/*
Theme Name: Opinion.Africa
Theme URI: https://opinion.africa
Author: Opinion.Africa
Author URI: https://opinion.africa
Description: A vibrant, high-converting research panel theme. Native WordPress authentication, member dashboard with Surveys, Profile and Rewards tabs, frontend Admin and PM panels, project-based survey distribution and FCM push notifications.
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: opinion-africa
Tags: business, custom-logo, custom-menu, full-width-template, theme-options, threaded-comments, translation-ready
*/

/* ==========================================================================
   Reset / WordPress fixes
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; }

/* WP admin bar offset */
.admin-bar header.site-header,
.admin-bar header.dash-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar header.site-header,
  .admin-bar header.dash-header { top: 46px; }
}

/* Reset WP defaults that interfere */
.site-header *, .site-footer *, .dash-header *, .dash-main *,
.modal *, .redeem-modal *, .hero *, section *, .container * {
  box-sizing: border-box;
}
.site-footer ul, .nav-links, .menu-dropdown,
.modal-tabs, .tabs, .options { list-style: none; padding: 0; margin: 0; }
.site-footer p, .hero p, section p, .modal p,
.welcome p, .panel-head p { margin: 0 0 6px; }
.modal h3, .welcome h1, .panel-head h2,
.section-head h2, .hero h1 { margin: 0 0 14px; }
.btn { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
a { color: inherit; }

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root{
  --brand:#C22C91; --brand-dark:#9A2274; --brand-light:#F7E5F0;
  --accent:#FFD23F; --accent-2:#00C2A8;
  --ink:#1A0E1A; --ink-soft:#5A4A5A;
  --bg:#FFFAFD; --card:#fff; --border:#F0E0EA;
  --shadow:0 10px 30px rgba(194,44,145,.08);
  --shadow-lg:0 20px 60px rgba(194,44,145,.18);
}

body{
  font-family:'DM Sans', system-ui, -apple-system, sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.6;
  font-size:16px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
body.modal-open{overflow:hidden}

h1, h2, h3, h4, h5, h6 {
  font-family:'Plus Jakarta Sans', system-ui, sans-serif;
  line-height:1.15;
  letter-spacing:-.02em;
  color:var(--ink);
  font-weight:700;
}

.container{ max-width:1200px; margin:0 auto; padding:0 24px; width:100%; }

/* ==========================================================================
   Announcement bar
   ========================================================================== */
.announce{
  background:linear-gradient(90deg, var(--brand), #E94BAE);
  color:#fff; text-align:center; font-size:14px;
  padding:10px 16px; font-weight:500;
}
.announce strong{ color:var(--accent); }
.announce a { color:#fff; }

/* ==========================================================================
   Site header (landing)
   ========================================================================== */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,250,253,.85);
  -webkit-backdrop-filter:saturate(180%) blur(12px);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--border);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  height:72px;
}
.logo{
  display:inline-flex; align-items:center; gap:10px;
  font-weight:800; font-size:20px;
  font-family:'Plus Jakarta Sans', sans-serif;
  text-decoration:none; color:var(--ink);
}
.logo img{ width:40px; height:40px; flex-shrink:0; }
.nav-links{
  display:flex; gap:32px; align-items:center;
}
.nav-links a, .nav-links li a{
  font-weight:500; font-size:15px; color:var(--ink-soft);
  text-decoration:none;
}
.nav-links a:hover{ color:var(--brand); }
.nav-cta{ display:flex; gap:12px; align-items:center; }

@media (max-width:820px){
  .nav-links{ display:none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 22px; border-radius:999px;
  font-weight:600; font-size:15px;
  cursor:pointer; border:none;
  font-family:'Plus Jakarta Sans', sans-serif;
  text-decoration:none; line-height:1;
  transition:transform .15s ease, box-shadow .2s ease, background .2s, color .2s;
  white-space:nowrap;
}
.btn-primary{
  background:var(--brand); color:#fff;
  box-shadow:0 8px 24px rgba(194,44,145,.35);
}
.btn-primary:hover{
  background:var(--brand-dark); color:#fff;
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(194,44,145,.45);
}
.btn-primary:disabled{ opacity:.6; cursor:not-allowed; transform:none; }
.btn-ghost{
  background:transparent; color:var(--ink);
  border:1.5px solid var(--border);
}
.btn-ghost:hover{ border-color:var(--brand); color:var(--brand); }
.btn-lg{ padding:18px 32px; font-size:17px; }
.btn-block{ width:100%; }
.btn-sm{ padding:8px 16px; font-size:13px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position:relative; overflow:hidden;
  padding:60px 0 100px;
}
.hero::before{
  content:""; position:absolute;
  top:-120px; right:-120px;
  width:520px; height:520px;
  background:radial-gradient(circle, rgba(194,44,145,.18), transparent 60%);
  border-radius:50%; pointer-events:none;
}
.hero::after{
  content:""; position:absolute;
  bottom:-160px; left:-100px;
  width:420px; height:420px;
  background:radial-gradient(circle, rgba(255,210,63,.25), transparent 60%);
  border-radius:50%; pointer-events:none;
}
.hero-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:64px;
  align-items:center;
  position:relative; z-index:1;
}
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--brand-light); color:var(--brand);
  padding:8px 14px; border-radius:999px;
  font-weight:600; font-size:13px;
  margin-bottom:20px;
}
.eyebrow .dot{
  width:8px; height:8px; border-radius:50%;
  background:var(--brand);
  animation:pulse 1.5s infinite;
}
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.4} }

.hero h1{
  font-size:clamp(36px, 5vw, 60px);
  font-weight:800; margin-bottom:20px;
}
.hero h1 .accent{
  background:linear-gradient(120deg, var(--brand), #E94BAE 60%, var(--accent));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.hero p.lead{
  font-size:19px; color:var(--ink-soft);
  max-width:520px; margin:0 0 32px;
}
.hero-cta{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:32px; }
.hero-trust{
  display:flex; gap:24px; flex-wrap:wrap; align-items:center;
  font-size:14px; color:var(--ink-soft);
}
.hero-trust span{
  display:inline-flex; align-items:center; gap:6px; font-weight:500;
}
.check{ color:var(--accent-2); font-weight:800; }

@media (max-width:900px){
  .hero-grid{ grid-template-columns:1fr; gap:48px; }
}

/* ==========================================================================
   Hero phone mockup
   ========================================================================== */
.hero-visual{ position:relative; }
.phone{
  background:#fff; border-radius:32px; padding:18px;
  box-shadow:var(--shadow-lg);
  border:1px solid var(--border);
  transform:rotate(-2deg);
}
.phone-screen{
  background:linear-gradient(180deg, var(--brand-light), #fff);
  border-radius:20px; padding:24px;
}
.phone-header{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:18px;
}
.avatar{
  width:40px; height:40px; border-radius:50%;
  background:linear-gradient(135deg, var(--brand), var(--accent));
  display:grid; place-items:center;
  color:#fff; font-weight:700;
}
.balance-card{
  background:linear-gradient(135deg, var(--brand), #E94BAE);
  color:#fff; border-radius:16px; padding:20px;
  margin-bottom:16px;
  box-shadow:0 12px 24px rgba(194,44,145,.3);
}
.balance-card .label{
  font-size:12px; opacity:.85; margin-bottom:6px;
  text-transform:uppercase; letter-spacing:.08em;
}
.balance-card .amount{
  font-size:34px; font-weight:800;
  font-family:'Plus Jakarta Sans', sans-serif;
}
.balance-card .sub{ font-size:13px; opacity:.9; margin-top:4px; }
.survey-item{
  background:#fff; border-radius:14px; padding:14px;
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:10px; border:1px solid var(--border);
}
.survey-item .title{ font-weight:600; font-size:14px; }
.survey-item .meta{ font-size:12px; color:var(--ink-soft); }
.reward{
  background:var(--accent); color:var(--ink);
  padding:6px 12px; border-radius:999px;
  font-weight:700; font-size:13px;
}

.floating-badge{
  position:absolute; background:#fff; padding:14px 18px;
  border-radius:16px; box-shadow:var(--shadow-lg);
  display:flex; align-items:center; gap:10px;
  font-weight:600; font-size:14px;
}
.badge-1{ top:30px; left:-30px; transform:rotate(-4deg); }
.badge-2{ bottom:40px; right:-30px; transform:rotate(3deg); }
.badge-icon{
  width:36px; height:36px; border-radius:10px;
  display:grid; place-items:center; font-size:18px;
  flex-shrink:0;
}
.badge-1 .badge-icon{ background:#E6FAF5; color:var(--accent-2); }
.badge-2 .badge-icon{ background:#FFF6D6; color:#B8860B; }

@media (max-width:600px){
  .floating-badge{ display:none; }
}

/* ==========================================================================
   Logo bar
   ========================================================================== */
.logos{
  background:#fff;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  padding:36px 0;
}
.logos-inner{
  display:flex; flex-wrap:wrap; align-items:center;
  justify-content:space-around; gap:24px;
}
.logos .label{
  font-size:13px; color:var(--ink-soft);
  font-weight:600; text-transform:uppercase; letter-spacing:.1em;
  flex-basis:100%; text-align:center; margin-bottom:8px;
}
.logo-pill{
  font-weight:700; color:var(--ink-soft);
  font-size:18px; opacity:.7;
  font-family:'Plus Jakarta Sans', sans-serif;
}

/* ==========================================================================
   Section base
   ========================================================================== */
section.padded{ padding:100px 0; }
.section-head{
  text-align:center; max-width:680px;
  margin:0 auto 56px;
}
.section-head .eyebrow{ margin-bottom:16px; }
.section-head h2{
  font-size:clamp(30px, 4vw, 44px);
  font-weight:800; margin:0 0 14px;
}
.section-head p{ font-size:18px; color:var(--ink-soft); margin:0; }

/* ==========================================================================
   How it works steps
   ========================================================================== */
.steps{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:24px;
}
.step{
  background:#fff; border:1px solid var(--border);
  border-radius:24px; padding:32px;
  transition:transform .2s, box-shadow .2s, border-color .2s;
}
.step:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-lg);
  border-color:var(--brand-light);
}
.step-num{
  width:48px; height:48px; border-radius:14px;
  background:var(--brand-light); color:var(--brand);
  display:grid; place-items:center;
  font-weight:800; font-size:20px;
  font-family:'Plus Jakarta Sans', sans-serif;
  margin-bottom:20px;
}
.step h3{ font-size:22px; margin:0 0 10px; }
.step p{ color:var(--ink-soft); margin:0; }

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

/* ==========================================================================
   Stats block
   ========================================================================== */
.stats{
  background:linear-gradient(135deg, var(--brand), #E94BAE);
  border-radius:32px; padding:56px 32px;
  color:#fff; position:relative; overflow:hidden;
}
.stats::before, .stats::after{
  content:""; position:absolute; border-radius:50%;
}
.stats::before{
  width:300px; height:300px;
  background:rgba(255,210,63,.2);
  top:-100px; right:-80px;
}
.stats::after{
  width:200px; height:200px;
  background:rgba(255,255,255,.08);
  bottom:-60px; left:-60px;
}
.stats-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:32px;
  position:relative; z-index:1;
  text-align:center;
}
.stat .num{
  font-size:44px; font-weight:800;
  font-family:'Plus Jakarta Sans', sans-serif;
  color:#fff;
}
.stat .num span{ color:var(--accent); }
.stat .lbl{ opacity:.9; font-size:14px; margin-top:6px; }

@media (max-width:820px){
  .stats-grid{ grid-template-columns:repeat(2, 1fr); }
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.tgrid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:24px;
}
.tcard{
  background:#fff; border:1px solid var(--border);
  border-radius:24px; padding:28px;
  transition:transform .2s, box-shadow .2s;
}
.tcard:hover{ transform:translateY(-4px); box-shadow:var(--shadow); }
.stars{
  color:var(--accent); font-size:18px;
  margin-bottom:14px; letter-spacing:2px;
}
.tcard p{ margin:0 0 20px; font-size:15px; color:var(--ink); }
.tperson{
  display:flex; align-items:center; gap:12px;
}
.tavatar{
  width:48px; height:48px; border-radius:50%;
  display:grid; place-items:center;
  color:#fff; font-weight:700;
  font-family:'Plus Jakarta Sans', sans-serif;
  flex-shrink:0;
}
.a1{ background:linear-gradient(135deg, #C22C91, #E94BAE); }
.a2{ background:linear-gradient(135deg, #00C2A8, #1FA98F); }
.a3{ background:linear-gradient(135deg, #FFD23F, #F39C12); }
.tname{ font-weight:700; font-size:15px; }
.tloc{ font-size:13px; color:var(--ink-soft); }
.tearned{
  margin-left:auto;
  background:var(--brand-light); color:var(--brand);
  padding:6px 12px; border-radius:999px;
  font-weight:700; font-size:13px;
  flex-shrink:0;
}

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

/* ==========================================================================
   Trust grid
   ========================================================================== */
.trust-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:24px;
}
.trust-item{ text-align:center; padding:24px; }
.trust-icon{
  width:64px; height:64px; border-radius:18px;
  background:var(--brand-light);
  display:grid; place-items:center;
  margin:0 auto 16px;
  font-size:28px;
}
.trust-item h4{ font-size:17px; margin:0 0 8px; font-weight:700; }
.trust-item p{ font-size:14px; color:var(--ink-soft); margin:0; }

@media (max-width:820px){
  .trust-grid{ grid-template-columns:repeat(2, 1fr); }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq{ max-width:780px; margin:0 auto; }
.faq-item{
  background:#fff; border:1px solid var(--border);
  border-radius:16px;
  margin-bottom:12px; overflow:hidden;
}
.faq-item summary{
  padding:22px 24px; cursor:pointer;
  font-weight:600; font-size:16px;
  display:flex; justify-content:space-between; align-items:center;
  list-style:none;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{
  content:"+"; font-size:24px;
  color:var(--brand); transition:transform .2s;
}
.faq-item[open] summary::after{ transform:rotate(45deg); }
.faq-item .faq-body{
  padding:0 24px 22px;
  color:var(--ink-soft); font-size:15px;
}

/* ==========================================================================
   Final CTA
   ========================================================================== */
.final-cta{
  background:linear-gradient(135deg, #1A0E1A, #3B1432);
  border-radius:32px; padding:72px 32px;
  text-align:center; color:#fff;
  position:relative; overflow:hidden;
}
.final-cta::before{
  content:""; position:absolute;
  width:600px; height:600px;
  background:radial-gradient(circle, rgba(194,44,145,.4), transparent 60%);
  top:-200px; left:50%; transform:translateX(-50%);
}
.final-cta > *{ position:relative; z-index:1; }
.final-cta h2{
  font-size:clamp(28px, 4vw, 42px);
  margin:0 0 14px; color:#fff;
}
.final-cta p{
  font-size:18px; opacity:.85;
  margin:0 auto 28px; max-width:520px;
}
.final-cta .btn-primary{
  background:var(--accent); color:var(--ink);
}
.final-cta .btn-primary:hover{
  background:#FFC107; color:var(--ink);
}

/* ==========================================================================
   Site footer (landing)
   ========================================================================== */
.site-footer{
  background:#fff;
  border-top:1px solid var(--border);
  padding:60px 0 30px;
  margin-top:60px;
}
.footer-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:40px;
  margin-bottom:40px;
}
.footer-brand p{
  color:var(--ink-soft); font-size:14px;
  margin-top:14px; max-width:300px;
}
.site-footer h5{
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:700; font-size:14px;
  margin:0 0 18px;
  text-transform:uppercase; letter-spacing:.06em;
}
.site-footer ul{ list-style:none; padding:0; margin:0; }
.site-footer ul li{ margin-bottom:10px; }
.site-footer ul a{
  font-size:14px; color:var(--ink-soft);
  text-decoration:none;
}
.site-footer ul a:hover{ color:var(--brand); }
.footer-bottom{
  border-top:1px solid var(--border);
  padding-top:24px;
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:12px;
  font-size:13px; color:var(--ink-soft);
}
.pay-badges{ display:flex; gap:8px; flex-wrap:wrap; }
.pay-badge{
  background:var(--brand-light); color:var(--brand);
  padding:6px 12px; border-radius:8px;
  font-size:12px; font-weight:600;
}

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

/* ==========================================================================
   Mobile sticky CTA
   ========================================================================== */
.mobile-cta{ display:none; }
@media (max-width:640px){
  .mobile-cta{
    display:block; position:fixed;
    bottom:0; left:0; right:0; z-index:40;
    background:#fff; padding:12px 16px;
    border-top:1px solid var(--border);
    box-shadow:0 -8px 24px rgba(0,0,0,.06);
  }
}

/* ==========================================================================
   Auth modal
   ========================================================================== */
.modal-overlay{
  position:fixed; inset:0; z-index:100;
  background:rgba(26,14,26,.6);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center;
  padding:20px;
  opacity:0; visibility:hidden;
  transition:opacity .25s, visibility .25s;
}
.modal-overlay.active{ opacity:1; visibility:visible; }
.modal{
  background:#fff; border-radius:24px;
  width:100%; max-width:460px;
  max-height:90vh; overflow-y:auto;
  box-shadow:0 30px 80px rgba(0,0,0,.25);
  transform:translateY(20px) scale(.96);
  transition:transform .3s;
  position:relative;
}
.modal-overlay.active .modal{ transform:translateY(0) scale(1); }
.modal-close{
  position:absolute; top:16px; right:16px;
  width:36px; height:36px; border-radius:50%;
  border:none; cursor:pointer;
  background:var(--brand-light); color:var(--brand);
  font-size:20px;
  display:grid; place-items:center;
  z-index:2; padding:0;
}
.modal-close:hover{ background:var(--brand); color:#fff; }

.modal-header{ padding:32px 32px 0; text-align:center; }
.modal-header img{ margin:0 auto 12px; width:56px; height:56px; }
.modal-header h3{ font-size:24px; margin:0 0 6px; font-weight:800; }
.modal-header p{ color:var(--ink-soft); font-size:15px; margin:0; }

.modal-tabs{
  display:flex; background:var(--brand-light);
  margin:24px 32px 0; padding:4px;
  border-radius:12px;
}
.modal-tab{
  flex:1; padding:10px;
  border:none; background:transparent;
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:600; font-size:14px;
  color:var(--ink-soft); cursor:pointer;
  border-radius:9px;
}
.modal-tab.active{
  background:#fff; color:var(--brand);
  box-shadow:0 2px 8px rgba(194,44,145,.15);
}

.modal-body{ padding:24px 32px 32px; }

.form-group{ margin-bottom:16px; }
.form-label{
  display:block; font-size:13px; font-weight:600;
  margin-bottom:6px;
  font-family:'Plus Jakarta Sans', sans-serif;
}
.form-input, .form-select{
  width:100%; padding:14px 16px;
  border:1.5px solid var(--border);
  border-radius:12px;
  font-size:15px;
  font-family:'DM Sans', sans-serif;
  background:#fff; color:var(--ink);
  transition:border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus{
  outline:none; border-color:var(--brand);
  box-shadow:0 0 0 4px rgba(194,44,145,.12);
}
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-helper{ font-size:12px; color:var(--ink-soft); margin-top:6px; }
.form-error{
  font-size:13px; color:#E11D48;
  background:#FEF2F4; padding:8px 12px;
  border-radius:8px;
  margin-top:6px; margin-bottom:6px;
  display:none;
}
.form-error.show{ display:block; }

.checkbox-row{
  display:flex; align-items:flex-start; gap:10px;
  font-size:13px; color:var(--ink-soft);
  margin-bottom:18px;
}
.checkbox-row input{ margin-top:3px; accent-color:var(--brand); }
.checkbox-row a{ color:var(--brand); font-weight:600; }
.forgot-link{
  display:block; text-align:right;
  font-size:13px; color:var(--brand);
  font-weight:600;
  margin-top:-8px; margin-bottom:18px;
  cursor:pointer;
}
.forgot-link:hover{ text-decoration:underline; }

.progress-wrap{ padding:0 32px; margin-top:20px; }
.progress-track{
  height:6px; background:var(--brand-light);
  border-radius:999px; overflow:hidden;
}
.progress-fill{
  height:100%;
  background:linear-gradient(90deg, var(--brand), #E94BAE);
  border-radius:999px;
  transition:width .3s;
  width:33%;
}
.progress-label{
  font-size:12px; color:var(--ink-soft);
  margin-top:8px; text-align:center; font-weight:600;
}

.form-step{ display:none; animation:fadeIn .25s; }
.form-step.active{ display:block; }
@keyframes fadeIn{
  from{ opacity:0; transform:translateY(8px); }
  to{ opacity:1; transform:translateY(0); }
}

.step-actions{ display:flex; gap:10px; margin-top:8px; }
.step-actions .btn{ flex:1; }

.bonus-strip{
  background:linear-gradient(90deg, var(--accent), #FFAA1F);
  color:var(--ink); padding:10px 16px;
  border-radius:12px; text-align:center;
  font-size:13px; font-weight:700;
  margin-bottom:18px;
}

.success-state{ text-align:center; padding:20px 0; }
.success-icon{
  width:80px; height:80px; border-radius:50%;
  background:linear-gradient(135deg, var(--accent-2), #1FA98F);
  color:#fff; font-size:40px;
  display:grid; place-items:center;
  margin:0 auto 20px;
  animation:popIn .4s cubic-bezier(.5, 1.5, .5, 1);
}
@keyframes popIn{ from{transform:scale(0)} to{transform:scale(1)} }

.spinner{
  display:inline-block;
  width:18px; height:18px;
  border:2.5px solid rgba(255,255,255,.4);
  border-top-color:#fff;
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

@media (max-width:520px){
  .modal-header{ padding:28px 22px 0; }
  .modal-tabs{ margin:20px 22px 0; }
  .modal-body{ padding:20px 22px 24px; }
  .progress-wrap{ padding:0 22px; }
  .form-row{ grid-template-columns:1fr; }
}

/* ==========================================================================
   Dashboard / Admin / Projects (shared 'dashboard-page' class)
   ========================================================================== */
body.dashboard-page{ background:var(--bg); }

.loader{
  position:fixed; inset:0;
  background:var(--bg);
  display:grid; place-items:center;
  z-index:200;
}
.loader-content{ text-align:center; padding:24px; }
.loader-content img{
  width:64px; margin:0 auto 16px;
  animation:spin 1.5s linear infinite;
}
.loader-content p{ color:var(--ink-soft); font-weight:600; margin:0; }

.dash-header{
  background:#fff;
  border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:50;
}
.dash-nav{
  max-width:1200px; margin:0 auto; padding:0 24px;
  display:flex; align-items:center; justify-content:space-between;
  height:72px;
}
.user-menu{
  display:flex; align-items:center; gap:14px;
  position:relative;
}
.points-pill{
  background:linear-gradient(135deg, var(--brand), #E94BAE);
  color:#fff; padding:8px 16px;
  border-radius:999px;
  font-weight:700; font-size:14px;
  display:flex; align-items:center; gap:6px;
  box-shadow:0 4px 12px rgba(194,44,145,.3);
}
.points-pill .star{ color:var(--accent); }
.avatar-btn{
  width:40px; height:40px; border-radius:50%;
  border:2px solid var(--border); cursor:pointer;
  background:linear-gradient(135deg, var(--brand), var(--accent));
  color:#fff; font-weight:700;
  display:grid; place-items:center;
  font-family:'Plus Jakarta Sans', sans-serif;
  overflow:hidden; padding:0;
}
.avatar-btn img{ width:100%; height:100%; object-fit:cover; }
.menu-dropdown{
  position:absolute; top:calc(100% + 8px); right:0;
  background:#fff; border:1px solid var(--border);
  border-radius:12px; padding:8px;
  min-width:200px;
  box-shadow:var(--shadow-lg);
  display:none; z-index:60;
}
.menu-dropdown.show{ display:block; }
.menu-dropdown .item{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius:8px;
  font-size:14px; cursor:pointer;
  color:var(--ink); text-decoration:none;
}
.menu-dropdown .item:hover{
  background:var(--brand-light); color:var(--brand);
}
.menu-dropdown .divider-h{
  height:1px; background:var(--border);
  margin:6px 0;
}

.dash-main{
  max-width:1200px; margin:0 auto;
  padding:32px 24px 80px;
}

.welcome{
  background:linear-gradient(135deg, var(--brand), #E94BAE);
  color:#fff; border-radius:24px;
  padding:32px; margin-bottom:32px;
  position:relative; overflow:hidden;
}
.welcome::before{
  content:""; position:absolute;
  width:300px; height:300px;
  background:radial-gradient(circle, rgba(255,210,63,.25), transparent 60%);
  top:-100px; right:-50px;
  border-radius:50%;
}
.welcome > *{ position:relative; z-index:1; }
.welcome h1{
  font-size:28px; font-weight:800;
  margin:0 0 6px; color:#fff;
}
.welcome p{ opacity:.9; margin:0; }
.welcome-stats{
  display:flex; gap:32px;
  margin-top:20px; flex-wrap:wrap;
}
.wstat .num{
  font-size:24px; font-weight:800;
  font-family:'Plus Jakarta Sans', sans-serif;
}
.wstat .lbl{
  font-size:12px; opacity:.85;
  text-transform:uppercase; letter-spacing:.08em;
}

.tabs{
  display:flex; gap:4px;
  background:#fff; border:1px solid var(--border);
  border-radius:14px; padding:6px;
  margin-bottom:24px;
  overflow-x:auto;
}
.tab{
  flex:1; min-width:fit-content;
  padding:12px 18px;
  background:transparent; border:none;
  border-radius:9px;
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:600; font-size:15px;
  color:var(--ink-soft); cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px;
  white-space:nowrap;
}
.tab:hover{ color:var(--brand); }
.tab.active{ background:var(--brand-light); color:var(--brand); }
.tab .badge{
  background:var(--brand); color:#fff;
  font-size:11px; padding:2px 7px;
  border-radius:999px; font-weight:700;
}

.tab-panel{ display:none; }
.tab-panel.active{ display:block; animation:fadeIn .25s; }

.panel-head{ margin-bottom:20px; }
.panel-head h2{ font-size:24px; font-weight:800; margin:0 0 4px; }
.panel-head p{ color:var(--ink-soft); font-size:15px; margin:0; }

.card{
  background:#fff; border:1px solid var(--border);
  border-radius:18px; padding:22px;
  transition:transform .2s, box-shadow .2s;
}
.card:hover{ transform:translateY(-3px); box-shadow:var(--shadow); }

/* Survey grid */
.survey-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));
  gap:18px;
}
.survey-card{ display:flex; flex-direction:column; }
.survey-tag{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px;
  background:var(--brand-light); color:var(--brand);
  padding:4px 10px; border-radius:999px;
  font-weight:700; margin-bottom:12px;
  width:fit-content;
}
.survey-card h3{ font-size:17px; margin:0 0 8px; font-weight:700; }
.survey-card .desc{
  color:var(--ink-soft); font-size:14px;
  margin-bottom:16px; flex:1;
}
.survey-meta{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:16px; padding-top:14px;
  border-top:1px dashed var(--border);
}
.survey-meta .meta-item{ font-size:13px; color:var(--ink-soft); }
.reward-pill{
  background:linear-gradient(135deg, var(--accent), #FFAA1F);
  color:var(--ink); padding:6px 14px;
  border-radius:999px;
  font-weight:800; font-size:14px;
  font-family:'Plus Jakarta Sans', sans-serif;
}

.empty{
  text-align:center; padding:60px 20px;
  background:#fff; border:1px dashed var(--border);
  border-radius:18px;
}
.empty .ico{ font-size:48px; margin-bottom:14px; }
.empty h3{ margin:0 0 6px; }
.empty p{ color:var(--ink-soft); max-width:380px; margin:0 auto; }

/* Profile categories */
.cat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:18px;
}
.cat-card{
  cursor:pointer;
  display:flex; align-items:flex-start; gap:14px;
}
.cat-card .cat-icon{
  width:54px; height:54px; border-radius:14px;
  background:var(--brand-light);
  display:grid; place-items:center; font-size:26px;
  flex-shrink:0;
}
.cat-card h3{ font-size:17px; margin:0 0 4px; }
.cat-card .desc{ font-size:13px; color:var(--ink-soft); margin-bottom:10px; }
.cat-progress{
  height:6px; background:var(--brand-light);
  border-radius:999px; overflow:hidden;
  margin-bottom:6px;
}
.cat-progress-fill{
  height:100%;
  background:linear-gradient(90deg, var(--brand), #E94BAE);
  transition:width .3s;
}
.cat-progress-label{
  font-size:12px; color:var(--ink-soft); font-weight:600;
}
.cat-card.complete .cat-progress-fill{
  background:linear-gradient(90deg, var(--accent-2), #1FA98F);
}

/* Question view */
.q-back{
  display:inline-flex; align-items:center; gap:6px;
  color:var(--brand); font-weight:600; font-size:14px;
  cursor:pointer; margin-bottom:18px;
}
.q-back:hover{ text-decoration:underline; }
.q-progress-wrap{ margin-bottom:24px; }
.q-progress-track{
  height:8px; background:var(--brand-light);
  border-radius:999px; overflow:hidden;
}
.q-progress-fill{
  height:100%;
  background:linear-gradient(90deg, var(--brand), #E94BAE);
  transition:width .3s;
}
.q-progress-label{
  font-size:13px; color:var(--ink-soft);
  margin-top:8px; text-align:center; font-weight:600;
}
.question{ max-width:600px; margin:0 auto; }
.question h2{ font-size:22px; margin:0 0 20px; text-align:center; }
.options{
  display:flex; flex-direction:column; gap:10px;
  margin-bottom:24px;
}
.option{
  display:flex; align-items:center; gap:12px;
  padding:16px 18px;
  background:#fff; border:2px solid var(--border);
  border-radius:14px;
  cursor:pointer;
  transition:all .15s;
  font-weight:500;
}
.option:hover{
  border-color:var(--brand);
  background:var(--brand-light);
}
.option.selected{
  border-color:var(--brand);
  background:var(--brand-light);
  color:var(--brand); font-weight:600;
}
.option .checkbox{
  width:22px; height:22px;
  border:2px solid var(--border);
  border-radius:6px;
  display:grid; place-items:center;
  flex-shrink:0;
  background:#fff;
}
.option .checkbox.radio{ border-radius:50%; }
.option.selected .checkbox{
  background:var(--brand); border-color:var(--brand);
  color:#fff; font-size:14px; font-weight:700;
}
.q-actions{ display:flex; gap:10px; }
.q-actions .btn{ flex:1; }

.saved-toast{
  position:fixed; bottom:24px; left:50%;
  transform:translateX(-50%) translateY(120%);
  background:var(--ink); color:#fff;
  padding:12px 20px; border-radius:999px;
  font-weight:600; font-size:14px;
  box-shadow:var(--shadow-lg);
  transition:transform .3s;
  z-index:80;
}
.saved-toast.show{ transform:translateX(-50%) translateY(0); }

/* Rewards */
.rewards-hero{
  background:linear-gradient(135deg, #1A0E1A, #3B1432);
  color:#fff; border-radius:24px;
  padding:36px; text-align:center;
  margin-bottom:28px;
  position:relative; overflow:hidden;
}
.rewards-hero::before{
  content:""; position:absolute;
  width:500px; height:500px;
  background:radial-gradient(circle, rgba(194,44,145,.4), transparent 60%);
  top:-200px; left:50%; transform:translateX(-50%);
}
.rewards-hero > *{ position:relative; z-index:1; }
.rewards-hero .label{
  text-transform:uppercase; font-size:13px; letter-spacing:.1em;
  opacity:.8; margin-bottom:8px; font-weight:600;
}
.rewards-hero .balance{
  font-size:54px; font-weight:800;
  font-family:'Plus Jakarta Sans', sans-serif;
  color:var(--accent);
}
.rewards-hero .equiv{ opacity:.85; margin-top:4px; }
.threshold-bar{ max-width:480px; margin:24px auto 0; }
.threshold-track{
  height:10px; background:rgba(255,255,255,.15);
  border-radius:999px; overflow:hidden;
}
.threshold-fill{
  height:100%;
  background:linear-gradient(90deg, var(--accent), #FFAA1F);
  border-radius:999px;
  transition:width .4s;
}
.threshold-label{ font-size:13px; opacity:.85; margin-top:10px; }

.redeem-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:16px;
  margin-bottom:28px;
}
.redeem-card{ text-align:center; padding:24px 20px; }
.redeem-card .ico{ font-size:36px; margin-bottom:10px; }
.redeem-card h4{ margin:0 0 4px; font-size:16px; }
.redeem-card .min{
  font-size:13px; color:var(--ink-soft); margin-bottom:14px;
}

.history h3{ font-size:18px; margin:0 0 14px; }
.history-item{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px;
  background:#fff; border:1px solid var(--border);
  border-radius:12px;
  margin-bottom:10px;
}
.history-item .info .ttl{ font-weight:600; font-size:14px; }
.history-item .info .date{ font-size:12px; color:var(--ink-soft); }
.history-item .amt{
  font-weight:700;
  font-family:'Plus Jakarta Sans', sans-serif;
}
.amt-pos{ color:var(--accent-2); }
.amt-neg{ color:var(--brand); }

/* Redemption modal (shared with admin / PM modals) */
.redeem-modal-overlay{
  position:fixed; inset:0; z-index:100;
  background:rgba(26,14,26,.6);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center;
  padding:20px;
  opacity:0; visibility:hidden;
  transition:opacity .25s;
}
.redeem-modal-overlay.active{ opacity:1; visibility:visible; }
.redeem-modal{
  background:#fff; border-radius:24px;
  width:100%; max-width:440px;
  padding:32px;
  box-shadow:0 30px 80px rgba(0,0,0,.25);
  transform:scale(.95); transition:transform .3s;
  position:relative;
  max-height:90vh; overflow-y:auto;
}
.redeem-modal-overlay.active .redeem-modal{ transform:scale(1); }
.redeem-modal h3{ font-size:22px; margin:0 0 6px; }
.redeem-modal p.sub{
  color:var(--ink-soft); font-size:14px;
  margin:0 0 20px;
}
.modal-actions{ display:flex; gap:10px; margin-top:18px; }
.modal-actions .btn{ flex:1; }

/* ==========================================================================
   Mobile dashboard tweaks
   ========================================================================== */
@media (max-width:640px){
  .welcome h1{ font-size:22px; }
  .welcome-stats{ gap:18px; }
  .panel-head h2{ font-size:20px; }
  .dash-main{ padding:20px 16px 60px; }
  .dash-nav{ padding:0 16px; }
  .points-pill{ padding:6px 12px; font-size:13px; }
}

/* ==========================================================================
   WordPress block editor / classic content compatibility
   ========================================================================== */
.entry-content > * { max-width:1200px; margin-left:auto; margin-right:auto; }
.alignwide { max-width:1100px; }
.alignfull { max-width:none; }