@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --panel: #ffffff;
  --line: #e2e8f0;
  --primary: #6366f1;
  --primary-2: #4f46e5;
  --accent: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --violet: #8b5cf6;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
  --shadow: 0 8px 32px rgba(15,23,42,.08);
  --shadow-lg: 0 24px 64px rgba(15,23,42,.12);
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 1360px;
}

* { box-sizing: border-box; }
html { min-height: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════
   BOXED SHELL
═══════════════════════════════════════ */
.boxed-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-lg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.boxed-shell > main { flex: 1; }

/* ═══════════════════════════════════════
   DARK HEADER
═══════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: #fff; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 14px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.button):not(.nav-user-pill):not(.nav-login) {
  padding: 7px 12px;
  border-radius: 8px;
  color: #94a3b8;
  font-weight: 600; font-size: 13px;
  transition: all .15s;
}
.nav a:not(.button):not(.nav-user-pill):not(.nav-login):hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-login {
  padding: 7px 14px; border-radius: 8px;
  color: #cbd5e1; font-weight: 600; font-size: 13px;
  border: 1px solid rgba(255,255,255,.12);
  transition: all .15s;
}
.nav-login:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); color: #fff; }
.nav-user-pill {
  width: 30px; height: 30px;
  border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-weight: 800; font-size: 12px;
}
.nav-form { margin: 0; }
.nav-toggle {
  display: none; width: 34px; height: 34px; min-height: 34px; padding: 0;
  border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  background: transparent; color: #fff; box-shadow: none;
}
.nav-toggle:hover { background: rgba(255,255,255,.06); }
.nav-toggle span { width: 16px; height: 2px; display: block; border-radius: 2px; background: currentColor; }
.nav-toggle span + span { margin-top: 4px; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.button, button {
  border: 0; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  min-height: 38px; padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(99,102,241,.25);
  transition: all .15s;
}
.button:hover, button:hover { background: var(--primary-2); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99,102,241,.3); }
button:disabled { cursor: not-allowed; background: #cbd5e1; color: #64748b; box-shadow: none; transform: none; }
.button.ghost, .ghost {
  background: rgba(99,102,241,.08); color: var(--primary);
  box-shadow: none; border: 1px solid rgba(99,102,241,.15);
}
.button.ghost:hover, .ghost:hover { background: rgba(99,102,241,.14); }
.button.large { min-height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.button.full { width: 100%; }
.mini { min-height: 30px; border-radius: 8px; padding: 0 10px; box-shadow: none; font-size: 12px; }
.muted-btn { background: rgba(99,102,241,.08); color: var(--primary); box-shadow: none; }
.danger { background: #fef2f2; color: var(--danger); box-shadow: none; }

/* ═══════════════════════════════════════
   FLASH & ALERTS
═══════════════════════════════════════ */
.flash {
  width: min(1080px, calc(100% - 32px)); margin: 14px auto 0;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; font-weight: 600;
}
.flash.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.impersonation-bar {
  width: min(1080px, calc(100% - 32px)); margin: 10px auto 0;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: #1e1b4b; color: #c4b5fd;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 13px;
}
.impersonation-bar form { margin: 0; }

/* ═══════════════════════════════════════
   HERO (HOMEPAGE) — CENTERED
═══════════════════════════════════════ */
.hero-centered {
  padding: 80px 32px 56px;
  text-align: center;
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
  position: relative; overflow: hidden;
}
.hero-centered::before {
  content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero-centered-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  color: #a5b4fc; font-size: 12px; font-weight: 600; margin-bottom: 24px;
}
.hero-centered h1 {
  font-size: clamp(36px, 6vw, 56px); line-height: 1.08;
  color: #fff; font-weight: 900; letter-spacing: -.025em; margin-bottom: 18px;
}
.gradient-text {
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc { color: #94a3b8; font-size: 17px; line-height: 1.7; max-width: 560px; margin: 0 auto 28px; }
.hero-centered .hero-actions { justify-content: center; }
.hero-stats-row {
  display: flex; justify-content: center; gap: 32px; margin-top: 40px;
  padding-top: 32px; border-top: 1px solid rgba(255,255,255,.08);
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 24px; color: #fff; font-weight: 800; }
.hero-stat span { display: block; color: #64748b; font-size: 12px; font-weight: 600; margin-top: 4px; }

/* Trust strip */
.trust-strip {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
  padding: 20px 24px; background: #fff; border-bottom: 1px solid var(--line);
}
.trust-strip span {
  padding: 6px 14px; border-radius: 999px;
  background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line);
}

/* Features section */
.features-section { padding: 64px 32px; background: #fff; }
.features-header { text-align: center; margin-bottom: 40px; }
.features-header h2 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.features-header p { color: var(--muted); font-size: 16px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1000px; margin: 0 auto; }
.feature-card {
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(99,102,241,.25); }
.feature-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; background: linear-gradient(135deg, #eef2ff, #ede9fe);
  color: #6366f1; font-size: 20px; margin-bottom: 16px; font-weight: 700;
}
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 0; }

/* Steps section */
.steps-section { padding: 64px 32px; background: #f8fafc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps-header { text-align: center; margin-bottom: 36px; }
.steps-header h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.steps-header p { color: var(--muted); font-size: 15px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; margin: 0 auto; }
.step-card {
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; text-align: center;
}
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-weight: 800; font-size: 16px; margin-bottom: 14px;
}
.step-card h3 { font-size: 15px; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 0; }

/* Marketplace section */
.marketplace-section { padding: 56px 32px; background: #fff; }
.marketplace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 1000px; margin: 0 auto; }
.marketplace-card {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #f8fafc;
}
.marketplace-card h3 { font-size: 16px; margin-bottom: 4px; }
.marketplace-card > p { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.marketplace-cta { text-align: center; margin-top: 20px; }

/* Dual CTA */
.dual-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.cta-card { padding: 40px 32px; }
.cta-card .eyebrow { margin-bottom: 10px; }
.cta-card h3 { font-size: 22px; margin-bottom: 10px; font-weight: 800; }
.cta-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.publisher-cta { background: #0f172a; color: #fff; }
.publisher-cta .eyebrow { color: #a5b4fc; }
.publisher-cta p { color: #94a3b8; }
.publisher-cta .button { background: #6366f1; }
.advertiser-cta { background: #f8fafc; border-top: 1px solid var(--line); }
.advertiser-cta .eyebrow { color: #6366f1; }


.eyebrow {
  margin: 0 0 12px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: #6366f1;
}
h1, h2, h3, p { margin-top: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.lead { color: #64748b; font-size: 16px; line-height: 1.7; max-width: 540px; }

/* ═══════════════════════════════════════
   FEATURE BAND (kept for sub-pages)
═══════════════════════════════════════ */
.feature-band {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.feature-band article {
  padding: 36px 28px; border-right: 1px solid var(--line);
  transition: background .2s;
}
.feature-band article:last-child { border-right: 0; }
.feature-band article:hover { background: #f8fafc; }
.feature-band h3 { margin-bottom: 8px; font-size: 16px; }
.feature-band p { color: var(--muted); line-height: 1.7; font-size: 13px; }
.icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  margin-bottom: 14px; font-size: 18px;
}

/* ═══════════════════════════════════════
   EARNING STRIP
═══════════════════════════════════════ */
.earning-strip {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #0f172a; color: #fff;
}
.earning-strip div {
  padding: 20px 24px; border-right: 1px solid rgba(255,255,255,.06);
}
.earning-strip div:last-child { border-right: 0; }
.earning-strip span, .earning-strip small { display: block; color: #64748b; font-weight: 600; font-size: 11px; }
.earning-strip strong { display: block; margin: 4px 0; font-size: clamp(20px, 3vw, 32px); line-height: 1; }

/* ═══════════════════════════════════════
   SECTIONS
═══════════════════════════════════════ */
.trust-marketplace {
  display: grid; grid-template-columns: .8fr 1.2fr;
  gap: 40px; align-items: start;
  padding: 56px 40px; background: #fff; border-bottom: 1px solid var(--line);
}
.trust-marketplace .section-copy .button { margin-top: 12px; }
.trust-marketplace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trust-panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #f8fafc; padding: 18px; box-shadow: var(--shadow-sm);
}
.trust-panel .panel-head { align-items: flex-start; margin-bottom: 12px; }
.trust-panel h3 { margin-bottom: 4px; font-size: 16px; }
.trust-panel p { color: var(--muted); line-height: 1.5; font-size: 13px; }

.conversion-section, .comparison-section, .onboarding-band {
  display: grid; grid-template-columns: .9fr 1.1fr;
  gap: 40px; align-items: center;
  padding: 56px 40px; background: #fff; border-bottom: 1px solid var(--line);
}
.advertiser-band { background: #f8fafc; }
.onboarding-band { background: linear-gradient(180deg, #fff, #f8fafc); }
.section-copy h2, .formats-hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; margin-bottom: 14px; font-weight: 800; }
.section-copy p { color: var(--muted); font-size: 15px; line-height: 1.7; }
.section-copy.compact h2 { font-size: clamp(24px, 3vw, 36px); }

.report-preview, .format-mini-grid, .comparison-grid, .onboarding-steps { display: grid; gap: 10px; }
.report-row, .format-mini-grid div, .comparison-grid div, .onboarding-steps div {
  min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; padding: 14px 16px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.report-row:hover, .onboarding-steps div:hover { border-color: rgba(99,102,241,.25); box-shadow: 0 4px 16px rgba(99,102,241,.08); }
.report-row span, .format-mini-grid span, .comparison-grid span { color: var(--muted); font-weight: 600; }
.onboarding-steps span {
  width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 10px; color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); font-weight: 800; font-size: 13px;
}
.report-row strong, .format-mini-grid strong, .comparison-grid strong, .onboarding-steps strong { font-size: 18px; }
.onboarding-steps small { color: var(--muted); margin-left: auto; font-weight: 600; font-size: 12px; }

/* ═══════════════════════════════════════
   FORMATS HERO
═══════════════════════════════════════ */
.formats-hero {
  min-height: 420px; display: flex; align-items: center;
  padding: 56px 40px; color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
}
.formats-hero > div { max-width: 700px; }
.formats-hero .eyebrow { color: #a5b4fc; }
.formats-hero p { color: #94a3b8; max-width: 600px; font-size: 16px; line-height: 1.7; }


/* ═══════════════════════════════════════
   FORMAT CARDS / CONTACT / TERMS
═══════════════════════════════════════ */
.format-visual {
  position: relative; height: 180px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #f8fafc; background-size: 300% 200%; background-repeat: no-repeat; margin-bottom: 14px;
}
.format-visual.smartlink { background-position: 0 0; }
.format-visual.directlink { background-position: 50% 0; }
.format-visual.popup { background-position: 100% 0; }
.format-visual.pushunder { background-position: 0 100%; }
.format-visual.banner { background-position: 50% 100%; }
.format-visual.cpa { background-position: 100% 100%; }

.format-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.format-card, .choice-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.format-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.format-card { padding: 22px; }
.format-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.format-card-head strong { color: var(--accent); font-size: 12px; text-transform: uppercase; font-weight: 700; }
.format-card h2 { font-size: 22px; }
.format-card p { color: var(--muted); line-height: 1.7; font-size: 13px; }
.format-card .format-intro { color: var(--ink); font-weight: 700; }
.format-card ul { padding-left: 16px; margin: 14px 0 0; color: #475569; line-height: 1.8; font-size: 13px; }

.contact-page { width: min(1080px, calc(100% - 32px)); margin: 36px auto 56px; }
.contact-hero {
  padding: 48px 40px; border-radius: var(--radius); color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
}
.contact-hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.08; margin-bottom: 14px; }
.contact-hero p { color: #94a3b8; font-size: 16px; line-height: 1.7; max-width: 600px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.contact-card, .contact-note { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; }
.contact-card span { color: var(--primary); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.contact-card h2 { margin-bottom: 0; font-size: 18px; }
.contact-card p { color: var(--muted); line-height: 1.6; font-size: 13px; }
.contact-card .button { margin-top: auto; }
.contact-note { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; padding: 22px; }
.contact-note p { color: var(--muted); line-height: 1.6; font-size: 13px; }

.terms-page { width: min(960px, calc(100% - 32px)); margin: 36px auto 56px; }
.terms-page .section-copy { margin-bottom: 20px; }
.terms-page h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; margin-bottom: 12px; }
.terms-document {
  padding: 32px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-sm);
}
.terms-document h2 { margin: 24px 0 8px; font-size: 18px; }
.terms-document h2:first-child { margin-top: 0; }
.terms-document p { color: #475569; line-height: 1.75; margin-bottom: 12px; font-size: 14px; }

/* ═══════════════════════════════════════
   WORKSPACE / DASHBOARD PANELS
═══════════════════════════════════════ */
.workspace { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 48px; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.account-head h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.account-head p:not(.eyebrow) { color: var(--muted); max-width: 560px; font-size: 14px; }
.account-pill {
  min-width: 180px; border-radius: var(--radius-sm);
  padding: 12px 14px; background: linear-gradient(135deg, #0f172a, #1e1b4b); color: #fff;
}
.account-pill span { display: block; color: #94a3b8; margin-bottom: 4px; font-size: 11px; font-weight: 600; }
.account-pill strong { font-size: 20px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.metric, .panel, .auth-shell .panel, .zone-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.metric { padding: 16px; display: block; transition: transform .15s, box-shadow .15s; }
.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.metric span { color: var(--muted); font-weight: 600; display: block; margin-bottom: 6px; font-size: 12px; }
.metric strong { font-size: 24px; font-weight: 800; }
.metric-link { color: inherit; }
.metric-link:hover { border-color: rgba(99,102,241,.3); }

.publisher-dashboard .metrics .metric:first-child {
  background: linear-gradient(135deg, #312e81, #4f46e5); color: #fff; border-color: transparent;
}
.publisher-dashboard .metrics .metric:first-child span { color: rgba(255,255,255,.6); }

/* Panel tabs */
.publisher-nav, .admin-nav {
  display: flex; gap: 4px; overflow-x: auto; padding: 6px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #f8fafc; margin-bottom: 16px;
}
.publisher-nav a, .admin-nav a {
  min-height: 34px; display: inline-flex; align-items: center;
  border-radius: 8px; padding: 0 12px;
  font-weight: 600; font-size: 13px; color: #64748b; white-space: nowrap;
  transition: all .15s;
}
.publisher-nav a.active, .publisher-nav a:hover,
.admin-nav a.active, .admin-nav a:hover {
  background: #fff; color: var(--primary); box-shadow: var(--shadow-sm);
}

/* Publisher hero panel */
.publisher-hero-panel {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: stretch;
  color: #fff; border-radius: var(--radius); padding: 28px; margin-bottom: 16px;
  background: linear-gradient(135deg, #0f172a, #312e81);
  box-shadow: var(--shadow);
}
.publisher-hero-panel .eyebrow { color: #a5b4fc; }
.publisher-hero-panel h2 { font-size: clamp(26px, 4vw, 38px); line-height: 1.1; margin-bottom: 10px; }
.publisher-hero-panel p { color: rgba(255,255,255,.6); max-width: 600px; line-height: 1.6; font-size: 14px; }
.affiliate-box {
  border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05); padding: 16px; display: grid; gap: 10px;
  align-content: center; backdrop-filter: blur(8px);
}
.affiliate-box span { color: rgba(255,255,255,.5); font-weight: 600; font-size: 12px; }
.affiliate-box strong { font-size: 22px; }
.affiliate-box p { color: rgba(255,255,255,.6); line-height: 1.5; margin: 0; font-size: 13px; }
.affiliate-box label { color: #fff; }
.affiliate-box input { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.9); }

/* Panels & splits */
.split { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; margin-bottom: 16px; }
.panel { padding: 18px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel h2 { margin-bottom: 4px; font-size: 16px; }
.panel p { color: var(--muted); font-size: 13px; }

/* ═══════════════════════════════════════
   FORMS & INPUTS
═══════════════════════════════════════ */
.form { display: grid; gap: 12px; }
.grid-form { grid-template-columns: repeat(2, 1fr); }
.grid-form label:nth-child(4), .grid-form .button { grid-column: 1 / -1; }
label { color: #334155; display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
input, select, textarea {
  width: 100%; min-height: 40px;
  border: 1px solid #cbd5e1; border-radius: var(--radius-sm);
  padding: 8px 12px; font: inherit; font-size: 14px;
  color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
textarea { resize: vertical; }
input[readonly], textarea[readonly] { background: #f8fafc; cursor: copy; }

/* ═══════════════════════════════════════
   AUTH PAGES
═══════════════════════════════════════ */
.auth-shell {
  width: min(1000px, calc(100% - 32px)); margin: 0 auto;
  min-height: calc(100vh - 60px);
  display: grid; grid-template-columns: 1fr 400px;
  align-items: center; gap: 48px; padding: 36px 0;
}
.auth-copy h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; line-height: 1.1; margin-bottom: 14px; }
.auth-copy p { color: var(--muted); font-size: 16px; line-height: 1.7; }
.muted { color: var(--muted); font-size: 13px; }
.muted a { color: var(--primary); font-weight: 700; }
.check-line { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #475569; font-size: 13px; }
.check-line input { width: auto; }

/* ═══════════════════════════════════════
   TABLES
═══════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th {
  text-align: left; color: #64748b; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; font-weight: 700;
  border-bottom: 1px solid var(--line); padding: 10px;
}
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
td small { display: block; margin-top: 3px; color: var(--muted); max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pager-current { display: inline-flex; align-items: center; background: var(--primary); color: #fff; }
.pager-gap { color: var(--muted); font-weight: 800; }

/* ═══════════════════════════════════════
   BADGES
═══════════════════════════════════════ */
.badge {
  display: inline-flex; min-height: 24px; align-items: center;
  border-radius: 999px; padding: 0 9px; font-weight: 700; font-size: 11px;
  background: #f1f5f9; color: #334155;
}
.badge.active, .badge.paid, .badge.publisher { background: #ecfdf5; color: #065f46; }
.badge.pending, .badge.advertiser { background: #fef3c7; color: #92400e; }
.badge.paused, .badge.suspended, .badge.rejected { background: #fef2f2; color: #991b1b; }
.badge.smartlink { background: #eef2ff; color: #3730a3; }
.badge.directlink { background: #ecfeff; color: #155e75; }
.badge.popup, .badge.admin { background: #faf5ff; color: #6b21a8; }
.badge.banner, .badge.cpm { background: #ecfdf5; color: #065f46; }
.badge.cpc { background: #fef3c7; color: #92400e; }


/* ═══════════════════════════════════════
   DAILY REPORTS / CHARTS
═══════════════════════════════════════ */
.daily-report { display: grid; gap: 8px; }
.daily-row {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  min-height: 58px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; padding: 12px 14px;
}
.daily-row div, .daily-row em { position: relative; z-index: 1; }
.daily-row strong, .daily-row span { display: block; }
.daily-row span { margin-top: 3px; color: var(--muted); font-weight: 600; font-size: 12px; }
.daily-row em { font-style: normal; color: var(--primary); font-weight: 800; }
.daily-row i { position: absolute; inset: auto auto 0 0; height: 3px; background: linear-gradient(90deg, #6366f1, #a855f7); border-radius: 0 3px 0 0; }
.daily-chart {
  display: block; width: 100%; height: 200px; margin: 8px 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fafbfc;
}
.typing-line { color: var(--primary); font-weight: 700; }
.premium-report { background: linear-gradient(180deg, #fff, #f8fafc); }
.source-url { display: block; min-width: 200px; max-width: 500px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; color: #334155; line-height: 1.4; font-size: 13px; }
.focus-strip {
  min-height: 40px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.focus-strip strong { color: var(--ink); font-size: 13px; }
.focus-strip span { color: var(--muted); font-weight: 600; font-size: 12px; }
.metric-tabs { gap: 6px; flex-wrap: wrap; }

/* ═══════════════════════════════════════
   MAIL SYSTEM
═══════════════════════════════════════ */
.mail-runner { margin-top: 14px; }
.mail-metrics { grid-template-columns: repeat(6, 1fr); margin-bottom: 14px; }
.admin-mail-layout { align-items: start; margin-bottom: 14px; }
.mail-preview { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8fafc; padding: 14px; display: grid; gap: 8px; }
.mail-preview span, .mail-worker-note { color: var(--muted); font-weight: 600; font-size: 12px; }
.mail-preview strong { display: block; font-size: 16px; }
.mail-preview pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.5; color: #334155; font-size: 13px; }
.mail-progress { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.mail-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6366f1, #a855f7); }
.mail-worker-note { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8fafc; }
.mail-live-table { margin-top: 14px; max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 10px; }
.mail-live-table h3 { margin-bottom: 8px; }
.mail-live-table table { min-width: 700px; }
.mail-live-table thead th { position: sticky; top: 0; z-index: 1; background: #fff; }

/* ═══════════════════════════════════════
   TERMS BOX / ZONES / SITES
═══════════════════════════════════════ */
.terms-box { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8fafc; overflow: hidden; }
.terms-head { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.terms-head span { color: var(--muted); font-size: 11px; font-weight: 700; }
.terms-scroll { max-height: 260px; overflow: auto; padding: 14px; color: #334155; font-size: 13px; line-height: 1.6; }
.terms-scroll h3 { margin: 14px 0 5px; color: var(--ink); font-size: 14px; }
.terms-scroll h3:first-child { margin-top: 0; }
.terms-scroll p { margin-bottom: 8px; }
.terms-check { align-items: flex-start; line-height: 1.4; }
.terms-check a { color: var(--primary); text-decoration: underline; }

.zone-list, .site-list, .deposit-list { display: grid; gap: 12px; }
.zone-card { padding: 16px; display: grid; grid-template-columns: 1fr minmax(240px, 1.2fr) minmax(200px, .8fr); gap: 14px; align-items: center; }
.zone-card h3 { margin-bottom: 4px; font-size: 15px; }
.zone-stats { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); font-weight: 700; font-size: 12px; }

.publisher-onboarding { display: grid; grid-template-columns: .75fr 1.25fr; gap: 14px; align-items: stretch; margin-bottom: 14px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice-card { padding: 16px; display: grid; gap: 8px; }
.choice-card .icon { margin-bottom: 0; }
.choice-card h3 { margin-bottom: 0; font-size: 14px; }
.choice-card p { color: var(--muted); line-height: 1.5; margin-bottom: 0; font-size: 13px; }
.choice-card .choice-note { padding: 8px 10px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); font-size: 12px; }
.choice-card .choice-status { margin: 0; color: var(--ink); font-weight: 800; }
.choice-card small { color: #334155; font-weight: 700; }
.site-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); padding: 16px; display: grid; gap: 10px; }
.site-card h3 { margin-bottom: 4px; font-size: 15px; }
.verify-options { display: grid; gap: 10px; }
.verify-option { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8fafc; padding: 10px; display: grid; gap: 6px; }
.verify-option strong, .verify-option small, .verify-file-actions span { display: block; }
.verify-option small, .verify-file-actions span { color: var(--muted); font-size: 12px; }
.verify-file-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.verify-option textarea { min-height: 100px; }

/* ═══════════════════════════════════════
   GEO / COUNTRY
═══════════════════════════════════════ */
.country-chip-list {
  max-height: 160px; display: flex; flex-wrap: wrap; gap: 7px;
  overflow-y: auto; padding-right: 4px; scrollbar-width: thin;
  scrollbar-color: rgba(99,102,241,.4) rgba(203,213,225,.4);
  mask-image: linear-gradient(180deg, transparent 0, #000 10px, #000 calc(100% - 16px), transparent 100%);
}
.country-chip-list span {
  min-height: 32px; display: inline-flex; align-items: center;
  border: 1px solid #e2e8f0; border-radius: 999px; padding: 0 10px;
  background: #fff; color: #334155; font-size: 12px; font-weight: 700;
}
.geo-rate-list { display: grid; gap: 8px; }
.geo-rate-list a {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; padding: 11px 12px; transition: border-color .15s;
}
.geo-rate-list a:hover { border-color: rgba(99,102,241,.3); }
.geo-rate-list span { min-width: 0; overflow-wrap: anywhere; font-weight: 800; font-size: 13px; }
.geo-rate-list strong { color: var(--accent); font-size: 18px; line-height: 1; }
.geo-rate-list small { color: var(--muted); font-weight: 700; font-size: 11px; }
.geo-map { display: grid; gap: 10px; margin-bottom: 14px; }
.geo-line {
  position: relative; overflow: hidden; min-height: 64px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #f8fafc; padding: 12px 14px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
}
.geo-line div, .geo-line em { position: relative; z-index: 1; }
.geo-line strong, .geo-line span { display: block; }
.geo-line span { color: var(--muted); margin-top: 3px; font-size: 12px; }
.geo-line em { font-style: normal; font-weight: 800; color: var(--primary); }
.geo-line i { position: absolute; inset: auto auto 0 0; height: 3px; background: linear-gradient(90deg, #6366f1, #a855f7); }

/* ═══════════════════════════════════════
   TICKETS / LIVE CHAT / IRC
═══════════════════════════════════════ */
.ticket-desk, .live-desk { display: grid; grid-template-columns: .38fr 1fr; gap: 12px; }
.ticket-list, .live-room-list { display: grid; align-content: start; gap: 6px; max-height: 560px; overflow: auto; padding-right: 4px; }
.ticket-row, .live-room-user {
  display: grid; gap: 3px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s;
}
.ticket-row.active, .live-room-user.active { border-color: rgba(99,102,241,.35); background: #eef2ff; }
.ticket-row span, .ticket-row small, .live-room-user small { color: var(--muted); font-size: 11px; }
.live-room-user { grid-template-columns: 22px 1fr; align-items: center; }
.live-room-user span { min-width: 16px; height: 16px; border-radius: 999px; display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; }
.live-room-user span:empty { background: #10b981; }
.live-room-user strong, .live-room-user small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-room-user small { grid-column: 2; }
.ticket-detail, .live-room-panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 14px; }
.compact-head { align-items: flex-start; }
.ticket-messages { display: grid; gap: 7px; max-height: 320px; overflow: auto; margin-bottom: 10px; }
.ticket-message { max-width: 82%; border-radius: var(--radius-sm); padding: 9px 11px; background: #f1f5f9; }
.ticket-message.admin-message { justify-self: end; background: #eef2ff; }
.ticket-message b, .ticket-message small { display: block; }
.ticket-message p { margin: 3px 0; color: #334155; line-height: 1.4; font-size: 13px; }
.live-room-panels { min-width: 0; }
.live-room-panel { display: none; }
.live-room-panel.active { display: grid; gap: 10px; }
.live-room-head { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.live-room-head small { display: block; margin-top: 2px; color: var(--muted); }
.live-reply-form textarea { min-height: 72px; }

/* IRC Console */
.irc-console-panel { margin-bottom: 14px; border: 1px solid #1e293b; border-radius: var(--radius); overflow: hidden; background: #020617; color: #e2e8f0; box-shadow: var(--shadow); }
.irc-toolbar { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #1e293b; background: #0f172a; }
.irc-toolbar div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.irc-toolbar span { min-height: 22px; display: inline-flex; align-items: center; border-radius: 4px; padding: 0 7px; background: #064e3b; color: #6ee7b7; font-size: 11px; font-weight: 800; }
.irc-toolbar strong { font-size: 16px; color: #fff; }
.irc-toolbar small { color: #94a3b8; }
.irc-toolbar select, .irc-search input, .irc-command textarea, .irc-command select { background: #020617; border-color: #334155; color: #e2e8f0; }
.irc-toolbar button, .irc-search button, .irc-command button { background: #4f46e5; box-shadow: none; }
.irc-search { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #1e293b; background: #0f172a; }
.irc-search span, .irc-command span { color: #67e8f9; font: 700 12px ui-monospace, monospace; }
.chat-admin-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.chat-admin-tools .panel { background: #0f172a; border-color: #1e293b; color: #e2e8f0; }
.chat-admin-tools .panel h2 { color: #fff; }
.chat-admin-tools .panel p, .chat-admin-tools .panel label, .chat-admin-tools .panel small { color: #94a3b8; }
.chat-admin-tools textarea, .chat-admin-tools select { background: #020617; border-color: #1e293b; color: #e2e8f0; }
.irc-console { min-height: 580px; display: grid; grid-template-columns: 220px 1fr 170px; background: #020617; font-family: ui-monospace, monospace; font-size: 12px; }
.irc-sidebar, .irc-nicks { min-width: 0; border-right: 1px solid #1e293b; background: #0f172a; }
.irc-nicks { border-right: 0; border-left: 1px solid #1e293b; }
.irc-pane-title { padding: 8px 10px; border-bottom: 1px solid #1e293b; color: #818cf8; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.irc-channel-list, .irc-nick-list { display: grid; align-content: start; max-height: 540px; overflow: auto; }
.irc-user { display: grid; grid-template-columns: 22px 1fr; gap: 2px 6px; padding: 7px 10px; border-bottom: 1px solid rgba(30,41,59,.6); color: #cbd5e1; }
.irc-user:hover, .irc-user.active { background: #1e1b4b; color: #fff; }
.irc-user.has-unread span { animation: unread-pulse .9s ease-in-out infinite; background: #ef4444; }
@keyframes unread-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.irc-user span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; }
.irc-user span:empty { background: #10b981; }
.irc-user strong, .irc-user small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irc-user small { grid-column: 2; color: #64748b; font-size: 10px; }
.irc-main { min-width: 0; display: grid; }
.irc-thread { display: none; min-width: 0; grid-template-rows: auto 1fr auto; }
.irc-thread.active { display: grid; }
.irc-topic { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #1e293b; background: #0f172a; }
.irc-topic strong { color: #fff; }
.irc-topic small { color: #94a3b8; }
.irc-messages { min-height: 400px; max-height: 460px; overflow: auto; padding: 8px 12px; background: #020617; }
.irc-line { display: grid; grid-template-columns: 48px 140px 1fr auto; gap: 6px; align-items: baseline; min-height: 22px; color: #e2e8f0; font-size: 12px; }
.irc-line.admin-message b { color: #818cf8; }
.irc-line.member-message b { color: #6ee7b7; }
.irc-time { color: #475569; }
.irc-line p { margin: 0; min-width: 0; color: #e2e8f0; line-height: 1.4; overflow-wrap: anywhere; }
.irc-line a { color: #67e8f9; text-decoration: underline; }
.irc-empty { margin: 10px; color: #64748b; font-family: Inter, sans-serif; }
.irc-command { display: grid; grid-template-columns: auto 1fr auto 100px auto auto; gap: 6px; align-items: center; padding: 8px; border-top: 1px solid #1e293b; background: #0f172a; }
.irc-command textarea { min-height: 38px; max-height: 80px; resize: vertical; }
.irc-command label { display: inline-flex; align-items: center; gap: 4px; color: #cbd5e1; font-weight: 700; font-size: 12px; }
.irc-command input[type="file"] { color: #94a3b8; max-width: 160px; }
.irc-nick-list span { padding: 6px 10px; border-bottom: 1px solid rgba(30,41,59,.5); color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irc-nick-list span:first-child { color: #818cf8; font-weight: 800; }

/* Live thread messages */
.live-thread-messages { max-height: 340px; overflow: auto; display: grid; gap: 6px; margin: 10px 0; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.live-thread-message { max-width: 84%; border-radius: var(--radius-sm); padding: 8px 10px; background: #f1f5f9; }
.live-thread-message.admin-message { justify-self: end; background: #eef2ff; }
.live-thread-message b, .live-thread-message small { display: block; }
.live-thread-message p { margin: 3px 0; line-height: 1.4; color: #334155; font-size: 13px; }

/* ═══════════════════════════════════════
   MISC COMPONENTS
═══════════════════════════════════════ */
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.mini-grid div { background: #0f172a; color: #fff; border-radius: var(--radius-sm); padding: 14px; border: 1px solid rgba(255,255,255,.06); }
.verified-sites { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.verified-sites h3 { margin-bottom: 10px; font-size: 15px; }
.verified-sites-table { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.verified-sites-table table { min-width: 660px; }
.verified-sites-table thead th { position: sticky; top: 0; z-index: 1; background: #fff; }
.site-domain-link { color: var(--primary); font-weight: 800; overflow-wrap: anywhere; }
.code-status { display: inline-flex; min-height: 24px; align-items: center; border-radius: 999px; padding: 0 9px; font-size: 11px; font-weight: 800; }
.code-status.present { background: #ecfdf5; color: #065f46; }
.code-status.missing { background: #fef2f2; color: #991b1b; }
.code-status.failed { background: #fef3c7; color: #92400e; }
.code-status.pending { background: #f1f5f9; color: #334155; }
.empty { color: var(--muted); text-align: center; padding: 18px; }
.report-split { grid-template-columns: 1.15fr .85fr; }
.geo-panel table { min-width: 500px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 8px; width: min(340px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: var(--radius-sm); color: #fff; background: #0f172a; box-shadow: var(--shadow); transform: translateY(10px); opacity: 0; transition: opacity .2s, transform .2s; font-weight: 600; font-size: 13px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: linear-gradient(135deg, #065f46, #10b981); }

/* ═══════════════════════════════════════
   REMAINING COMPONENTS (preserved)
═══════════════════════════════════════ */
.rate-details { margin: 12px 0; }
.rate-details summary { cursor: pointer; font-weight: 800; margin-bottom: 10px; }
.country-rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-height: 320px; overflow: auto; gap: 10px; }
.country-rate-grid div { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8fafc; padding: 12px; }
.country-rate-grid strong, .country-rate-grid span { display: block; }
.country-rate-grid span { color: var(--muted); margin-top: 4px; line-height: 1.4; font-size: 12px; }
.rate-table-wrap { max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.rate-table { min-width: 1000px; }
.rate-table thead th { position: sticky; top: 0; z-index: 2; background: #fff; }
.rate-table th:first-child, .rate-table td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
.rate-table thead th:first-child { z-index: 3; }
.rate-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; margin: 2px 3px 2px 0; border-radius: 999px; padding: 0 9px; background: #eef2ff; color: #3730a3; font-size: 11px; font-weight: 700; }
.rate-chip b { color: #0f172a; }
.country-summary { margin-top: 4px; }
.country-members-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.country-member-card { min-height: 100px; display: grid; grid-template-columns: 42px 1fr auto; gap: 8px 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8fafc; padding: 12px; }
.smartlink-stat-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.smartlink-stat-strip div { min-height: 60px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; background: #f8fafc; }
.smartlink-stat-strip span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.smartlink-stat-strip strong { display: block; color: var(--ink); font-size: 18px; line-height: 1.1; }
.device-list { display: grid; gap: 10px; }
.device-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: #f8fafc; }
.device-card span, .device-card small { color: var(--muted); display: block; }
.device-card strong { display: block; margin: 4px 0; font-size: 20px; }
.compact-device-card strong { font-size: 14px; line-height: 1.3; }
.quality-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.quality-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 10px; }
.quality-card strong, .quality-card small { display: block; }
.quality-card small { margin-top: 4px; color: var(--muted); line-height: 1.4; font-size: 12px; }
.earning-warning { border: 1px solid #fbbf24; border-left: 4px solid #f59e0b; border-radius: var(--radius-sm); background: #fefce8; color: #713f12; padding: 10px 12px; margin: 10px 0; }
.earning-warning strong, .earning-warning span { display: block; }
.earning-warning strong { font-size: 14px; }
.earning-warning span { margin-top: 4px; line-height: 1.4; font-size: 12px; }
.banner-code-preview { width: min(100%, 200px); aspect-ratio: var(--banner-ratio, 728/90); border: 1px solid var(--line); border-radius: 6px; background: #0f172a; overflow: hidden; display: grid; place-items: center; margin-top: 8px; }
.banner-code-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.banner-code-list { grid-column: 1 / -1; display: grid; gap: 12px; }
.banner-placement-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8fafc; padding: 12px; display: grid; gap: 8px; }
.banner-placement-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.banner-placement-head strong, .banner-placement-head small, .banner-preview-title { display: block; }
.banner-placement-head strong { font-size: 16px; }
.banner-placement-head small, .banner-preview-title { color: var(--muted); }
.publisher-banner-preview { width: min(100%, var(--banner-width, 728px)); max-width: 100%; max-height: 560px; }
.banner-placement-code { display: grid; gap: 6px; font-weight: 800; }
.banner-placement-code textarea { width: 100%; min-height: 90px; font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.4; }
.advertiser-banner-preview { width: min(100%, 240px); }
.banner-upload-preview { grid-column: 1 / -1; border: 1px dashed #94a3b8; border-radius: var(--radius-sm); padding: 12px; background: #fafbfc; }
.banner-upload-preview span, .banner-upload-preview small { color: var(--muted); }
.banner-upload-preview img { max-width: min(100%, 480px); max-height: 200px; object-fit: contain; display: block; margin-top: 10px; border: 1px solid var(--line); border-radius: 6px; background: #0f172a; }
.soft-line { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.estimate-box { grid-column: 1 / -1; border: 1px solid #c7d2fe; border-radius: var(--radius-sm); background: #eef2ff; color: #3730a3; padding: 12px 14px; font-weight: 700; }
.estimate-box strong, .estimate-box span { display: block; }
.estimate-box span { margin-top: 4px; color: #475569; font-weight: 600; line-height: 1.5; font-size: 13px; }
.bonus-grid, .knowledge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.bonus-grid div { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8fafc; padding: 12px; }
.bonus-grid strong, .bonus-grid span { display: block; }
.bonus-grid span { color: var(--muted); margin-top: 4px; line-height: 1.4; font-size: 12px; }
.scroll-table { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.advanced-report { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 12px; }
.advanced-report summary { cursor: pointer; font-weight: 800; color: var(--primary); }
.advanced-report[open] summary { margin-bottom: 12px; }
.share-row, .filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.publisher-command { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.campaign-admin-list { gap: 12px; }
.campaign-admin-card > strong { font-size: 16px; }
.campaign-admin-form { margin-top: 10px; }
.campaign-admin-form .wide, .campaign-actions { grid-column: 1 / -1; }
.compact-table table { min-width: 480px; }
.compact-metrics { margin: 0 0 14px; }
.online-page { display: inline-block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.notice-card small { white-space: pre-wrap; line-height: 1.5; }
.health-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.health-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; background: #fff; }
.health-card span, .health-card small { display: block; color: var(--muted); line-height: 1.4; font-size: 12px; }
.health-card strong { display: block; margin: 4px 0; font-size: 18px; line-height: 1.2; }
.health-card.good { border-color: rgba(16,185,129,.3); background: #ecfdf5; }
.health-card.info { border-color: rgba(99,102,241,.2); background: #eef2ff; }
.health-card.warning { border-color: rgba(245,158,11,.3); background: #fefce8; }
.health-card.critical { border-color: rgba(239,68,68,.3); background: #fef2f2; }
.health-meter { height: 5px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin: 7px 0; }
.health-meter i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.good-text { color: #065f46 !important; }
.warn-text { color: #92400e !important; }
.danger-text { color: #991b1b !important; }
.network-preview { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; background: #f8fafc; }
.network-preview iframe { width: 100%; min-height: 170px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.onboarding-checklist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.check-step { display: grid; grid-template-columns: 38px 1fr; gap: 6px; align-items: start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; background: #fff; }
.check-step span { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #f1f5f9; color: #334155; }
.check-step strong, .check-step small { min-width: 0; display: block; }
.check-step small { color: var(--muted); line-height: 1.4; margin-top: 2px; font-size: 12px; }
.check-step.done { border-color: rgba(16,185,129,.3); background: #ecfdf5; }
.check-step.done span { background: #10b981; color: #fff; }
.check-step.todo { border-color: rgba(99,102,241,.2); }
.check-step.todo:hover { border-color: rgba(99,102,241,.4); background: #eef2ff; }
.quality-pill { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 9px; font-size: 11px; font-weight: 800; border: 1px solid var(--line); }
.quality-pill.good { color: #065f46; background: #ecfdf5; border-color: rgba(16,185,129,.3); }
.quality-pill.watch { color: #92400e; background: #fefce8; border-color: rgba(245,158,11,.3); }
.quality-pill.risk { color: #991b1b; background: #fef2f2; border-color: rgba(239,68,68,.3); }
.live-widget { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(340px, calc(100vw - 32px)); }
.live-widget.is-closed { width: auto; }
.live-widget.is-closed details { display: none; }
.live-widget-reopen { display: none; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 800; padding: 10px 14px; box-shadow: var(--shadow); font-size: 12px; }
.live-widget.is-closed .live-widget-reopen { display: inline-flex; }
.live-widget details { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.live-widget summary { cursor: pointer; padding: 11px 40px 11px 12px; font-weight: 800; display: flex; gap: 6px; align-items: center; font-size: 13px; }
.live-widget-close { position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; margin: 0; border: 1px solid var(--line); border-radius: 999px; background: #f1f5f9; color: #334155; font-weight: 800; cursor: pointer; z-index: 2; font-size: 12px; }
.live-widget .live-widget-close { margin: 0; }
.live-widget summary span { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.live-widget summary span.online { background: #10b981; }
.live-widget summary span.offline { background: #ef4444; }
.live-messages { max-height: 200px; overflow: auto; padding: 0 12px 8px; font-size: 13px; }
.live-widget textarea { width: calc(100% - 24px); margin: 0 12px 8px; }
.live-widget button { margin: 0 12px 12px; }
.live-login-box { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 8px; }
.live-login-box.compact { padding-top: 6px; }
.live-login-box p { color: var(--muted); line-height: 1.4; margin: 0; font-size: 13px; }
.live-login-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.live-status-form { align-items: center; }

/* Tab visibility (preserved exactly) */
.admin-page .admin-tab-section { display: none; }
.admin-page .admin-tab-wrap { display: none; }
.admin-page.admin-tab-overview .tab-overview, .admin-page.admin-tab-users .tab-users, .admin-page.admin-tab-countries .tab-countries, .admin-page.admin-tab-online .tab-online, .admin-page.admin-tab-campaigns .tab-campaigns, .admin-page.admin-tab-network .tab-network, .admin-page.admin-tab-reports .tab-reports, .admin-page.admin-tab-traffic .tab-traffic, .admin-page.admin-tab-finance .tab-finance, .admin-page.admin-tab-support .tab-support, .admin-page.admin-tab-chat .tab-chat, .admin-page.admin-tab-mail .tab-mail, .admin-page.admin-tab-risk .tab-risk, .admin-page.admin-tab-audit .tab-audit, .admin-page.admin-tab-settings .tab-settings { display: block; }
.admin-page.admin-tab-overview .wrap-overview, .admin-page.admin-tab-users .wrap-users, .admin-page.admin-tab-countries .wrap-countries, .admin-page.admin-tab-online .wrap-online, .admin-page.admin-tab-campaigns .wrap-campaigns, .admin-page.admin-tab-network .wrap-network, .admin-page.admin-tab-reports .wrap-reports, .admin-page.admin-tab-traffic .wrap-traffic, .admin-page.admin-tab-finance .wrap-finance, .admin-page.admin-tab-risk .wrap-finance, .admin-page.admin-tab-support .wrap-support, .admin-page.admin-tab-chat .wrap-chat, .admin-page.admin-tab-mail .wrap-mail, .admin-page.admin-tab-settings .wrap-settings { display: grid; }
.admin-page .split > .admin-tab-section { min-width: 0; }
.advertiser-page .advertiser-tab-section { display: none; }
.advertiser-page .advertiser-tab-wrap { display: none; }
.advertiser-page.advertiser-tab-overview .tab-overview, .advertiser-page.advertiser-tab-smartlink .tab-smartlink, .advertiser-page.advertiser-tab-directlink .tab-directlink, .advertiser-page.advertiser-tab-popup .tab-popup, .advertiser-page.advertiser-tab-pushunder .tab-pushunder, .advertiser-page.advertiser-tab-banner .tab-banner, .advertiser-page.advertiser-tab-cpa .tab-cpa, .advertiser-page.advertiser-tab-reports .tab-reports, .advertiser-page.advertiser-tab-finance .tab-finance, .advertiser-page.advertiser-tab-support .tab-support, .advertiser-page.advertiser-tab-account .tab-account { display: block; }
.advertiser-page.advertiser-tab-overview .wrap-overview, .advertiser-page.advertiser-tab-smartlink .wrap-planner, .advertiser-page.advertiser-tab-directlink .wrap-planner, .advertiser-page.advertiser-tab-popup .wrap-planner, .advertiser-page.advertiser-tab-pushunder .wrap-planner, .advertiser-page.advertiser-tab-banner .wrap-planner, .advertiser-page.advertiser-tab-cpa .wrap-planner, .advertiser-page.advertiser-tab-support .wrap-support { display: grid; }
.advertiser-page .split > .advertiser-tab-section { min-width: 0; }
.publisher-page .publisher-tab-section { display: none; }
.publisher-page .publisher-tab-wrap { display: none; }
.publisher-page.publisher-tab-overview .tab-overview, .publisher-page.publisher-tab-sites .tab-sites, .publisher-page.publisher-tab-ads .tab-ads, .publisher-page.publisher-tab-reports .tab-reports, .publisher-page.publisher-tab-earnings .tab-earnings, .publisher-page.publisher-tab-affiliate .tab-affiliate, .publisher-page.publisher-tab-notifications .tab-notifications, .publisher-page.publisher-tab-support .tab-support, .publisher-page.publisher-tab-bonus .tab-bonus, .publisher-page.publisher-tab-account .tab-account { display: block; }
.publisher-page.publisher-tab-overview .publisher-hero-panel, .publisher-page.publisher-tab-sites .publisher-onboarding, .publisher-page.publisher-tab-ads .publisher-onboarding { display: grid; }
.publisher-page.publisher-tab-overview .publisher-command { display: flex; }
.publisher-page.publisher-tab-reports .wrap-reports, .publisher-page.publisher-tab-earnings .wrap-earnings, .publisher-page.publisher-tab-support .wrap-support, .publisher-page.publisher-tab-bonus .wrap-bonus { display: grid; }
.publisher-page.publisher-tab-earnings .wrap-earnings { grid-template-columns: 1fr; }
.publisher-page .split > .publisher-tab-section { min-width: 0; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.site-footer {
  padding: 40px 32px 20px; background: #0f172a; color: #fff;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.footer-brand .brand-mark { width: 32px; height: 32px; font-size: 13px; }
.footer-brand strong { display: block; font-size: 15px; }
.footer-brand p { margin: 3px 0 0; color: #64748b; font-size: 12px; }
.footer-links {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-links div { display: flex; flex-direction: column; gap: 7px; }
.footer-links strong { color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.footer-links a { color: #64748b; font-size: 13px; font-weight: 500; transition: color .15s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { padding-top: 16px; text-align: center; color: #475569; font-size: 11px; font-weight: 600; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 980px) {
  .hero-centered { padding: 56px 24px 40px; }
  .hero-stats-row { gap: 20px; flex-wrap: wrap; }
  .features-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .marketplace-grid, .dual-cta { grid-template-columns: 1fr; }
  .hero, .auth-shell, .split, .zone-card, .ticket-desk, .live-desk, .conversion-section, .comparison-section, .onboarding-band, .publisher-onboarding, .publisher-hero-panel, .knowledge-grid, .bonus-grid, .country-rate-grid, .contact-grid, .contact-note, .health-grid, .onboarding-checklist, .trust-marketplace, .trust-marketplace-grid { grid-template-columns: 1fr; }
  .quality-grid { grid-template-columns: repeat(2, 1fr); }
  .chat-admin-tools { grid-template-columns: 1fr; }
  .irc-console { grid-template-columns: 1fr; }
  .irc-sidebar, .irc-nicks { border-left: 0; border-right: 0; }
  .irc-channel-list, .irc-nick-list { max-height: 200px; }
  .irc-command { grid-template-columns: 1fr; }
  .publisher-command, .footer-links { flex-direction: column; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: auto; padding: 40px 24px 36px; }
  .hero-panel { min-height: 320px; }
  .traffic-callout { grid-template-columns: 1fr; gap: 4px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .feature-band { grid-template-columns: 1fr; }
  .feature-band article { border-right: 0; border-bottom: 1px solid var(--line); }
  .earning-strip, .format-cards, .choice-grid { grid-template-columns: repeat(2, 1fr); }
  .account-head { align-items: stretch; flex-direction: column; }
}

@media (max-width: 700px) {
  .quality-grid { grid-template-columns: 1fr; }
  .topbar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .nav-toggle { display: grid; place-items: center; margin-left: auto; }
  .topbar.nav-ready:not(.nav-open) .nav { display: none; }
  .nav { width: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding-top: 6px; }
  .nav a, .nav-form, .nav-form button { width: 100%; }
  .nav a:not(.button):not(.nav-user-pill):not(.nav-login) {
    min-height: 38px; display: flex; align-items: center;
    border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 0 12px;
    background: rgba(255,255,255,.03);
  }
  .hero h1 { font-size: 32px; }
  .lead { font-size: 14px; }
  .features-grid, .steps-grid { grid-template-columns: 1fr; }
  .hero-centered h1 { font-size: 32px; }
  .hero-stats-row { gap: 16px; }
  .glass-grid, .metrics, .grid-form, .mini-grid, .earning-strip, .format-cards, .choice-grid { grid-template-columns: 1fr; }
  .ticket-list, .live-room-list { max-height: 240px; }
  .ticket-message, .live-thread-message { max-width: 100%; }
  .conversion-section, .comparison-section, .onboarding-band, .formats-hero, .trust-marketplace { padding: 28px 16px; }
  .geo-rate-list a { grid-template-columns: 1fr; }
  .report-row, .format-mini-grid div, .comparison-grid div, .onboarding-steps div { align-items: flex-start; flex-direction: column; }
  .onboarding-steps small { margin-left: 0; }
  .zone-stats { justify-content: flex-start; flex-wrap: wrap; }
  .footer-links { grid-template-columns: 1fr; }
}
