@import url('../tokens.css');
/* ─── RESET ───────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: 'Tajawal', sans-serif; -webkit-font-smoothing: antialiased; }
body { background: var(--bg-main); min-height: 100vh; }
button { font-family: 'Tajawal', sans-serif; }
input, textarea { font-family: 'Tajawal', sans-serif; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

/* ─── ANIMATIONS ──────────────────────────────────────────────────────── */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes glow  { 0%,100% { opacity: 0.4; } 50% { opacity: 0.9; } }
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-8px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── APP SHELL ───────────────────────────────────────────────────────── */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  font-family: 'Tajawal', sans-serif;
}
.app-header {
  background: var(--bg-card);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.hamburger span { display: block; height: 2px; background: var(--bg-sidebar); border-radius: 2px; }
.hamburger span:nth-child(1) { width: 22px; }
.hamburger span:nth-child(2) { width: 22px; }
.hamburger span:nth-child(3) { width: 14px; align-self: flex-end; }
.app-logo { display: flex; align-items: center; gap: 9px; flex: 1; justify-content: center; }
.app-logo .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--bg-sidebar);
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--primary); }
.app-logo .name { font-size: 15px; font-weight: 700; color: var(--neutral-900); }
.bell-btn { position: relative; background: none; border: none; cursor: pointer; padding: 8px;
  min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.bell-btn .icon { font-size: 22px; }
.bell-btn .badge { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px;
  background: var(--red-500); border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--white);
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--white); }
.tab-indicator { background: var(--bg-card); border-bottom: 1px solid var(--border-soft);
  padding: 10px 18px; display: flex; align-items: center; gap: 8px; }
.tab-indicator .icon { font-size: 16px; }
.tab-indicator .label { font-size: 15px; font-weight: 700; color: var(--neutral-900); }
.app-content { flex: 1; padding: 16px 14px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ─── COMMON ──────────────────────────────────────────────────────────── */
.col { display: flex; flex-direction: column; gap: 14px; }
.col-10 { display: flex; flex-direction: column; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.card { background: var(--bg-card); border-radius: 14px; padding: 16px; border: none; box-shadow: var(--shadow-card); color: var(--text-main); }
.card-lg { background: var(--bg-card); border-radius: 16px; padding: 18px 20px; border: none; box-shadow: var(--shadow-card); color: var(--text-main); }
.dark-card { background: var(--bg-sidebar); border-radius: 20px; padding: 22px 20px; color: var(--white); box-shadow: var(--shadow-card); }

/* ─── BARS ────────────────────────────────────────────────────────────── */
.bar2 { height: 8px; background: var(--border-soft); border-radius: 4px; overflow: hidden; }
.bar2 > div { height: 100%; border-radius: 4px; transition: width 0.6s ease; }

/* ─── TIER BADGE ──────────────────────────────────────────────────────── */
.tier-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px;
  padding: 3px 10px; font-size: 11px; font-weight: 700; }
.tier-badge.lg { padding: 6px 14px; font-size: 14px; }
.tier-Bronze  { background: var(--amber-50); color: #CD7F32; border: 1px solid #CD7F3230; }
.tier-Silver  { background: var(--border-soft); color: var(--text-muted); border: 1px solid var(--text-muted)30; }
.tier-Gold    { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary)30; }
.tier-Diamond { background: var(--purple-50); color: var(--purple-500); border: 1px solid #7C3AED30; }

/* ─── BUTTONS ─────────────────────────────────────────────────────────── */
.btn { border: none; cursor: pointer; font-family: 'Tajawal', sans-serif; }
.btn-primary { background: var(--bg-sidebar); color: var(--white); border-radius: 12px; padding: 13px;
  font-size: 14px; font-weight: 700; width: 100%; }
.btn-secondary { background: var(--border-soft); color: var(--neutral-700); border-radius: 10px; padding: 12px;
  font-size: 13px; font-weight: 600; }
.btn-back { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--text-secondary);
  text-align: right; padding: 0; font-family: 'Tajawal', sans-serif; }

/* ─── LANDING PAGE ────────────────────────────────────────────────────── */
.lp-page { background: var(--neutral-950); min-height: 100vh; color: var(--white);
  font-family: 'Tajawal', sans-serif; overflow-x: hidden; }
.lp-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent; transition: all 0.3s; padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center; }
.lp-header.scrolled { background: rgba(5,5,5,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-900); }
.lp-brand { display: flex; align-items: center; gap: 10px; }
.lp-brand .mark { width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--white); font-weight: 900; }
.lp-brand .text { font-size: 16px; font-weight: 800; color: var(--white); }
.lp-cta { background: linear-gradient(135deg, var(--primary), var(--secondary)); border: none;
  border-radius: 10px; padding: 10px 20px; color: var(--white); font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: 'Tajawal', sans-serif; }
.lp-cta-big { background: linear-gradient(135deg, var(--primary), var(--secondary)); border: none;
  border-radius: 14px; padding: 16px 32px; color: var(--white); font-size: 16px; font-weight: 800;
  cursor: pointer; font-family: 'Tajawal', sans-serif;
  box-shadow: 0 8px 30px rgba(254,44,85,0.35); }
.lp-cta-xl { background: linear-gradient(135deg, var(--primary), var(--secondary)); border: none;
  border-radius: 14px; padding: 18px 40px; color: var(--white); font-size: 17px; font-weight: 800;
  cursor: pointer; font-family: 'Tajawal', sans-serif;
  box-shadow: 0 8px 40px rgba(254,44,85,0.4); }

.lp-hero { min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 100px 24px 60px; position: relative; overflow: hidden; }
.lp-hero-glow { position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
  width: 500px; height: 500px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(254,44,85,0.18) 0%, transparent 65%);
  animation: glow 4s ease-in-out infinite; }
.lp-pill { display: inline-flex; align-items: center; gap: 8px;
  background: rgba(254,44,85,0.15); border: 1px solid rgba(254,44,85,0.3);
  border-radius: 20px; padding: 6px 18px; margin-bottom: 28px; position: relative; }
.lp-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  display: inline-block; animation: glow 2s infinite; }
.lp-pill .text { font-size: 13px; color: var(--primary); font-weight: 600; }
.lp-diamond { font-size: 64px; margin-bottom: 20px;
  animation: float 3s ease-in-out infinite; position: relative; }
.lp-h1 { font-size: 38px; font-weight: 900; line-height: 1.2; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--white) 40%, var(--primary) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  position: relative; }
.lp-sub { font-size: 15px; color: var(--text-muted); max-width: 360px; line-height: 1.9;
  margin-bottom: 40px; position: relative; }

.lp-ticker { overflow: hidden; background: var(--neutral-950); border-top: 1px solid var(--neutral-900);
  border-bottom: 1px solid var(--neutral-900); padding: 11px 0; }
.lp-ticker-track { display: flex; gap: 60px; width: max-content; direction: ltr;
  animation: lp-ticker-scroll 45s linear infinite; will-change: transform; }
.lp-ticker-track:hover { animation-play-state: paused; }
.lp-ticker-item { font-size: 13px; color: var(--neutral-200); font-family: 'Tajawal', sans-serif;
  white-space: nowrap; display: flex; align-items: center; gap: 16px; }
.lp-ticker-item .sep { color: var(--primary); }
@keyframes lp-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.lp-section { padding: 70px 24px; max-width: 500px; margin: 0 auto; text-align: center; }
.lp-eyebrow { font-size: 11px; color: var(--primary); font-weight: 700; letter-spacing: 0.15em;
  margin-bottom: 10px; text-transform: uppercase; }
.lp-h2 { font-size: 26px; font-weight: 900; margin-bottom: 44px; }
.lp-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-stat { background: var(--neutral-950); border: 1px solid var(--neutral-900); border-radius: 16px;
  padding: 22px 14px; text-align: center; }
.lp-stat .icon { font-size: 26px; margin-bottom: 8px; }
.lp-stat .num  { font-size: 32px; font-weight: 900; color: var(--white); margin-bottom: 5px; }
.lp-stat .label { font-size: 12px; color: var(--text-secondary); }

.lp-benefits { padding: 40px 24px 70px; max-width: 500px; margin: 0 auto; }
.lp-benefits-head { text-align: center; margin-bottom: 36px; }
.lp-benefits-head h2 { font-size: 26px; font-weight: 900; }

/* ─── BLOG / PUBLIC ARTICLES ─────────────────────────────────────── */
.lp-blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 20px; }
.lp-blog-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--neutral-200); transition: transform .2s, border-color .2s; display: flex; flex-direction: column; }
.lp-blog-card:hover { transform: translateY(-2px); border-color: rgba(254,44,85,0.5); }
.lp-blog-thumb { width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center; background-color: var(--bg-sidebar); }
.lp-blog-thumb-fallback { background: linear-gradient(135deg,var(--indigo-500),var(--purple-500)); display: flex; align-items: center; justify-content: center; font-size: 56px; color: var(--white); }
.lp-blog-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.lp-blog-tag { font-size: 11px; color: var(--primary); font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.lp-blog-title { font-size: 16px; font-weight: 800; line-height: 1.45; color: var(--neutral-50); margin-bottom: 8px; }
.lp-blog-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.7; flex: 1; }
.lp-blog-meta { font-size: 11px; color: var(--text-secondary); margin-top: 10px; }

/* ─── PUBLIC ARTICLE PAGE ────────────────────────────────────────── */
.pub-article-wrap { max-width: 820px; margin: 0 auto; padding: 40px 24px 80px; color: var(--neutral-200); }
.pub-article-hero { background: linear-gradient(135deg,var(--indigo-500),var(--purple-500)); border-radius: 20px; padding: 32px; margin-bottom: 24px; }
.pub-article-hero .back { background: rgba(255,255,255,0.2); border: none; color: var(--white); padding: 6px 14px; border-radius: 10px; cursor: pointer; font-size: 12px; margin-bottom: 14px; text-decoration: none; display: inline-block; }
.pub-article-hero .tag { display: inline-block; background: rgba(255,255,255,0.25); padding: 3px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; margin-bottom: 10px; color: var(--white); }
.pub-article-hero h1 { font-size: 28px; font-weight: 900; color: var(--white); margin-bottom: 8px; line-height: 1.3; }
.pub-article-hero .meta { font-size: 13px; color: rgba(255,255,255,0.85); }
.pub-article-video { aspect-ratio: 16/9; width: 100%; border-radius: 16px; overflow: hidden; background: var(--neutral-950); margin-bottom: 24px; }
.pub-article-video iframe { width: 100%; height: 100%; border: 0; }
.pub-article-body { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 30px; font-size: 16px; line-height: 1.9; color: var(--neutral-300); }
.pub-article-body h1, .pub-article-body h2, .pub-article-body h3 { color: var(--neutral-50); margin: 24px 0 12px; }
.pub-article-body p { margin-bottom: 16px; }
.pub-article-body a { color: var(--secondary); text-decoration: underline; }
.pub-article-body img { max-width: 100%; border-radius: 12px; margin: 14px 0; }
.pub-article-body ul, .pub-article-body ol { margin: 12px 24px; }
.pub-article-related { margin-top: 28px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 22px; }
.pub-article-related h3 { font-size: 16px; color: var(--neutral-50); margin-bottom: 14px; }
.lp-benefit { background: var(--neutral-950); border: 1px solid var(--neutral-900); border-radius: 16px;
  padding: 18px 20px; display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.lp-benefit .ic { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: rgba(254,44,85,0.12); border: 1px solid rgba(254,44,85,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 22px; }
.lp-benefit .title { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 5px; }
.lp-benefit .desc  { font-size: 12px; color: var(--text-secondary); line-height: 1.7; }

.lp-test-card { background: var(--neutral-950); border: 1px solid var(--neutral-900); border-radius: 20px;
  padding: 28px 24px; margin-bottom: 16px; position: relative; overflow: hidden; }
.lp-test-card .quote { position: absolute; top: 12px; right: 20px; font-size: 80px;
  color: var(--primary); opacity: 0.1; font-family: serif; line-height: 1; }
.lp-test-card p { font-size: 15px; color: var(--neutral-200); line-height: 1.9; margin-bottom: 20px; }
.lp-test-foot { display: flex; justify-content: space-between; align-items: center; }
.lp-test-foot .who { display: flex; align-items: center; gap: 10px; }
.lp-test-foot .ava { width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--white); }
.lp-test-foot .name { font-size: 13px; font-weight: 700; color: var(--white); }
.lp-test-foot .tier { font-size: 11px; margin-top: 1px; font-weight: 700; }
.lp-test-foot .top  { font-size: 10px; color: var(--text-secondary); margin-bottom: 2px; }
.lp-test-foot .max  { font-size: 15px; font-weight: 900; color: var(--primary); }
.lp-test-dots { display: flex; justify-content: center; gap: 6px; }
.lp-test-dots button { height: 8px; border-radius: 4px; border: none; cursor: pointer;
  padding: 0; transition: all 0.3s; background: #333; }
.lp-test-dots button.active { width: 24px; background: var(--primary); }
.lp-test-dots button:not(.active) { width: 8px; }

.lp-tier-row { background: var(--neutral-950); border-radius: 12px; padding: 14px 18px;
  display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.lp-tier-row .ic { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  font-weight: 900; }
.lp-tier-row .body { flex: 1; text-align: right; }
.lp-tier-row .top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.lp-tier-row .top .name { font-size: 13px; font-weight: 700; }
.lp-tier-row .top .range { font-size: 11px; color: var(--text-secondary); }
.lp-tier-row .bar { height: 5px; background: var(--neutral-900); border-radius: 3px; overflow: hidden; }
.lp-tier-row .fill { height: 100%; border-radius: 3px; }

.lp-cta-section { padding: 60px 24px 100px; text-align: center; position: relative; }
.lp-cta-section .glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 400px; height: 400px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(254,44,85,0.12) 0%, transparent 65%); }
.lp-cta-section .inner { position: relative; }
.lp-cta-section .rocket { font-size: 52px; margin-bottom: 16px;
  animation: float 3s ease-in-out infinite; }
.lp-cta-section h2 { font-size: 28px; font-weight: 900; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--white), var(--primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.lp-cta-section p { font-size: 14px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.8; }

/* ─── NAV BAR ─────────────────────────────────────────────────────── */
.lp-nav { display: none; align-items: center; gap: 26px; }
.lp-nav a { color: var(--text-muted); font-size: 13px; font-weight: 600; text-decoration: none; transition: color .2s; position: relative; }
.lp-nav a:hover { color: var(--white); }
.lp-nav a.active { color: var(--primary); }
.lp-nav a::after { content:""; position:absolute; bottom:-6px; left:0; right:0; height:2px; background:var(--primary); transform:scaleX(0); transition:transform .2s; border-radius:2px; }
.lp-nav a:hover::after, .lp-nav a.active::after { transform:scaleX(1); }
.lp-header-right { display:flex; align-items:center; gap:10px; }
.lp-mobile-toggle { display: inline-flex; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); width:40px;height:40px;border-radius:10px; align-items:center;justify-content:center; color:var(--white); cursor:pointer; font-size:18px; }
.lp-mobile-nav { display:none; position:fixed; top:62px; left:0; right:0; background:rgba(5,5,5,0.98); backdrop-filter: blur(14px); border-bottom:1px solid var(--neutral-900); padding:16px 24px; z-index:99; flex-direction:column; gap:14px; }
.lp-mobile-nav.open { display:flex; }
.lp-mobile-nav a { color:var(--neutral-200); font-weight:700; font-size:14px; text-decoration:none; padding:8px 0; border-bottom:1px solid var(--neutral-950); }
@media (min-width: 820px) {
  .lp-nav { display: flex; }
  .lp-mobile-toggle { display: none; }
}

/* ─── FOOTER ──────────────────────────────────────────────────────── */
.lp-footer { border-top: 1px solid var(--neutral-950); background: var(--neutral-950); padding: 48px 24px 24px; color: var(--text-muted); font-size: 13px; }
.lp-footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
@media (max-width: 820px) { .lp-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 520px) { .lp-footer-grid { grid-template-columns: 1fr; } }
.lp-footer-col h4 { color: var(--neutral-50); font-size: 13px; font-weight: 800; margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.6px; }
.lp-footer-col a { display: block; color: var(--text-muted); text-decoration: none; padding: 4px 0; font-size: 13px; transition: color .2s; }
.lp-footer-col a:hover { color: var(--primary); }
.lp-footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.lp-footer-brand .mark { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg,var(--primary),var(--accent)); display:flex; align-items:center; justify-content:center; font-size: 18px; font-weight: 900; color: var(--white); overflow:hidden; }
.lp-footer-brand .text { font-size: 17px; font-weight: 800; color: var(--white); }
.lp-footer-tagline { color: var(--text-secondary); font-size: 13px; line-height: 1.8; margin-bottom: 16px; max-width: 320px; }
.lp-footer-socials { display: flex; gap: 8px; }
.lp-footer-socials a { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: all .2s; font-size: 15px; }
.lp-footer-socials a:hover { background: rgba(254,44,85,0.15); border-color: rgba(254,44,85,0.4); color: var(--primary); transform: translateY(-2px); }
.lp-footer-contact { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; padding: 4px 0; }
.lp-footer-contact span.ic { width: 20px; text-align: center; }
.lp-footer-bottom { max-width: 1100px; margin: 0 auto; border-top: 1px solid var(--neutral-950); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--neutral-700); }

/* ─── HERO LOGO ───────────────────────────────────────────────────── */
.lp-hero-mark { width: 88px; height: 88px; border-radius: 22px; background: linear-gradient(135deg,var(--primary),var(--accent)); display: inline-flex; align-items: center; justify-content: center; font-size: 44px; color: var(--white); margin-bottom: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(254,44,85,0.35); }

/* ─── LOGIN PAGE ──────────────────────────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--neutral-950); padding: 24px; font-family: 'Tajawal', sans-serif; position: relative; }
.login-page .glow { position: fixed; top: 20%; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(254,44,85,0.15) 0%, transparent 70%); }
.login-card { width: 100%; max-width: 360px; position: relative; }
.login-head { text-align: center; margin-bottom: 36px; }
.login-head .mark { width: 60px; height: 60px; border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 14px; }
.login-head .name { font-size: 22px; font-weight: 900; color: var(--white); }
.login-head .sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.login-form { background: var(--neutral-900); border-radius: 20px; border: 1px solid var(--neutral-900);
  padding: 28px 24px; }
.login-form .field { margin-bottom: 16px; }
.login-form label { font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 7px; }
.login-form input { width: 100%; box-sizing: border-box; background: var(--neutral-950);
  border: 1px solid var(--neutral-800); border-radius: 10px; padding: 11px 14px;
  font-size: 14px; color: var(--white); outline: none; font-family: 'Tajawal', sans-serif; }
.login-form input:focus { border-color: var(--primary); }
.login-form button { width: 100%; padding: 13px; background: var(--primary); color: var(--white);
  border: none; border-radius: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: 'Tajawal', sans-serif; }
.login-form button.loading { background: var(--primary-deep); opacity: 0.9; cursor: wait; }

/* ─── HOME TAB ────────────────────────────────────────────────────────── */
.banner { border-radius: 16px; overflow: hidden; height: 108px;
  position: relative; cursor: pointer; }
.banner .inner { padding: 16px 20px; height: 100%; box-sizing: border-box;
  display: flex; align-items: center; gap: 14px; transition: opacity 0.3s ease; }
.banner .inner.img-mode { padding: 0; position: relative; background: var(--border-soft); }
.banner .inner.img-mode img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner .icon { font-size: 40px; flex-shrink: 0; }
.banner .body { flex: 1; }
.banner .badge { background: rgba(255,255,255,0.25); color: var(--white); border-radius: 20px;
  padding: 2px 10px; font-size: 12px; font-weight: 700; display: inline-block; margin-bottom: 5px; }
.banner .title { font-size: 15px; font-weight: 800; color: var(--white); margin-bottom: 2px; }
.banner .sub { font-size: 11px; color: rgba(255,255,255,0.85); line-height: 1.4; }
.banner .arrow { color: rgba(255,255,255,0.7); font-size: 22px; flex-shrink: 0; }
.banner .banner-nav { position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.35); color: var(--white); font-size: 22px; font-weight: 900;
  line-height: 1; display: flex; align-items: center; justify-content: center;
  z-index: 3; padding: 0; transition: background 0.15s; }
.banner .banner-nav:hover { background: rgba(0,0,0,0.55); }
.banner .banner-nav.prev { right: 8px; }
.banner .banner-nav.next { left: 8px; }
.banner-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; }
.banner-dots button { height: 6px; border-radius: 3px; border: none; cursor: pointer;
  padding: 0; background: rgba(255,255,255,0.4); transition: width 0.3s; width: 6px; }
.banner-dots button.active { width: 16px; background: var(--bg-card); }

/* Hero recoloured per agency feedback — the dark gradient was too heavy.
   It now reads as a clean card that respects light/dark theme tokens. */
.home-hero { background: var(--bg-card); border-radius: 18px; padding: 20px; color: var(--text-main); box-shadow: var(--shadow-card); }
.home-hero-top { display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px; }
.home-hero-user { display: flex; gap: 12px; align-items: center; }
.home-hero-user .ava { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft);
  border: 2px solid var(--primary); color: var(--primary-deep); display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; }
.home-hero-user .name { font-weight: 700; font-size: 15px; color: var(--text-main); }
.home-hero-user .meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.home-diamond-box { background: var(--primary-soft); border: 1px solid var(--primary-soft);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center; }
.home-diamond-box .lbl { font-size: 11px; color: var(--primary-deep); margin-bottom: 4px; font-weight: 700; }
.home-diamond-box .val { font-size: 36px; font-weight: 900; color: var(--primary-deep); line-height: 1; }
.home-diamond-box .pct { font-size: 24px; font-weight: 900; color: var(--primary-deep); }
.home-diamond-box .pct-lbl { font-size: 12px; color: var(--primary-deep); opacity: .8; }
.home-progress { height: 8px; background: var(--neutral-100); border-radius: 4px; margin-bottom: 6px; overflow: hidden; }
.home-progress > div { height: 100%; border-radius: 4px; }
.home-progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }

.kpi-card { background: var(--bg-card); border-radius: 14px; padding: 16px;
  border: none; box-shadow: var(--shadow-card); position: relative; overflow: hidden;
  text-align: center; }
/* Side-accent stripes removed per agency feedback — pure shadow surfaces. */
.kpi-card.indigo, .kpi-card.amber { border-top: none; }
.kpi-card .lbl { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 6px; font-weight: var(--fw-bold); }
.kpi-card .val { font-size: 22px; font-weight: var(--fw-black); color: var(--text-main); }
.kpi-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.tier-card { border-radius: 18px; padding: 32px 24px; text-align: center;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 210px; }
.tier-card.amber { background: var(--primary); }
.tier-card.violet { background: var(--purple-500); }
.tier-card .lbl { font-size: 20px; color: var(--white); margin-bottom: 14px; font-weight: 800; letter-spacing: 0.2px; }
.tier-card .val { font-size: 64px; font-weight: 900; color: var(--white); line-height: 1.05; }
.tier-card .sub { font-size: 24px; color: rgba(255,255,255,0.95); margin-top: 14px; font-weight: 700; }

.live-block { background: var(--bg-card); border-radius: 16px; padding: 18px 20px; border: 1px solid var(--border-soft); }
.live-block .head { font-size: 13px; font-weight: 700; color: var(--neutral-900); margin-bottom: 14px; }
.live-block .row { margin-bottom: 12px; }
.live-block .row:last-child { margin-bottom: 0; }
.live-block .meta { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.live-block .meta .l { color: var(--neutral-700); font-weight: 600; }
.live-block .meta .v { font-weight: 700; }

.promo-card { background: var(--bg-card); border-radius: 16px; padding: 16px 20px;
  border: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; }
.promo-card .lbl { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.promo-card .val { font-size: 24px; font-weight: 800; }
.promo-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.promo-circle { width: 54px; height: 54px; position: relative;
  display: flex; align-items: center; justify-content: center; }
.promo-circle svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.promo-circle .pct { font-size: 11px; font-weight: 800; color: var(--neutral-900); }

.tiktok-card { background: linear-gradient(135deg, #010101, #2d2d2d);
  border-radius: 16px; padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  border: 1px solid #333; cursor: pointer; }
.tiktok-card .ic { width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--pink-500), #FF0050);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0; }
.tiktok-card .title { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.tiktok-card .sub { font-size: 12px; color: rgba(255,255,255,0.55); }
.tiktok-card .arrow { color: var(--pink-500); font-size: 20px; }

.upgrade-alert { background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 16px;
  padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; }
.upgrade-alert .lbl { font-size: 12px; color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.upgrade-alert .title { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.upgrade-alert .ic { font-size: 44px; }
.upgrade-alert .forecast-line { font-size: 12px; color: rgba(255,255,255,0.95); line-height: 1.6; }
.upgrade-alert .forecast-cap  { font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 4px; }
.upgrade-alert .field-hint    { color: rgba(255,255,255,0.85); }
.upgrade-alert .forecast-stats {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.upgrade-alert .forecast-chip {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* ─── Forecast %-only card ──────────────────────────────────────────
   Minimalist — only the projected reward % is shown, large and bold.
   Two-column flex: left column has label + caption; right column shows
   the percentage in a contrast pill so it pops against the gradient. */
/* Calm forecast card — gradient removed per agency feedback. */
.reward-pct-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  color: var(--text-main);
}
.reward-pct-card::before { display: none; }
.reward-pct-card.off { background: var(--bg-card); box-shadow: var(--shadow-card); }
.reward-pct-card .rpc-side { flex: 1; min-width: 0; z-index: 1; }
.reward-pct-card .rpc-lbl {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.4;
}
.reward-pct-card .rpc-cap {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
}
.reward-pct-card .rpc-pct {
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 900;
  line-height: 1;
  z-index: 1;
}
.reward-pct-card.off .rpc-pct { color: var(--text-secondary); }
.reward-pct-card .rpc-num { font-size: 48px; }
.reward-pct-card .rpc-sym { font-size: 26px; opacity: 0.85; }

@media (max-width: 480px) {
  .reward-pct-card { padding: 18px; gap: 14px; }
  .reward-pct-card .rpc-pct { padding: 12px 18px; border-radius: 14px; }
  .reward-pct-card .rpc-num { font-size: 38px; }
  .reward-pct-card .rpc-sym { font-size: 22px; }
  .reward-pct-card .rpc-lbl { font-size: 12.5px; }
  .reward-pct-card .rpc-cap { font-size: 11px; }
}

.streak-card { background: var(--bg-card); border-radius: 16px; padding: 16px 20px;
  border: 1px solid var(--border-soft); display: flex; align-items: center; gap: 14px; }
.streak-card .ic { width: 52px; height: 52px; border-radius: 14px;
  background: var(--primary); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0; }
.streak-card .lbl { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.streak-card .val { font-size: 22px; font-weight: 900; color: var(--neutral-900); }
.streak-card .val span { font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.streak-card .best { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.streak-card .week { text-align: center; }
.streak-card .week .dot { display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin: 0 2px; background: var(--border-soft); }
.streak-card .week .dot.on { background: var(--primary); }
.streak-card .week .lbl2 { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

.danger-alert { background: var(--red-50); border: 1px solid var(--red-200); border-radius: 16px;
  padding: 16px 20px; }
.danger-alert .head { font-size: 13px; font-weight: 700; color: var(--red-600); margin-bottom: 8px; }
.danger-alert .body { font-size: 13px; color: var(--neutral-700); line-height: 1.8; }
.danger-alert .row { background: var(--bg-card); border-radius: 10px; padding: 10px 14px; margin-top: 10px;
  display: flex; justify-content: space-between; align-items: center; }
.danger-alert .row .l { font-size: 12px; color: var(--text-secondary); }
.danger-alert .row .v { font-size: 18px; font-weight: 900; color: var(--red-600); }

.feature-button { width: 100%; border-radius: 16px; padding: 16px 20px;
  cursor: pointer; display: flex; align-items: center; gap: 14px; text-align: right; }
.feature-button .ic { width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; }
.feature-button .body { flex: 1; }
.feature-button .title { font-size: 14px; font-weight: 700; }
.feature-button .sub { font-size: 12px; margin-top: 2px; }
.feature-button .arrow { font-size: 20px; }
/* Feature-button modifiers: gradients flattened to solid brand-tinted
   surfaces per agency feedback (no more pink → cyan rainbows). */
.fb-indigo { background: var(--indigo-50); border: 1.5px solid var(--indigo-200); }
.fb-indigo .ic { background: var(--indigo-500); color: var(--white); }
.fb-indigo .title { color: #3730A3; }
.fb-indigo .sub { color: var(--indigo-500); }
.fb-indigo .arrow { color: var(--indigo-500); }
.fb-amber { background: var(--primary-soft); border: 1.5px solid var(--amber-200); }
.fb-amber .ic { background: var(--primary); color: var(--white); }
.fb-amber .title { color: var(--accent); }
.fb-amber .sub { color: var(--primary); }
.fb-amber .arrow { color: var(--primary); }
.fb-green { background: var(--green-50); border: 1.5px solid var(--green-100); }
.fb-green .ic { background: var(--green-500); color: var(--white); }
.fb-green .title { color: var(--green-800); }
.fb-green .sub { color: var(--green-500); }
.fb-green .arrow { color: var(--green-500); }

/* ─── RANK KPI CARD (inside KPI grid) ─────────────────────────────────── */
.kpi-card.rank { border-top: 3px solid var(--secondary);
  background: var(--primary-soft); }
.kpi-card.rank .lbl { color: var(--accent); font-weight: 800; }
.kpi-card.rank .sub { color: var(--primary-hover); opacity: 0.9; font-weight: 600; }
.kpi-card.rank .val { color: var(--accent); display: flex; align-items: baseline; gap: 4px; }
.kpi-card.rank .val .rank-hash { font-size: 16px; opacity: 0.65; font-weight: 800; }
.kpi-card.rank .val .rank-of   { font-size: 13px; font-weight: 700; color: var(--primary-hover); opacity: 0.85; margin-inline-start: 6px; }
.kpi-card.rank .field-hint { color: var(--accent); opacity: 0.8; }

/* ─── PERFORMANCE TAB ─────────────────────────────────────────────────── */
.perf-hero { background: var(--bg-sidebar); color: var(--white); border-radius: 16px; padding: 20px;
  display: flex; justify-content: space-between; align-items: center; }
.perf-hero .lbl { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.perf-hero .val { font-size: 24px; font-weight: 900; }
.perf-hero .check { font-size: 12px; margin-top: 4px; }
.perf-hero .icon { font-size: 32px; }

.chart-placeholder { background: var(--bg-main); border: 1px dashed var(--border-main); border-radius: 10px;
  padding: 20px; text-align: center; color: var(--text-muted); font-size: 12px; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding: 4px 0; }
.chart-bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.chart-bars .stack { width: 100%; display: flex; align-items: flex-end; gap: 3px; flex: 1; }
.chart-bars .b1 { flex: 1; background: var(--border-soft); border-radius: 4px 4px 0 0; min-height: 4px; }
.chart-bars .b2 { flex: 1; background: var(--bg-sidebar); border-radius: 4px 4px 0 0; min-height: 4px; }
.chart-bars .b2.last { background: var(--primary); }
.chart-bars .month { font-size: 12px; color: var(--text-muted); }
.chart-legend { display: flex; gap: 12px; margin-bottom: 12px; font-size: 12px; color: var(--text-muted); }
.chart-legend span { display: flex; align-items: center; gap: 4px; }
.chart-legend .swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.score-row { margin-bottom: 12px; }
.score-row .meta { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 5px; }

.history-row { background: var(--bg-main); border-radius: 12px; padding: 12px 14px;
  border: 1px solid var(--border-soft); }
.history-row.best { background: var(--primary-soft); border: 1.5px solid var(--amber-200); }
.history-row .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.history-row .top .l { display: flex; align-items: center; gap: 8px; }
.history-row .top .month { font-size: 13px; font-weight: 700; color: var(--neutral-900); }
.history-row .top .badge { font-size: 10px; background: var(--amber-200); color: var(--accent);
  border-radius: 20px; padding: 1px 8px; font-weight: 700; }
.history-row .top .r { display: flex; align-items: center; gap: 8px; }
.history-row .top .tier { font-size: 11px; font-weight: 700; }
.history-row .top .pct { font-size: 12px; font-weight: 700; }
.history-row .bar { height: 6px; background: var(--border-main); border-radius: 3px; margin-bottom: 6px; overflow: hidden; }
.history-row .fill { height: 100%; border-radius: 3px; }
.history-row .meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }

.summary-card { background: var(--bg-main); border-radius: 10px; padding: 10px 8px; text-align: center; }
.summary-card .v { font-size: 13px; font-weight: 800; margin-bottom: 3px; }
.summary-card .l { font-size: 10px; color: var(--text-muted); }

/* ─── PAYMENTS TAB ──────────────────────────────────────────────────────
   Hero uses an opaque pink gradient so white text actually has contrast.
   (Previously inherited var(--bg-sidebar) which is white in light mode →
   white-on-white made every number invisible.) */
.pay-hero {
  background: linear-gradient(135deg, #FE2C55 0%, #C81C3F 100%);
  border-radius: 20px;
  padding: 24px 22px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(254,44,85,0.25);
  position: relative;
  overflow: hidden;
}
.pay-hero::before {
  content: ""; position: absolute; top: -40px; inset-inline-end: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.08); pointer-events: none;
}
.pay-hero .lbl {
  font-size: 13px; color: rgba(255,255,255,0.85);
  margin-bottom: 8px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
}
.pay-hero .val {
  font-size: 38px; font-weight: 900; margin-bottom: 18px;
  color: #fff; letter-spacing: -0.5px;
}
.pay-hero .val span { font-size: 16px; font-weight: 600; color: rgba(255,255,255,0.8); margin-inline-start: 4px; }

/* Mini stat grid — 3 equal cards (Total · Pending · Withdrawn) */
.pay-hero .row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.pay-hero .row > div {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px; padding: 12px 10px; text-align: center;
  backdrop-filter: blur(4px);
}
.pay-hero .row .lb {
  font-size: 11px; color: rgba(255,255,255,0.78);
  margin-bottom: 4px; font-weight: 600;
}
.pay-hero .row .v2 { font-size: 15px; font-weight: 900; color: #fff; }
.pay-hero .row .v2 span { font-size: 10px; opacity: 0.7; margin-inline-start: 2px; }

.pay-hero .withdraw {
  width: 100%; padding: 14px; border-radius: 14px; border: none;
  font-size: 15px; font-weight: 900; font-family: 'Tajawal', sans-serif;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s;
}
.pay-hero .withdraw.ok {
  background: #fff; color: var(--primary-deep);
  cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.pay-hero .withdraw.ok:hover { transform: translateY(-2px); }
.pay-hero .withdraw.no {
  background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.85);
  cursor: not-allowed; border: 1px dashed rgba(255,255,255,0.35);
}

.method-card { background: var(--bg-card); border-radius: 16px; padding: 18px; border: 1px solid var(--border-soft); }
.method-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.method-head .title { font-size: 13px; font-weight: 700; color: var(--neutral-900); }
.method-head .edit { background: var(--border-soft); border: none; border-radius: 8px;
  padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--neutral-700); cursor: pointer; }
.method-current { display: flex; align-items: center; gap: 14px; border-radius: 12px; padding: 14px 16px; }
.method-current .icon { font-size: 26px; }
.method-current .lbl { font-size: 14px; font-weight: 700; }
.method-current .val { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.method-current .active { margin-right: auto; font-size: 11px; color: var(--green-500);
  background: var(--purple-50); border-radius: 20px; padding: 3px 10px; }

.history-card { background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border-soft); overflow: hidden; }
.history-card > button { width: 100%; padding: 16px 20px; background: none; border: none;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  font-family: 'Tajawal', sans-serif; }
.history-card .item { padding: 14px 20px; border-top: 1px solid var(--neutral-50);
  display: flex; justify-content: space-between; align-items: center; }
.history-card .item .id { font-size: 12px; color: var(--text-muted); }
.history-card .item .meth { font-size: 13px; font-weight: 600; color: var(--neutral-700); margin-top: 2px; }
.history-card .item .amt { font-size: 15px; font-weight: 800; color: var(--neutral-900); }
.history-card .item .st { display: inline-flex; align-items: center; gap: 4px;
  border-radius: 20px; padding: 2px 8px; font-size: 12px; font-weight: 600; margin-top: 4px; }
.history-card .item .st .d { width: 5px; height: 5px; border-radius: 50%; }

/* ─── ACADEMY TAB ─────────────────────────────────────────────────────── */
.aca-hero { background: var(--bg-sidebar); border-radius: 20px; padding: 22px 20px; color: var(--white); }
.aca-hero .lbl { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.aca-hero .val { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.aca-hero .sub { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.aca-hero .bar { height: 7px; background: var(--bg-sidebar-hover); border-radius: 4px; overflow: hidden; }
.aca-hero .fill { width: 0; height: 100%; background: var(--primary); border-radius: 4px; }
.aca-hero .pct { font-size: 12px; color: var(--text-secondary); margin-top: 5px; }
.course-card { background: var(--bg-card); border-radius: 14px; padding: 16px 18px;
  border: 1px solid var(--border-soft); cursor: pointer; }
.course-card .top { display: flex; gap: 12px; align-items: flex-start; }
.course-card .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--bg-main);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.course-card .ic.done { background: var(--purple-50); }
.course-card .body { flex: 1; }
.course-card .head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.course-card .title { font-size: 14px; font-weight: 700; color: var(--neutral-900); }
.course-card.done .title { color: var(--text-secondary); text-decoration: line-through; }
.course-card .level { border-radius: 20px; padding: 2px 8px; font-size: 12px; font-weight: 700;
  flex-shrink: 0; margin-right: 4px; }
.course-card .meta { font-size: 12px; color: var(--text-muted); }
.course-card .arrow { color: var(--neutral-300); font-size: 18px; }
.course-card .progress { height: 4px; background: var(--border-soft); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.course-card .progress > div { height: 100%; background: var(--primary); border-radius: 2px; }

.level-mubt { background: var(--purple-50); color: var(--green-800); }
.level-mut  { background: var(--primary-soft); color: var(--primary-hover); }
.level-mut2 { background: var(--red-50); color: var(--red-800); }

/* ─── REQUESTS TAB ────────────────────────────────────────────────────── */
.tabs-pill { display: flex; background: var(--neutral-100); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.tabs-pill button { flex: 1; padding: 10px 12px; border-radius: 9px; border: none;
  cursor: pointer; background: transparent; color: var(--text-main);
  font-size: 14px; font-weight: 800; font-family: inherit; transition: background .15s, color .15s; }
.tabs-pill button:hover { background: var(--bg-card); }
.tabs-pill button.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-card); }

.req-card { background: var(--bg-card); border-radius: 14px; padding: 18px; border: 1px solid var(--border-soft); }
.req-card .head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.req-card .id { font-size: 12px; color: var(--text-muted); }
.req-card .type { font-size: 14px; font-weight: 700; color: var(--neutral-900); margin-top: 3px; }
.req-card .status { display: inline-flex; align-items: center; gap: 5px;
  border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; }
.req-card .status .d { width: 6px; height: 6px; border-radius: 50%; }
.req-card .note { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.req-type-btn { display: flex; align-items: center; gap: 14px; padding: 18px 16px;
  border-radius: 14px; cursor: pointer; text-align: right; width: 100%; }
.req-type-btn .ic { font-size: 28px; }
.req-type-btn .title { font-size: 15px; font-weight: 700; }
.req-type-btn .desc { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.req-type-btn .arrow { margin-right: auto; font-size: 18px; }
.rt-promo { background: var(--primary-soft); border: 1.5px solid var(--amber-200); }
.rt-promo .title, .rt-promo .arrow { color: var(--primary); }
.rt-support { background: var(--indigo-50); border: 1.5px solid var(--indigo-200); }
.rt-support .title, .rt-support .arrow { color: #1D4ED8; }

.form-card { background: var(--bg-card); border-radius: 14px; padding: 20px; border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 14px; }
.form-card label { font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 6px; }
.form-card input[type="text"], .form-card input[type="date"], .form-card input[type="time"],
.form-card input[type="url"], .form-card input[type="number"], .form-card textarea {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border-main); border-radius: 8px;
  padding: 11px 12px; font-size: 14px; outline: none;
  font-family: 'Tajawal', sans-serif; color: var(--neutral-900);
}
.form-card textarea { resize: none; padding: 10px 12px; font-size: 13px; }
.form-card input:focus, .form-card textarea:focus { border-color: var(--neutral-900); }

.promo-info-card { background: var(--bg-sidebar); border-radius: 14px; padding: 14px 16px; color: var(--white); }
.promo-info-card .lbl { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.promo-info-card .val { font-size: 24px; font-weight: 900; color: var(--primary); }
.promo-info-card .meta { display: flex; justify-content: space-between; font-size: 11px;
  color: var(--text-secondary); margin-top: 4px; margin-bottom: 6px; }
.promo-info-card .bar { height: 5px; background: var(--bg-sidebar-hover); border-radius: 3px; overflow: hidden; }
.promo-info-card .fill { height: 100%; background: var(--primary); border-radius: 3px; }

.promo-slider { background: var(--bg-main); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.promo-slider .head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 10px; }
.promo-slider .head .l { font-weight: 600; color: var(--neutral-700); }
.promo-slider .head .v { font-weight: 800; color: var(--primary); font-size: 15px; }
.promo-slider input[type="range"] { width: 100%; height: 6px; -webkit-appearance: none;
  background: var(--border-main); border-radius: 3px; outline: none; cursor: pointer; }
.promo-slider .scale { display: flex; justify-content: space-between; font-size: 11px;
  color: var(--text-muted); margin-top: 4px; }
.promo-slider .preview { background: var(--primary-soft); border: 1px solid var(--amber-200); border-radius: 10px;
  padding: 12px; margin-top: 12px; }
.promo-slider .preview .h { font-size: 11px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.promo-slider .preview .row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; }
.promo-slider .preview .row + .row { border-top: 1px solid var(--amber-100); }

.appeal-warn { background: var(--red-50); border: 1px solid var(--red-200); border-radius: 16px;
  padding: 22px 20px; text-align: center; }
.appeal-warn .ic { font-size: 36px; margin-bottom: 12px; }
.appeal-warn .title { font-size: 15px; font-weight: 700; color: var(--neutral-900); margin-bottom: 8px; }
.appeal-warn .body { font-size: 13px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; }
.appeal-warn .row { display: flex; gap: 10px; }
.appeal-warn .row button { flex: 1; padding: 12px; border-radius: 10px; cursor: pointer;
  font-size: 13px; font-weight: 700; font-family: 'Tajawal', sans-serif; }
.appeal-warn .row .no { background: var(--red-50); color: var(--red-800); border: 1.5px solid var(--red-200); }
.appeal-warn .row .yes { background: var(--bg-sidebar); color: var(--white); border: none; }

.appeal-instr { background: var(--primary-soft); border: 1px solid var(--amber-200); border-radius: 16px;
  padding: 24px 20px; text-align: center; }
.appeal-instr .ic { font-size: 40px; margin-bottom: 14px; }
.appeal-instr .title { font-size: 15px; font-weight: 700; color: var(--neutral-900); margin-bottom: 10px; }
.appeal-instr .body { font-size: 13px; color: var(--text-secondary); line-height: 1.9; margin-bottom: 20px; }
.appeal-instr button { width: 100%; padding: 12px; background: var(--primary); color: var(--white);
  border: none; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700;
  font-family: 'Tajawal', sans-serif; }

.support-type { display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: 12px; border: 1.5px solid var(--border-soft); background: var(--bg-card); cursor: pointer;
  text-align: right; width: 100%; }
.support-type .ic { font-size: 24px; }
.support-type .title { font-size: 14px; font-weight: 600; color: var(--neutral-900); }
.support-type .desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.support-type .arrow { margin-right: auto; color: var(--neutral-300); font-size: 18px; }

.upload-zone { display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px; border: 2px dashed var(--border-main); border-radius: 12px; cursor: pointer; background: var(--bg-main); }
.upload-zone.full { border-color: var(--green-500); background: var(--purple-50); }
.upload-zone .ic { font-size: 32px; }
.upload-zone .ti { font-size: 13px; color: var(--neutral-700); font-weight: 600; }
.upload-zone .tt { font-size: 12px; color: var(--text-muted); }

.success-card { background: var(--purple-50); border: 1px solid var(--green-100); border-radius: 14px;
  padding: 20px; text-align: center; }
.success-card .ic { font-size: 40px; margin-bottom: 10px; }
.success-card .text { font-size: 16px; font-weight: 700; color: var(--green-800); }

.auto-card { background: var(--bg-card); border-radius: 16px; overflow: hidden; }
.auto-card .head { padding: 14px 20px; }
.auto-card .head .title { font-size: 14px; font-weight: 700; }
.auto-card .head .sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.auto-card .body { padding: 16px 20px; }
.auto-card .body pre { font-size: 13px; color: var(--neutral-700); line-height: 1.9;
  white-space: pre-wrap; font-family: 'Tajawal', sans-serif; margin: 0; }
.auto-card .actions { padding: 0 20px 16px; }

/* ─── REWARDS TAB ─────────────────────────────────────────────────────── */
/* Adaptive card: was built dark (bg-sidebar + white text), but --bg-sidebar
   is WHITE in light mode, so the icons (inheriting white) turned invisible.
   Use card/text tokens so it works — and the icons stay visible — in both. */
/* Rewards/Wallet segmented tabs — wallet lives as a tab inside Rewards so it
   doesn't read as a separate "money you must collect" destination. */
.rew-tabs { display: flex; gap: 6px; background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 14px; padding: 6px; margin-bottom: 16px; }
.rew-tabs .rew-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 800; color: var(--text-secondary); text-decoration: none; transition: background .15s, color .15s; }
.rew-tabs .rew-tab i { width: 18px; height: 18px; }
.rew-tabs .rew-tab.active { background: var(--primary); color: #fff; }
.rew-tabs .rew-tab:not(.active):hover { background: var(--bg-hover); color: var(--text-main); }

.rew-hero { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 20px; padding: 22px 20px; color: var(--text-main); }
.rew-hero .h1 { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.rew-hero .h2 { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.rew-hero .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.rew-hero .stat { background: var(--bg-hover); border-radius: 12px; padding: 14px; text-align: center; }
.rew-hero .stat .l { font-size: 10px; color: var(--text-secondary); margin-bottom: 5px; }
.rew-hero .stat .v { font-size: 20px; font-weight: 900; color: var(--text-main); }
.rew-hero .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.rew-hero .grid3 .c { background: var(--bg-hover); border-radius: 10px; padding: 10px 8px; text-align: center; }
.rew-hero .grid3 .ic { font-size: 16px; margin-bottom: 3px; color: var(--text-secondary); }
.rew-hero .grid3 .n  { font-size: 12px; font-weight: 700; }
.rew-hero .grid3 .l  { font-size: 9px; color: var(--text-secondary); margin-top: 1px; }

.rew-filter { display: flex; background: var(--bg-main); border-radius: 12px; padding: 4px; gap: 4px; }
.rew-filter button { flex: 1; padding: 8px 4px; border-radius: 9px; border: none; cursor: pointer;
  background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 600;
  font-family: 'Tajawal', sans-serif; }
.rew-filter button.active { background: var(--bg-sidebar); color: var(--white); }

/* Help button that opens the "how to earn" modal */
.rew-help-btn { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18);
  color: var(--white); width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background .2s; flex-shrink: 0; }
.rew-help-btn:hover { background: rgba(255,255,255,0.2); }

/* Overlay + sheet for the how-to-earn modal */
.rew-how-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn .2s ease; }
.rew-how-sheet { background: var(--bg-card); border-radius: 18px; padding: 22px; max-width: 560px; width: 100%;
  max-height: 85vh; overflow: auto; animation: slideUp .25s ease; }
.rew-how-head { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); }
.rew-how-close { background: var(--border-soft); border: none; width: 32px; height: 32px; border-radius: 10px;
  cursor: pointer; font-size: 14px; font-weight: 700; color: var(--text-secondary); }
.rew-how-close:hover { background: var(--border-main); color: var(--neutral-900); }
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }
@keyframes slideUp { from {transform:translateY(20px);opacity:0;} to {transform:translateY(0);opacity:1;} }

.rew-card { background: var(--bg-card); border-radius: 14px; overflow: hidden; }
.rew-card .head { padding: 6px 14px; display: flex; align-items: center; gap: 6px; }
.rew-card .head .ic { font-size: 13px; }
.rew-card .head .l  { font-size: 11px; font-weight: 700; }
.rew-card .body { display: flex; align-items: center; gap: 12px; padding: 14px; }
.rew-card .ava { width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.rew-card .info { flex: 1; }
.rew-card .info .t { font-size: 13px; font-weight: 700; color: var(--neutral-900); }
.rew-card .info .n { font-size: 11px; color: var(--text-secondary); margin-top: 2px; font-style: italic; }
.rew-card .info .m { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.rew-card .right { text-align: left; }
.rew-card .amt { font-size: 16px; font-weight: 900; }
.rew-card .st { display: inline-block; border-radius: 99px; padding: 2px 8px;
  font-size: 11px; font-weight: 700; margin-top: 3px; }

.rew-perf { border: 1px solid var(--indigo-200); }
.rew-perf .head { background: var(--indigo-50); border-bottom: 1px solid var(--indigo-200); }
.rew-perf .head .l { color: var(--indigo-500); }
.rew-perf .ava { background: var(--indigo-50); }
.rew-gift { border: 1px solid var(--pink-200); }
.rew-gift .head { background: var(--pink-50); border-bottom: 1px solid var(--pink-200); }
.rew-gift .head .l { color: var(--pink-500); }
.rew-gift .ava { background: var(--pink-50); }
.rew-contest { border: 1px solid var(--amber-200); }
.rew-contest .head { background: var(--primary-soft); border-bottom: 1px solid var(--amber-200); }
.rew-contest .head .l { color: var(--primary); }
.rew-contest .ava { background: var(--primary-soft); }

.rew-how { background: var(--bg-card); border-radius: 16px; padding: 18px 20px; border: 1px solid var(--border-soft); }
.rew-how .h { font-size: 13px; font-weight: 700; color: var(--neutral-900); margin-bottom: 16px; }
.rew-how .sources { display: flex; gap: 8px; margin-bottom: 16px; }
.rew-how .src { flex: 1; border-radius: 10px; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px; }
.rew-how .src.auto { background: var(--indigo-50); }
.rew-how .src.auto .l { color: var(--indigo-500); }
.rew-how .src.man { background: var(--green-50); }
.rew-how .src.man .l { color: var(--green-600); }
.rew-how .src .ic { font-size: 16px; }
.rew-how .src .l { font-size: 12px; font-weight: 700; }
.rew-how .src .d { font-size: 10px; color: var(--text-secondary); }
.rew-how .group { margin-bottom: 16px; }
.rew-how .group:last-child { margin-bottom: 0; }
.rew-how .group .ghead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rew-how .group .ghead .ic { width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 16px; }
.rew-how .group .ghead .name { flex: 1; font-size: 13px; font-weight: 700; color: var(--neutral-900); }
.rew-how .group .ghead .src-badge { display: inline-flex; align-items: center; gap: 4px;
  border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; }
.rew-how .items { padding-right: 12px; margin-right: 4px; border-right-width: 3px; border-right-style: solid; }
.rew-how .item { display: flex; gap: 10px; align-items: flex-start; padding: 10px;
  background: var(--bg-main); border-radius: 8px; margin-bottom: 6px; }
.rew-how .item:last-child { margin-bottom: 0; }
.rew-how .item .ic { font-size: 18px; flex-shrink: 0; }
.rew-how .item .t { font-size: 12px; font-weight: 700; color: var(--neutral-900); }
.rew-how .item .d { font-size: 11px; color: var(--text-secondary); margin-top: 2px; line-height: 1.6; }

/* ─── ACCOUNT TAB ─────────────────────────────────────────────────────── */
.account-tab { display: flex; flex-direction: column; gap: 0; height: calc(100vh - 130px); }
.manager-card { background: var(--bg-sidebar); border-radius: 16px; padding: 16px 18px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.manager-card .ava { width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(135deg, var(--indigo-500), var(--purple-500));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--white); flex-shrink: 0; }
.manager-card .info { flex: 1; }
.manager-card .name { font-size: 14px; font-weight: 700; color: var(--white); }
.manager-card .role { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.manager-card .status { font-size: 11px; color: var(--green-500); margin-top: 3px;
  display: flex; align-items: center; gap: 4px; }
.manager-card .status .d { width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-500); display: inline-block; }
.manager-card .actions { display: flex; gap: 8px; }
.manager-card .actions a { width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; text-decoration: none; }
.manager-card .actions .wa { background: #25D366; }
.manager-card .actions .ph { background: #3B82F6; }

.chat-area { flex: 1; overflow-y: auto; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.chat-day { text-align: center; margin: 10px 0; }
.chat-day span { background: var(--border-soft); color: var(--text-muted); border-radius: 20px;
  padding: 3px 12px; font-size: 11px; }
.chat-msg { display: flex; margin-bottom: 8px; gap: 8px; align-items: flex-end; }
.chat-msg.me { justify-content: flex-start; }
.chat-msg.them { justify-content: flex-end; }
.chat-msg .ava { width: 28px; height: 28px; border-radius: 8px; background: var(--indigo-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--white); font-weight: 700; flex-shrink: 0; }
.chat-msg .bubble { max-width: 75%; padding: 10px 14px;
  font-size: 14px; line-height: 1.6; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.chat-msg.me .bubble { border-radius: 16px 16px 4px 16px; background: var(--bg-sidebar); color: var(--white); }
.chat-msg.them .bubble { border-radius: 16px 16px 16px 4px; background: var(--bg-card); color: var(--neutral-900); }
.chat-msg .time { font-size: 10px; margin-top: 4px; }
.chat-msg.me .time { color: rgba(255,255,255,0.5); text-align: left; }
.chat-msg.them .time { color: var(--neutral-300); text-align: right; }

.quick-msgs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
.quick-msgs::-webkit-scrollbar { display: none; }
.quick-msgs button { flex-shrink: 0; padding: 6px 12px; border-radius: 20px;
  border: 1.5px solid var(--border-main); background: var(--bg-card);
  font-size: 12px; color: var(--neutral-700); cursor: pointer;
  font-family: 'Tajawal', sans-serif; white-space: nowrap; }

.chat-input { display: flex; gap: 8px; align-items: center;
  background: var(--bg-card); border-radius: 14px; border: 1px solid var(--border-main);
  padding: 6px 6px 6px 14px; }
.chat-input input { flex: 1; border: none; outline: none; font-size: 14px;
  font-family: 'Tajawal', sans-serif; background: transparent; color: var(--neutral-900); }
.chat-input button { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-sidebar);
  border: none; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--white); }

/* ─── EVENTS TAB ──────────────────────────────────────────────────────── */
.event-card { background: var(--bg-card); border-radius: 14px; padding: 16px 18px;
  border: 1px solid var(--border-soft); cursor: pointer; display: flex; gap: 14px; align-items: center; }
.event-card .ic { width: 50px; height: 50px; border-radius: 13px; background: var(--bg-main);
  display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
.event-card .body { flex: 1; }
.event-card .head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.event-card .title { font-size: 14px; font-weight: 700; color: var(--neutral-900); }
.event-card .st { border-radius: 20px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.event-card .prize { font-size: 12px; color: var(--text-secondary); margin-bottom: 0; }
.event-card .rank { font-size: 11px; color: var(--primary); font-weight: 600; margin-top: 6px; }
.event-card .progress { height: 4px; background: var(--border-soft); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.event-card .progress > div { height: 100%; background: var(--primary); border-radius: 2px; }
.event-card .arrow { color: var(--neutral-300); font-size: 18px; }
.event-section .label { font-size: 13px; font-weight: 700; color: var(--neutral-900); margin-bottom: 10px; }
.event-section.dim .label { color: var(--text-muted); }
.event-section.dim .col-10 { opacity: 0.6; }

/* ─── NOTIFICATIONS PANEL ────────────────────────────────────────────── */
.overlay-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.overlay-sheet { width: 100%; max-width: 420px; background: var(--bg-card);
  border-radius: 20px; padding: 24px 20px 28px;
  font-family: 'Tajawal', sans-serif; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
@media (max-width: 640px) {
  .overlay-bg { align-items: flex-end; padding: 0; }
  .overlay-sheet { border-radius: 20px 20px 0 0; max-height: 90vh; padding-bottom: 32px; }
}

.notif-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.notif-head .title { font-size: 15px; font-weight: 700; color: var(--neutral-900); }
.notif-head .mark { background: none; border: none; cursor: pointer; font-size: 12px; color: var(--indigo-500);
  font-weight: 600; font-family: 'Tajawal', sans-serif; }
.notif-item { display: flex; gap: 12px; padding: 14px 10px; border-radius: 12px;
  margin-bottom: 4px; cursor: pointer; }
.notif-item.unread { background: #F0F4FF; }
.notif-item .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--border-soft);
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.notif-item.unread .ic { background: var(--indigo-100); }
.notif-item .body { flex: 1; }
.notif-item .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.notif-item .title { font-size: 13px; font-weight: 500; color: var(--neutral-900); }
.notif-item.unread .title { font-weight: 700; }
.notif-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--indigo-500);
  display: inline-block; flex-shrink: 0; }
.notif-item .body-text { font-size: 12px; color: var(--text-secondary); }
.notif-item .time { font-size: 12px; color: var(--neutral-300); margin-top: 3px; }

/* ─── SIDE DRAWER ─────────────────────────────────────────────────────── */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; }
.drawer { position: fixed; top: 0; bottom: 0; right: 0;
  width: 260px; background: var(--bg-card); z-index: 201;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15); }
.drawer .head { padding: 20px 20px 16px; border-bottom: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; align-items: center; }
.drawer .head .brand { display: flex; align-items: center; gap: 10px; }
.drawer .head .mark { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-sidebar);
  display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--primary); }
.drawer .head .name { font-size: 14px; font-weight: 700; color: var(--neutral-900); }
.drawer .head .close { background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--text-muted); padding: 4px; min-width: 36px; min-height: 36px; }
.drawer .nav { flex: 1; overflow-y: auto; padding: 12px; }
.drawer .nav button { width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 12px; border: none; cursor: pointer;
  background: transparent; color: var(--neutral-700); margin-bottom: 4px;
  font-family: 'Tajawal', sans-serif; font-size: 14px; font-weight: 500; text-align: right; }
.drawer .nav button.active { background: var(--bg-sidebar); color: var(--white); font-weight: 700; }
.drawer .nav button .ic { font-size: 20px; line-height: 1; }
.drawer .nav button .lbl { flex: 1; }
.drawer .nav button .arr { font-size: 18px; opacity: 0.6; }
.drawer .actions { padding: 12px 12px 24px; border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 8px; }
.drawer .actions button { width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; cursor: pointer;
  font-family: 'Tajawal', sans-serif; font-size: 14px; text-align: right; }
.drawer .actions .notifs { background: var(--bg-main); color: var(--neutral-700); border: none; font-weight: 500; }
.drawer .actions .notifs .badge { background: var(--red-500); color: var(--white); border-radius: 20px;
  padding: 2px 7px; font-size: 11px; font-weight: 700; }
.drawer .actions .lang { background: var(--bg-card); color: var(--neutral-700);
  border: 1.5px solid var(--border-main); font-weight: 600; }
.drawer .actions .lang .swap { font-size: 11px; background: var(--border-soft); border-radius: 8px;
  padding: 2px 8px; color: var(--text-secondary); }
.drawer .actions .logout { background: var(--red-50); color: var(--red-600); border: none; font-weight: 600; }

/* ─── REWARD POPUP ────────────────────────────────────────────────────── */
.rew-popup-bg { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  font-family: 'Tajawal', sans-serif; }
.rew-popup { width: 100%; max-width: 360px; background: var(--bg-card); border-radius: 24px;
  overflow: hidden;
  max-height: 90vh; display: flex; flex-direction: column;
  transform: scale(0.85) translateY(40px); opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.rew-popup.show { transform: scale(1) translateY(0); opacity: 1; }
.rew-popup .head { background: linear-gradient(135deg, var(--neutral-900), var(--neutral-800));
  padding: 28px 24px 24px; text-align: center; position: relative; flex-shrink: 0; }
.rew-popup .head .counter { position: absolute; top: 14px; left: 16px;
  background: rgba(255,255,255,0.15); border-radius: 20px; padding: 3px 10px;
  font-size: 11px; color: var(--white); font-weight: 600; }
.rew-popup .head .ic { font-size: 52px; margin-bottom: 12px;
  animation: bounce 0.6s ease infinite alternate; }
.rew-popup .head .lbl { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.rew-popup .head .amt { font-size: 42px; font-weight: 900; line-height: 1; margin-bottom: 8px; }
.rew-popup .head .badge { border-radius: 20px; padding: 4px 14px;
  font-size: 12px; font-weight: 700; }
.rew-popup .body { padding: 20px 24px 24px; flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.rew-popup .body .title { font-size: 16px; font-weight: 800; color: var(--text-main);
  margin-bottom: 8px; text-align: center; }
.rew-popup .body .note { background: var(--bg-main); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 16px; font-size: 13px; color: var(--text-secondary);
  text-align: center; line-height: 1.7; }
.rew-popup .body .meta { display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.rew-popup .body .meta strong { color: var(--text-secondary); }
.rew-popup .dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 16px; }
.rew-popup .dots .dot { height: 7px; border-radius: 4px; background: var(--border-main);
  width: 7px; transition: all 0.3s; }
.rew-popup .dots .dot.on { width: 20px; background: var(--text-secondary); }
.rew-popup .body button.cta { width: 100%; padding: 14px; background: var(--primary); color: #fff;
  border: none; border-radius: 14px; font-size: 15px; font-weight: 800; cursor: pointer;
  font-family: 'Tajawal', sans-serif; box-shadow: var(--shadow-card);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.rew-popup .body button.cta:hover { filter: brightness(.95); }
.rew-popup .body button.skip { width: 100%; margin-top: 10px; padding: 10px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--text-muted); font-family: 'Tajawal', sans-serif; }
.rew-popup .body .rich-content { background: var(--bg-main); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 16px; font-size: 13px; color: var(--text-secondary);
  line-height: 1.9; white-space: pre-wrap; word-break: break-word; }
.rew-popup .body .rich-content strong { color: var(--text-main); font-weight: 800; }
.rew-popup .body .rich-content em { font-style: italic; color: var(--text-secondary); }

/* ─── TOAST ───────────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--bg-sidebar); color: var(--white); border-radius: 12px; padding: 12px 20px;
  font-size: 13px; font-weight: 600; z-index: 99; white-space: nowrap;
  display: flex; gap: 8px; }
.toast .check { color: var(--green-500); }

/* ─── RESPONSIVE ──────────────────────────────────────────────────────── */
/* Larger screens: shell fills the viewport, cards rearrange into a grid */
@media (min-width: 900px) {
  .app-shell { max-width: none; }

  .app-header,
  .tab-indicator,
  .app-content {
    padding-left: max(18px, calc(50vw - 700px));
    padding-right: max(18px, calc(50vw - 700px));
  }

  .app-content {
    max-width: none;
    padding-top: 22px;
    padding-bottom: 32px;
  }

  /* Stacked card columns become a multi-column dashboard grid */
  .app-content > .col,
  .app-content > .account-tab {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
    align-items: start;
  }

  /* Hero / summary cards always span the full width */
  .app-content > .col > .home-hero,
  .app-content > .col > .perf-hero,
  .app-content > .col > .pay-hero,
  .app-content > .col > .aca-hero,
  .app-content > .col > .rew-hero {
    grid-column: 1 / -1;
  }

  /* Filter rows span the full width and float to the top */
  .app-content > .col > .rew-filter {
    grid-column: 1 / -1;
    order: -1;
  }

  /* Inner card lists span full width as a flex grid that fills every row */
  .app-content > .col > .col-10 {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .app-content > .col > .col-10 > * {
    flex: 1 1 320px;
    min-width: 0;
  }

  /* Rewards summary card: reflow into a horizontal layout when full width */
  .app-content > .col > .rew-hero {
    display: grid;
    grid-template-columns: minmax(160px, auto) 1fr 1fr;
    align-items: center;
    gap: 24px;
    padding: 22px 28px;
  }
  .app-content > .col > .rew-hero .h1 { grid-column: 1; grid-row: 1; margin: 0; }
  .app-content > .col > .rew-hero .h2 { grid-column: 1; grid-row: 2; margin: 0; font-size: 18px; color: var(--white); }
  .app-content > .col > .rew-hero .grid  { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .app-content > .col > .rew-hero .grid3 { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
}

/* Medium screens 600–899px: just widen content, keep single column */
@media (min-width: 600px) and (max-width: 899px) {
  .app-shell { max-width: none; }
  .app-header,
  .tab-indicator,
  .app-content {
    padding-left: max(18px, calc(50vw - 280px));
    padding-right: max(18px, calc(50vw - 280px));
  }
  .app-content { max-width: none; }
}

/* Very small phones: tighten paddings so nothing overflows */
@media (max-width: 360px) {
  .app-content { padding: 14px 12px 22px; }
  .app-header  { padding: 12px 14px; }
  .home-hero, .dark-card { padding: 20px 16px; }
  .card, .card-lg { padding: 14px; }
  .lp-section, .lp-benefits { padding-left: 18px; padding-right: 18px; }
}

/* ════════════════════════════════════════════════════════════════════════
   HERO RPG — gamified home hero (2026-05-20)
   Single-color: always uses the brand primary (TikTok pink). Status badge
   text/icon still changes (Elite/On Fire/Steady/Needs Push) but the card
   colour never does — keeps the home page on-brand.
   ════════════════════════════════════════════════════════════════════════ */
/* Hero — neutral light card with only LIGHT brand accents (agency request
   to cut the heavy red block). White/card surface, dark text, a thin pink
   top strip + pink soft pills + pink progress. No full-bleed gradient. */
.hero-rpg {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.hero-rpg::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-deep));
}

/* Top row: status badge on one side, rank chip on the other. */
.hero-rpg .hero-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.hero-rpg .hero-status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: var(--primary-soft);
  color: var(--primary-deep);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
/* Rank chip — a small "feel-good" badge (gold trophy + rank), clickable. */
.hero-rpg .hero-rank {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--neutral-100);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.hero-rpg .hero-rank [data-lucide] { width: 14px; height: 14px; color: #F59E0B; }
.hero-rpg .hero-rank span { font-size: 11px; font-weight: 700; color: var(--text-muted); }
[data-theme="dark"] .hero-rpg .hero-rank { background: var(--bg-elevated); border-color: var(--border-main); }
.hero-rpg .hero-status [data-lucide] {
  width: 14px;
  height: 14px;
}
.hero-rpg .hero-headline {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 14px;
  line-height: 1.5;
  color: var(--text-main);
}
/* Target tier shown as a soft chip so the level number stands out. */
.hero-rpg .hero-headline .hero-tier {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-deep);
  padding: 2px 12px;
  border-radius: 9px;
  font-weight: 900;
  white-space: nowrap;
  margin-inline-start: 4px;
}
[data-theme="dark"] .hero-rpg .hero-headline .hero-tier { color: #FF8FA3; }
/* "?" info button next to the headline — opens the tier-system explainer. */
.hero-rpg .hero-headline .tier-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  vertical-align: middle;
  margin-inline-start: 6px;
  border: none;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-deep);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.hero-rpg .hero-headline .tier-info-btn:hover { background: var(--primary); color: #fff; }
.hero-rpg .hero-headline .tier-info-btn i { width: 16px; height: 16px; }
/* Current → Target progression row. Two equal stat tiles with a chevron
   between them, so the eye reads "where I am → where I'm headed". */
.hero-rpg .hero-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.hero-rpg .hstat {
  background: var(--neutral-100);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.hero-rpg .hstat .v {
  /* Full diamond totals (e.g. 1,587,899) — fluid size so the untruncated
     number always fits both tiles side-by-side, down to small phones. */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: clamp(15px, 4.6vw, 20px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-main);
  white-space: nowrap;
}
/* Diamond glyph — the lucide gem icon, tinted a soft diamond-blue so it reads
   as a gem without adding a loud accent. Replaces the flat ◆ character. */
.hero-rpg .hstat .v [data-lucide] {
  width: 17px;
  height: 17px;
  color: #3FA9F5;
  flex-shrink: 0;
}
.hero-rpg .hstat .l {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 700;
}
/* Both tiles stay neutral — no red fill on the target (agency: a red "target"
   box read as a warning). The chevron + labels carry the current→goal story. */
/* Chevron divider — points from current toward target (RTL-aware). */
.hero-rpg .hstat-arrow {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-rpg .hstat-arrow [data-lucide] { width: 20px; height: 20px; }
[dir="ltr"] .hero-rpg .hstat-arrow { transform: rotate(180deg); }
/* Progress label row — goal name + icon on one side, the % on the other.
   Two of these stack: "keep current tier" (green when secured) and
   "upgrade to next tier" (brand pink). */
.hero-rpg .hero-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
/* Add breathing room before the SECOND head (the advance bar) so the two
   progress blocks read as distinct goals, not one stack. The advance head
   follows either the maintain bar OR its remaining line, so cover both. */
.hero-rpg .hero-progress + .hero-progress-head,
.hero-rpg .hero-remaining + .hero-progress-head { margin-top: 14px; }
.hero-rpg .hero-progress-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-secondary);
}
.hero-rpg .hero-progress-head span [data-lucide] {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}
.hero-rpg .hero-progress-head b {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary-deep);
}
.hero-rpg .hero-progress-head b.ok { color: var(--green-600); }
/* Tier threshold (full diamond number) shown next to each bar's label. */
.hero-rpg .hph-thr { font-size: 11px; font-weight: 800; color: var(--text-muted); margin-inline-start: 5px; white-space: nowrap; }
.hero-rpg .hero-progress {
  position: relative;
  height: 10px;
  background: var(--neutral-100);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.hero-rpg .hero-progress .bar {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
/* "Secured" state for the maintain bar — green signals the current tier is
   locked in for next month (same convention as the stream bars). */
.hero-rpg .hero-progress .bar.done {
  background: linear-gradient(90deg, var(--green-500), #34D399);
}
/* "Just X left to reach the new tier" — the single actionable number. */
.hero-rpg .hero-remaining {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 13px;
}
.hero-rpg .hero-remaining [data-lucide] { width: 15px; height: 15px; color: var(--primary); flex-shrink: 0; }
.hero-rpg .hero-remaining b { color: var(--primary-deep); font-weight: 900; }
/* Tighten the gap between the maintain bar and its own remaining line so the
   block (bar + "X left to stay") reads as one unit, separate from advance. */
.hero-rpg .hero-progress + .hero-remaining { margin-top: -3px; }
/* Secured state — the maintain goal is met; recolour the line green. */
.hero-rpg .hero-remaining.ok { color: var(--green-600); }
.hero-rpg .hero-remaining.ok [data-lucide] { color: var(--green-500); }
/* Last-month + expected-EOM, pulled into the hero (two compact cells). */
.hero-rpg .hero-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.hero-rpg .hero-extra .he-item {
  background: var(--neutral-100);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 9px 10px;
  text-align: center;
}
.hero-rpg .hero-extra .he-l {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 3px;
}
.hero-rpg .hero-extra .he-l [data-lucide] { width: 13px; height: 13px; }
.hero-rpg .hero-extra .he-v { font-size: 16px; font-weight: 900; color: var(--text-main); }
[data-theme="dark"] .hero-rpg .hero-extra .he-item { background: var(--bg-elevated); border-color: var(--border-main); }
/* Hero Step — non-clickable instructional banner that replaces the
   CTA button. It's a "next step" hint, not a link out to TikTok. */
.hero-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--neutral-100);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
}
.hero-step .hs-ic {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-radius: 10px;
  flex-shrink: 0;
}
.hero-step .hs-ic [data-lucide] { width: 18px; height: 18px; }
.hero-step .hs-text { flex: 1; min-width: 0; }
.hero-step .hs-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.hero-step .hs-desc {
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--text-main);
}
@media (max-width: 360px) {
  .hero-rpg { padding: 18px 16px; }
  .hero-rpg .hero-headline { font-size: 19px; }
  /* .hstat .v uses clamp() so the full number stays inside the tile —
     no fixed override here (a fixed size would overflow on narrow phones). */
  .hero-rpg .hstat { padding: 12px 6px; }
  .hero-rpg .hstat-arrow [data-lucide] { width: 16px; height: 16px; }
  .hero-step .hs-desc { font-size: 12.5px; }
}
/* Dark mode — the inner surfaces use --neutral-100, which stays LIGHT in the
   dark theme. Without these overrides the stat tiles render light-grey with
   near-white text (invisible). Use dark elevated surfaces instead. */
[data-theme="dark"] .hero-rpg .hstat {
  background: var(--bg-elevated);
  border-color: var(--border-main);
}
[data-theme="dark"] .hero-rpg .hero-progress-head b,
[data-theme="dark"] .hero-rpg .hero-remaining b { color: #FF8FA3; }
[data-theme="dark"] .hero-rpg .hero-progress {
  background: var(--bg-elevated);
}
/* Calm the red in dark mode (red reads as "danger"): dim the accent strip,
   and turn the pink "next step" box into a neutral elevated panel. */
[data-theme="dark"] .hero-rpg::before {
  opacity: 0.4;
  height: 2px;
}
[data-theme="dark"] .hero-step {
  background: var(--bg-elevated);
  border-color: var(--border-main);
}
[data-theme="dark"] .hero-step .hs-title {
  color: var(--text-secondary);
}

/* ════════════════════════════════════════════════════════════════════════
   GAMIFICATION CARDS — home.html (Phase 2)
   ──────────────────────────────────────────────────────────────────────── */

/* Reward Journey Timeline — horizontal track showing ALL reward
   levels (1..max). Completed = gold medal + "تم منحها", current =
   pink pulsing medal + "حاليًا" + chip row showing what's left,
   locked = grey lock. Scrolls horizontally when too many levels. */
.reward-warm-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}
.reward-warm-card .rj-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.reward-warm-card .rj-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.reward-warm-card .rj-title [data-lucide] {
  width: 18px; height: 18px; color: var(--primary);
}
.reward-warm-card .rj-pos {
  font-size: 11.5px;
  font-weight: 900;
  color: var(--primary-deep);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.reward-warm-card .rj-timeline-wrap {
  overflow-x: auto;
  margin: 0 -6px;
  padding: 4px 6px 12px;
  scrollbar-width: thin;
}
.reward-warm-card .rj-timeline-wrap::-webkit-scrollbar { height: 6px; }
.reward-warm-card .rj-timeline-wrap::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 999px; }
.reward-warm-card .rj-timeline {
  display: flex;
  align-items: flex-start;
  min-width: max-content;
}
.reward-warm-card .rj-node {
  flex-shrink: 0;
  width: 116px;
  text-align: center;
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.reward-warm-card .rj-node.completed { border-color: rgba(254, 44, 85, 0.20); }
.reward-warm-card .rj-node.current {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 4px 14px rgba(254, 44, 85, 0.18);
}
.reward-warm-card .rj-medal {
  width: 50px;
  height: 50px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-200);
  color: var(--neutral-500);
  border: 3px solid var(--bg-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.reward-warm-card .rj-medal [data-lucide] { width: 22px; height: 22px; stroke-width: 2.5; }
.reward-warm-card .rj-node.completed .rj-medal {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(254, 44, 85, 0.30);
}
.reward-warm-card .rj-node.current .rj-medal {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft), 0 4px 14px rgba(254, 44, 85, 0.40);
  animation: rj-pulse 1.8s infinite;
  transform: scale(1.06);
}
@keyframes rj-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(254, 44, 85, 0.18), 0 4px 14px rgba(254, 44, 85, 0.30); }
  50%      { box-shadow: 0 0 0 8px rgba(254, 44, 85, 0.10), 0 6px 18px rgba(254, 44, 85, 0.45); }
}
.reward-warm-card .rj-node.locked .rj-medal {
  background: var(--neutral-150);
  color: var(--neutral-400);
  border-color: var(--neutral-100);
}
.reward-warm-card .rj-lvl-row {
  display: flex;
  justify-content: center;
  margin-bottom: 7px;
}
.reward-warm-card .rj-lvl-num {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 0.2px;
}
.reward-warm-card .rj-node.current .rj-lvl-num { color: var(--primary-deep); }
.reward-warm-card .rj-node.locked  .rj-lvl-num { color: var(--text-muted); }
.reward-warm-card .rj-reqs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  margin-bottom: 8px;
  padding: 6px 4px;
  background: var(--neutral-50);
  border-radius: 8px;
}
.reward-warm-card .rj-node.current .rj-reqs { background: rgba(255, 255, 255, 0.55); }
.reward-warm-card .rj-req {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
}
.reward-warm-card .rj-req [data-lucide] { width: 11px; height: 11px; color: var(--primary); }
.reward-warm-card .rj-node.locked .rj-req [data-lucide] { color: var(--neutral-400); }
.reward-warm-card .rj-status {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-block;
}
.reward-warm-card .rj-node.completed .rj-status { color: #fff;                background: var(--primary); }
.reward-warm-card .rj-node.current   .rj-status { color: var(--primary-deep); background: #fff; border: 1px solid var(--primary); }
.reward-warm-card .rj-node.locked    .rj-status { color: var(--neutral-600);  background: var(--neutral-100); }
.reward-warm-card .rj-track {
  flex: 0 0 20px;
  align-self: flex-start;
  margin: 28px -4px 0;
  height: 4px;
  background: var(--neutral-200);
  border-radius: 999px;
  position: relative;
  z-index: 1;
}
.reward-warm-card .rj-track.completed {
  background: var(--primary);
}
/* Not a nested box — a quiet footer line inside the journey card,
   separated only by a thin divider. Label + chips sit on one row. */
.reward-warm-card .rj-current-info {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-main);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.reward-warm-card .rj-current-info b { font-weight: 900; }
.reward-warm-card .rj-info-items {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.reward-warm-card .rj-info-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: var(--text-main);
}
/* Progress-bar variant of the "remaining to next level" block — one mini bar
   per unmet requirement (stream days / hours), so the creator sees exactly
   how close they are instead of a bare "7h left" chip. */
.reward-warm-card .rj-current-info.rj-progress {
  flex-direction: column;
  align-items: stretch;
  gap: 11px;
}
.reward-warm-card .rj-ci-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
  color: var(--text-main);
}
.reward-warm-card .rj-ci-title [data-lucide] { width: 15px; height: 15px; color: var(--primary); }
.reward-warm-card .rj-pbar { text-align: start; }
.reward-warm-card .rj-pbar .ph {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.reward-warm-card .rj-pbar .ph span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
}
.reward-warm-card .rj-pbar .ph span [data-lucide] { width: 14px; height: 14px; color: var(--text-muted); }
.reward-warm-card .rj-pbar .ph b { font-size: 13px; font-weight: 900; color: var(--text-main); }
.reward-warm-card .rj-ptrack {
  height: 9px;
  background: var(--neutral-100);
  border-radius: 999px;
  overflow: hidden;
}
.reward-warm-card .rj-pfill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.reward-warm-card .rj-ci-hint {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}
[data-theme="dark"] .reward-warm-card .rj-ptrack { background: var(--bg-elevated); }
.reward-warm-card .rj-at-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  font-size: 14px;
  font-weight: 900;
  color: var(--primary-deep);
}
.reward-warm-card .rj-at-top [data-lucide] { width: 18px; height: 18px; color: #FBBF24; }
[data-theme="dark"] .reward-warm-card .rj-node { background: var(--bg-card); border-color: var(--border-soft); }
[data-theme="dark"] .reward-warm-card .rj-node.current { background: rgba(254, 44, 85, 0.10); border-color: var(--primary); }
[data-theme="dark"] .reward-warm-card .rj-medal { border-color: var(--bg-card); }
[data-theme="dark"] .reward-warm-card .rj-node.locked .rj-medal { background: var(--bg-darker); color: var(--text-muted); }
[data-theme="dark"] .reward-warm-card .rj-track { background: var(--bg-darker); }
[data-theme="dark"] .reward-warm-card .rj-reqs { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .reward-warm-card .rj-current-info { border-top-color: var(--border-main); color: var(--text-main); }
[data-theme="dark"] .reward-warm-card .rj-info-chip { background: var(--bg-elevated); border-color: var(--border-strong); color: var(--text-main); }
[data-theme="dark"] .reward-warm-card .rj-node.current .rj-reqs { background: rgba(0, 0, 0, 0.20); }
[data-theme="dark"] .reward-warm-card .rj-lvl-num { color: var(--text-main); }
[data-theme="dark"] .reward-warm-card .rj-node.current .rj-lvl-num { color: #FF8FA3; }
[data-theme="dark"] .reward-warm-card .rj-node.locked .rj-lvl-num { color: var(--text-muted); }
[data-theme="dark"] .reward-warm-card .rj-req { color: var(--text-secondary); }
[data-theme="dark"] .reward-warm-card .rj-node.current .rj-status { background: var(--bg-card); color: #FF8FA3; }
[data-theme="dark"] .reward-warm-card .rj-current-info {
  background: rgba(254, 44, 85, 0.14);
  border-color: rgba(254, 44, 85, 0.30);
  color: #FF8FA3;
}
[data-theme="dark"] .reward-warm-card .rj-info-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(254, 44, 85, 0.30);
  color: #FF8FA3;
}
[data-theme="dark"] .reward-warm-card .rj-pos {
  background: rgba(254, 44, 85, 0.18);
  color: #FF8FA3;
}
[data-theme="dark"] .reward-warm-card .rj-at-top { color: #FF8FA3; }

/* Diamond Summary block — current month / last month / EOM projection.
   Sits right under the Hero RPG so the creator still sees the raw numbers
   alongside the gamified card. Brand-only colors. */
.dmd-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.dmd-summary .dmd-box {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 9px 11px;
  text-align: center;
}
.dmd-summary .dmd-box.current {
  background: var(--primary-soft);
  border-color: rgba(254, 44, 85, 0.18);
}
.dmd-summary .dmd-box .lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.dmd-summary .dmd-box .lbl [data-lucide] { width: 13px; height: 13px; }
.dmd-summary .dmd-box .val {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.15;
}
.dmd-summary .dmd-box.current .lbl,
.dmd-summary .dmd-box.current .val { color: var(--primary-deep); }
.dmd-summary .dmd-box.wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: start;
  gap: 12px;
}
.dmd-summary .dmd-box.wide .lbl { margin-bottom: 0; justify-content: flex-start; }
.dmd-summary .dmd-box.wide .val { font-size: 15px; }
.dmd-summary .dmd-box .hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 600;
}
.dmd-summary .dmd-box.current .hint { color: var(--primary-deep); opacity: .8; }
/* Stream box — two stacked progress bars (days + hours) toward the reward
   requirement. Brand-pink fill whose width = % of target; turns green at
   100% so the colour itself signals the goal is met. */
.stream-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0 8px;
}
.sb-row { text-align: start; }
.sb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.sb-head [data-lucide] { width: 13px; height: 13px; vertical-align: -2px; }
.sb-head b { font-size: 14px; font-weight: 900; color: var(--text-main); }
.sb-head b span { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.sb-track {
  height: 9px;
  border-radius: 999px;
  background: var(--neutral-100);
  overflow: hidden;
}
.sb-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-deep));
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.sb-fill.done {
  background: linear-gradient(90deg, var(--green-500), #34D399);
}
[data-theme="dark"] .sb-track { background: var(--bg-elevated); }
.sb-cap { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-top: 5px; }
.sb-cap .ok { color: var(--green-600); display: inline-flex; align-items: center; gap: 4px; }
.sb-cap .ok [data-lucide] { width: 13px; height: 13px; }
/* Small marker that drops from the bar at the fill edge, showing what's left. */
.sb-barwrap { position: relative; padding-top: 3px; }
.sb-marker {
  position: absolute;
  top: 12px;
  transform: translateX(-50%);
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.sb-marker::before {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  width: 2px; height: 5px;
  background: var(--primary);
}
[data-theme="dark"] .sb-marker { color: #FF8FA3; background: rgba(254,44,85,0.16); }
/* Every level shown as a dot on the bar; reached ones turn green with a
   check, and each reveals the level's full info on hover. */
.sb-dot {
  position: absolute;
  top: -3px;
  transform: translateX(-50%);
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--neutral-300, #CBD5E1);
  box-sizing: border-box;
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .12s;
}
.sb-dot:hover { transform: translateX(-50%) scale(1.25); z-index: 25; }
.sb-dot.done { background: var(--green-500); border-color: #fff; box-shadow: 0 0 0 1px var(--green-500); }
.sb-dot.done [data-lucide] { width: 9px; height: 9px; color: #fff; stroke-width: 3.5; }
.sb-tip {
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--neutral-900, #111827);
  color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1.5;
  white-space: normal;
  width: max-content;
  max-width: 170px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 8px;
  opacity: 0; visibility: hidden;
  transition: opacity .15s;
  z-index: 30;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.sb-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--neutral-900, #111827);
}
/* Edge-aware anchoring so the tooltip never spills off / gets clipped. */
.sb-dot.tip-start .sb-tip { left: -6px; right: auto; transform: none; }
.sb-dot.tip-start .sb-tip::after { left: 13px; transform: none; }
.sb-dot.tip-end .sb-tip { right: -6px; left: auto; transform: none; }
.sb-dot.tip-end .sb-tip::after { left: auto; right: 13px; transform: none; }
.sb-dot:hover .sb-tip { opacity: 1; visibility: visible; }
[data-theme="dark"] .sb-dot { background: var(--bg-elevated); border-color: var(--border-strong); }
[data-theme="dark"] .sb-dot.done { background: var(--green-500); border-color: var(--bg-card); }
[data-theme="dark"] .sb-tip { background: #000; }
[data-theme="dark"] .sb-tip::after { border-top-color: #000; }

/* Merged card: this-month streaming progress + next-unlock in one box. */
.combo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.cc-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; color: var(--text-secondary);
  margin-bottom: 10px;
}
.cc-title [data-lucide] { width: 15px; height: 15px; color: var(--primary); }
.cc-hint { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-top: 7px; text-align: center; }
.cc-divider { height: 1px; background: var(--border-soft); margin: 14px 0; }
.combo-card .cc-unlock-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800; color: var(--text-main); margin-bottom: 6px;
}
.combo-card .cc-unlock-title [data-lucide] { width: 15px; height: 15px; color: var(--primary); }
.combo-card .cc-unlock-desc { font-size: 13px; font-weight: 800; color: var(--text-main); margin-bottom: 8px; line-height: 1.5; }
.combo-card .cc-unlock .cc-hint { text-align: start; }
.combo-card .uc-bar { height: 6px; background: var(--neutral-100); border-radius: 999px; overflow: hidden; }
.combo-card .uc-bar > div { height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s ease; }
[data-theme="dark"] .combo-card .uc-bar { background: var(--bg-elevated); }
@media (max-width: 360px) {
  .dmd-summary .dmd-box .val { font-size: 16px; }
  .dmd-summary .dmd-box.wide .val { font-size: 14px; }
}
[data-theme="dark"] .dmd-summary .dmd-box.current { background: rgba(254, 44, 85, 0.07); border-color: rgba(254, 44, 85, 0.16); }
[data-theme="dark"] .dmd-summary .dmd-box.current .lbl,
[data-theme="dark"] .dmd-summary .dmd-box.current .val { color: #FF8FA3; }

/* Rank Card on Home — surfaces ranking instead of hiding it on /perf */
.rank-card-home {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.rank-card-home:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
  border-color: var(--primary);
}
.rank-card-home .rc-trophy {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 12px;
  flex-shrink: 0;
}
.rank-card-home .rc-trophy [data-lucide] { width: 22px; height: 22px; }
.rank-card-home .rc-body { flex: 1; min-width: 0; }
.rank-card-home .rc-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.rank-card-home .rc-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1;
}
.rank-card-home .rc-total {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.rank-card-home .rc-arrow {
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 900;
}
[data-theme="dark"] .rank-card-home .rc-trophy {
  background: rgba(254, 44, 85, 0.18);
  color: #FF8FA3;
}

/* Next Unlock Card — surface top_gap from tier_progress */
.unlock-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.unlock-card .uc-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 12px;
  flex-shrink: 0;
}
.unlock-card .uc-icon [data-lucide] { width: 22px; height: 22px; }
.unlock-card .uc-body { flex: 1; min-width: 0; }
.unlock-card .uc-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.unlock-card .uc-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}
.unlock-card .uc-bar {
  height: 6px;
  background: var(--neutral-150);
  border-radius: 999px;
  overflow: hidden;
}
.unlock-card .uc-bar > div {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.unlock-card .uc-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 7px;
  line-height: 1.4;
}
[data-theme="dark"] .unlock-card .uc-icon {
  background: rgba(254, 44, 85, 0.18);
  color: #FF8FA3;
}
[data-theme="dark"] .unlock-card .uc-bar { background: var(--bg-darker); }

/* Weekly AI Insight — one-line trend comparison */
.ai-insight {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.ai-insight [data-lucide] { width: 18px; height: 18px; flex-shrink: 0; }
.ai-insight.up   { background: var(--green-100); color: var(--green-800); border: 1px solid #BBF7D0; }
.ai-insight.down { background: var(--red-100);   color: var(--red-800);   border: 1px solid var(--red-200); }
.ai-insight.flat { background: var(--neutral-100); color: var(--text-secondary); border: 1px solid var(--border-soft); }
/* "soft" = behind-pace nudge. Neutral surface + a thin brand accent on the
   leading edge — motivational, never a red alarm. */
.ai-insight.soft {
  background: var(--neutral-100);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  border-inline-start: 3px solid var(--primary);
}
.ai-insight.soft [data-lucide] { color: var(--primary); }
[data-theme="dark"] .ai-insight.soft { background: rgba(255,255,255,0.04); color: var(--text-main); border-color: var(--border-soft); border-inline-start-color: var(--primary); }
[data-theme="dark"] .ai-insight.up   { background: rgba(34,197,94,0.15);  color: #86EFAC; border-color: rgba(34,197,94,0.30); }
[data-theme="dark"] .ai-insight.down { background: rgba(239,68,68,0.15);  color: #FCA5A5; border-color: rgba(239,68,68,0.30); }
[data-theme="dark"] .ai-insight.flat { background: rgba(255,255,255,0.04);color: var(--text-secondary); border-color: var(--border-soft); }

/* Daily Missions Card */
.missions-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.missions-card .mc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.missions-card .mc-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.missions-card .mc-title [data-lucide] { width: 18px; height: 18px; color: var(--primary); }
.missions-card .mc-total {
  font-size: 11px;
  font-weight: 800;
  color: var(--amber-800);
  background: var(--amber-100);
  border-radius: 999px;
  padding: 4px 10px;
}
.missions-card .mc-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 10px;
  line-height: 1.5;
}
.mission {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
}
.mission:first-of-type { border-top: none; }
.mission .m-ic {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
  flex-shrink: 0;
}
.mission .m-ic [data-lucide] { width: 18px; height: 18px; }
.mission.completed .m-ic { background: var(--green-100); color: var(--green-700); }
.mission .m-body { flex: 1; min-width: 0; }
.mission .m-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}
.mission .m-bar {
  height: 5px;
  background: var(--neutral-150);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.mission .m-bar > div {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.mission.completed .m-bar > div { background: var(--green-500); }
.mission .m-prog {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}
.mission .m-reward { flex-shrink: 0; }
.mission .m-reward button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.mission .m-reward button:hover { background: var(--primary-hover); transform: translateY(-1px); }
.mission .m-reward button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.mission .m-r-pending {
  font-size: 12px;
  font-weight: 800;
  color: var(--amber-700);
  background: var(--amber-100);
  padding: 6px 10px;
  border-radius: 10px;
  display: inline-block;
}
.mission.completed .m-r-pending {
  color: var(--green-700);
  background: var(--green-100);
}
/* Locked = still in progress, prize visible but greyed out */
.mission .m-r-locked {
  color: var(--neutral-600);
  background: var(--neutral-100);
}
/* Claimed = celebratory green pill */
.mission .m-r-claimed,
.mission.completed .m-r-claimed {
  color: var(--green-700);
  background: var(--green-100);
}
/* Pulse the "اسحب" button so the win moment pops without being noisy */
.mission .m-claim {
  animation: m-claim-pulse 1.8s ease-in-out infinite;
}
@keyframes m-claim-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254,44,85,0.42); }
  50%      { box-shadow: 0 0 0 6px rgba(254,44,85,0); }
}

[data-theme="dark"] .mission .m-bar { background: var(--bg-darker); }
[data-theme="dark"] .mission.completed .m-ic { background: rgba(34,197,94,0.18); color: #86EFAC; }
[data-theme="dark"] .missions-card .mc-total { color: #FBBF24; background: rgba(245,158,11,0.18); }
[data-theme="dark"] .mission .m-r-pending { color: #FCD34D; background: rgba(245,158,11,0.18); }
[data-theme="dark"] .mission.completed .m-r-pending { color: #86EFAC; background: rgba(34,197,94,0.18); }
[data-theme="dark"] .mission .m-r-locked   { color: #9CA3AF; background: rgba(148,163,184,0.18); }
[data-theme="dark"] .mission .m-r-claimed,
[data-theme="dark"] .mission.completed .m-r-claimed { color: #86EFAC; background: rgba(34,197,94,0.18); }

/* ─── MILESTONES (creator portal) ─────────────────────────────── */
.milestones-section { margin-bottom: 18px; }
.milestones-head {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 10px;
  font-size: 15px; font-weight: 900; color: var(--text-main);
}
.milestones-head [data-lucide] { width: 18px; height: 18px; }
.milestone-track { display: grid; gap: 10px; }
.milestone-card {
  background: var(--bg-card); border-radius: 14px;
  padding: 14px; border: 1px solid var(--border-soft);
  display: flex; gap: 12px; align-items: flex-start;
  transition: all .2s;
}
.milestone-card.completed { border-color: #10B981; background: #ECFDF5; }
.milestone-card.locked    { opacity: .55; filter: grayscale(.4); }
.milestone-card .mc-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.milestone-card .mc-icon [data-lucide] { width: 22px; height: 22px; }
.milestone-card.completed .mc-icon { background: #10B981; color: #fff; }
.milestone-card .mc-body { flex: 1; min-width: 0; }
.milestone-card .mc-title {
  font-size: 14px; font-weight: 900; color: var(--text-main);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.milestone-card .mc-status-pill {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: #DBEAFE; color: #1E40AF; font-weight: 800;
}
.milestone-card.completed .mc-status-pill { background: #10B981; color: #fff; }
.milestone-card .mc-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.milestone-card .mc-reward {
  font-size: 12px; color: var(--primary-deep); margin-top: 6px;
  font-weight: 700; background: var(--primary-soft);
  padding: 6px 10px; border-radius: 8px; display: inline-block;
}
.milestone-card .mc-progress-row { margin-top: 10px; }
.milestone-card .mc-bar {
  height: 6px; background: var(--neutral-100); border-radius: 999px;
  overflow: hidden;
}
.milestone-card .mc-bar > div {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-deep));
  border-radius: 999px; transition: width .4s ease;
}
.milestone-card .mc-prog-text {
  font-size: 11px; color: var(--text-muted); margin-top: 4px;
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
[data-theme="dark"] .milestone-card.completed { background: rgba(16,185,129,0.12); }


/* ─── MILESTONES (creator portal) ─────────────────────────────── */
.milestones-section { margin-bottom: 18px; }
.milestones-head {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 10px;
  font-size: 15px; font-weight: 900; color: var(--text-main);
}
.milestones-head [data-lucide] { width: 18px; height: 18px; }
.milestone-track { display: grid; gap: 10px; }
.milestone-card {
  background: var(--bg-card); border-radius: 14px;
  padding: 14px; border: 1px solid var(--border-soft);
  display: flex; gap: 12px; align-items: flex-start;
  transition: all .2s;
}
.milestone-card.completed { border-color: #10B981; background: #ECFDF5; }
.milestone-card.locked    { opacity: .55; filter: grayscale(.4); }
.milestone-card .mc-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.milestone-card .mc-icon [data-lucide] { width: 22px; height: 22px; }
.milestone-card.completed .mc-icon { background: #10B981; color: #fff; }
.milestone-card .mc-body { flex: 1; min-width: 0; }
.milestone-card .mc-title {
  font-size: 14px; font-weight: 900; color: var(--text-main);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.milestone-card .mc-status-pill {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: #DBEAFE; color: #1E40AF; font-weight: 800;
}
.milestone-card.completed .mc-status-pill { background: #10B981; color: #fff; }
.milestone-card .mc-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.milestone-card .mc-reward {
  font-size: 12px; color: var(--primary-deep); margin-top: 6px;
  font-weight: 700; background: var(--primary-soft);
  padding: 6px 10px; border-radius: 8px; display: inline-block;
}
.milestone-card .mc-progress-row { margin-top: 10px; }
.milestone-card .mc-bar {
  height: 6px; background: var(--neutral-100); border-radius: 999px;
  overflow: hidden;
}
.milestone-card .mc-bar > div {
  height: 100