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

:root {
  --bg: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --bg-surface: #111111;
  --border: #2a2a2a;
  --border-hover: #3a3a3a;
  --text: #e4e4ec;
  --text-muted: #8888a0;
  --text-dim: #555568;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.12);
  --orange: #f97316;
  --purple: #a855f7;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.logo-icon.small { width: 24px; height: 24px; border-radius: 6px; }

.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-badge {
  background: var(--accent-glow);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Luma API Status */
.luma-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  cursor: default;
  transition: all 0.2s;
}
.luma-status:hover { border-color: var(--border-hover); }
.luma-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background 0.3s;
}
.luma-status.ok .luma-status-dot { background: var(--green); box-shadow: 0 0 4px var(--green); }
.luma-status.degraded .luma-status-dot { background: var(--orange); box-shadow: 0 0 4px var(--orange); }
.luma-status.down .luma-status-dot { background: #ef4444; box-shadow: 0 0 4px #ef4444; }
.luma-status.ok .luma-status-label { color: var(--green); }
.luma-status.degraded .luma-status-label { color: var(--orange); }
.luma-status.down .luma-status-label { color: #ef4444; }

/* ===== Header Nav ===== */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.header-nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}

.header-nav-link.active {
  color: var(--accent-light);
  background: var(--accent-glow);
  font-weight: 600;
}

/* ===== Page Layout (shared by leaderboard + flow) ===== */
.page-content {
  padding: 32px 0 48px;
  min-height: calc(100vh - 56px - 80px);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header-text {}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.page-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.page-action-btn:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.page-action-btn.secondary {
  border-color: var(--border);
  color: var(--text-muted);
}

.page-action-btn.secondary:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

/* ===== Leaderboard Page ===== */
.lb-podium {
  margin-bottom: 32px;
}

.lb-podium-loading {
  text-align: center;
  padding: 48px 20px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.lb-empty {
  text-align: center;
  padding: 48px 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.lb-podium-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  padding: 24px 0;
}

.lb-podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 160px;
}

.lb-podium-emoji {
  font-size: 2rem;
  margin-bottom: 6px;
}

.lb-podium-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.lb-podium-pts {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 4px;
}

.lb-podium-members {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.lb-podium-bar {
  width: 100%;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
}

.lb-podium-rank {
  font-size: 1.8rem;
  font-weight: 800;
}

/* Full Rankings Table */
.lb-rankings {
  margin-bottom: 32px;
}

.lb-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.lb-row:hover {
  border-color: var(--border-hover);
}

.lb-row-rank {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.lb-row-emoji {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.lb-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-row-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.lb-row-members {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.lb-row-pts {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-light);
  flex-shrink: 0;
}

/* Live Stats */
.lb-stats {
  margin-top: 8px;
}

.lb-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

.lb-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.lb-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ===== Flow Page ===== */
.flow-signin-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 0;
}

.flow-signin-card {
  text-align: center;
  max-width: 400px;
  padding: 48px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.flow-signin-icon {
  color: var(--accent-light);
  margin-bottom: 20px;
}

.flow-signin-icon svg {
  padding: 16px;
  border-radius: 50%;
  background: var(--accent-glow);
}

.flow-signin-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.flow-signin-msg {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.flow-signin-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 16px;
}

.flow-signin-btn:hover { opacity: 0.9; }

.flow-signin-links {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.flow-signin-links a {
  color: var(--text-muted);
  font-weight: 500;
}

.flow-authed {}

.flow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.flow-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.flow-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.flow-card-header svg { opacity: 0.6; }

.flow-card-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-glow);
  color: var(--accent-light);
}

.flow-card-badge:empty { display: none; }

/* When badge is the last child, push right */
.flow-card-header > .flow-card-badge:last-child {
  margin-left: auto;
}

.flow-card-body {
  padding: 12px 16px;
  max-height: 360px;
  overflow-y: auto;
}

.flow-loading {
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== Responsive (nav + pages) ===== */
@media (max-width: 640px) {
  .header-nav { gap: 2px; }
  .header-nav-link { padding: 5px 10px; font-size: 0.75rem; }
  .page-title { font-size: 1.4rem; }
  .page-header { flex-direction: column; }
  .page-header-actions { width: 100%; }

  .lb-podium-row { gap: 8px; padding: 16px 0; }
  .lb-podium-item { width: 110px; }
  .lb-podium-name { font-size: 0.78rem; }
  .lb-stats-row { grid-template-columns: 1fr; }

  .flow-grid { grid-template-columns: 1fr; }
  .flow-signin-card { padding: 32px 20px; }
}

@media (max-width: 480px) {
  .header-nav-link { padding: 4px 8px; font-size: 0.72rem; }
  .lb-podium-item { width: 90px; }
  .lb-podium-emoji { font-size: 1.4rem; }
  .lb-podium-rank { font-size: 1.3rem; }
}

/* ===== Hero ===== */
.hero {
  padding: 36px 0 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--purple), #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ===== Hero CTA Row ===== */
.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.hero-cta-btn:hover { text-decoration: none; transform: translateY(-1px); }

.hero-cta-telegram {
  background: #2AABEE;
  color: #fff;
  border-color: rgba(42, 171, 238, 0.3);
  box-shadow: 0 4px 16px rgba(42, 171, 238, 0.25);
}
.hero-cta-telegram:hover { background: #1E9AD6; box-shadow: 0 6px 24px rgba(42, 171, 238, 0.35); }

.hero-cta-farcaster {
  background: #8B5CF6;
  color: #fff;
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}
.hero-cta-farcaster:hover { background: #7C3AED; box-shadow: 0 6px 24px rgba(139, 92, 246, 0.35); }

.hero-dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.2s;
  cursor: pointer;
}
.hero-dash-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.hero-dash-btn svg { opacity: 0.7; }

/* ===== Hero Stats ===== */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
  padding: 16px 0;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hero-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hero-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.hero-stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ===== Hero Top Crews ===== */
.hero-crews {
  max-width: 460px;
  margin: 0 auto 28px;
}

.hero-crews-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.hero-crews-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-crew-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.hero-crew-item:hover { border-color: var(--border-hover); }

.hero-crew-rank {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  width: 20px;
  text-align: center;
}

.hero-crew-rank.gold { color: #fbbf24; }
.hero-crew-rank.silver { color: #94a3b8; }
.hero-crew-rank.bronze { color: #cd7f32; }

.hero-crew-emoji {
  font-size: 1.2rem;
}

.hero-crew-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.hero-crew-pts {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
  background: var(--accent-glow);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.hero-crew-members {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ===== Search ===== */
.search-bar {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 44px 0 44px;
  font-size: 0.95rem;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar input::placeholder { color: var(--text-dim); }
.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

/* ===== My Flow Section ===== */
.myflow-section {
  padding: 24px 0 8px;
  border-bottom: 1px solid var(--border);
}

.myflow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.myflow-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.myflow-deeplinks {
  display: flex;
  gap: 10px;
}

.myflow-deeplink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s;
}

.myflow-deeplink:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  text-decoration: none;
}

.myflow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.myflow-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.myflow-card-wide {
  grid-column: 1 / -1;
}

.myflow-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.myflow-card-header svg { opacity: 0.6; }

.myflow-card-body {
  padding: 12px 16px;
  max-height: 280px;
  overflow-y: auto;
}

.myflow-empty {
  text-align: center;
  padding: 20px 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* My Flow: Schedule Items */
.myflow-schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.myflow-schedule-item:last-child { border-bottom: none; }

.myflow-schedule-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 4px 8px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
}

.myflow-schedule-date .day {
  font-size: 1rem;
  font-weight: 800;
}

.myflow-schedule-info {
  flex: 1;
  min-width: 0;
}

.myflow-schedule-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.myflow-schedule-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.myflow-rsvp-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--green-dim);
  color: var(--green);
  flex-shrink: 0;
}

/* My Flow: Crew Items */
.myflow-crew-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.myflow-crew-item:last-child { border-bottom: none; }

.myflow-crew-emoji { font-size: 1.3rem; }

.myflow-crew-info { flex: 1; }

.myflow-crew-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.myflow-crew-role {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

/* My Flow: Leaderboard Items */
.myflow-lb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.myflow-lb-item:last-child { border-bottom: none; }

.myflow-lb-rank {
  width: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
}

.myflow-lb-rank.rank-1 { color: #fbbf24; }
.myflow-lb-rank.rank-2 { color: #94a3b8; }
.myflow-lb-rank.rank-3 { color: #cd7f32; }

.myflow-lb-emoji { font-size: 1.1rem; }
.myflow-lb-name {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.myflow-lb-pts {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
}

.myflow-lb-members {
  font-size: 0.65rem;
  color: var(--text-dim);
  min-width: 60px;
  text-align: right;
}

/* ===== Categories ===== */
.categories-section {
  padding: 8px 0;
  position: sticky;
  top: 56px;
  z-index: 90;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
}

.categories-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories-row::-webkit-scrollbar { display: none; }

.cat-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cat-chip:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-card-hover);
}

.cat-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cat-chip .cat-count {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ===== Filters ===== */
.filters-section {
  padding: 8px 0 16px;
}

.filters-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.filter-pill.active {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--green);
}

.results-meta {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== Events Grid ===== */
.events-section {
  padding: 0 0 48px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ===== Event Card ===== */
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.event-card:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .event-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
  }
  .event-card:active {
    transform: none;
  }
}

.event-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg-surface);
}

.event-card-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card));
}

.event-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-card-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-light);
  margin-bottom: 8px;
}

.event-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.event-card-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-card-meta-row svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.5;
}

.event-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.event-price {
  font-size: 0.8rem;
  font-weight: 600;
}

.event-price.free {
  color: var(--green);
  background: var(--green-dim);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.event-price.paid { color: var(--orange); }

.event-attendees {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-sold-out {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* RSVP button on event cards */
.event-rsvp-btn {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.event-rsvp-btn:hover {
  background: var(--accent);
  color: #fff;
}

.event-rsvp-btn.rsvpd {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--green);
}

/* ===== Platform Source Badge ===== */
.event-card-source {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.8);
  text-transform: capitalize;
  pointer-events: none;
}

.event-card-source .source-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.event-card-img-wrap {
  position: relative;
}

/* ===== Card Action Icons ===== */
.event-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.event-card-action {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}

.event-card-action:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.event-card-action svg {
  width: 14px;
  height: 14px;
}

/* ===== Platform Dropdown ===== */
.platform-dropdown {
  position: relative;
}

.platform-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
}

.platform-trigger svg {
  transition: transform 0.2s;
}

.platform-dropdown.open .platform-trigger svg {
  transform: rotate(180deg);
}

.platform-dropdown.open .platform-trigger {
  border-color: var(--accent);
  color: var(--accent-light);
}

.platform-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
}

.platform-dropdown.open .platform-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.platform-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.platform-option:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.platform-option.active {
  background: var(--accent-glow);
  color: var(--accent-light);
}

.platform-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== Event Action Modal ===== */
.event-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  transition: opacity 0.2s;
}

.event-modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: min(420px, calc(100% - 24px));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  z-index: 1001;
  padding: 20px;
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.event-modal:not(.hidden) {
  transform: translateX(-50%) translateY(0);
}

.event-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}

.event-modal-close:hover {
  color: var(--text);
}

.event-modal-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-right: 24px;
}

.event-modal-img {
  width: 100%;
  height: 160px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--bg-surface);
}

.event-modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-modal-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.event-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.event-modal-btn:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.03);
}

.event-modal-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  padding: 15px 16px;
  border-radius: var(--radius);
  letter-spacing: 0.01em;
}

.event-modal-btn.primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.event-modal-row {
  display: flex;
  gap: 8px;
}

.event-modal-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}

.event-modal-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-glow);
}

.event-modal-chip svg {
  opacity: 0.7;
  flex-shrink: 0;
}

.event-modal-chip:hover svg {
  opacity: 1;
}

.event-modal-external {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.event-modal-external:hover {
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
}

.event-modal-external svg {
  opacity: 0.5;
}

.event-modal-share-panel {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-modal-share-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.event-modal-share-opt:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.event-modal-share-opt svg {
  opacity: 0.6;
}

/* Copy link success state */
.event-modal-share-opt.copied {
  color: var(--green);
}

/* ===== RSVP Confirmation ===== */
.rsvp-confirm {
  text-align: center;
  padding: 8px 0 4px;
}

.rsvp-confirm-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: #fff;
  animation: rsvpPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rsvpPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.rsvp-confirm-check svg {
  animation: rsvpStroke 0.5s ease-out 0.15s both;
}

@keyframes rsvpStroke {
  0% { stroke-dasharray: 40; stroke-dashoffset: 40; }
  100% { stroke-dasharray: 40; stroke-dashoffset: 0; }
}

.rsvp-confirm-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.rsvp-confirm-event {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.rsvp-confirm-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.rsvp-confirm-msg {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.4;
}

.rsvp-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.rsvp-confirm-actions .event-modal-chip {
  text-decoration: none;
}

/* ===== Skeleton ===== */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 320px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Load More ===== */
.load-more-wrap {
  text-align: center;
  margin-top: 24px;
}

.load-more-btn {
  padding: 10px 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-dim);
}

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

.footer-right {
  display: flex;
  gap: 16px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-link:hover { color: var(--text); }

/* ===== Chat With FlowB Button ===== */
/* ===== FlowB FAB Wrap ===== */
.flowb-fab-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-with-flowb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.35);
  background: var(--bg-card);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(37, 99, 235, 0.1);
  transition: all 0.25s;
}

.chat-with-flowb:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 32px rgba(37, 99, 235, 0.4), 0 0 0 1px rgba(37, 99, 235, 0.25);
  border-color: rgba(37, 99, 235, 0.5);
}

.flowb-fab-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-with-flowb-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== FlowB Nudge Chat Notification ===== */
.flowb-nudge {
  position: relative;
  width: 260px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  animation: nudgePop 0.35s cubic-bezier(0.32, 0.72, 0, 1) 3s both;
}

/* Chat bubble tail */
.flowb-nudge::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}

@keyframes nudgePop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.flowb-nudge.dismissed {
  animation: nudgeFade 0.2s ease-in forwards;
}

@keyframes nudgeFade {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.95);
  }
}

.flowb-nudge-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}

.flowb-nudge-close:hover {
  color: var(--text-muted);
}

.flowb-nudge-msg {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-right: 14px;
}

.flowb-nudge-msg strong {
  color: var(--text);
  font-weight: 600;
}

.flowb-nudge-links {
  display: flex;
  gap: 6px;
}

.flowb-nudge-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.flowb-nudge-link.tg {
  background: rgba(42, 171, 238, 0.12);
  color: #2AABEE;
  border: 1px solid rgba(42, 171, 238, 0.2);
}

.flowb-nudge-link.tg:hover {
  background: rgba(42, 171, 238, 0.22);
  text-decoration: none;
}

.flowb-nudge-link.fc {
  background: rgba(139, 92, 246, 0.12);
  color: #8B5CF6;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.flowb-nudge-link.fc:hover {
  background: rgba(139, 92, 246, 0.22);
  text-decoration: none;
}

/* ===== FlowB Full Chat Modal ===== */
.flowb-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.flowb-chat-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.flowb-chat-window {
  position: relative;
  width: 100%;
  max-width: 680px;
  height: 85vh;
  max-height: 800px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(37, 99, 235, 0.08);
  overflow: hidden;
  animation: chatWindowIn 0.35s ease-out;
}

@keyframes chatWindowIn {
  from { transform: scale(0.95) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Chat Header */
.flowb-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.flowb-chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flowb-chat-header-info {
  display: flex;
  flex-direction: column;
}

.flowb-chat-header-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

.flowb-chat-header-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.flowb-chat-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flowb-chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--green);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-dim);
}

.flowb-chat-status.error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.flowb-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.flowb-chat-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: all 0.15s;
}

.flowb-chat-close:hover {
  color: var(--text);
  background: var(--bg-card);
}

/* Chat Body */
.flowb-chat-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Welcome State */
.flowb-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px 32px;
  text-align: center;
  flex: 1;
}

.flowb-welcome.hidden-welcome { display: none; }

.flowb-welcome-logo {
  margin-bottom: 20px;
}

.flowb-welcome-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.flowb-welcome-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.flowb-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}

.flowb-suggestion {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  line-height: 1.4;
}

.flowb-suggestion:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-glow);
}

/* Messages */
.flowb-messages {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.flowb-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: msgIn 0.3s ease-out;
}

@keyframes msgIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.flowb-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.flowb-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.75rem;
}

.flowb-msg.bot .flowb-msg-avatar {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
}

.flowb-msg.user .flowb-msg-avatar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.flowb-msg-content {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.flowb-msg.bot .flowb-msg-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-top-left-radius: 4px;
}

.flowb-msg.user .flowb-msg-content {
  background: var(--accent);
  color: #fff;
  border-top-right-radius: 4px;
}

.flowb-msg-content strong { font-weight: 600; }
.flowb-msg-content a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.flowb-msg.bot .flowb-msg-content a { color: var(--accent-light); }

/* Typing Indicator */
.flowb-typing {
  display: flex;
  gap: 5px;
  padding: 4px 0;
}

.flowb-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typingDot 1.2s ease-in-out infinite;
}

.flowb-typing span:nth-child(2) { animation-delay: 0.2s; }
.flowb-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* Quick Bar */
.flowb-quick-bar {
  display: flex;
  gap: 6px;
  padding: 8px 20px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  scrollbar-width: none;
  flex-shrink: 0;
}

.flowb-quick-bar::-webkit-scrollbar { display: none; }

.flowb-quick-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}

.flowb-quick-chip:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Flow-aware chips get a distinct style */
.flowb-quick-flow {
  border-color: rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent-light);
}

.flowb-quick-flow:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: #fff;
}

/* Input Area */
.flowb-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.flowb-input-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.flowb-input-wrap textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  resize: none;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.flowb-input-wrap textarea::placeholder { color: var(--text-dim); }

.flowb-input-wrap textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.flowb-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.flowb-send-btn:hover { opacity: 0.85; }
.flowb-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.flowb-input-hint {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero { padding: 24px 0 16px; }
  .flowb-fab-wrap { bottom: 16px; right: 16px; }
  .flowb-nudge { width: 220px; }
  .event-modal { width: calc(100% - 12px); }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .event-card-img { height: 140px; }
  .footer-inner { flex-direction: column; gap: 12px; }

  .myflow-grid { grid-template-columns: 1fr; }
  .myflow-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.5rem; }
  .search-bar input { height: 44px; font-size: 0.9rem; }

  .flowb-chat-modal { padding: 0; }
  .flowb-chat-window {
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .flowb-suggestions { grid-template-columns: 1fr; }
  .chat-with-flowb { width: 48px; height: 48px; }
}

/* ===== Points Badge ===== */
.points-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-pill);
  background: var(--accent-glow);
  border: 1px solid rgba(37, 99, 235, 0.2);
  cursor: default;
  transition: transform 0.3s;
}

.points-badge.points-pulse {
  animation: badgePulse 0.5s ease;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.points-ring-wrap {
  position: relative;
  width: 20px;
  height: 20px;
}

.points-ring {
  position: absolute;
  top: -8px;
  left: -8px;
}

.points-ring-track { color: rgba(37, 99, 235, 0.1); }
.points-ring-progress {
  color: var(--accent-light);
  transition: stroke-dashoffset 0.7s ease-out;
}

.points-flame {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  line-height: 1;
}

.points-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-light);
  font-variant-numeric: tabular-nums;
}

.points-streak {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(37, 99, 235, 0.2);
}

.streak-icon { font-size: 0.7rem; }
.streak-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(37, 99, 235, 0.7);
  font-variant-numeric: tabular-nums;
}

/* Tooltip */
.points-tooltip {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 50;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}

.points-badge:hover .points-tooltip { opacity: 1; }

.points-tooltip-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.points-tooltip-streak {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-top: 6px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}

/* ===== Points Toasts ===== */
.points-toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.points-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid rgba(37, 99, 235, 0.3);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.points-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.points-toast.hide {
  transform: translateY(-10px);
  opacity: 0;
}

/* ===== Milestone Banner ===== */
.milestone-banner {
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.milestone-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(37,99,235,0.05));
  border: 1px solid rgba(37, 99, 235, 0.2);
  backdrop-filter: blur(8px);
  overflow: hidden;
  margin: 8px 0;
}

.milestone-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.15), transparent);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.milestone-content {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.milestone-icon-wrap {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.2);
  font-size: 1rem;
}

.milestone-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-light);
}

.milestone-msg {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.milestone-close {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.milestone-close:hover { color: var(--text); }

/* ===== Auth Button ===== */
.auth-btn {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ===== User Menu ===== */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.user-avatar:hover { transform: scale(1.08); }

.user-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
}

.user-dropdown-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.user-dropdown-item {
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.user-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

/* ===== Login Modal ===== */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.login-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.login-close:hover { color: var(--text); }

.login-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.login-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 10px;
  text-decoration: none;
}

.login-btn-danz {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-color: transparent;
  color: #fff;
}

.login-btn-danz:hover {
  opacity: 0.9;
  text-decoration: none;
}

.login-btn-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}

.login-btn-wallet {
  background: var(--bg-surface);
  color: var(--text);
}

.login-btn-wallet:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.login-footer-text {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 16px;
  line-height: 1.4;
}

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

/* ===== Responsive (auth) ===== */
@media (max-width: 640px) {
  .points-badge { padding: 3px 8px 3px 4px; }
  .points-count { font-size: 0.75rem; }
  .auth-btn { padding: 5px 12px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .points-tooltip { right: -60px; }
}

/* ===== Reminder Sub-Panel ===== */
.event-modal-reminder-panel {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.reminder-panel-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.reminder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.reminder-chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}

.reminder-chip:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.reminder-chip.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

.reminder-custom-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}

.reminder-custom-input {
  width: 70px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 0.8rem;
  font-family: var(--font);
  outline: none;
}

.reminder-custom-input:focus {
  border-color: var(--accent);
}

.reminder-custom-select {
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 0.8rem;
  font-family: var(--font);
  outline: none;
}

.reminder-custom-add {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent-light);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reminder-custom-add:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.reminder-save-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}

.reminder-save-btn:hover {
  background: var(--accent-light);
}

/* ===== Notification Settings Modal ===== */
.notif-settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.notif-settings-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100% - 32px));
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  z-index: 1001;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease-out;
}

.notif-settings-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-right: 24px;
}

.notif-settings-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.notif-settings-section:last-of-type {
  border-bottom: none;
}

.notif-settings-section-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.notif-settings-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.notif-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.notif-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.notif-quiet-hours-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.notif-field-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.notif-select {
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 0.8rem;
  font-family: var(--font);
  outline: none;
}

.notif-select:focus {
  border-color: var(--accent);
}

.notif-tz-select {
  width: 100%;
}

.notif-limit-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-limit-input {
  width: 60px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font);
  outline: none;
  text-align: center;
}

.notif-limit-input:focus {
  border-color: var(--accent);
}

.notif-limit-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.notif-save-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}

.notif-save-btn:hover {
  background: var(--accent-light);
}

.notif-save-btn.saved {
  background: var(--green);
}

/* ===== Sign-In Prompt ===== */
.signin-prompt-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.signin-prompt {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 28px 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: modalIn 0.3s ease-out;
}

.signin-prompt-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.signin-prompt-close:hover { color: var(--text); }

.signin-prompt-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent-light);
}

.signin-prompt-icon svg {
  padding: 12px;
  border-radius: 50%;
  background: var(--accent-glow);
}

.signin-prompt-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.signin-prompt-msg {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.55;
}

.signin-prompt-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.2s;
}

.signin-prompt-btn:hover { opacity: 0.9; }

.signin-prompt-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 12px;
}

/* ===== Dashboard Section ===== */
.dashboard-section {
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--border);
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dash-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.dash-settings-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}

.dash-settings-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Profile Card */
.dash-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.dash-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.dash-profile-info {
  flex: 1;
  min-width: 120px;
}

.dash-username {
  font-size: 1.1rem;
  font-weight: 700;
}

.dash-user-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.dash-stats-row {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.dash-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 60px;
}

.dash-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dash-stat-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Dashboard Grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-card-header svg { opacity: 0.6; }

.dash-card-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-glow);
  color: var(--accent-light);
}

.dash-card-body {
  padding: 12px 16px;
  max-height: 320px;
  overflow-y: auto;
}

.dash-loading {
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.dash-empty {
  text-align: center;
  padding: 24px 12px;
}

.dash-empty svg {
  color: var(--text-dim);
  margin-bottom: 10px;
}

.dash-empty p {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dash-empty span {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.dash-empty-sm {
  padding: 16px 8px;
}

/* Dashboard: Schedule Items */
.dash-event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.dash-event-item:last-child { border-bottom: none; }

.dash-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: 6px 8px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  text-align: center;
}

.dash-event-day {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-event-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1.1;
}

.dash-event-mon {
  font-size: 0.55rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
}

.dash-event-info {
  flex: 1;
  min-width: 0;
}

.dash-event-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-event-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.dash-event-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.dash-event-status.going {
  background: var(--green-dim);
  color: var(--green);
}

.dash-event-status.maybe {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

/* Dashboard: Crew Items */
.dash-crew-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.dash-crew-item:last-child { border-bottom: none; }

.dash-crew-emoji { font-size: 1.4rem; }

.dash-crew-info { flex: 1; }

.dash-crew-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.dash-crew-role {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

.dash-crew-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-crew-code {
  font-size: 0.65rem;
  color: var(--accent-light);
  background: var(--accent-glow);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.dash-crew-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.dash-crew-members {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Crew card wide layout */
.flow-card-wide {
  grid-column: 1 / -1;
}

.flow-card-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.flow-card-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s;
}

.flow-card-action-btn:hover {
  background: var(--accent-glow);
  color: var(--accent-light);
  border-color: var(--accent-light);
}

/* Crew Leave Button */
.crew-leave-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
}

.dash-crew-item:hover .crew-leave-btn { opacity: 1; }
.crew-leave-btn:hover { color: #ef4444; border-color: #ef4444; }

/* Crew Join Button */
.crew-join-btn {
  padding: 5px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.crew-join-btn:hover { opacity: 0.85; }
.crew-join-btn:disabled { opacity: 0.5; cursor: default; }
.crew-join-btn.joined { background: var(--green, #22c55e); }

/* Discover Crew Item */
.crew-discover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.crew-discover-item:last-child { border-bottom: none; }

/* Crew Panel (inline, slides open) */
.crew-panel {
  border-top: 1px solid var(--border);
  padding: 0 16px 16px;
}

.crew-panel.hidden { display: none; }

.crew-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
}

.crew-panel-header h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.crew-panel-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
}
.crew-panel-close:hover { color: var(--text); }

/* Crew Modal */
.crew-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.crew-modal-backdrop.hidden { display: none; }

.crew-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 400px;
  background: var(--card-bg, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  z-index: 1000;
  overflow: hidden;
}
.crew-modal.hidden { display: none; }

.crew-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.crew-modal-header h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.crew-modal-body {
  padding: 16px;
}

.crew-form-group {
  margin-bottom: 14px;
}

.crew-form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.crew-form-opt {
  font-weight: 400;
  color: var(--text-dim);
}

.crew-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  outline: none;
  box-sizing: border-box;
}

.crew-input:focus {
  border-color: var(--accent-light);
}

.crew-input-emoji {
  width: 60px;
  font-size: 1.3rem;
  text-align: center;
}

.crew-submit-btn {
  width: 100%;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: opacity 0.15s;
}

.crew-submit-btn:hover { opacity: 0.85; }
.crew-submit-btn:disabled { opacity: 0.5; cursor: default; }

.crew-form-note {
  margin-top: 10px;
  font-size: 0.75rem;
  text-align: center;
  min-height: 1.2em;
}

.crew-form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Dashboard: Points & Milestones */
.dash-milestone-progress {
  padding: 8px 0;
}

.dash-milestone-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dash-milestone-header strong {
  color: var(--accent-light);
}

.dash-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.1);
  overflow: hidden;
}

.dash-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  transition: width 0.7s ease-out;
}

.dash-milestone-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.dash-milestone-maxed {
  font-size: 0.82rem;
  color: var(--accent-light);
  text-align: center;
  padding: 12px;
}

.dash-achieved {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.dash-achieved-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(34, 197, 94, 0.08);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.15);
}

/* Dashboard: Friends */
.dash-friend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  margin: 4px 4px 4px 0;
}

.dash-friend-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.65rem;
}

.dash-friend-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Dashboard Responsive */
@media (max-width: 640px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-profile-card { flex-direction: column; text-align: center; }
  .dash-stats-row { margin-left: 0; }
  .dash-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
  .dash-stats-row { gap: 12px; }
  .dash-stat { min-width: 50px; }
}

/* ===== Activity Feed ===== */
.feed-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.feed-tabs { display: flex; gap: 4px; }
.feed-tab {
  padding: 8px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-pill);
  color: var(--text-muted); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.feed-tab:hover { border-color: var(--accent); color: var(--text); }
.feed-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.feed-time-filters { display: flex; gap: 4px; }
.feed-time-btn {
  padding: 6px 14px; background: none; border: 1px solid var(--border); border-radius: var(--radius-pill);
  color: var(--text-dim); font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.feed-time-btn:hover { border-color: var(--text-muted); color: var(--text-muted); }
.feed-time-btn.active { background: var(--bg-card); border-color: var(--text-muted); color: var(--text); }
.feed-stats-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0; margin-bottom: 16px;
  font-size: 0.82rem; color: var(--text-muted);
}
.feed-stat-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-dim); }
.feed-section-title { font-size: 0.92rem; font-weight: 700; margin-bottom: 12px; margin-top: 24px; }
.feed-venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.feed-venue-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.2s;
}
.feed-venue-card:hover { border-color: var(--accent); }
.feed-venue-count {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent-glow); color: var(--accent-light);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 800; flex-shrink: 0;
}
.feed-venue-info { flex: 1; min-width: 0; }
.feed-venue-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-venue-people { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-item {
  display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-item-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700;
  color: var(--accent-light); flex-shrink: 0;
}
.feed-item-body { flex: 1; min-width: 0; }
.feed-item-text { font-size: 0.88rem; line-height: 1.5; }
.feed-item-text strong { font-weight: 600; }
.feed-item-message {
  font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; padding: 6px 10px;
  background: var(--bg-surface); border-radius: var(--radius-sm); font-style: italic;
}
.feed-item-time { font-size: 0.72rem; color: var(--text-dim); margin-top: 4px; }
.feed-trending-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border);
}
.feed-trending-item:last-child { border-bottom: none; }
.feed-trending-rank {
  width: 24px; height: 24px; border-radius: 6px; background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted); flex-shrink: 0;
}
.feed-trending-name { flex: 1; font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-trending-rsvps { font-size: 0.78rem; color: var(--accent-light); font-weight: 600; flex-shrink: 0; }
.feed-empty { text-align: center; padding: 48px 20px; color: var(--text-dim); font-size: 0.92rem; }
.feed-auth-gate {
  text-align: center; padding: 32px 20px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px;
}
.feed-auth-gate p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 12px; }
.feed-auth-btn {
  padding: 10px 24px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-pill);
  font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.feed-auth-btn:hover { background: var(--accent-light); }
@media (max-width: 600px) {
  .feed-controls { flex-direction: column; align-items: stretch; }
  .feed-tabs { justify-content: center; }
  .feed-time-filters { justify-content: center; }
  .feed-venue-grid { grid-template-columns: 1fr; }
}

/* ===== Agents Page ===== */
.agents-section { margin-bottom: 32px; }
.agents-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.agents-section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.agent-slot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s, transform 0.15s;
}
.agent-slot-card:hover {
  border-color: var(--border-hover);
}
.agent-slot-open {
  border-style: dashed;
  opacity: 0.75;
}
.agent-slot-open:hover {
  opacity: 1;
  border-color: var(--accent);
}

.agent-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.agent-slot-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
}

.agent-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.agent-status-open {
  background: var(--green-dim);
  color: var(--green);
}
.agent-status-claimed {
  background: var(--accent-glow);
  color: var(--accent-light);
}
.agent-status-reserved {
  background: rgba(249, 115, 22, 0.12);
  color: var(--orange);
}

.agent-slot-body {}
.agent-slot-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-slot-empty {
  color: var(--text-dim);
  font-style: italic;
  font-weight: 400;
}
.agent-slot-owner {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.agent-slot-skills {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.agent-slot-skills svg { opacity: 0.5; }

/* My Agent section */
.agents-my-section {
  margin-top: 32px;
}
.agents-signin-gate {}

/* Skills */
.agent-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.agent-skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
}
.agent-skill-name {
  font-weight: 500;
  color: var(--text);
}
.agent-skill-level {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-light);
}

/* Skills Marketplace Items */
.agent-skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.agent-skill-item:last-child { border-bottom: none; }
.agent-skill-owned {
  opacity: 0.6;
}
.agent-skill-info {
  flex: 1;
  min-width: 0;
}
.agent-skill-item-name {
  font-size: 0.9rem;
  font-weight: 600;
}
.agent-skill-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.agent-skill-action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.agent-skill-price {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}
.agent-skill-buy-btn {
  padding: 5px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.agent-skill-buy-btn:hover { background: var(--accent-light); }
.agent-skill-buy-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.agent-skill-owned-badge {
  padding: 5px 12px;
  background: var(--green-dim);
  color: var(--green);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Transaction History */
.agent-tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.agent-tx-item:last-child { border-bottom: none; }
.agent-tx-info { flex: 1; min-width: 0; }
.agent-tx-desc {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-tx-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.agent-tx-amount {
  font-size: 0.88rem;
  font-weight: 700;
  flex-shrink: 0;
}
.agent-tx-positive { color: var(--green); }
.agent-tx-negative { color: #ef4444; }

@media (max-width: 600px) {
  .agents-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .agent-slot-card { padding: 12px; }
  .agent-slot-name { font-size: 0.85rem; }
}

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