:root {
  --primary: #6366f1;
  --secondary: #0ea5e9;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1e2230;
  --muted: #6b7280;
  --border: #e7e9f0;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(20, 20, 43, 0.06);
  --input-bg: #fcfcfe;
  --sidebar-bg: #111827;
  --overlay: rgba(15, 17, 26, 0.55);
}

html[data-theme="dark"] {
  --bg: #0f1117;
  --card: #171a23;
  --text: #e8e9ee;
  --muted: #9aa1b1;
  --border: #2a2e3b;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --input-bg: #1d2029;
  --sidebar-bg: #0a0c12;
  --overlay: rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  transition: background-color .2s ease, color .2s ease;
}

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Navbar ---------- */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color .2s ease, border-color .2s ease;
}
.navbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1180px;
  margin: 0 auto;
}
.brand {
  font-weight: 800;
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--text); font-weight: 500; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.wallet-pill {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 6px 16px rgba(99,102,241,.28); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  background: #0a1f44;
  color: #fff;
  padding: 40px 0 50px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.15), transparent 55%);
}
.hero .inner { position: relative; display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.hero-text { flex: 1; min-width: 280px; }
.hero-text h1 { font-size: 42px; font-weight: 800; margin: 0 0 16px; line-height: 1.15; }
.hero-text p { font-size: 17px; opacity: .92; margin-bottom: 28px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero-visual { flex: 0 0 220px; display: flex; justify-content: center; }

.announcement-bar {
  background: #111827;
  color: #fff;
  padding: 9px 0;
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
}
.announcement-track {
  display: inline-flex;
  width: max-content;
  animation: announcement-scroll 26s linear infinite;
}
.announcement-bar:hover .announcement-track { animation-play-state: paused; }
.announcement-item {
  display: inline-block;
  padding-right: 60px;
  white-space: nowrap;
}
@keyframes announcement-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .announcement-track { animation: none; }
  .announcement-bar { overflow-x: auto; }
}

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: -35px;
  position: relative;
  z-index: 2;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  text-align: center;
}
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--text); }
.stat-card .label { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.section-title p { color: var(--muted); max-width: 560px; margin: 0 auto; }

.section-services {
  background: linear-gradient(180deg, rgba(99,102,241,.08), rgba(14,165,233,.04) 55%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.section-ways-to-earn { padding-top: 20px; }
.section-eyebrow {
  display: inline-block; padding: 5px 14px; margin-bottom: 12px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary); background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.25);
}
.section-services .section-title h2 { font-size: 36px; }
.section-services .feature-card { border-color: rgba(99,102,241,.15); }

.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.section-how-it-works {
  background: linear-gradient(180deg, rgba(14,165,233,.08), rgba(99,102,241,.04) 55%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-eyebrow-alt {
  color: var(--secondary); background: rgba(14,165,233,.12);
  border-color: rgba(14,165,233,.25);
}
.section-how-it-works .section-title h2 { font-size: 36px; }
.how-it-works-grid { grid-template-columns: repeat(3, 1fr); }
.step-card {
  position: relative; border-color: rgba(14,165,233,.15);
}
.step-card:not(:last-child)::after {
  content: "→";
  position: absolute; top: 50%; right: -34px; transform: translateY(-50%);
  font-size: 22px; font-weight: 700; color: var(--secondary); opacity: .6;
}
@media (max-width: 900px) {
  .step-card:not(:last-child)::after { display: none; }
}
.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform .2s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; margin: 0 auto 16px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Homepage post cards (Featured Jobs / Paid to Write / Marketplace) ---------- */
.post-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.post-card {
  display: flex; align-items: stretch;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  overflow: hidden; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(17, 24, 39, .14);
  border-color: rgba(99, 102, 241, .35);
  text-decoration: none;
}
.post-card-media {
  position: relative; flex: 0 0 42%; max-width: 42%; overflow: hidden; min-height: 150px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.post-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.post-card:hover .post-card-media img { transform: scale(1.08); }
.post-card-media.is-icon { display: flex; align-items: center; justify-content: center; }
.post-card-media.is-icon .post-card-emoji { font-size: 42px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }
.post-card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.32), rgba(0,0,0,0) 55%);
  pointer-events: none;
}
.post-card-eyebrow {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(17, 24, 39, .55); backdrop-filter: blur(3px);
  color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px;
}
.post-card-featured-flag {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: #f59e0b; color: #fff; font-size: 12px; font-weight: 800;
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(245, 158, 11, .4);
}
.post-card-body {
  flex: 1; min-width: 0; padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.post-card-title {
  margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.32; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-sub { margin: 0; font-size: 12.5px; color: var(--muted); }
.post-card-meta { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.post-card-price { font-weight: 800; color: var(--success); font-size: 15px; }

/* ---------- Cards / Panels ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  border: 1px solid var(--border);
  transition: background-color .2s ease, border-color .2s ease;
  overflow-x: auto;
}
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted, #6b7280); }
.form-control {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1.5px solid var(--border); font-size: 14.5px; background: var(--input-bg);
  color: var(--text);
  transition: border-color .15s, background-color .2s ease, color .2s ease;
}
.form-control:focus { outline: none; border-color: var(--primary); background: var(--card); }
.form-control::placeholder { color: var(--muted); opacity: .8; }
textarea.form-control { resize: vertical; min-height: 90px; }
.auth-wrap {
  max-width: 420px; margin: 60px auto; padding: 0 20px;
}
.auth-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 30px; }
.auth-card h2 { margin-top: 0; text-align: center; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14.5px; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ---------- Tables ---------- */
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th, table.table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.table th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
table.table tr:hover td { background: rgba(99, 102, 241, 0.06); }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; display: inline-block; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-suspended { background: #fee2e2; color: #991b1b; }
.badge-inactive { background: #fef3c7; color: #92400e; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-failed { background: #fee2e2; color: #991b1b; }

html[data-theme="dark"] .alert-success { background: rgba(34,197,94,.12); color: #4ade80; border-color: rgba(34,197,94,.3); }
html[data-theme="dark"] .alert-danger { background: rgba(239,68,68,.12); color: #f87171; border-color: rgba(239,68,68,.3); }
html[data-theme="dark"] .alert-info { background: rgba(59,130,246,.12); color: #93c5fd; border-color: rgba(59,130,246,.3); }
html[data-theme="dark"] .badge-pending,
html[data-theme="dark"] .badge-inactive { background: rgba(245,158,11,.15); color: #fbbf24; }
html[data-theme="dark"] .badge-approved,
html[data-theme="dark"] .badge-active { background: rgba(34,197,94,.15); color: #4ade80; }
html[data-theme="dark"] .badge-rejected,
html[data-theme="dark"] .badge-suspended,
html[data-theme="dark"] .badge-failed { background: rgba(239,68,68,.15); color: #f87171; }
html[data-theme="dark"] .badge-processing { background: rgba(59,130,246,.15); color: #60a5fa; }

/* ---------- Dashboard layout ---------- */
.attention-panel { border: 1px solid #fde68a; background: #fffbeb; border-radius: 14px; padding: 20px 22px; margin-bottom: 26px; }
html[data-theme="dark"] .attention-panel { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3); }
.attention-panel.all-clear { border-color: #a7f3d0; background: #ecfdf5; }
html[data-theme="dark"] .attention-panel.all-clear { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.3); }
.attention-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.attention-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: var(--card-bg, #fff); border: 1px solid rgba(0,0,0,.06); text-decoration: none; color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
html[data-theme="dark"] .attention-item { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.attention-item:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.08); text-decoration: none; }
.attention-item .attn-icon { font-size: 20px; }
.attention-item .attn-label { flex: 1; font-size: 13.5px; font-weight: 600; }
.attention-item .attn-count { font-weight: 800; font-size: 15px; background: #f59e0b; color: #fff; border-radius: 20px; padding: 2px 10px; min-width: 26px; text-align: center; }
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.dash-card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.dash-card .icon { font-size: 22px; margin-bottom: 8px; }
.dash-card .value { font-size: 22px; font-weight: 800; }
.dash-card .label { color: var(--muted); font-size: 13px; }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.action-card {
  background: var(--card); border-radius: var(--radius); padding: 24px 18px;
  box-shadow: var(--shadow); text-align: center; border: 1px solid var(--border);
  transition: transform .15s;
}
.action-card:hover { transform: translateY(-3px); text-decoration: none; }
.action-card .emoji { font-size: 30px; margin-bottom: 10px; }
.action-card h4 { margin: 0 0 4px; color: var(--text); font-size: 15px; }
.action-card p { margin: 0; color: var(--muted); font-size: 12.5px; }

/* ---------- Support tickets (user + admin) ---------- */
.support-grid { display:grid; grid-template-columns: 300px 1fr; gap:20px; align-items:flex-start; }
.support-grid-admin { display:grid; grid-template-columns: 340px 1fr; gap:20px; align-items:flex-start; }
.support-list-panel { max-height:640px; overflow-y:auto; }
.support-thread { max-height:440px; overflow-y:auto; display:flex; flex-direction:column; gap:10px; margin:16px 0; }
.support-bubble { max-width:80%; }

/* ---------- Marketplace product image (square, full image visible) ---------- */
.marketplace-img-wrap {
  width: 60%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 14px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(100,116,139,.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.marketplace-img-wrap img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Footer ---------- */
footer { background: #111827; color: #cbd5e1; padding: 40px 0 20px; margin-top: 60px; }
footer .foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 26px; }
footer h4 { color: #fff; margin-bottom: 14px; }
footer a { color: #cbd5e1; }
footer .foot-bottom { border-top: 1px solid #1f2937; padding-top: 18px; text-align: center; font-size: 13px; color: #94a3b8; }

.social-links-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.social-links-footer a { font-size: 12.5px; }
.social-links-footer .social-icon-link { display: inline-block; line-height: 0; }
.social-links-footer .social-icon-img { height: 22px; width: 22px; object-fit: contain; vertical-align: middle; transition: transform .15s ease; }
/* Bigger, more prominent social icons on the homepage */
.social-links-footer.social-links-home { gap: 16px; }
.social-links-footer.social-links-home a { font-size: 15px; }
.social-links-footer.social-links-home .social-icon-img { height: 56px; width: 56px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.social-links-footer.social-links-home .social-icon-img:hover { transform: scale(1.08); }

.app-download-links .app-download-img { height: 46px; width: auto; border-radius: 8px; }

.ad-slot { margin: 16px 0; text-align: center; }
.ad-slot-script, .ad-slot-popunder { margin: 0; }

/* ---------- Admin layout ---------- */
.admin-body { display: flex; min-height: 100vh; background: var(--bg); }
.admin-sidebar {
  width: 250px; background: #111827; color: #e5e7eb; flex-shrink: 0;
  padding: 22px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .brand { padding: 0 22px 22px; display: block; color: #fff; -webkit-text-fill-color: #fff;}
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 11px 22px;
  color: #cbd5e1; font-size: 14.5px; font-weight: 500;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.admin-sidebar a .nav-badge { margin-left: auto; padding: 2px 8px; font-size: 11px; }
.admin-sidebar .sec-title { padding: 16px 22px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; }
.admin-main { flex: 1; padding: 26px 30px; max-width: calc(100% - 250px); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-topbar h1 { font-size: 22px; margin: 0; }

/* ---------- Misc ---------- */
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.tag-input-row { display:flex; gap: 10px; }
.progress-bar-outer { background: var(--border); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar-inner { background: linear-gradient(135deg, var(--primary), var(--secondary)); height: 100%; }

/* ---------- Theme toggle ---------- */
.theme-toggle-btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--card); color: var(--text);
  cursor: pointer; font-size: 17px; line-height: 1; padding: 0;
  transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
  flex-shrink: 0;
}
.theme-toggle-btn:hover, .icon-btn:hover { transform: translateY(-1px); }
.theme-toggle-btn .icon-dark { display: none; }
html[data-theme="dark"] .theme-toggle-btn .icon-light { display: none; }
html[data-theme="dark"] .theme-toggle-btn .icon-dark { display: inline; }

/* Sidebar-hosted toggle (dark background, needs its own coloring) */
.admin-sidebar .theme-toggle-btn, .admin-mobile-bar .icon-btn { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }
.admin-sidebar .theme-toggle-btn { width: 100%; border-radius: 10px; justify-content: flex-start; padding: 10px 12px; font-size: 14px; gap: 8px; }

/* ---------- Public nav: mobile hamburger ---------- */
.nav-toggle-btn {
  display: none; width: 40px; height: 40px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--card); color: var(--text);
  font-size: 19px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-links-wrap { display: flex; align-items: center; gap: 22px; }

/* ---------- Admin: mobile top bar + overlay ---------- */
.admin-mobile-bar { display: none; }
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: var(--overlay); z-index: 190;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 900px) {
  .stats-grid, .features-grid, .dash-grid, .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .features-grid[style] { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-2, .support-grid, .support-grid-admin { grid-template-columns: 1fr; }
  footer .foot-grid { grid-template-columns: 1fr; }
  .hero .inner { flex-direction: column; }
  .admin-main { max-width: 100%; padding: 18px 16px 30px; }
  .admin-sidebar { position: fixed; left: -270px; z-index: 200; transition: left .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .admin-sidebar.open { left: 0; }
  .admin-mobile-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 4px 2px 20px;
  }
  .admin-mobile-bar .brand { font-weight: 800; font-size: 17px; }
  .admin-topbar { flex-wrap: wrap; gap: 10px; }
  .admin-topbar form { width: 100%; }
  .admin-topbar form input.form-control { width: 100% !important; }
  .support-list-panel { max-height: 280px; }
  .marketplace-img-wrap { width: 75%; }
  .post-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-grid, .features-grid, .dash-grid, .quick-actions, .attention-list { grid-template-columns: 1fr; }
  .nav-links-wrap { display: none; }
  .nav-toggle-btn { display: inline-flex; }
  .nav-links-wrap.mobile-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 14px 20px 20px; box-shadow: var(--shadow); z-index: 99;
  }
  .nav-links-wrap.mobile-open .nav-links { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-links-wrap.mobile-open .nav-links a { padding: 10px 4px; }
  .nav-links-wrap.mobile-open .wallet-pill { text-align: center; margin: 6px 0; }
  .navbar .inner { position: relative; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
  .card { padding: 18px; }
  .admin-main { padding: 16px 12px 26px; }
  .hero-text h1 { font-size: 30px; }
  .dash-card .value, .stat-card .num { font-size: 19px; }
  .support-thread { max-height: 320px; }
  .support-bubble { max-width: 92%; }
  .marketplace-img-wrap { width: 85%; }
  .post-card { flex-direction: column; }
  .post-card-media { flex: 0 0 auto; max-width: 100%; height: 150px; }
  .post-card-body { padding: 16px 18px; }
}

/* ---------------- Sponsored Posts ---------------- */
.richtext-toolbar {
  display: flex; flex-wrap: wrap; gap: 6px;
  background: var(--bg, #f8f9fb); border: 1px solid var(--border); border-bottom: none;
  border-radius: 10px 10px 0 0; padding: 8px;
}
.richtext-toolbar button {
  background: var(--card); border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 10px; font-size: 13px; cursor: pointer; color: var(--text);
}
.richtext-toolbar button:hover { border-color: var(--primary); color: var(--primary); }
.richtext-editor {
  min-height: 180px; border: 1px solid var(--border); border-radius: 0 0 10px 10px;
  padding: 12px 14px; background: var(--card); font-size: 14.5px; line-height: 1.6;
}
.richtext-editor:focus { outline: none; border-color: var(--primary); }
.duration-options { display: flex; flex-wrap: wrap; gap: 10px; }
.duration-option {
  display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 14px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.duration-option:has(input:checked) { border-color: var(--primary); background: rgba(99,102,241,.08); }
.post-body { font-size: 16px; line-height: 1.75; }
.post-body h1, .post-body h2, .post-body h3 { margin: 22px 0 10px; }
.post-body p { margin: 0 0 14px; }
.post-body ul, .post-body ol { margin: 0 0 14px 22px; }
.post-body a { color: var(--primary); text-decoration: underline; }

/* ---------- Notification bell (user navbar + admin bar) ---------- */
.notif-bell-wrap { position: relative; flex-shrink: 0; }
.notif-bell-btn { position: relative; }
.notif-bell-count {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 800;
  line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--card);
}
.notif-dropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0; width: 340px; max-width: 88vw;
  max-height: 420px; overflow-y: auto; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,.15)); z-index: 250;
}
.notif-bell-wrap.open .notif-dropdown { display: block; }
.notif-dropdown-head {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 14px;
  border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; color: var(--text);
  position: sticky; top: 0; background: var(--card);
}
.notif-mark-all {
  background: none; border: none; color: var(--primary); font-size: 12.5px; font-weight: 600;
  cursor: pointer; padding: 0;
}
.notif-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13.5px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item-text { flex: 1; font-size: 13.5px; line-height: 1.45; color: var(--text); text-decoration: none; }
.notif-item-text:hover { color: var(--primary); }
.notif-item-danger .notif-item-text { border-left: 3px solid #ef4444; padding-left: 8px; }
.notif-item-info .notif-item-text { border-left: 3px solid var(--secondary); padding-left: 8px; }
.notif-item-success .notif-item-text { border-left: 3px solid #22c55e; padding-left: 8px; }
.notif-dismiss {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; border: none; background: var(--bg);
  color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; display: flex;
  align-items: center; justify-content: center;
}
.notif-dismiss:hover { background: #ef4444; color: #fff; }
.admin-notif-bar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
@media (max-width: 768px) {
  .notif-dropdown { position: fixed; top: 62px; right: 10px; left: 10px; width: auto; max-width: none; }
}


/* ---------------- PWA Install Banner ---------------- */
.pwa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  max-width: 480px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(20, 20, 43, 0.18);
  padding: 14px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  animation: pwaSlideUp .3s ease;
}
.pwa-install-banner.show { display: flex; }
.pwa-install-banner .pwa-install-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.pwa-install-banner .pwa-install-icon img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.pwa-install-banner .pwa-install-body { flex: 1; min-width: 0; }
.pwa-install-banner .pwa-install-title { font-weight: 700; font-size: 14px; color: var(--text); margin: 0 0 2px; }
.pwa-install-banner .pwa-install-text { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.4; }
.pwa-install-banner .pwa-install-actions { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
.pwa-install-banner .pwa-install-btn {
  border: none; border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); cursor: pointer;
  white-space: nowrap;
}
.pwa-install-banner .pwa-install-close {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--bg);
  color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; display: flex;
  align-items: center; justify-content: center;
}
.pwa-install-banner .pwa-install-close:hover { background: #ef4444; color: #fff; }
@keyframes pwaSlideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 480px) {
  .pwa-install-banner { flex-wrap: wrap; }
  .pwa-install-banner .pwa-install-actions { width: 100%; justify-content: flex-end; }
}
