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

:root {
  --bg: #0b0f19;
  --card: #111827;
  --card-hover: #161d2e;
  --border: #1f2937;
  --border-light: #283548;
  --text: #e5e7eb;
  --text-secondary: #c4c4c4;
  --muted: #9ca3af;
  --dim: #4b5563;
  --brand: #60a5fa;
  --brand-dim: rgba(96,165,250,0.10);
  --brand-glow: rgba(96,165,250,0.25);
  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.10);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.10);
  --yellow: #f59e0b;
  --yellow-dim: rgba(245,158,11,0.10);
  --purple: #a855f7;
  --purple-dim: rgba(168,85,247,0.10);
  --sidebar-w: 256px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:hover { opacity: 0.85; }

/* ── Layout ── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: transform 0.25s ease;
}

/* ─ Brand area ─ */
.sidebar-header {
  padding: 20px 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-brand-name {
  font-family: 'Geist', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: var(--dim);
  font-weight: 400;
  margin-top: 1px;
}

/* ─ Navigation ─ */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
  padding: 18px 12px 6px;
}

.sidebar-section-label:first-child {
  padding-top: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}

.sidebar-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  opacity: 1;
}

.sidebar-link.active {
  color: var(--text);
  background: var(--brand-dim);
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--dim);
  transition: color 0.15s;
}

.sidebar-link:hover .sidebar-icon {
  color: var(--muted);
}

.sidebar-link.active .sidebar-icon {
  color: var(--brand);
}

.sidebar-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  background: var(--brand-dim);
  color: var(--brand);
  padding: 2px 7px;
  border-radius: 100px;
}

/* ─ User footer ─ */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--dim);
}

.sidebar-logout {
  font-size: 11px;
  color: var(--dim);
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s;
  cursor: pointer;
  background: none;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logout:hover {
  color: var(--red);
  border-color: rgba(239,68,68,0.3);
}

/* ── Main area ── */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 40;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.mobile-menu-btn:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.page {
  flex: 1;
  padding: 40px 40px 80px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════
   Overview: Hero Profile Card
   ══════════════════════════════════════════════════ */

.hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  animation: heroFadeIn 0.5s ease both;
}

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

/* Ambient glow behind the card */
.hero-glow {
  position: absolute;
  top: -40%;
  left: -10%;
  width: 50%;
  height: 180%;
  background: radial-gradient(ellipse, rgba(96,165,250,0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* ─ Profile row ─ */
.hero-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.hero-avatar-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--brand), var(--purple));
  flex-shrink: 0;
  animation: heroAvatarIn 0.6s ease both 0.15s;
}

@keyframes heroAvatarIn {
  from { opacity: 0; scale: 0.8; }
  to { opacity: 1; scale: 1; }
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--bg);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-identity {
  animation: heroSlideIn 0.5s ease both 0.2s;
}

@keyframes heroSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-name {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.hero-role {
  font-size: 12px;
  font-weight: 500;
  color: var(--dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─ Metric tiles ─ */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-tile {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  animation: tileIn 0.4s ease both;
}

.metric-tile:nth-child(1) { animation-delay: 0.25s; }
.metric-tile:nth-child(2) { animation-delay: 0.35s; }
.metric-tile:nth-child(3) { animation-delay: 0.45s; }

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

.metric-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity 0.25s;
}

.metric-tile:hover {
  border-color: var(--border-light);
  background: rgba(255,255,255,0.03);
  transform: translateY(-2px);
}

.metric-tile:hover::before {
  opacity: 1;
}

/* Color variants */
.metric-tile[data-color="brand"]::before {
  background: var(--brand);
}
.metric-tile[data-color="brand"] .metric-icon {
  background: var(--brand-dim);
  color: var(--brand);
}

.metric-tile[data-color="purple"]::before {
  background: var(--purple);
}
.metric-tile[data-color="purple"] .metric-icon {
  background: var(--purple-dim);
  color: var(--purple);
}

.metric-tile[data-color="green"]::before {
  background: var(--green);
}
.metric-tile[data-color="green"] .metric-icon {
  background: var(--green-dim);
  color: var(--green);
}

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-data {
  flex: 1;
  min-width: 0;
}

.metric-value {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.metric-green {
  color: var(--green);
}

.metric-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--dim);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .hero {
    padding: 24px 20px;
  }

  .hero-profile {
    flex-direction: column;
    text-align: center;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════
   Section Headings
   ══════════════════════════════════════════════════ */

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 36px;
  margin-bottom: 14px;
  animation: tileIn 0.4s ease both;
}

.section-heading svg {
  color: var(--dim);
}

/* ══════════════════════════════════════════════════
   Alerts Strip
   ══════════════════════════════════════════════════ */

.alerts-strip {
  margin-top: 20px;
  animation: tileIn 0.4s ease both;
}

.alerts-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.alerts-scroll::-webkit-scrollbar {
  display: none;
}

.alert-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.alert-pill:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.alert-pill strong {
  font-weight: 700;
  color: var(--text);
}

.alert-pill svg {
  flex-shrink: 0;
}

/* Color variants */
.alert-pill--yellow {
  border-color: rgba(245,158,11,0.2);
  background: rgba(245,158,11,0.04);
}
.alert-pill--yellow svg {
  color: var(--yellow);
}
.alert-pill--yellow:hover {
  border-color: rgba(245,158,11,0.35);
  background: rgba(245,158,11,0.07);
}

.alert-pill--green {
  border-color: rgba(34,197,94,0.2);
  background: rgba(34,197,94,0.04);
}
.alert-pill--green svg {
  color: var(--green);
}
.alert-pill--green:hover {
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.07);
}

.alert-pill--brand {
  border-color: rgba(96,165,250,0.2);
  background: rgba(96,165,250,0.04);
}
.alert-pill--brand svg {
  color: var(--brand);
}
.alert-pill--brand:hover {
  border-color: rgba(96,165,250,0.35);
  background: rgba(96,165,250,0.07);
}

/* ══════════════════════════════════════════════════
   Pulse Row: Sparkline + Recent Clips
   ══════════════════════════════════════════════════ */

.pulse-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  margin-top: 20px;
  animation: tileIn 0.4s ease both;
}

/* ─ Sparkline Card ─ */
.spark-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.spark-card:hover {
  border-color: var(--border-light);
}

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

.spark-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.spark-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 3px 8px;
  border-radius: 100px;
}

.spark-change--up {
  color: var(--green);
  background: var(--green-dim);
}

.spark-change--down {
  color: var(--red);
  background: var(--red-dim);
}

.spark-value {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 4px;
}

.spark-sub {
  font-size: 11.5px;
  color: var(--dim);
  font-weight: 500;
  margin-bottom: 18px;
}

.spark-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  min-height: 70px;
}

.spark-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  height: 100%;
}

.spark-col {
  flex: 1;
  height: var(--h);
  background: rgba(96,165,250,0.15);
  border-radius: 4px 4px 2px 2px;
  position: relative;
  transition: all 0.2s ease;
  animation: barGrow 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--h, 0) * 0.005s + 0.3s);
}

.spark-col::after {
  content: attr(data-day);
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.spark-col:hover {
  background: rgba(96,165,250,0.3);
}

.spark-col::before {
  content: attr(data-views) " views";
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-light);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, top 0.15s ease;
  z-index: 10;
  font-variant-numeric: tabular-nums;
}

.spark-col:hover::before {
  opacity: 1;
  top: -36px;
}

.spark-col--today {
  background: var(--brand);
  box-shadow: 0 0 12px rgba(96,165,250,0.3);
}

.spark-col--today:hover {
  background: var(--brand);
  box-shadow: 0 0 16px rgba(96,165,250,0.45);
}

@keyframes barGrow {
  from { height: 0; opacity: 0; }
  to { height: var(--h); opacity: 1; }
}

/* ─ Recent Clips Card ─ */
.clips-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.clips-card:hover {
  border-color: var(--border-light);
}

.clips-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  margin-bottom: 12px;
}

.clips-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.clips-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-dim);
  padding: 3px 10px;
  border-radius: 100px;
}

.clips-list {
  display: flex;
  flex-direction: column;
}

.clip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  text-decoration: none;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
}

.clip-row:hover {
  background: rgba(255,255,255,0.02);
  border-left-color: var(--brand);
  opacity: 1;
}

.clip-platform {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clip-platform--yt {
  background: rgba(255,0,0,0.1);
  color: #f44;
}

.clip-platform--tt {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.clip-platform--ig {
  background: linear-gradient(135deg, rgba(131,58,180,0.15), rgba(253,29,29,0.15), rgba(252,176,69,0.15));
  color: #e1306c;
}

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

.clip-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-bottom: 3px;
}

.clip-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clip-views {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.clip-campaign-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-dim);
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ─ Pulse Row responsive ─ */
@media (max-width: 768px) {
  .pulse-row {
    grid-template-columns: 1fr;
  }

  .clip-row {
    padding: 10px 16px;
  }

  .clips-header {
    padding: 0 16px;
  }
}

/* ══════════════════════════════════════════════════
   Active Campaign — Card Style
   ══════════════════════════════════════════════════ */

.ac-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.active-campaign {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 26px;
  position: relative;
  overflow: hidden;
  animation: tileIn 0.4s ease both;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.active-campaign:hover {
  border-color: rgba(34,197,94,0.2);
  box-shadow:
    0 0 0 1px rgba(34,197,94,0.06),
    0 0 30px rgba(34,197,94,0.04),
    0 4px 20px rgba(0,0,0,0.2);
}

/* Subtle corner glow */
.ac-glow {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(34,197,94,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(34,197,94,0.05) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.active-campaign:hover .ac-glow {
  opacity: 1;
}

/* ─ Top row: Title + Badges ─ */
.ac-top-row {
  margin-bottom: 20px;
}

.ac-title {
  font-family: 'Geist', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  margin-bottom: 10px;
}

.ac-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}

.ac-badge--green {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}

.ac-badge--dim {
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.06);
}

.ac-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─ Info grid ─ */
.ac-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ac-info-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--dim);
  margin-bottom: 3px;
}

.ac-info-value {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ac-info-value span {
  font-weight: 400;
  color: var(--dim);
  font-size: 11.5px;
}

.ac-info-platforms {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-plat-yt { color: #f44; }
.ac-plat-tt { color: var(--text); }
.ac-plat-ig { color: #e1306c; }

/* ─ Qualify bar ─ */
.ac-qualify {
  margin-bottom: 20px;
  padding-bottom: 0;
}

.ac-qualify-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ac-qualify-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--dim);
}

.ac-qualify-label strong {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.ac-qualify-pct {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.ac-qualify-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  position: relative;
  overflow: hidden;
}

.ac-qualify-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress);
  background: var(--green);
  border-radius: 100px;
  animation: qualifyGrow 1s cubic-bezier(0.22, 1, 0.36, 1) both 0.5s;
}

@keyframes qualifyGrow {
  from { width: 0; }
  to { width: var(--progress); }
}

/* ─ Stats ─ */
.ac-stats-row {
  display: flex;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.ac-stat {
  flex: 1;
  text-align: center;
}

.ac-stat-val {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ac-stat-green {
  color: var(--green);
}

.ac-stat-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 5px;
}

.ac-stat-sep {
  width: 1px;
  height: 26px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   Recent Campaigns
   ══════════════════════════════════════════════════ */

.recent-campaigns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.rc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  transition: all 0.25s ease;
  animation: tileIn 0.4s ease both;
}

.rc-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.rc-name {
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.rc-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
}

.rc-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.rc-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.rc-stat-val {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.rc-green {
  color: var(--green);
}

.rc-stat-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rc-bar {
  height: 3px;
  background: rgba(255,255,255,0.04);
  border-radius: 100px;
  overflow: hidden;
}

.rc-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--dim);
  opacity: 0.5;
}

/* History button */
.rc-history-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  animation: tileIn 0.4s ease both;
}

.rc-history-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  transition: all 0.2s ease;
}

.rc-history-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: rgba(255,255,255,0.02);
  opacity: 1;
}

.rc-history-btn svg {
  transition: transform 0.2s ease;
}

.rc-history-btn:hover svg {
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .active-campaign {
    padding: 20px;
  }

  .ac-info-grid {
    gap: 10px 14px;
  }

  .ac-stats-row {
    flex-direction: column;
    gap: 12px;
  }

  .ac-stat-sep {
    width: 50px;
    height: 1px;
  }

  .ac-grid {
    grid-template-columns: 1fr;
  }

  .recent-campaigns {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 45;
}

.mobile-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 16px;
}

/* ── Page view switching ── */
.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

/* ══════════════════════════════════════════════════
   Campaigns Page
   ══════════════════════════════════════════════════ */

.cp-header {
  margin-bottom: 24px;
  animation: tileIn 0.4s ease both;
}

.cp-title {
  font-family: 'Geist', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.cp-subtitle {
  font-size: 13.5px;
  color: var(--dim);
  font-weight: 400;
}

/* Filters */
.cp-filters {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  animation: tileIn 0.4s ease both;
}

.cp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  height: 38px;
  flex: 1;
  max-width: 280px;
  transition: border-color 0.2s ease;
}

.cp-search:focus-within {
  border-color: var(--border-light);
}

.cp-search svg {
  color: var(--dim);
  flex-shrink: 0;
}

.cp-search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  width: 100%;
}

.cp-search-input::placeholder {
  color: var(--dim);
}

.cp-pills {
  display: flex;
  gap: 6px;
}

.cp-pill {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.cp-pill.active {
  background: var(--brand-dim);
  border-color: rgba(96,165,250,0.25);
  color: var(--brand);
}

/* Grid */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Card */
.cp-card {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: tileIn 0.4s ease both;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.cp-card:hover {
  border-color: rgba(34,197,94,0.2);
  box-shadow:
    0 0 0 1px rgba(34,197,94,0.06),
    0 0 30px rgba(34,197,94,0.04),
    0 4px 20px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

.cp-card-glow {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(34,197,94,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(34,197,94,0.05) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cp-card:hover .cp-card-glow {
  opacity: 1;
}

/* Card top */
.cp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cp-card-name {
  font-family: 'Geist', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.cp-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  flex-shrink: 0;
}

.cp-badge--green {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}

.cp-badge--yellow {
  background: rgba(245,158,11,0.12);
  color: var(--yellow);
  border: 1px solid rgba(245,158,11,0.2);
}

.cp-badge--dim {
  background: rgba(255,255,255,0.04);
  color: var(--dim);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Rate */
.cp-card-rate {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}

.cp-card-rate span {
  font-size: 12px;
  font-weight: 400;
  color: var(--dim);
}

/* Details */
.cp-card-details {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cp-detail {
  flex: 1;
}

.cp-detail-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--dim);
  margin-bottom: 2px;
}

.cp-detail-value {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cp-detail-value--warn {
  color: var(--yellow);
}

/* Platforms */
.cp-card-platforms {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.cp-plat-yt { color: #f44; }
.cp-plat-tt { color: var(--text); }
.cp-plat-ig { color: #e1306c; }

/* Buttons */
.cp-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
}

.cp-btn--info {
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid var(--border);
}

.cp-btn--info:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: rgba(255,255,255,0.06);
}

.cp-btn--joined {
  background: rgba(34,197,94,0.1);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
  cursor: default;
}

.cp-btn--full {
  background: rgba(255,255,255,0.04);
  color: var(--dim);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: not-allowed;
}

/* ══════════════════════════════════════════════════
   Videos Page
   ══════════════════════════════════════════════════ */

.vp-header {
  margin-bottom: 20px;
  animation: tileIn 0.4s ease both;
}

.vp-title {
  font-family: 'Geist', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.vp-subtitle {
  font-size: 13.5px;
  color: var(--dim);
  font-weight: 400;
}

/* Stats summary */
.vp-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: tileIn 0.4s ease both;
}

.vp-stat-box {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px 20px;
  flex: 1;
}

.vp-stat-num {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 4px;
}

.vp-stat-green { color: var(--green); }

.vp-stat-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Filters */
.vp-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  animation: tileIn 0.4s ease both;
}

.vp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  height: 38px;
  flex: 1;
  max-width: 260px;
  transition: border-color 0.2s ease;
}

.vp-search:focus-within { border-color: var(--border-light); }
.vp-search svg { color: var(--dim); flex-shrink: 0; }

.vp-search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  width: 100%;
}

.vp-search-input::placeholder { color: var(--dim); }

.vp-pills {
  display: flex;
  gap: 6px;
}

.vp-pill, .vp-sort {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.vp-pill:hover, .vp-sort:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.vp-pill.active {
  background: var(--brand-dim);
  border-color: rgba(96,165,250,0.25);
  color: var(--brand);
}

.vp-sort.active {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-light);
  color: var(--text);
}

.vp-dropdown {
  position: relative;
}

.vp-dropdown-btn {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vp-dropdown-btn:hover,
.vp-dropdown.open .vp-dropdown-btn {
  border-color: var(--border-light);
  color: var(--text);
}

.vp-dropdown.open .vp-dropdown-btn svg {
  transform: rotate(180deg);
}

.vp-dropdown-btn svg {
  transition: transform 0.2s ease;
}

.vp-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: #1a2236;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 4px;
  display: none;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  max-height: calc(3 * 36px + 8px);
  overflow-y: auto;
}

.vp-dropdown-menu::-webkit-scrollbar {
  width: 4px;
}

.vp-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.vp-dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

.vp-dropdown.open .vp-dropdown-menu {
  display: block;
}

.vp-dropdown-item {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s ease;
  width: 100%;
  text-align: left;
  display: block;
}

.vp-dropdown-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.vp-dropdown-item.active {
  background: var(--purple-dim);
  color: var(--purple);
}

/* Table */
.vp-table {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
  animation: tileIn 0.4s ease both;
}

.vp-row {
  display: grid;
  grid-template-columns: 56px 1fr 120px 80px 90px 90px 60px 32px;
  gap: 0 8px;
  align-items: center;
  padding: 0 20px;
  height: 52px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  text-decoration: none;
  transition: background 0.15s ease;
}

.vp-row:last-child { border-bottom: none; }

a.vp-row:hover {
  background: rgba(255,255,255,0.02);
  opacity: 1;
}

.vp-row--head {
  height: 42px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.vp-row--head .vp-col {
  font-size: 10px;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vp-col {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.vp-col--plat {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vp-plat {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vp-plat--yt { background: rgba(255,0,0,0.1); color: #f44; }
.vp-plat--tt { background: rgba(255,255,255,0.06); color: var(--text); }
.vp-plat--ig { background: linear-gradient(135deg, rgba(131,58,180,0.15), rgba(253,29,29,0.15), rgba(252,176,69,0.15)); color: #e1306c; }

.vp-col--title {
  color: var(--text);
  padding-right: 12px;
}

.vp-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-dim);
  padding: 2px 8px;
  border-radius: 100px;
}

.vp-col--views, .vp-col--earn, .vp-col--date {
  font-size: 13px;
}

.vp-green { color: var(--green); }
.vp-dim { color: var(--dim); }
.vp-est { color: var(--brand); }
.vp-est span {
  font-size: 9px;
  font-weight: 600;
  color: var(--dim);
  margin-left: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vp-col--date {
  color: var(--dim);
  font-weight: 500;
}

.vp-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
}

.vp-badge--green {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}

.vp-badge--yellow,
.vp-badge--cyan {
  background: rgba(34,211,238,0.10);
  color: #22d3ee;
  border: 1px solid rgba(34,211,238,0.2);
}

.vp-badge--orange {
  background: rgba(251,146,60,0.12);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,0.2);
}

.vp-col--link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vp-col--link svg {
  color: var(--dim);
  transition: color 0.15s ease;
}

a.vp-row:hover .vp-col--link svg {
  color: var(--brand);
}

@media (max-width: 1024px) {
  .vp-row {
    grid-template-columns: 44px 1fr 100px 70px 70px 80px 50px 28px;
    padding: 0 14px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .vp-stats {
    flex-direction: column;
  }

  .vp-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .vp-search {
    max-width: none;
  }

  .vp-pills {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .vp-pills::-webkit-scrollbar { display: none; }

  .vp-row {
    grid-template-columns: 36px 1fr 70px 60px 28px;
    height: 48px;
    padding: 0 12px;
  }

  .vp-col--campaign,
  .vp-col--status,
  .vp-col--date {
    display: none;
  }

  .vp-row--head .vp-col--campaign,
  .vp-row--head .vp-col--status,
  .vp-row--head .vp-col--date {
    display: none;
  }
}

/* ── Campaign Modal ── */
.cm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.cm-overlay.open {
  display: flex;
}

.cm-modal {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 520px;
  position: relative;
  animation: modalIn 0.25s ease both;
  max-height: 90vh;
  overflow-y: auto;
}

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

.cm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-close:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.cm-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cm-name {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.cm-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
}

.cm-badge--green {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}

.cm-badge--yellow {
  background: rgba(245,158,11,0.12);
  color: var(--yellow);
  border: 1px solid rgba(245,158,11,0.2);
}

.cm-badge--dim {
  background: rgba(255,255,255,0.04);
  color: var(--dim);
  border: 1px solid rgba(255,255,255,0.06);
}

.cm-badge--joined {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}

.cm-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.cm-info-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--dim);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cm-info-value {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Your Stats in modal */
.cm-your-stats {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-left: 3px solid var(--green);
  background: rgba(34,197,94,0.04);
  border-radius: 0 10px 10px 0;
}

.cm-your-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.cm-your-row {
  display: flex;
  align-items: center;
}

.cm-your-stat {
  flex: 1;
  text-align: center;
}

.cm-your-val {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cm-your-green {
  color: var(--green);
}

.cm-your-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 5px;
}

.cm-your-sep {
  width: 1px;
  height: 26px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.cm-actions {
  display: flex;
  gap: 10px;
}

.cm-btn-join {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  transition: background 0.2s ease;
}

.cm-btn-join:hover {
  background: #7ab8ff;
}

.cm-btn-joined {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(34,197,94,0.2);
  background: rgba(34,197,94,0.1);
  color: var(--green);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cm-btn-full {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.04);
  color: var(--dim);
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
  .cp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0; }
  .mobile-toggle { display: flex; }
  .mobile-menu-btn { display: flex; }
  .page { padding: 60px 16px 60px; }

  .cp-grid {
    grid-template-columns: 1fr;
  }

  .cm-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cm-modal {
    width: 95%;
    padding: 24px;
  }

  .cp-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .cp-search {
    max-width: none;
  }

  .cp-pills {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .cp-pills::-webkit-scrollbar {
    display: none;
  }
}

/* ── Accounts Page ── */
.acc-header {
  margin-bottom: 28px;
}

.acc-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.acc-title {
  font-family: 'Geist', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.acc-subtitle {
  font-size: 13.5px;
  color: var(--dim);
  font-weight: 400;
  margin-top: 2px;
}

.acc-connected-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-bottom: 4px;
}

.acc-connected-num {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
}

.acc-connected-lbl {
  font-size: 13px;
  color: var(--dim);
}

.acc-section {
  margin-top: 28px;
}

.acc-section-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--dim);
  margin-bottom: 12px;
}

/* Platform cards – vertical grid */
.acc-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.acc-platform {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
  animation: tileIn 0.4s ease both;
}

.acc-platform:hover {
  border-color: rgba(255,255,255,0.10);
  transform: translateY(-2px);
}

/* Top colored accent bar */
.acc-platform-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}

.acc-platform--yt .acc-platform-accent {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.acc-platform--tt .acc-platform-accent {
  background: linear-gradient(90deg, #e5e7eb, #9ca3af);
}

.acc-platform--ig .acc-platform-accent {
  background: linear-gradient(90deg, #a855f7, #ec4899, #f59e0b);
}

.acc-platform-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.acc-platform-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acc-platform-icon--yt {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}

.acc-platform-icon--tt {
  background: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

.acc-platform-icon--ig {
  background: rgba(168,85,247,0.12);
  color: #a855f7;
}

.acc-platform-name {
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.acc-platform-user {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.acc-platform-user--none {
  color: var(--dim);
}

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

.acc-dot--green {
  background: var(--green);
  box-shadow: 0 0 6px rgba(34,197,94,0.4);
}

.acc-dot--dim {
  background: var(--dim);
}

.acc-platform-since {
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 16px;
}

.acc-platform-cta {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.5;
  margin-bottom: 18px;
}

.acc-platform-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.acc-platform-stat {
  display: flex;
  flex-direction: column;
}

.acc-platform-stat-val {
  font-family: 'Geist', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.acc-platform-stat-lbl {
  font-size: 11px;
  color: var(--dim);
  margin-top: 1px;
}

/* Buttons */
.acc-btn {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  width: 100%;
  text-align: center;
  margin-top: auto;
}

.acc-btn--link {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34,197,94,0.2);
}

.acc-btn--link:hover {
  background: rgba(34,197,94,0.18);
  border-color: rgba(34,197,94,0.35);
}

.acc-btn--unlink {
  background: transparent;
  color: var(--dim);
  border-color: var(--border);
}

.acc-btn--unlink:hover {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239,68,68,0.25);
}

.acc-btn--edit {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
  width: auto;
  padding: 8px 18px;
}

.acc-btn--edit:hover {
  border-color: var(--border-light);
  color: var(--text);
}

/* Payout card */
.acc-payout-card {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acc-payout-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.acc-payout-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-dim);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-payout-method {
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.acc-payout-detail {
  font-size: 13px;
  color: var(--dim);
  margin-top: 1px;
}

/* Responsive */
@media (max-width: 1024px) {
  .acc-platforms {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .acc-platforms {
    grid-template-columns: 1fr;
  }

  .acc-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .acc-payout-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* ── Payouts Page ── */
.po-header {
  margin-bottom: 28px;
}

.po-title {
  font-family: 'Geist', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.po-subtitle {
  font-size: 13.5px;
  color: var(--dim);
  font-weight: 400;
  margin-top: 2px;
}

.po-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  animation: tileIn 0.4s ease both;
}

.po-stat-box {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px 20px;
  flex: 1;
}

.po-stat-num {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.po-stat-num--pending {
  color: var(--yellow);
}

.po-stat-num--date {
  color: var(--brand);
}

.po-stat-lbl {
  font-size: 12px;
  color: var(--dim);
  margin-top: 2px;
}

.po-section-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--dim);
  margin-bottom: 12px;
}

.po-table {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
}

.po-row {
  display: grid;
  grid-template-columns: 130px 1fr 100px 90px 110px;
  gap: 0 8px;
  align-items: center;
  padding: 0 24px;
  height: 52px;
  transition: background 0.12s ease;
}

.po-row + .po-row {
  border-top: 1px solid rgba(255,255,255,0.04);
}

.po-row:not(.po-row--head):hover {
  background: rgba(255,255,255,0.02);
}

.po-row--head {
  height: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.po-row--head .po-col {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dim);
}

.po-col {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.po-col--date {
  font-weight: 500;
  color: var(--text);
}

.po-col--amount {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  color: var(--text);
}

.po-col--method {
  color: var(--dim);
}

.po-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 3px 10px;
  border-radius: 6px;
}

.po-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.po-badge--green {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}

.po-badge--orange {
  background: rgba(251,146,60,0.12);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,0.2);
}

.po-badge--cyan {
  background: rgba(34,211,238,0.10);
  color: #22d3ee;
  border: 1px solid rgba(34,211,238,0.2);
}

@media (max-width: 768px) {
  .po-stats {
    flex-direction: column;
  }

  .po-row {
    grid-template-columns: 90px 1fr 80px 90px;
    padding: 0 14px;
    font-size: 12px;
  }

  .po-col--method {
    display: none;
  }

  .po-row--head .po-col--method {
    display: none;
  }
}

/* ── Campaign History Page ── */
.ch-header {
  margin-bottom: 20px;
}

.ch-title {
  font-family: 'Geist', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.ch-subtitle {
  font-size: 13.5px;
  color: var(--dim);
  font-weight: 400;
  margin-top: 2px;
}

.ch-filters {
  margin-bottom: 20px;
}

.ch-pills {
  display: flex;
  gap: 8px;
}

.ch-pill {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.ch-pill.active {
  background: var(--brand-dim);
  border-color: rgba(96,165,250,0.25);
  color: var(--brand);
}

/* Card grid */
.ch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ch-card {
  background: #151b2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 20px 22px;
  border-left: 3px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
  animation: tileIn 0.4s ease both;
}

.ch-card--completed {
  border-left-color: var(--green);
}

.ch-card--ended {
  border-left-color: var(--dim);
  opacity: 0.7;
}

.ch-card--ended:hover {
  opacity: 0.85;
}

.ch-card:hover {
  background: #1a2135;
  border-color: rgba(255,255,255,0.10);
}

.ch-card--completed:hover {
  border-left-color: var(--green);
}

.ch-card--ended:hover {
  border-left-color: var(--dim);
}

.ch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.ch-card-name {
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.ch-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.ch-status--green {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}

.ch-status--dim {
  background: rgba(255,255,255,0.04);
  color: var(--dim);
  border: 1px solid rgba(255,255,255,0.06);
}

.ch-card-date {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 16px;
}

.ch-card-stats {
  display: flex;
  gap: 20px;
}

.ch-card-stat-val {
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.ch-earned {
  color: var(--green);
}

.ch-card-stat-lbl {
  font-size: 11px;
  color: var(--dim);
  margin-top: 1px;
}

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

  .ch-pills {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ch-pills::-webkit-scrollbar { display: none; }
}

/* ═══ Empty State ═══ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.empty-state-icon {
  margin-bottom: 16px;
  opacity: 0.7;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 13px;
  color: var(--dim);
  max-width: 360px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.empty-state-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
}

.empty-state-btn:hover { opacity: 0.85; }

.empty-state-discord {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 16px;
  background: rgba(88, 101, 242, 0.12);
  color: #5865f2;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s;
}

.empty-state-discord:hover { background: rgba(88, 101, 242, 0.2); }

/* ═══ Account Handle Links ═══ */
.acc-handle-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s;
}

.acc-handle-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ═══ Campaign Keyword ═══ */
.ac-keyword {
  padding: 6px 0;
  font-size: 12px;
  color: var(--dim);
}

.ac-keyword code {
  background: rgba(96, 165, 250, 0.1);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'SF Mono', Consolas, monospace;
}

.ac-keyword-label {
  color: var(--dim);
  font-size: 11px;
}

/* ═══ Campaign Discord Link ═══ */
.ac-links-row {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.ac-discord-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5865f2;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity .2s;
}

.ac-discord-link:hover { opacity: 0.8; }

/* ═══ Campaign Modal Discord ═══ */
.cm-discord-link {
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.cm-discord-link a:hover { opacity: 0.8; }

/* ═══ Leave Campaign Button ═══ */
.cm-btn-leave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  margin-left: 8px;
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.cm-btn-leave:hover {
  background: var(--red);
  color: #fff;
}

/* ═══ PayPal Form ═══ */
.acc-payout-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.acc-payout-form {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.acc-payout-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}

.acc-payout-input:focus {
  border-color: var(--brand);
}

.acc-payout-form-btns {
  display: flex;
  gap: 6px;
}
