/* ── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080810;
  --surface: #0f0f1a;
  --card: #16162a;
  --card-hover: #1c1c33;
  --border: #1e1e38;
  --border-light: #28284a;
  --accent: #6b5cf7;
  --accent-dim: #3d3590;
  --accent-glow: rgba(107, 92, 247, 0.14);
  --green: #00c896;
  --green-dim: rgba(0, 200, 150, 0.1);
  --red: #ff4f63;
  --red-dim: rgba(255, 79, 99, 0.1);
  --gold: #f5c842;
  --gold-dim: rgba(245, 200, 66, 0.1);
  --blue: #3d9fff;
  --blue-dim: rgba(61, 159, 255, 0.1);
  --ocean: #0ea5e9;
  --ocean-dim: rgba(14, 165, 233, 0.1);
  --text: #d8d6f2;
  --text-2: #8e8cb0;
  --text-3: #4e4c6a;
  --radius: 12px;
  --radius-sm: 7px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --nova: #f5c842;
}

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

/* ── Layout ─────────────────────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; height: 100vh; }
#topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px; height: 54px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; flex-shrink: 0;
}
#layout { display: flex; flex: 1; overflow: hidden; }
#sidenav {
  width: 196px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 12px 10px; gap: 2px; overflow-y: auto;
}
#content-area { flex: 1; overflow-y: auto; padding: 28px 32px; }

/* ── Top Bar ─────────────────────────────────────────────────────────────── */
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { color: var(--ocean); font-size: 18px; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -0.5px; color: #fff; }
.brand-tag { font-size: 11px; color: var(--text-3); padding: 2px 8px; background: var(--card); border-radius: 20px; border: 1px solid var(--border); white-space: nowrap; }

.topbar-center { flex: 1; display: flex; justify-content: center; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.user-switch-wrap { display: flex; align-items: center; gap: 8px; }
.user-switch-label { font-size: 12px; color: var(--text-3); white-space: nowrap; }
#user-switcher {
  background: var(--card); border: 1px solid var(--border-light); color: var(--text);
  border-radius: var(--radius-sm); padding: 6px 10px; font-size: 13px; cursor: pointer; outline: none;
}
#user-switcher:focus { border-color: var(--accent); }

.wallet-chip {
  display: flex; align-items: center; gap: 5px;
  background: var(--card); border: 1px solid var(--border-light);
  border-radius: 20px; padding: 5px 12px; font-size: 13px;
}
.wallet-chip .w-ico { color: var(--nova); font-size: 12px; }
#balance-display { font-weight: 700; font-variant-numeric: tabular-nums; }
.wallet-unit { color: var(--text-3); font-size: 11px; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 12px;
  background: none; border: none; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: left; transition: all 0.15s; position: relative;
}
.nav-btn:hover { background: var(--card); color: var(--text); }
.nav-btn.active { background: var(--accent-glow); color: var(--accent); }
.nav-ico { font-size: 15px; width: 20px; text-align: center; color: var(--text-3); flex-shrink: 0; }
.nav-btn.active .nav-ico { color: var(--accent); }
.nav-divider { height: 1px; background: var(--border); margin: 6px 0; }

.nav-badge {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--accent); color: #fff; border-radius: 20px;
  font-size: 10px; font-weight: 700; padding: 1px 6px; min-width: 18px; text-align: center;
}
.nav-badge.hidden { display: none; }
.nav-spacer { flex: 1; min-height: 12px; }

.sim-tick-btn {
  width: 100%; padding: 9px 12px;
  background: var(--green-dim); border: 1px solid rgba(0,200,150,0.2);
  border-radius: var(--radius-sm); color: var(--green); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 6px;
}
.sim-tick-btn:hover { background: rgba(0,200,150,0.18); }
.sim-tick-btn:active { transform: scale(0.98); }
.sim-note { font-size: 10px; color: var(--text-3); text-align: center; padding: 4px 0 0; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn { padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #7d70f8; }
.btn-primary:disabled { background: var(--accent-dim); cursor: not-allowed; opacity: 0.6; }
.btn-ghost { background: var(--card); border: 1px solid var(--border-light); color: var(--text); }
.btn-ghost:hover { background: var(--card-hover); }
.btn-success { background: var(--green-dim); border: 1px solid rgba(0,200,150,0.25); color: var(--green); }
.btn-success:hover { background: rgba(0,200,150,0.18); }
.btn-danger { background: var(--red-dim); border: 1px solid rgba(255,79,99,0.25); color: var(--red); }
.btn-danger:hover { background: rgba(255,79,99,0.18); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; transition: border-color 0.15s;
}
.card:hover { border-color: var(--border-light); }

.section-title { font-size: 18px; font-weight: 800; margin-bottom: 5px; letter-spacing: -0.4px; }
.section-sub { font-size: 13px; color: var(--text-2); margin-bottom: 22px; }

/* ── Tags ────────────────────────────────────────────────────────────────── */
.tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.tag-text { background: var(--blue-dim); color: var(--blue); }
.tag-image { background: rgba(245,150,50,0.12); color: #f59632; }
.tag-audio { background: var(--green-dim); color: var(--green); }
.tag-video { background: var(--red-dim); color: var(--red); }

.cat-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.cat-food { background: rgba(245,150,50,0.12); color: #f59632; border-color: rgba(245,150,50,0.2); }
.cat-arts { background: rgba(168,85,247,0.12); color: #a855f7; border-color: rgba(168,85,247,0.2); }
.cat-business { background: var(--blue-dim); color: var(--blue); border-color: rgba(61,159,255,0.2); }
.cat-sport { background: var(--green-dim); color: var(--green); border-color: rgba(0,200,150,0.2); }
.cat-music { background: rgba(236,72,153,0.12); color: #ec4899; border-color: rgba(236,72,153,0.2); }
.cat-community { background: rgba(20,184,166,0.12); color: #14b8a6; border-color: rgba(20,184,166,0.2); }
.cat-coast { background: var(--ocean-dim); color: var(--ocean); border-color: rgba(14,165,233,0.2); }

.hood-tag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 20px; font-size: 10px; font-weight: 600; background: rgba(255,255,255,0.06); color: var(--text-3); border: 1px solid var(--border); }

.status-badge { padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status-pending { background: var(--gold-dim); color: var(--gold); }
.status-active { background: var(--green-dim); color: var(--green); }
.status-completed { background: var(--blue-dim); color: var(--blue); }
.status-rejected { background: var(--red-dim); color: var(--red); }
.status-cancelled { background: rgba(100,100,120,0.15); color: var(--text-3); }

.meta { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta-dot::before { content: '·'; }

/* ── City Dashboard ──────────────────────────────────────────────────────── */
.city-hero {
  background: linear-gradient(135deg, #0d0d20 0%, #0a1628 50%, #080d18 100%);
  border: 1px solid rgba(14,165,233,0.2); border-radius: var(--radius);
  padding: 28px 32px; margin-bottom: 24px; position: relative; overflow: hidden;
}
.city-hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,233,0.12) 0%, transparent 70%);
}
.city-hero-title { font-size: 28px; font-weight: 900; letter-spacing: -0.8px; color: #fff; margin-bottom: 4px; }
.city-hero-sub { font-size: 14px; color: rgba(255,255,255,0.5); max-width: 480px; line-height: 1.6; }
.city-rising-score {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
}
.rising-label { font-size: 12px; color: var(--ocean); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.rising-bar-track { height: 6px; background: rgba(14,165,233,0.15); border-radius: 4px; flex: 1; max-width: 200px; }
.rising-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--ocean), #38bdf8); transition: width 1s ease; }
.rising-pct { font-size: 13px; font-weight: 700; color: var(--ocean); }

.city-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.city-stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.city-stat-val { font-size: 26px; font-weight: 800; letter-spacing: -0.8px; color: #fff; margin-bottom: 2px; }
.city-stat-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; }
.city-stat-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }

.city-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.city-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.city-panel-title { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }

/* Category bars */
.cat-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cat-bar-label { font-size: 12px; color: var(--text-2); width: 120px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-bar-track { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 3px; }
.cat-bar-val { font-size: 11px; color: var(--text-3); width: 32px; text-align: right; flex-shrink: 0; }

/* Leaderboard */
.lb-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-size: 13px; font-weight: 800; color: var(--text-3); width: 18px; text-align: center; flex-shrink: 0; }
.lb-rank.gold { color: var(--gold); }
.lb-rank.silver { color: #9ca3af; }
.lb-rank.bronze { color: #b45309; }
.lb-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.lb-name { flex: 1; font-size: 13px; font-weight: 600; }
.lb-handle { font-size: 11px; color: var(--text-3); }
.lb-val { font-size: 13px; font-weight: 700; text-align: right; flex-shrink: 0; }

/* City Goals */
.goals-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.goal-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.goal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.goal-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.goal-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.goal-bounty { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.goal-bounty-val { font-size: 16px; font-weight: 800; color: var(--nova); }
.goal-bounty-label { font-size: 10px; color: var(--text-3); }
.goal-progress { margin-top: 10px; }
.goal-progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-bottom: 5px; }
.goal-bar { height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.goal-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #a78bf8); transition: width 0.8s ease; }

/* Recent content mini cards */
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.recent-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; cursor: pointer; transition: all 0.15s;
}
.recent-card:hover { border-color: var(--border-light); background: var(--card-hover); }

/* ── Feed ────────────────────────────────────────────────────────────────── */
.feed-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.feed-wrap { display: flex; flex-direction: column; gap: 14px; }

.content-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: border-color 0.15s;
}
.content-card:hover { border-color: var(--border-light); }
.content-card.placement { border-color: rgba(245,200,66,0.3); }
.content-card.placement:hover { border-color: rgba(245,200,66,0.5); }

.card-topbar { display: flex; align-items: center; gap: 9px; padding: 12px 16px 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-glow); border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.author-info { flex: 1; min-width: 0; }
.author-name { font-size: 13px; font-weight: 700; }
.author-handle { font-size: 11px; color: var(--text-3); }
.card-tags { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }

.placement-tag {
  font-size: 10px; font-weight: 700; color: var(--nova);
  background: var(--gold-dim); border: 1px solid rgba(245,200,66,0.2);
  border-radius: 20px; padding: 2px 8px;
}
.card-body { padding: 12px 16px 14px; }
.content-title { font-size: 15px; font-weight: 700; line-height: 1.35; margin-bottom: 7px; }
.content-excerpt { font-size: 13px; color: var(--text-2); line-height: 1.6; }

.img-placeholder { background: linear-gradient(135deg, var(--surface), var(--card)); border-radius: var(--radius-sm); margin: 10px 0; display: flex; align-items: center; justify-content: center; font-size: 56px; height: 140px; border: 1px solid var(--border); }
.audio-player { background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.waveform { display: flex; align-items: center; gap: 2px; height: 32px; }
.waveform-bar { width: 3px; background: var(--accent-dim); border-radius: 2px; flex-shrink: 0; }
.audio-controls { display: flex; align-items: center; gap: 10px; }
.play-btn { background: var(--accent); border: none; border-radius: 50%; width: 28px; height: 28px; color: #fff; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.audio-duration { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.video-thumb { background: linear-gradient(135deg, #120d20, #0d1220); border-radius: var(--radius-sm); margin: 10px 0; height: 140px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.video-thumb-emoji { font-size: 52px; opacity: 0.7; }
.video-play-btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: rgba(107,92,247,0.85); border: none; color: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(0,0,0,0.5); }

/* ── Marketplace ─────────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.type-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; }
.type-tab { padding: 5px 11px; border-radius: 4px; font-size: 12px; font-weight: 600; border: none; background: none; color: var(--text-2); cursor: pointer; transition: all 0.15s; }
.type-tab.active { background: var(--card); color: var(--text); }
.search-input { flex: 1; min-width: 150px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 7px 12px; font-size: 13px; outline: none; }
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-3); }

.publisher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.publisher-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; cursor: pointer; transition: all 0.15s; }
.publisher-card:hover { border-color: var(--accent-dim); background: var(--card-hover); transform: translateY(-1px); }
.pub-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pub-avatar { font-size: 24px; width: 42px; height: 42px; background: var(--surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-light); flex-shrink: 0; }
.pub-name { font-size: 14px; font-weight: 700; }
.pub-handle { font-size: 11px; color: var(--text-3); }
.pub-bio { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-bottom: 10px; }
.pub-stats { display: flex; gap: 16px; margin-bottom: 10px; }
.pub-stat-val { font-size: 14px; font-weight: 800; }
.pub-stat-label { font-size: 10px; color: var(--text-3); }
.pub-types { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.pub-price { font-size: 12px; color: var(--text-2); }
.pub-price strong { color: var(--nova); }

/* ── Promote ─────────────────────────────────────────────────────────────── */
.promote-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.promote-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.panel-title { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.content-pick-list { display: flex; flex-direction: column; gap: 7px; max-height: 280px; overflow-y: auto; }
.content-pick-item { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; transition: all 0.15s; display: flex; align-items: flex-start; gap: 10px; }
.content-pick-item:hover { border-color: var(--accent-dim); background: var(--card-hover); }
.content-pick-item.selected { border-color: var(--accent); background: var(--accent-glow); }
.pick-type-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.pick-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.pick-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.pub-pick-list { display: flex; flex-direction: column; gap: 7px; max-height: 280px; overflow-y: auto; }
.pub-pick-item { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 10px; }
.pub-pick-item:hover { border-color: var(--accent-dim); background: var(--card-hover); }
.pub-pick-item.selected { border-color: var(--accent); background: var(--accent-glow); }
.pub-pick-avatar { font-size: 17px; width: 32px; height: 32px; background: var(--surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pub-pick-name { font-size: 13px; font-weight: 600; }
.pub-pick-meta { font-size: 11px; color: var(--text-3); }
.pub-pick-right { margin-left: auto; text-align: right; flex-shrink: 0; }
.pub-pick-price { font-size: 12px; color: var(--nova); font-weight: 700; }

.promote-summary { grid-column: 1/-1; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; }
.summary-label { font-size: 13px; color: var(--text-2); }
.summary-val { font-size: 13px; font-weight: 600; }
.impressions-row { display: flex; align-items: center; gap: 16px; margin: 12px 0; }
.impressions-input { width: 130px; background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-sm); color: var(--text); padding: 8px 12px; font-size: 14px; font-weight: 600; outline: none; }
.impressions-input:focus { border-color: var(--accent); }
.cost-display { font-size: 20px; font-weight: 800; color: var(--nova); }

/* ── Offers / Deals ──────────────────────────────────────────────────────── */
.offers-list { display: flex; flex-direction: column; gap: 12px; }
.offer-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.offer-card.offer-pending { border-left: 3px solid var(--gold); }
.offer-card.offer-active { border-left: 3px solid var(--green); }
.offer-card.offer-completed { border-left: 3px solid var(--blue); }
.offer-card.offer-rejected { border-left: 3px solid var(--red); }
.offer-card.offer-cancelled { border-left: 3px solid var(--text-3); }
.offer-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.offer-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.offer-actions { display: flex; gap: 7px; flex-shrink: 0; margin-left: 10px; }
.offer-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.offer-stat-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; }
.offer-stat-val { font-size: 14px; font-weight: 800; }
.progress-bar-wrap { margin-top: 12px; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-bottom: 5px; }
.progress-bar { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--green); transition: width 0.5s; }

/* ── Wallet ──────────────────────────────────────────────────────────────── */
.wallet-hero {
  background: linear-gradient(135deg, rgba(107,92,247,0.1), rgba(245,200,66,0.08));
  border: 1px solid var(--border-light); border-radius: var(--radius);
  padding: 28px; margin-bottom: 24px; text-align: center;
}
.wallet-balance-val { font-size: 48px; font-weight: 900; letter-spacing: -2px; color: #fff; }
.wallet-balance-unit { font-size: 20px; color: var(--nova); font-weight: 700; margin-left: 6px; }

.tx-list { display: flex; flex-direction: column; gap: 2px; }
.tx-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--card); border-radius: var(--radius-sm); }
.tx-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.tx-icon-earn { background: var(--green-dim); color: var(--green); }
.tx-icon-spend { background: var(--red-dim); color: var(--red); }
.tx-icon-refund { background: var(--blue-dim); color: var(--blue); }
.tx-icon-topup { background: var(--gold-dim); color: var(--nova); }
.tx-desc { flex: 1; font-size: 13px; }
.tx-time { font-size: 11px; color: var(--text-3); }
.tx-amount { font-size: 14px; font-weight: 700; text-align: right; }
.tx-amount.earn, .tx-amount.topup, .tx-amount.refund { color: var(--green); }
.tx-amount.spend { color: var(--red); }

/* ── Settings ────────────────────────────────────────────────────────────── */
.settings-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; gap: 12px; }
.settings-label { font-size: 13px; }
.settings-sub { font-size: 11px; color: var(--text-3); }
.toggle { position: relative; width: 38px; height: 21px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 21px; cursor: pointer; transition: 0.2s; }
.toggle-slider::before { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: 0.2s; }
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(17px); }
.num-input { width: 90px; background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-sm); color: var(--text); padding: 6px 10px; font-size: 13px; outline: none; }
.num-input:focus { border-color: var(--accent); }

/* ── Empty / Toast / Misc ────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-3); }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-sub { font-size: 13px; }
.loading { text-align: center; padding: 48px; color: var(--text-3); font-size: 13px; }

#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; max-width: 320px; box-shadow: var(--shadow); animation: slide-in 0.2s ease; border: 1px solid var(--border); }
.toast-info { background: var(--card); }
.toast-success { background: var(--green-dim); border-color: rgba(0,200,150,0.25); color: var(--green); }
.toast-error { background: var(--red-dim); border-color: rgba(255,79,99,0.25); color: var(--red); }
.toast-sim { background: var(--accent-glow); border-color: var(--accent-dim); }
@keyframes slide-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.divider span { font-size: 11px; color: var(--text-3); white-space: nowrap; }

select, input { font-family: inherit; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Council ─────────────────────────────────────────────────────────────── */
.council-hero {
  background: linear-gradient(135deg, #080f1a 0%, #0a1428 60%, #07101e 100%);
  border: 1px solid rgba(61,159,255,0.2); border-radius: var(--radius);
  padding: 22px 28px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.council-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(61,159,255,0.1) 0%, transparent 70%);
}
.council-brand { display: flex; align-items: center; gap: 12px; }
.council-icon { font-size: 28px; }
.council-title { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.council-sub { font-size: 12px; color: rgba(255,255,255,0.4); max-width: 340px; line-height: 1.5; }
.council-grade { text-align: center; flex-shrink: 0; }
.council-grade-val { font-size: 48px; font-weight: 900; line-height: 1; }
.council-grade-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.council-stats-row { display: flex; gap: 20px; flex-shrink: 0; flex-wrap: wrap; }
.council-stat { text-align: center; }
.council-stat-val { font-size: 18px; font-weight: 800; }
.council-stat-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; }

.council-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; margin-bottom: 16px; }
.council-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }

.perf-stat { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.perf-stat:last-child { border-bottom: none; }
.perf-stat-label { font-size: 12px; color: var(--text-2); }
.perf-stat-val { font-size: 13px; font-weight: 700; }
.perf-bar-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.perf-bar-fill { height: 100%; border-radius: 2px; background: var(--accent); }

.activity-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-meta { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.issue-form-wrap {
  background: var(--card); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.form-field-label { font-size: 11px; color: var(--text-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }

.photo-zone {
  border: 2px dashed var(--border-light); border-radius: var(--radius-sm);
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.15s, background 0.15s; position: relative;
  overflow: hidden;
}
.photo-zone:hover { border-color: var(--accent-dim); background: var(--accent-glow); }
.photo-zone.has-photo { border-style: solid; border-color: var(--border-light); cursor: default; }
.photo-zone.drag-over { border-color: var(--accent); background: var(--accent-glow); }
.photo-placeholder { text-align: center; padding: 16px; pointer-events: none; }
.photo-preview-img {
  width: 100%; max-height: 200px; object-fit: cover; display: block; border-radius: 4px;
}
.photo-preview-wrap { position: relative; width: 100%; }
.photo-remove-btn {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.65); border: none; border-radius: 20px;
  color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px;
  cursor: pointer; transition: background 0.15s;
}
.photo-remove-btn:hover { background: rgba(255,79,99,0.8); }
.issue-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 6px; margin-top: 10px; border: 1px solid var(--border); display: block; }

.issue-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px; transition: border-color 0.15s;
}
.issue-card:hover { border-color: var(--border-light); }
.issue-card.priority-high { border-left: 3px solid var(--nova); }
.issue-card.priority-urgent { border-left: 3px solid var(--red); }
.issue-card-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.issue-ref {
  font-family: 'SF Mono', 'Fira Code', monospace; font-size: 11px; font-weight: 700;
  color: var(--blue); background: var(--blue-dim); padding: 3px 8px; border-radius: 5px;
  letter-spacing: 0.5px; flex-shrink: 0; white-space: nowrap;
}
.issue-title { font-size: 14px; font-weight: 700; line-height: 1.35; flex: 1; }
.issue-meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin: 6px 0 8px; }
.issue-desc { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.issue-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.support-btn {
  display: flex; align-items: center; gap: 4px; padding: 4px 10px;
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text-2); transition: all 0.15s;
}
.support-btn:hover { border-color: var(--accent-dim); color: var(--accent); }
.support-btn.supported { background: var(--accent-glow); border-color: var(--accent-dim); color: var(--accent); }
.thanks-btn {
  display: flex; align-items: center; gap: 4px; padding: 4px 10px;
  background: var(--green-dim); border: 1px solid rgba(0,200,150,0.2);
  border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--green); transition: all 0.15s;
}
.thanks-btn:hover { background: rgba(0,200,150,0.2); }
.thanks-btn.thanked { opacity: 0.6; cursor: default; }
.issue-time { font-size: 11px; color: var(--text-3); }
.updates-btn { margin-left: auto; font-size: 12px; color: var(--text-3); background: none; border: none; cursor: pointer; padding: 4px 0; transition: color 0.15s; }
.updates-btn:hover { color: var(--text); }

/* Council issue status badges */
.status-submitted { background: rgba(245,200,66,0.1); color: var(--gold); }
.status-acknowledged { background: var(--blue-dim); color: var(--blue); }
.status-in_progress { background: var(--accent-glow); color: var(--accent); }
.status-resolved { background: var(--green-dim); color: var(--green); }
.status-closed { background: rgba(100,100,120,0.1); color: var(--text-3); }

/* Issue category tags */
.iss-tag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 20px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.iss-roads    { background: rgba(245,150,50,0.1); color: #f59632; border-color: rgba(245,150,50,0.2); }
.iss-lighting { background: rgba(245,200,66,0.1); color: var(--gold); border-color: rgba(245,200,66,0.2); }
.iss-parks    { background: var(--green-dim); color: var(--green); border-color: rgba(0,200,150,0.2); }
.iss-graffiti { background: var(--red-dim); color: var(--red); border-color: rgba(255,79,99,0.2); }
.iss-drainage { background: var(--ocean-dim); color: var(--ocean); border-color: rgba(14,165,233,0.2); }
.iss-trees    { background: rgba(34,197,94,0.1); color: #22c55e; border-color: rgba(34,197,94,0.2); }
.iss-waste    { background: rgba(20,184,166,0.1); color: #14b8a6; border-color: rgba(20,184,166,0.2); }
.iss-safety   { background: var(--red-dim); color: #ff6b35; border-color: rgba(255,107,53,0.2); }

/* Timeline */
.issue-timeline { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.timeline-item { display: flex; gap: 10px; padding-bottom: 14px; position: relative; }
.timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0; width: 1px; background: var(--border); }
.timeline-dot { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex-shrink: 0; background: var(--surface); border: 2px solid var(--border); }
.dot-submitted    { border-color: var(--gold); color: var(--gold); }
.dot-acknowledged { border-color: var(--blue); color: var(--blue); }
.dot-in_progress  { border-color: var(--accent); color: var(--accent); }
.dot-resolved     { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.timeline-content { flex: 1; padding-top: 1px; }
.timeline-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.timeline-note { font-size: 12px; color: var(--text-2); line-height: 1.55; }
.timeline-author { font-size: 10px; color: var(--text-3); margin-top: 3px; }

/* ── Filter selects ──────────────────────────────────────────────────────── */
.filter-select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 6px 10px; font-size: 12px; outline: none; cursor: pointer; font-family: inherit;
}
.filter-select:focus { border-color: var(--accent); }
.filter-select option { background: var(--card); }

/* ── City hero enhancements ──────────────────────────────────────────────── */
.city-hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.city-score { text-align: center; flex-shrink: 0; }
.city-score-val { font-size: 42px; font-weight: 900; color: var(--ocean); line-height: 1; }
.city-score-label { font-size: 10px; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Leaderboard enhancements ────────────────────────────────────────────── */
.lb-info { flex: 1; min-width: 0; }
.lb-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; align-items: center; }
.lb-right { text-align: right; flex-shrink: 0; }

/* ── Recent content cards ────────────────────────────────────────────────── */
.recent-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.recent-author { font-size: 12px; font-weight: 600; line-height: 1.2; }
.recent-handle { font-size: 11px; color: var(--text-3); }
.recent-title {
  font-size: 13px; font-weight: 700; line-height: 1.35; margin-bottom: 8px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.recent-meta { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
