/* ==================== RESET & BASE ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0770A5;
  --primary-dark: #055a84;
  --accent: #C4E58A;
  --accent-dark: #a6c96e;
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --success: #10b981;
  --error: #ef4444;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(4,34,58,0.18);
  --shadow-lg: 0 8px 32px rgba(4,34,58,0.28);
  --nav-height: 64px;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(145deg, #04223a 0%, #0770A5 55%, #056b6b 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }
main.has-nav { padding-top: var(--nav-height); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ==================== NAVIGATION ==================== */
.main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(4,34,58,0.25);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
}
.logo-text { font-weight: 700; font-size: 18px; color: var(--primary); letter-spacing: 1px; }
.logo-sub { font-size: 10px; color: var(--text-light); text-transform: uppercase; letter-spacing: 2px; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.nav-logout { color: var(--error) !important; }
.nav-logout:hover { background: var(--error) !important; color: #fff !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-google { background: #fff; color: #333; border: 1px solid var(--border); }
.btn-google:hover { background: #f8f8f8; }
.btn-facebook { background: #1877F2; color: #fff; }
.btn-facebook:hover { background: #1565c0; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
  background: #fff;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(7, 112, 165, 0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.form-check input[type="checkbox"] { width: auto; }
.char-count { color: var(--text-light); font-size: 12px; }
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 60px; }
.toggle-pw {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--primary); border-color: var(--primary); }

/* ==================== ALERTS ==================== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ==================== AUTH PAGES ==================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
}
.auth-card {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo h1 {
  font-size: 28px;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.auth-logo p { color: var(--text-light); font-size: 14px; }

.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-light);
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span { padding: 0 16px; }

.social-buttons { display: flex; flex-direction: column; gap: 12px; }
.auth-switch { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-light); }

/* ==================== CHECKOUT ==================== */
.checkout-card { max-width: 480px; }
.checkout-info { margin: 24px 0; }
.checkout-price { text-align: center; margin-bottom: 20px; }
.price-amount { font-size: 48px; font-weight: 700; color: var(--primary); }
.price-label { display: block; color: var(--text-light); font-size: 14px; margin-top: 4px; }
.checkout-perks { list-style: none; }
.checkout-perks li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  padding-left: 28px;
  position: relative;
}
.checkout-perks li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}
.checkout-note { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text-light); }

/* ==================== DASHBOARD ==================== */
.dashboard-page { max-width: 1200px; margin: 0 auto; padding: 32px 20px; }
.dashboard-hero {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 32px;
}
.dashboard-hero h1 { font-size: 28px; margin-bottom: 8px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.dashboard-hero p { color: rgba(255,255,255,.75); font-size: 16px; }
.dashboard-hero strong { color: #fff; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.dash-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h2 { font-size: 18px; }
.card-link { font-size: 14px; font-weight: 500; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
}
.action-tile:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.action-icon { font-size: 28px; margin-bottom: 8px; }
.action-tile span { font-size: 13px; font-weight: 500; text-align: center; }

.content-list { display: flex; flex-direction: column; gap: 12px; }
.content-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--text);
}
.content-item:hover { background: var(--bg); text-decoration: none; }
.content-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.content-info h3 { font-size: 14px; margin-bottom: 2px; }
.content-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: rgba(7, 112, 165, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}
.content-date { font-size: 12px; color: var(--text-light); margin-left: 8px; }

.member-list-small { display: flex; flex-direction: column; gap: 12px; }
.member-row { display: flex; align-items: center; gap: 12px; }
.member-avatar-sm {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.member-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.member-avatar-sm span { color: #fff; font-weight: 600; font-size: 16px; }
.member-row strong { font-size: 14px; display: block; }
.member-row small { font-size: 12px; color: var(--text-light); }

.empty-state { color: var(--text-light); font-size: 14px; text-align: center; padding: 20px 0; }

/* ==================== CONTENT PAGES ==================== */
.content-page { max-width: 1200px; margin: 0 auto; padding: 32px 20px; }
.page-header { text-align: center; margin-bottom: 32px; }
.page-header h1 { font-size: 28px; margin-bottom: 8px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.page-header p { color: rgba(255,255,255,.75); }
.page-header .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.page-header .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; border-color: #fff; }

.content-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  justify-content: center;
}
.filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  background: #fff;
  border: 1px solid var(--border);
  transition: all 0.2s;
  text-decoration: none;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.content-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
}
.content-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.content-card-img { height: 160px; background-size: cover; background-position: center; background-color: var(--bg); }
.content-card-placeholder { background: linear-gradient(135deg, var(--primary) 0%, #0aa5e0 100%); }
.content-card-body { padding: 16px; }
.content-card-body h3 { font-size: 16px; margin: 8px 0 12px; line-height: 1.4; }

.empty-state-lg { text-align: center; padding: 60px 20px; }
.empty-state-lg h2 { font-size: 22px; margin-bottom: 8px; color: var(--text); }
.empty-state-lg p { color: var(--text-light); }

.article-container { max-width: 720px; margin: 0 auto; }
.article-hero { height: 300px; background-size: cover; background-position: center; border-radius: var(--radius); margin-bottom: 32px; }
.article-body { background: #fff; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-body h1 { font-size: 28px; margin: 12px 0 8px; line-height: 1.3; }
.article-body time { color: var(--text-light); font-size: 14px; }
.article-content { margin-top: 24px; font-size: 16px; line-height: 1.8; }
.article-content p { margin-bottom: 16px; }
.article-content h2 { margin: 32px 0 16px; }
.article-content img { border-radius: 8px; margin: 16px 0; }

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.8);
}
.back-link:hover { color: #fff; text-decoration: none; }

/* ==================== DIRECTORY ==================== */
.directory-page { max-width: 1200px; margin: 0 auto; padding: 32px 20px; }
.search-bar {
  display: flex;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto 32px;
}
.search-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}
.search-bar input:focus { outline: none; border-color: var(--primary); }

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.member-card {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
}
.member-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.member-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-avatar span { color: #fff; font-weight: 700; font-size: 28px; }
.member-card h3 { font-size: 16px; margin-bottom: 4px; }
.member-location { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.member-bio-preview { font-size: 13px; color: var(--text-light); line-height: 1.4; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}
.page-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
  border: 1px solid var(--border);
}
.page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.page-info { font-size: 14px; color: var(--text-light); }

/* ==================== PROFILE ==================== */
.profile-page { max-width: 640px; margin: 0 auto; padding: 32px 20px; }
.profile-card {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.profile-card h1 { font-size: 24px; margin-bottom: 24px; }
.profile-avatar-section { text-align: center; margin-bottom: 24px; }
.member-avatar-lg {
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.member-avatar-lg span { color: #fff; font-weight: 700; font-size: 36px; }
.avatar-note { font-size: 12px; color: var(--text-light); }
.profile-bio { margin: 20px 0; font-size: 15px; line-height: 1.7; }
.member-since { font-size: 13px; color: var(--text-light); text-align: center; margin-top: 20px; }
.profile-meta { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-light); }
.profile-meta p { margin-bottom: 4px; }
.profile-view h1 { margin: 12px 0 4px; }

/* ==================== VOTING ==================== */
.voting-page { max-width: 1200px; margin: 0 auto; padding: 32px 20px; }
.text-muted { color: var(--text-light); }

/* Stats bar */
.v-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.v-stat {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.v-stat-num { display: block; font-size: 32px; font-weight: 700; color: var(--primary); }
.v-stat-label { font-size: 13px; color: var(--text-light); font-weight: 500; }

/* Actions */
.v-actions { display: flex; gap: 12px; margin-bottom: 24px; }

/* Filters */
.v-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.v-filter-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* Proposal cards */
.v-proposals { display: flex; flex-direction: column; gap: 16px; }
.v-proposal-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
  border-left: 4px solid transparent;
}
.v-proposal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.v-proposal-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.v-phase {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.v-phase-active { background: #d1fae5; color: #065f46; }
.v-phase-accepted { background: #d1fae5; color: #065f46; }
.v-phase-rejected { background: #fee2e2; color: #991b1b; }
.v-area-tag {
  font-size: 12px;
  color: var(--text-light);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 12px;
}
.v-proposal-title { font-size: 18px; margin-bottom: 8px; line-height: 1.3; }
.v-proposal-summary { font-size: 14px; color: var(--text-light); line-height: 1.5; margin-bottom: 12px; }
.v-proposal-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-light); }

/* Vote bar */
.v-vote-bar {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  background: var(--bg);
  margin-top: 12px;
}
.v-vote-bar-lg { height: 16px; border-radius: 8px; margin-top: 20px; }
.v-vote-yes { background: var(--success); transition: width 0.3s; }
.v-vote-no { background: var(--error); transition: width 0.3s; }
.v-vote-abstain { background: #9ca3af; transition: width 0.3s; }
.v-vote-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--text-light); }
.v-legend-yes::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-right: 4px; }
.v-legend-no::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--error); margin-right: 4px; }
.v-legend-abstain::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; margin-right: 4px; }

/* Empty state */
.v-empty { text-align: center; padding: 60px 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.v-empty-icon { font-size: 48px; margin-bottom: 16px; }
.v-empty h2 { font-size: 22px; margin-bottom: 8px; }
.v-empty p { color: var(--text-light); margin-bottom: 24px; }

/* Delegation banner */
.v-delegation-banner {
  margin-top: 32px;
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.v-delegation-banner h3 { font-size: 14px; font-weight: 600; white-space: nowrap; }
.v-delegation-list-small { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.v-delegation-chip {
  padding: 4px 12px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* ── Proposal Detail ── */
.v-detail { max-width: 800px; margin: 0 auto; }
.v-detail-header { background: #fff; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); margin-bottom: 24px; }
.v-detail-badges { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.v-detail-header h1 { font-size: 28px; line-height: 1.3; margin-bottom: 12px; }
.v-detail-meta { display: flex; gap: 20px; font-size: 14px; color: var(--text-light); flex-wrap: wrap; }

/* Timeline */
.v-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.v-timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
}
.v-timeline-step.v-timeline-done { color: var(--primary); }
.v-timeline-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--border);
}
.v-timeline-done .v-timeline-dot { background: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.v-timeline-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  min-width: 40px;
}
.v-timeline-bar.v-timeline-done { background: var(--primary); }

/* Time notice */
.v-time-notice {
  background: #dbeafe;
  color: #1e40af;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  text-align: center;
  margin-bottom: 24px;
}
.v-time-urgent { background: #fef3c7; color: #92400e; }

/* Detail body */
.v-detail-body {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.v-detail-body h2 { font-size: 18px; margin-bottom: 12px; color: var(--primary); }
.v-detail-body h2 + h2 { margin-top: 24px; }
.v-summary-text { font-size: 16px; line-height: 1.7; margin-bottom: 8px; }
.v-body-text { font-size: 15px; line-height: 1.7; color: var(--text-light); }

/* Voting section */
.v-voting-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  text-align: center;
}
.v-voting-section h2 { font-size: 20px; margin-bottom: 16px; }
.v-voted-notice { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.v-voted-yes { color: var(--success); }
.v-voted-no { color: var(--error); }
.v-voted-abstain { color: #6b7280; }
.v-vote-form { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.v-vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 32px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  min-width: 120px;
}
.v-vote-icon { font-size: 28px; }
.v-vote-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.v-vote-btn-yes:hover, .v-vote-btn-yes.v-vote-active { border-color: var(--success); background: #f0fdf4; color: var(--success); }
.v-vote-btn-no:hover, .v-vote-btn-no.v-vote-active { border-color: var(--error); background: #fef2f2; color: var(--error); }
.v-vote-btn-abstain:hover, .v-vote-btn-abstain.v-vote-active { border-color: #9ca3af; background: #f9fafb; color: #6b7280; }

/* Results */
.v-results-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.v-results-section h2 { font-size: 20px; margin-bottom: 20px; text-align: center; }
.v-results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.v-result-card { text-align: center; padding: 20px; border-radius: var(--radius); }
.v-result-yes { background: #f0fdf4; }
.v-result-no { background: #fef2f2; }
.v-result-abstain { background: #f9fafb; }
.v-result-num { font-size: 32px; font-weight: 700; }
.v-result-yes .v-result-num { color: var(--success); }
.v-result-no .v-result-num { color: var(--error); }
.v-result-abstain .v-result-num { color: #6b7280; }
.v-result-label { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 4px; }
.v-result-pct { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.v-total-votes { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-light); }
.v-vote-hint { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }

/* Close section */
.v-close-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border-left: 4px solid var(--error);
}
.v-close-section h3 { font-size: 16px; margin-bottom: 6px; }
.v-close-section p { font-size: 14px; color: var(--text-light); margin-bottom: 12px; }
.v-close-btn { color: var(--error) !important; border-color: var(--error) !important; }
.v-close-btn:hover { background: var(--error) !important; color: #fff !important; }

/* Comments */
.v-comments {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.v-comments h2 { font-size: 20px; margin-bottom: 20px; }
.v-comment-form { margin-bottom: 24px; }
.v-comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
}
.v-comment-form textarea:focus { outline: none; border-color: var(--primary); }
.v-no-comments { color: var(--text-light); text-align: center; padding: 20px; }
.v-comment-list { display: flex; flex-direction: column; gap: 16px; }
.v-comment {
  padding: 16px;
  border-radius: 8px;
  background: var(--bg);
}
.v-comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}
.v-comment-header strong { color: var(--text); }
.v-comment-header span { color: var(--text-light); }
.v-comment p { font-size: 14px; line-height: 1.6; }

/* ── New Proposal Form ── */
.v-form-card {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.v-form-card h1 { font-size: 24px; margin-bottom: 8px; }
.v-form-intro { color: var(--text-light); font-size: 14px; margin-bottom: 28px; }
.form-help { font-size: 12px; color: var(--text-light); margin-top: 6px; }

/* ── Landing Page & Councils ── */
.v-community-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0aa5e0 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.v-community-hero h2 { font-size: 24px; margin-bottom: 8px; }
.v-community-hero p { opacity: 0.9; font-size: 15px; line-height: 1.6; max-width: 600px; }
.v-community-hero .btn { background: #fff; color: var(--primary); font-weight: 700; white-space: nowrap; }
.v-community-hero .btn:hover { background: var(--accent); color: var(--text); }
.v-community-stats { display: flex; gap: 24px; margin-top: 12px; font-size: 14px; opacity: 0.9; }

.v-section { margin-bottom: 40px; }
.v-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.v-section-header h2 { font-size: 22px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* All outline buttons on blue backgrounds (voting, discussions, events, enrich) */
.voting-page .btn-outline,
.disc-page .btn-outline,
.events-page .btn-outline,
.enrich-page .btn-outline,
.content-page .btn-outline,
.v-actions .btn-outline,
.v-section-header .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.voting-page .btn-outline:hover,
.disc-page .btn-outline:hover,
.events-page .btn-outline:hover,
.enrich-page .btn-outline:hover,
.content-page .btn-outline:hover,
.v-actions .btn-outline:hover,
.v-section-header .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; border-color: #fff; }

/* Restore dark styling inside white cards */
.v-council-header .btn-outline,
.v-detail-header .btn-outline,
.v-voting-section .btn-outline,
.v-results-section .btn-outline,
.v-detail-body .btn-outline,
.v-comments .btn-outline,
.v-form-card .btn-outline,
.v-deleg-card .btn-outline,
.v-delegation-banner .btn-outline,
.v-empty .btn-outline,
.disc-card .btn-outline,
.disc-sidebar-card .btn-outline,
.dash-card .btn-outline { color: var(--primary); border-color: var(--primary); }
.v-council-header .btn-outline:hover,
.v-detail-header .btn-outline:hover,
.v-voting-section .btn-outline:hover,
.v-results-section .btn-outline:hover,
.v-detail-body .btn-outline:hover,
.v-comments .btn-outline:hover,
.v-form-card .btn-outline:hover,
.v-deleg-card .btn-outline:hover,
.v-delegation-banner .btn-outline:hover,
.v-empty .btn-outline:hover,
.disc-card .btn-outline:hover,
.disc-sidebar-card .btn-outline:hover,
.dash-card .btn-outline:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.v-council-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.v-council-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
  position: relative;
}
a.v-council-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.v-council-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(7,112,165,0.1);
  color: var(--primary);
  margin-bottom: 8px;
}
.v-council-card h3 { font-size: 18px; margin-bottom: 4px; }
.v-council-location { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.v-council-desc { font-size: 14px; color: var(--text-light); line-height: 1.5; margin-bottom: 12px; }
.v-council-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-light); }

/* Council dashboard header */
.v-council-header {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.v-council-header h1 { font-size: 28px; margin-bottom: 4px; }
.v-council-location-lg { font-size: 15px; color: var(--text-light); margin-bottom: 8px; }
.v-council-desc-lg { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 12px; max-width: 600px; }
.v-council-meta-lg { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--text-light); }
.v-council-header-actions { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }

.v-role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.v-role-admin { background: #fef3c7; color: #92400e; }
.v-role-moderator { background: #dbeafe; color: #1e40af; }
.v-role-member { background: #f3f4f6; color: #6b7280; }

/* Members section */
.v-members-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}
.v-members-section h2 { font-size: 18px; margin-bottom: 16px; }
.v-members-list { display: flex; flex-wrap: wrap; gap: 8px; }
.v-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 13px;
}

/* Ideas from councils */
.v-council-ideas { margin-top: 40px; }
.v-council-ideas h2 { font-size: 20px; margin-bottom: 4px; }
.v-council-ideas > .text-muted { margin-bottom: 16px; }
.v-ideas-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 12px; }
.v-idea-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent);
}
.v-idea-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; }
.v-idea-council { color: var(--text-light); }
.v-idea-card h3 { font-size: 15px; margin-bottom: 6px; }
.v-idea-card p { font-size: 13px; color: var(--text-light); line-height: 1.5; margin-bottom: 8px; }
.v-idea-link { font-size: 13px; font-weight: 600; }

/* How it works */
.v-how-it-works {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-top: 40px;
}
.v-how-it-works h2 { font-size: 20px; margin-bottom: 8px; text-align: center; }

/* ── Delegations ── */
.v-deleg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.v-deleg-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.v-deleg-card h2 { font-size: 18px; margin-bottom: 16px; color: var(--primary); }
.v-deleg-desc { font-size: 14px; color: var(--text-light); margin-bottom: 12px; }
.v-deleg-list { display: flex; flex-direction: column; gap: 12px; }
.v-deleg-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
}
.v-deleg-info strong { display: block; font-size: 14px; }
.v-deleg-scope { font-size: 12px; color: var(--text-light); }
.v-deleg-remove {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--error);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.v-deleg-remove:hover { background: #fef2f2; }
.v-deleg-info-card { grid-column: 1 / -1; }
.v-deleg-explainer { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-top: 8px; }
.v-deleg-step { text-align: center; }
.v-deleg-step-icon { font-size: 32px; margin-bottom: 8px; }
.v-deleg-step h3 { font-size: 15px; margin-bottom: 4px; }
.v-deleg-step p { font-size: 13px; color: var(--text-light); line-height: 1.5; }

/* ==================== FOOTER ==================== */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 20px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-light);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 2px solid var(--primary);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; }

  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .profile-card { padding: 28px 20px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
  .search-bar { flex-direction: column; }

  .dashboard-hero h1 { font-size: 22px; }
  .content-grid { grid-template-columns: 1fr; }
  .member-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .v-stats { grid-template-columns: repeat(2, 1fr); }
  .v-actions { flex-direction: column; }
  .v-vote-form { flex-direction: column; align-items: center; }
  .v-vote-btn { width: 100%; max-width: 280px; }
  .v-results-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .v-result-card { padding: 12px; }
  .v-result-num { font-size: 24px; }
  .v-detail-header { padding: 24px; }
  .v-detail-header h1 { font-size: 22px; }
  .v-community-hero { padding: 24px; flex-direction: column; text-align: center; }
  .v-community-hero .btn { width: 100%; }
  .v-community-stats { justify-content: center; }
  .v-council-grid { grid-template-columns: 1fr; }
  .v-council-header { flex-direction: column; }
  .v-council-header-actions { width: 100%; }
  .v-council-header-actions .btn { flex: 1; }
  .v-ideas-list { grid-template-columns: 1fr; }
  .v-deleg-grid { grid-template-columns: 1fr; }
  .v-deleg-explainer { grid-template-columns: repeat(2, 1fr); }
  .v-form-card { padding: 24px; }
  .v-timeline-step span { font-size: 10px; }
}

/* ═══════════════════════════════════════════
   DISCUSSIONS (Reddit-style Forum)
   ═══════════════════════════════════════════ */

.disc-page { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }

/* Top Bar */
.disc-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.disc-top-bar h1 { font-size: 1.8rem; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.25); margin: 0; }
.disc-top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.disc-top-actions .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.disc-top-actions .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; border-color: #fff; }

/* Sort Bar */
.disc-sort-bar { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg-card); border-radius: 8px; padding: 4px; border: 1px solid var(--border); }
.disc-sort-btn { padding: 8px 16px; border-radius: 6px; text-decoration: none; color: var(--text-light); font-size: 0.85rem; font-weight: 500; transition: all 0.2s; }
.disc-sort-btn:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.disc-sort-btn.active { background: var(--primary); color: #fff; }

/* Layout */
.disc-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }

/* Feed */
.disc-feed { display: flex; flex-direction: column; gap: 12px; }

/* Discussion Card */
.disc-card { display: flex; gap: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: border-color 0.2s; }
.disc-card:hover { border-color: var(--primary); }
.disc-card.disc-pinned { border-left: 3px solid var(--accent); }

/* Vote Column */
.disc-vote-col { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; background: rgba(0,0,0,0.02); min-width: 48px; }
.disc-vote-btn { background: none; border: none; cursor: pointer; font-size: 0.9rem; color: var(--text-light); padding: 4px; border-radius: 4px; transition: all 0.2s; line-height: 1; }
.disc-vote-btn:hover { background: rgba(0,0,0,0.08); color: var(--primary); }
.disc-vote-btn.disc-voted { color: var(--primary); font-weight: 700; }
.disc-vote-btn.disc-vote-down.disc-voted { color: var(--error); }
.disc-score { font-size: 0.85rem; font-weight: 700; color: var(--text); }

/* Card Body */
.disc-card-body { flex: 1; padding: 12px 16px; min-width: 0; }
.disc-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-light); margin-bottom: 6px; }
.disc-category-tag { background: rgba(59,130,246,0.1); color: var(--primary); padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; }
.disc-pin-badge { background: rgba(245,158,11,0.15); color: #b45309; padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; }
.disc-author { color: var(--text-light); }
.disc-author strong { color: var(--text); }
.disc-time { color: var(--text-muted); }

.disc-card-title { display: block; font-size: 1.1rem; font-weight: 600; color: var(--text); text-decoration: none; margin-bottom: 6px; line-height: 1.3; }
.disc-card-title:hover { color: var(--primary); }

.disc-card-media { margin: 8px 0; border-radius: 8px; overflow: hidden; max-height: 300px; }
.disc-card-media img { width: 100%; max-height: 300px; object-fit: cover; }

.disc-card-preview { font-size: 0.85rem; color: var(--text-light); line-height: 1.5; margin-bottom: 8px; }

.disc-card-actions { display: flex; gap: 12px; }
.disc-action-btn { font-size: 0.8rem; color: var(--text-light); text-decoration: none; font-weight: 500; padding: 4px 8px; border-radius: 4px; transition: background 0.2s; }
.disc-action-btn:hover { background: rgba(0,0,0,0.05); color: var(--text); }

/* Sidebar */
.disc-sidebar { display: flex; flex-direction: column; gap: 16px; }
.disc-sidebar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.disc-sidebar-card h3 { font-size: 0.9rem; font-weight: 700; color: var(--text); margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.5px; }

.disc-cat-list { list-style: none; padding: 0; margin: 0; }
.disc-cat-list li { margin-bottom: 2px; }
.disc-cat-list a { display: block; padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--text-light); font-size: 0.85rem; transition: all 0.2s; }
.disc-cat-list a:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.disc-cat-list a.active { background: var(--primary); color: #fff; }

.disc-guidelines { list-style: none; padding: 0; margin: 0; }
.disc-guidelines li { padding: 6px 0; font-size: 0.8rem; color: var(--text-light); border-bottom: 1px solid var(--border); }
.disc-guidelines li:last-child { border: none; }
.disc-guidelines li::before { content: '• '; color: var(--primary); font-weight: 700; }

/* Empty State */
.disc-empty { text-align: center; padding: 60px 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
.disc-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.disc-empty h2 { font-size: 1.3rem; color: var(--text); margin-bottom: 8px; }
.disc-empty p { color: var(--text-light); margin-bottom: 20px; }

/* ── New Post Form ── */
.disc-form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 32px; max-width: 700px; }
.disc-form-intro { color: var(--text-light); margin-bottom: 24px; }

.disc-upload-area { position: relative; border: 2px dashed var(--border); border-radius: 8px; padding: 24px; text-align: center; transition: border-color 0.2s; cursor: pointer; }
.disc-upload-area:hover { border-color: var(--primary); }
.disc-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.disc-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-light); }
.disc-upload-icon { font-size: 2rem; }
.disc-upload-hint { font-size: 0.75rem; color: var(--text-muted); }
.disc-video-badge { background: rgba(0,0,0,0.05); padding: 12px 20px; border-radius: 8px; font-size: 0.9rem; color: var(--text); }

/* ── Discussion Detail ── */
.disc-detail { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 28px; margin-bottom: 24px; }
.disc-detail-header { margin-bottom: 20px; }
.disc-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--text-light); margin-bottom: 10px; }
.disc-detail h1 { font-size: 1.6rem; color: var(--text); margin: 0; line-height: 1.3; }

.disc-detail-media { margin: 16px 0; }
.disc-detail-media img { max-width: 100%; border-radius: 8px; }

.disc-detail-body { font-size: 0.95rem; color: var(--text); line-height: 1.7; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }

.disc-detail-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.disc-vote-row { display: flex; align-items: center; gap: 8px; }
.disc-action-vote { background: none; border: 1px solid var(--border); cursor: pointer; padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; color: var(--text-light); transition: all 0.2s; }
.disc-action-vote:hover { border-color: var(--primary); color: var(--primary); background: rgba(59,130,246,0.05); }
.disc-action-vote.disc-voted { border-color: var(--primary); color: var(--primary); background: rgba(59,130,246,0.1); font-weight: 600; }
.disc-action-vote.disc-action-vote-down.disc-voted { border-color: var(--error); color: var(--error); background: rgba(239,68,68,0.1); }
.disc-comment-count { font-size: 0.85rem; color: var(--text-light); }
.disc-delete-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 0.8rem; padding: 6px 10px; border-radius: 4px; transition: all 0.2s; }
.disc-delete-btn:hover { color: var(--error); background: rgba(239,68,68,0.08); }

/* ── Comments ── */
.disc-comments { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.disc-comments h2 { font-size: 1.2rem; color: var(--text); margin: 0 0 20px; }

.disc-comment-form { margin-bottom: 24px; }
.disc-comment-form textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 0.9rem; resize: vertical; margin-bottom: 8px; }
.disc-comment-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

.disc-no-comments { text-align: center; padding: 24px; color: var(--text-muted); font-style: italic; }

.disc-comment-list { display: flex; flex-direction: column; gap: 0; }
.disc-comment { padding: 12px 0; border-top: 1px solid var(--border); }
.disc-comment:first-child { border-top: none; }

.disc-comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 0.8rem; }
.disc-comment-header strong { color: var(--text); }

.disc-comment-body { font-size: 0.9rem; color: var(--text); line-height: 1.6; margin-bottom: 8px; }

.disc-comment-actions { display: flex; align-items: center; gap: 6px; }
.disc-comment-vote { background: none; border: none; cursor: pointer; font-size: 0.75rem; color: var(--text-light); padding: 2px 6px; border-radius: 4px; transition: all 0.2s; }
.disc-comment-vote:hover { background: rgba(0,0,0,0.05); }
.disc-comment-vote.disc-voted { color: var(--primary); font-weight: 600; }
.disc-reply-toggle { background: none; border: none; cursor: pointer; font-size: 0.75rem; color: var(--text-light); padding: 2px 6px; border-radius: 4px; transition: all 0.2s; }
.disc-reply-toggle:hover { background: rgba(0,0,0,0.05); color: var(--text); }

.disc-reply-form { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--primary); }
.disc-reply-form textarea { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 0.85rem; resize: vertical; margin-bottom: 6px; }
.disc-reply-form textarea:focus { outline: none; border-color: var(--primary); }
.btn-sm { padding: 6px 16px; font-size: 0.8rem; }

/* ── Discussion Top Actions ── */
.disc-top-actions { display: flex; gap: 8px; align-items: center; }

/* ── Discussion Group Badge ── */
.disc-group-badge { background: rgba(139,92,246,0.12); color: #7c3aed; padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; text-decoration: none; }
.disc-group-badge:hover { background: rgba(139,92,246,0.2); text-decoration: none; }

/* ── Discussion Detail Right Actions ── */
.disc-detail-right-actions { display: flex; gap: 8px; align-items: center; }

/* ── Discussion Group List (sidebar) ── */
.disc-group-list { list-style: none; padding: 0; margin: 0; }
.disc-group-list li { margin-bottom: 2px; }
.disc-group-link { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: 0.85rem; transition: all 0.2s; }
.disc-group-link:hover { background: rgba(0,0,0,0.05); text-decoration: none; }
.disc-group-name { font-weight: 500; }
.disc-group-count { font-size: 0.72rem; color: var(--text-light); }
.disc-sidebar-more { display: block; text-align: center; font-size: 0.8rem; color: var(--primary); margin-top: 10px; padding: 6px; border-radius: 6px; }
.disc-sidebar-more:hover { background: rgba(7,112,165,0.08); text-decoration: none; }

/* ── Discussion Groups Page ── */
.dg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.dg-card { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-decoration: none; color: inherit; transition: border-color 0.2s, box-shadow 0.2s; }
.dg-card:hover { border-color: var(--primary); box-shadow: var(--shadow); text-decoration: none; }
.dg-card-icon { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; flex-shrink: 0; }
.dg-card-body { flex: 1; min-width: 0; }
.dg-card-name { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.dg-card-desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.4; margin: 0 0 8px; }
.dg-card-meta { display: flex; gap: 12px; font-size: 0.75rem; color: var(--text-light); }
.dg-member-badge { background: var(--success); color: #fff; padding: 1px 6px; border-radius: 6px; font-size: 0.68rem; font-weight: 600; }

/* ── Discussion Group Header ── */
.dg-header { display: flex; gap: 20px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.dg-header-icon { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; flex-shrink: 0; }
.dg-header-info { flex: 1; min-width: 0; }
.dg-header-info h1 { font-size: 1.5rem; margin: 0 0 6px; }
.dg-header-desc { font-size: 0.9rem; color: var(--text-light); margin: 0 0 8px; }
.dg-header-meta { display: flex; gap: 16px; font-size: 0.82rem; color: var(--text-light); }
.dg-header-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ==================== EVENTS ==================== */
.events-page { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }

.events-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.events-top-bar h1 { font-size: 1.8rem; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.25); margin: 0; }
.events-top-bar .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.events-top-bar .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; border-color: #fff; }

.events-filter-bar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.events-filter-form { width: 100%; }
.events-filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.events-filter-field { flex: 1; min-width: 140px; }
.events-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.85rem; font-family: inherit; background: #fff; }
.events-input:focus { outline: none; border-color: var(--primary); }

.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.event-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s; }
.event-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }

.event-card-img { height: 160px; background-size: cover; background-position: center; background-color: var(--primary); }
.event-card-img-default { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), #7c3aed); }
.event-card-date-big { text-align: center; color: #fff; }
.event-month { display: block; font-size: 0.85rem; font-weight: 600; letter-spacing: 1px; }
.event-day { display: block; font-size: 2.5rem; font-weight: 700; line-height: 1; }

.event-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.event-card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.event-type-badge { background: rgba(59,130,246,0.1); color: var(--primary); padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; text-transform: capitalize; }
.event-council-badge { background: rgba(139,92,246,0.12); color: #7c3aed; padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; }

.event-card-title { font-size: 1.05rem; font-weight: 600; color: var(--text); margin: 0 0 10px; line-height: 1.3; }
.event-card-info { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: var(--text-light); margin-bottom: 12px; flex: 1; }
.event-card-date, .event-card-location { display: flex; align-items: center; gap: 4px; }

.event-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: var(--text-light); border-top: 1px solid var(--border); padding-top: 10px; }
.event-rsvp-count { font-weight: 600; color: var(--primary); }

/* ── Event Detail ── */
.event-detail { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.event-detail-image { margin: -28px -28px 20px; max-height: 360px; overflow: hidden; }
.event-detail-image img { width: 100%; max-height: 360px; object-fit: cover; }

.event-detail-header { margin-bottom: 20px; }
.event-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 0.82rem; }
.event-detail-header h1 { font-size: 1.6rem; margin: 0; }
.event-disc-link { font-size: 0.78rem; color: var(--primary); }

.event-detail-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; padding: 16px; background: var(--bg); border-radius: 8px; }
.event-info-item { display: flex; gap: 10px; font-size: 0.88rem; }
.event-info-icon { font-size: 1.3rem; flex-shrink: 0; }
.event-info-item strong { color: var(--text); }

.event-detail-body { font-size: 0.95rem; line-height: 1.7; color: var(--text); margin-bottom: 20px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.event-detail-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.event-rsvp-btn { font-size: 0.9rem; }
.event-rsvp-btn.event-rsvp-going { background: var(--success); color: #fff; border-color: var(--success); }
.event-rsvp-btn.event-rsvp-going:hover { background: #059669; }

/* ── Event RSVP List ── */
.event-rsvps { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.event-rsvps h2 { font-size: 1.1rem; margin: 0 0 16px; }
.event-no-rsvps { color: var(--text-light); font-size: 0.9rem; }
.event-rsvp-list { display: flex; flex-wrap: wrap; gap: 12px; }
.event-rsvp-item { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 8px; padding: 8px 14px; }
.event-rsvp-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
.event-rsvp-name { font-size: 0.85rem; font-weight: 500; }
.event-rsvp-status { font-size: 0.72rem; color: var(--success); font-weight: 600; text-transform: capitalize; }

/* ── Event Empty State ── */
.events-empty { grid-column: 1 / -1; text-align: center; padding: 60px 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.events-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.events-empty h2 { font-size: 1.3rem; color: var(--text); margin-bottom: 8px; }
.events-empty p { color: var(--text-light); margin-bottom: 20px; }

/* ── Event Form ── */
.events-form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 700px; }
.events-form-intro { color: var(--text-light); font-size: 0.9rem; margin-bottom: 24px; }
.events-linked-info { background: rgba(7,112,165,0.08); border: 1px solid rgba(7,112,165,0.2); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 0.88rem; color: var(--primary); }

.form-row { display: flex; gap: 16px; }
.form-half { flex: 1; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: auto; }

/* ── Alert styles ── */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-success { background: #d4f5e2; color: #059669; }
.alert-error { background: #fee2e2; color: #dc2626; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .disc-layout { grid-template-columns: 1fr; }
  .disc-sidebar { order: -1; }
  .disc-sidebar-card { display: none; }
  .disc-sidebar-card:first-child { display: block; }
  .disc-top-bar { flex-wrap: wrap; gap: 10px; }
  .disc-top-bar h1 { font-size: 1.4rem; }
  .disc-top-actions { flex-wrap: wrap; }
  .disc-detail { padding: 16px; }
  .disc-comments { padding: 16px; }
  .disc-form-card { padding: 20px; }
  .disc-detail-actions { flex-direction: column; align-items: flex-start; }
  .disc-detail-right-actions { margin-top: 8px; }

  .events-grid { grid-template-columns: 1fr; }
  .events-filter-row { flex-direction: column; }
  .events-filter-field { min-width: 100%; }
  .events-form-card { padding: 20px; }
  .event-detail { padding: 16px; }
  .event-detail-image { margin: -16px -16px 16px; }
  .event-detail-info-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }

  .dg-grid { grid-template-columns: 1fr; }
  .dg-header { flex-direction: column; }
  .dg-header-actions { width: 100%; }
  .dg-header-actions .btn { flex: 1; text-align: center; }
}
