/* BUILD-MARKER: app-css-2026-09-11-e — bump this comment on every edit so it's
   trivial to check (view-source or curl) whether the live server is actually
   serving this version, instead of a cached/stale upload. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand { font-family: 'Manrope', sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: var(--bg); background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
}
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-logo {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--indigo), var(--pink));
}
.nav-title { font-weight: 800; font-size: 17px; line-height: 1.1; }
.nav-sub { font-size: 11px; color: var(--text-faint); }
.nav-links { display: flex; align-items: center; gap: 18px; font-weight: 600; font-size: 14px; color: var(--text-muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted);
  position: relative;
}
.icon-btn:hover { color: var(--text); }
.badge-dot {
  position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--pink); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ── Category tabs ───────────────────────────────────────────────── */
.tabs-row {
  /*display: flex; */
  align-items: center; gap: 12px; margin-bottom: 8px;
  max-width: 100%;
}
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 4px; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs-actions { display: flex; gap: 8px; flex: 0 0 auto; margin-top: 5px; }
.tabs-actions .btn-ghost { padding: 6px 14px; font-size: 12px; white-space: nowrap; }
.tabs-actions .btn-ghost.active { color: #fff; border-color: transparent; background: linear-gradient(100deg, var(--indigo), var(--purple)); }
.tab {
  flex: 0 0 auto; padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tab.active { color: #fff; border-color: transparent; background: linear-gradient(100deg, var(--indigo), var(--purple)); }

/* ── Composer ────────────────────────────────────────────────────── */
.composer { padding: 18px; margin: 16px 0; }
.composer textarea, .composer select,
.composer input[type="text"], .composer input[type="email"],
.composer input[type="password"], .composer input[type="number"] {
  width: 100%; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; color: var(--text); font-family: inherit; font-size: 14px; resize: vertical;
  transition: border-color .15s ease;
}
.composer textarea:focus, .composer select:focus,
.composer input[type="text"]:focus, .composer input[type="email"]:focus,
.composer input[type="password"]:focus, .composer input[type="number"]:focus {
  outline: none; border-color: var(--indigo);
}
.composer select {
  appearance: none; -webkit-appearance: none; color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23A78BFA' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
  border-color: rgba(139,92,246,.35);
}
.composer select:focus { border-color: #A78BFA; box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.composer select option { background: var(--bg-elevated); color: var(--text); }
.composer label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; display: block; margin: 14px 0 6px; }
.composer .field-hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.composer .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pain-slider { width: 100%; accent-color: var(--pink); }
.composer-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.char-count { font-size: 12px; color: var(--text-faint); }

/* ── Post card ───────────────────────────────────────────────────── */
.post-card { padding: 20px; margin-bottom: 16px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px; font-family: 'Manrope', sans-serif;
}
.post-handle { font-weight: 700; font-size: 14px; }
.post-meta { font-size: 12px; color: var(--text-faint); }
.category-pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); color: #fff; }
.post-text { font-size: 16px; line-height: 1.55; margin: 4px 0 12px; white-space: pre-wrap; }
.wishful-box {
  border-left: 3px solid var(--pink); background: var(--surface); border-radius: 0 12px 12px 0;
  padding: 10px 14px; font-size: 14px; color: var(--text-muted); margin-bottom: 14px;
}
.wishful-box b { color: var(--pink); }
.post-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-btn {
  display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-pill); padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer;
}
.action-btn:hover { color: var(--text); }
.action-btn.active { color: #fff; border-color: transparent; }
.action-btn.like.active { background: linear-gradient(100deg, var(--blue), var(--cyan)); }
.action-btn.same.active { background: linear-gradient(100deg, var(--pink), var(--orange)); }
.pain-tag { margin-left: auto; font-size: 12px; color: var(--text-faint); font-weight: 700; }

/* ── Comments ────────────────────────────────────────────────────── */
.comments { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: none; }
.comments.open { display: block; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; }
.comment .avatar { width: 30px; height: 30px; font-size: 11px; }
.comment-body { background: var(--surface); border-radius: 14px; padding: 8px 12px; font-size: 13px; flex: 1; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 9px 14px; color: var(--text); }

/* ── Leaderboard / opportunities / admin shared ─────────────────── */
.section-title { font-size: 22px; font-weight: 800; margin: 24px 0 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.dashboard-charts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 800px) { .dashboard-charts { grid-template-columns: 1fr; } }
.stat-card { padding: 18px; text-align: center; }
.stat-card h3 { font-size: 26px; margin: 0; background: linear-gradient(100deg, var(--indigo), var(--pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card p { color: var(--text-muted); font-size: 13px; margin: 6px 0 0; }
.leaderboard-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.leaderboard-rank { width: 24px; font-weight: 800; color: var(--text-faint); }
.opp-card { padding: 18px; }
.opp-score { display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill); font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(100deg, var(--green), var(--cyan)); }

/* ── Admin ───────────────────────────────────────────────────────── */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; flex: none; border-right: 1px solid var(--border); padding: 20px 14px; }
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text-muted); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--surface); color: var(--text); }
.admin-main { flex: 1; padding: 24px; max-width: 1200px; min-width: 0; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.admin-table th { color: var(--text-faint); font-weight: 700; text-transform: uppercase; font-size: 11px; }
.status-pill { padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; }
.status-approved { background: rgba(34,197,94,.15); color: var(--green); }
.status-pending { background: rgba(234,179,8,.15); color: var(--yellow); }
.status-rejected { background: rgba(239,68,68,.15); color: var(--danger); }
.login-shell { max-width: 380px; margin: 90px auto; }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.footer-brand-name { font-size: 20px; margin-top: 12px; }
.footer-tagline { color: var(--text-muted); font-size: 13px; margin: 10px 0 0; max-width: 320px; line-height: 1.6; }
.footer-links h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin: 0 0 14px; }
.footer-links a { display: block; color: var(--text-muted); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 20px; text-align: center; }
.footer-bottom p { margin: 0; color: var(--text-faint); font-size: 12px; }

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-strong); border: 1px solid var(--border); border-radius: 14px; padding: 12px 20px;
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.55); align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-card { width: 100%; max-width: 420px; padding: 22px; }
.modal-card textarea:focus { outline: none; border-color: var(--indigo); }

/* ── Responsive ──────────────────────────────────────────────────── */

/* Filter panel: side-by-side State/City on tablet+, stacked on phones. */
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Admin: sidebar becomes a horizontal scrollable bar above the content
   instead of a fixed-width column eating half a phone screen. */
@media (max-width: 720px) {
  .admin-shell { flex-direction: column; min-height: 0; }
  .admin-sidebar {
    width: auto; border-right: none; border-bottom: 1px solid var(--border);
    display: flex; gap: 4px; overflow-x: auto; padding: 10px 12px; white-space: nowrap;
  }
  .admin-sidebar > div:first-child { display: none; } /* "Wishful Admin" wordmark - redundant once stacked */
  .admin-sidebar a { margin-bottom: 0; flex: 0 0 auto; }
  .admin-sidebar a[style*="margin-top"] { display: none; } /* "Back to site" - already reachable via nav elsewhere on mobile */
  .admin-main { padding: 16px; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .footer-brand-name { margin-top: 8px; }
  .footer-tagline { max-width: none; margin-left: auto; margin-right: auto; }
  .footer-links a { text-align: center; }
}

@media (max-width: 480px) {
  .composer .row { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-sub { display: none; }
  /*.nav-handle { display: none; }*/
}
