/* monetization-dashboard.css — Ad Sales Creator Monetization Dashboard.
   Dark theme, neon purple (#A855F7) accents. NovaReelOS design system. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #000; color: #E8E8E8; font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

/* ── Accent ───────────────────────────────────────────────────────────── */
.md-accent { color: #A855F7 !important; }

/* ── Topbar ───────────────────────────────────────────────────────────── */
.md-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: rgba(0,0,0,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid #1A1A1A;
}
.md-topbar-title { font-size: 1.25rem; font-weight: 800; color: #fff; }
.md-topbar-right { display: flex; align-items: center; gap: 16px; }
.md-topbar-link { font-size: 0.82rem; color: #A855F7; font-weight: 600; }
.md-topbar-link:hover { text-decoration: underline; }
.md-split-pill {
  font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  background: rgba(168,85,247,0.12); color: #A855F7;
}

/* ── Container ────────────────────────────────────────────────────────── */
.md-container { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; }

/* ── Hero Cards ───────────────────────────────────────────────────────── */
.md-hero {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 36px;
}
.md-hero-card {
  background: #0A0A0A; border: 1px solid #1A1A1A; border-radius: 14px;
  padding: 22px 18px; display: flex; flex-direction: column; gap: 6px;
}
.md-hero-primary { border-color: rgba(168,85,247,0.3); }
.md-hero-label { font-size: 0.78rem; color: #8A8B91; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.md-hero-value { font-size: 1.6rem; font-weight: 800; color: #fff; }
.md-hero-sub { font-size: 0.75rem; color: #555; }
.md-hero-sub strong { color: #A855F7; }

/* Split bar inside hero */
.md-split-bar {
  display: flex; height: 32px; border-radius: 8px; overflow: hidden;
  font-size: 0.75rem; font-weight: 700; margin-top: 4px;
}
.md-split-creator {
  background: linear-gradient(135deg, #A855F7, #7C3AED);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.md-split-platform {
  background: linear-gradient(135deg, #1A1A2E, #2D2D44);
  display: flex; align-items: center; justify-content: center; color: #666;
}

/* ── Section ──────────────────────────────────────────────────────────── */
.md-section { margin-bottom: 40px; }
.md-section-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 16px; }

/* ── Surface Cards Grid ──────────────────────────────────────────────── */
.md-surface-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.md-surface-card {
  background: #0A0A0A; border: 1px solid #1A1A1A; border-radius: 14px;
  padding: 22px 18px; transition: border-color 0.15s, transform 0.1s;
  cursor: default;
}
.md-surface-card:hover { border-color: rgba(168,85,247,0.35); transform: translateY(-1px); }
.md-surface-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.md-surface-icon { font-size: 1.5rem; }
.md-trend { font-size: 0.65rem; }
.md-trend-up { color: #22C55E; }
.md-trend-neutral { color: #555; }
.md-surface-name { font-size: 0.82rem; font-weight: 700; color: #ccc; margin-bottom: 6px; }
.md-surface-amount { font-size: 1.35rem; font-weight: 800; color: #A855F7; margin-bottom: 4px; }
.md-surface-meta { font-size: 0.72rem; color: #666; margin-bottom: 2px; }
.md-surface-cpm { font-size: 0.7rem; color: #555; }

/* ── Chart ────────────────────────────────────────────────────────────── */
.md-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.md-chart-controls { display: flex; gap: 6px; }
.md-chart-btn {
  background: #1A1A1A; border: 1px solid #2A2A2A; color: #888; font-size: 0.75rem;
  font-weight: 600; padding: 6px 14px; border-radius: 6px; cursor: pointer; transition: all 0.15s;
  font-family: inherit;
}
.md-chart-btn:hover { color: #ccc; border-color: #444; }
.md-chart-btn.active { background: rgba(168,85,247,0.15); border-color: #A855F7; color: #A855F7; }
.md-chart-wrap {
  background: #0A0A0A; border: 1px solid #1A1A1A; border-radius: 14px;
  padding: 20px; overflow-x: auto;
}
#revenueChart { width: 100%; height: 280px; display: block; }

/* ── Table ────────────────────────────────────────────────────────────── */
.md-table-wrap { overflow-x: auto; }
.md-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.md-table th {
  text-align: left; padding: 10px 14px; font-size: 0.72rem; font-weight: 700;
  color: #666; text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid #1A1A1A;
}
.md-table td {
  padding: 12px 14px; border-bottom: 1px solid #0F0F0F; color: #ccc;
}
.md-table tr:hover td { background: #0A0A0A; }
.md-right { text-align: right; }
.md-table-sm { margin-top: 16px; }
.md-table-sm th, .md-table-sm td { padding: 8px 12px; }
.md-empty-cell { text-align: center; color: #555; padding: 32px 14px !important; }

/* Surface badges in table */
.md-badge-surface {
  display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 3px 10px;
  border-radius: 4px; text-transform: capitalize;
}
.md-badge-video { background: rgba(168,85,247,0.15); color: #A855F7; }
.md-badge-posts { background: rgba(59,130,246,0.15); color: #3B82F6; }
.md-badge-music { background: rgba(236,72,153,0.15); color: #EC4899; }
.md-badge-live { background: rgba(239,68,68,0.15); color: #EF4444; }
.md-badge-brand_deals { background: rgba(34,197,94,0.15); color: #22C55E; }
.md-badge-ad_sales { background: rgba(251,191,36,0.15); color: #FBBF24; }

/* Status badges */
.md-status {
  display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 3px 10px;
  border-radius: 4px;
}
.md-status-completed { background: rgba(34,197,94,0.12); color: #22C55E; }
.md-status-pending { background: rgba(251,191,36,0.12); color: #FBBF24; }
.md-status-paid { background: rgba(168,85,247,0.12); color: #A855F7; }

/* Pagination */
.md-pagination {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 16px;
}
.md-page-btn {
  background: #1A1A1A; border: 1px solid #2A2A2A; color: #ccc; font-size: 0.8rem;
  font-weight: 600; padding: 6px 16px; border-radius: 6px; cursor: pointer;
  font-family: inherit; transition: all 0.15s;
}
.md-page-btn:hover:not(:disabled) { border-color: #A855F7; color: #A855F7; }
.md-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.md-page-info { font-size: 0.8rem; color: #666; }

/* ── Payout Section ──────────────────────────────────────────────────── */
.md-payout-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.md-btn {
  display: inline-block; padding: 10px 20px; font-weight: 700; font-size: 0.82rem;
  border-radius: 8px; border: none; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.md-btn-primary { background: #A855F7; color: #fff; }
.md-btn-primary:hover:not(:disabled) { background: #9333EA; }
.md-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.md-payout-info {
  display: flex; gap: 20px; margin-bottom: 16px;
  background: #0A0A0A; border: 1px solid #1A1A1A; border-radius: 12px; padding: 18px 20px;
}
.md-payout-stat { display: flex; flex-direction: column; gap: 4px; }
.md-payout-stat-label { font-size: 0.75rem; color: #666; font-weight: 600; }
.md-payout-stat-value { font-size: 1.1rem; font-weight: 800; color: #fff; }
.md-empty-sm {
  text-align: center; padding: 28px 16px; color: #555; font-size: 0.85rem;
  background: #0A0A0A; border: 1px dashed #1A1A1A; border-radius: 10px; margin-top: 12px;
}

/* ── Quick Actions ───────────────────────────────────────────────────── */
.md-quick-actions {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 40px;
}
.md-action-card {
  display: flex; align-items: center; gap: 14px;
  background: #0A0A0A; border: 1px solid #1A1A1A; border-radius: 12px;
  padding: 18px 20px; transition: border-color 0.15s;
}
.md-action-card:hover { border-color: rgba(168,85,247,0.35); }
.md-action-icon { font-size: 1.4rem; }
.md-action-label { font-size: 0.85rem; font-weight: 600; color: #ccc; flex: 1; }
.md-action-arrow { font-size: 1rem; color: #A855F7; font-weight: 700; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .md-hero { grid-template-columns: repeat(2, 1fr); }
  .md-surface-grid { grid-template-columns: repeat(2, 1fr); }
  .md-quick-actions { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .md-topbar { flex-direction: column; gap: 8px; padding: 12px 16px; }
  .md-hero { grid-template-columns: 1fr; }
  .md-surface-grid { grid-template-columns: 1fr 1fr; }
  .md-payout-info { flex-direction: column; }
  .md-container { padding: 16px 12px 40px; }
}
@media (max-width: 420px) {
  .md-surface-grid { grid-template-columns: 1fr; }
}

/* ── Nova Shop Earnings Card (Layer 4B) ──────────────────────────────── */
.md-surface-card-nova {
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.06) 0%, rgba(0, 0, 0, 0.4) 100%);
}
.md-surface-card-nova:hover {
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}
.md-nova-badge {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: #00E5FF; background: rgba(0, 229, 255, 0.12); border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 2px 8px; border-radius: 4px;
}
.md-surface-card-nova .md-surface-amount { color: #00E5FF; }
.ns-pulse { animation: nsPulse 0.5s ease-out; }
@keyframes nsPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
