/* ══════════════════════════════════════════════════════════════
   WEBINAR FUNNEL — Premium Upgrade
   ALL rules scoped to #page-webinar. Nothing bleeds to other pages.
   ══════════════════════════════════════════════════════════════ */

/* ── Webinar accent: soft pastel pink (scoped — other pages unaffected) ── */
#page-webinar {
  --webinar:     #E8A0BF;
  --webinar-bg:  rgba(232, 160, 191, 0.10);
  /* Pastel status palette — overrides saturated theme colors within webinar only */
  --green:       #7BBF9E;
  --green-bg:    rgba(123, 191, 158, 0.15);
  --amber:       #F5D78E;
  --amber-bg:    rgba(245, 215, 142, 0.20);
  --red:         #F4A4A4;
  --red-bg:      rgba(244, 164, 164, 0.15);
  /* Pastel purple — matches "Attended" bar; used for tag.purple + Save Config button */
  --purple:      #A78BCA;
  --purple-bg:   rgba(167, 139, 202, 0.15);
  --accent:      #A78BCA;
  /* Pastel pink card borders — gives all webinar boxes a pretty pink outline */
  --card-border: rgba(232, 160, 191, 0.35);
  --border:      rgba(232, 160, 191, 0.28);
}

[data-theme="dark"] #page-webinar {
  --webinar:     #F2B8D0;
  --webinar-bg:  rgba(242, 184, 208, 0.11);
  --green:       #7BBF9E;
  --green-bg:    rgba(123, 191, 158, 0.18);
  --amber:       #F5D78E;
  --amber-bg:    rgba(245, 215, 142, 0.18);
  --red:         #F4A4A4;
  --red-bg:      rgba(244, 164, 164, 0.18);
  --purple:      #A78BCA;
  --purple-bg:   rgba(167, 139, 202, 0.20);
  --accent:      #A78BCA;
  /* Dark mode — slightly brighter pink so borders read on dark backgrounds */
  --card-border: rgba(242, 184, 208, 0.28);
  --border:      rgba(242, 184, 208, 0.22);
}

/* ── Sample preview banner ── */
.webinar-preview-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

.webinar-preview-banner svg {
  flex-shrink: 0;
  stroke: var(--text-muted);
}

/* ── Page title with magenta underline ── */
#page-webinar .report-title::after {
  content: '';
  display: block;
  width: 32px;
  height: 2.5px;
  background: var(--webinar);
  border-radius: 2px;
  margin-top: 7px;
}

/* ── Webinar source badge (mirrors HYROS badge on ads page) ── */
.webinar-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--webinar-bg);
  color: var(--webinar);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

/* ── Hero row — wider gauge, stretch both panels ── */
#page-webinar .webinar-hero-row {
  grid-template-columns: 260px 1fr;
  gap: 20px;
  margin-bottom: 36px;
  align-items: stretch;
}

/* ── Gauge card — elevate to premium card ── */
#page-webinar #webinar-health-gauge-card {
  border-radius: 10px;
  padding: 28px 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] #page-webinar #webinar-health-gauge-card {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.45);
}

/* ── Selector panel — elevated card ── */
#page-webinar .webinar-selector-panel {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 20px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] #page-webinar .webinar-selector-panel {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.45);
}

/* Current webinar name — more presence */
#page-webinar .webinar-current-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Active selector card — magenta left border ── */
#page-webinar .webinar-selector-card.active {
  border-left-color: var(--webinar);
  background: var(--webinar-bg);
}

/* ── Section labels — magenta left border, flex for target chip ── */
#page-webinar .section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  border-left: 2.5px solid var(--webinar);
}

/* ── Target chip — benchmark callout inside section labels ── */
.webinar-target-chip {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ── Funnel section — elevated card ── */
#page-webinar #webinar-funnel-section {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  padding: 18px 24px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] #page-webinar #webinar-funnel-section {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* ── Upcoming webinar notice in the funnel section ── */
.webinar-funnel-upcoming {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.wfu-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--webinar);
}

.wfu-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.wfu-countdown {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--webinar-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── Funnel intelligence strip (benchmarks above SVG) ── */
.webinar-funnel-intel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.webinar-intel-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-right: 4px;
}

.webinar-intel-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 3px 9px;
  border-radius: 4px;
}

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

.wic-dot.green  { background: var(--green);   }
.wic-dot.amber  { background: var(--blue);    }  /* ROAS is perf metric, not a warning */
.wic-dot.purple { background: var(--webinar); }
.wic-dot.blue   { background: var(--blue);    }

/* ── KPI cards in webinar — elevated corners + pink border pop ── */
#page-webinar .kpi-card {
  border-radius: 8px;
  border-width: 1.5px;
}

/* ── Registration section: 4-column grid with Total spanning full width ── */
#section-registration .kpi-grid {
  grid-template-columns: repeat(4, 1fr);
}

#section-registration .kpi-card--full {
  grid-column: 1 / -1;
}

/* ── KPI values — tabular numbers for clean alignment ── */
#page-webinar .kpi-value {
  font-variant-numeric: tabular-nums;
  font-size: 26px;
}

#page-webinar .section-block {
  position: relative;
  overflow: hidden;
}

/* ── Manifesting loading text ── */
@keyframes manifesting-flash {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 0.15; }
}

.kpi-manifesting {
  font-size: 13px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  animation: manifesting-flash 1.6s ease-in-out infinite;
}

/* ── Funnel shimmer glow — manifesting state ── */
@keyframes funnel-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(232, 160, 191, 0.20)); }
  50%       { filter: drop-shadow(0 0 14px rgba(232, 160, 191, 0.50)); }
}

@keyframes funnel-glow-pulse-dark {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(242, 184, 208, 0.28)); }
  50%       { filter: drop-shadow(0 0 18px rgba(242, 184, 208, 0.62)); }
}

#webinar-funnel-svg-wrap.funnel-manifesting .webinar-funnel-svg {
  animation: funnel-glow-pulse 2s ease-in-out infinite;
}

[data-theme="dark"] #webinar-funnel-svg-wrap.funnel-manifesting .webinar-funnel-svg {
  animation: funnel-glow-pulse-dark 2s ease-in-out infinite;
}

/* SVG gauge manifesting text (same flash) */
.gauge-manifesting {
  animation: manifesting-flash 1.6s ease-in-out infinite;
}

/* ── Pending badge — shown for post-webinar metrics before event runs ── */
.kpi-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--webinar);
  background: var(--webinar-bg);
  border: 1.5px solid rgba(232, 160, 191, 0.55);
  border-radius: 5px;
  padding: 3px 9px;
  text-transform: uppercase;
  vertical-align: middle;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 4px rgba(232, 160, 191, 0.18);
  animation: manifesting-flash 2.4s ease-in-out infinite;
}

[data-theme="dark"] .kpi-pending-badge {
  color: var(--webinar);
  background: var(--webinar-bg);
  border-color: rgba(242, 184, 208, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 10px rgba(242, 184, 208, 0.12);
}

/* ── Webinar status label variants (LIVE / UPCOMING / CURRENT / MOST RECENT) ── */
.wlabel-live {
  color: var(--green, #4CC97A);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.wlabel-upcoming {
  color: var(--webinar);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wlabel-current {
  color: var(--text-light, #aaa);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wlabel-recent {
  color: var(--text-muted, #888);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Progress bars — thicker, cleaner ── */
#page-webinar .kpi-progress-bar-track {
  height: 4px;
  border-radius: 4px;
  margin-top: 10px;
}

/* ── REVENUE SECTION — ROAS hero layout ── */

/* Reflow the 4-col grid so ROAS spans 2 cols */
#section-revenue .kpi-grid {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* ROAS: hero — first in flow, spans 2 cols */
#section-revenue #card-webinar-roas {
  grid-column: 1 / 3;
}

/* ROAS value — larger because it's the hero number */
#section-revenue #card-webinar-roas .kpi-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

#section-revenue #card-webinar-roas .kpi-label {
  font-size: 11.5px;
  font-weight: 600;
}

/* Call Show Rate — pending, spans full width below */
#section-revenue #card-webinar-call-show {
  grid-column: 1 / -1;
}

/* ── Responsive: collapse hero row on narrow screens ── */
@media (max-width: 860px) {
  #page-webinar .webinar-hero-row {
    grid-template-columns: 1fr;
  }

  #section-revenue .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  #section-revenue #card-webinar-roas {
    grid-column: 1 / -1;
  }

  #section-revenue #card-webinar-call-show {
    grid-column: 1 / -1;
  }
}

/* ══════════════════════════════════════════════
   WEBINAR TAB NAVIGATION
   ══════════════════════════════════════════════ */

.webinar-tab-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  padding-bottom: 0;
}

.webinar-tab-btn {
  padding: 8px 18px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.webinar-tab-btn:hover {
  color: var(--text);
}

.webinar-tab-btn.active {
  color: var(--webinar);
  border-bottom-color: var(--webinar);
  font-weight: 600;
}

/* ══════════════════════════════════════════════
   SECTION 3 — 5-CARD CONVERSION GRID
   ══════════════════════════════════════════════ */

#section-conversion .kpi-grid {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1100px) {
  #section-conversion .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  #section-conversion .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════════════════════
   WEBINAR HISTORY TAB
   ══════════════════════════════════════════════ */

/* ── Filter bar ── */

.webinar-history-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
}

.whf-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.whf-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.whf-input {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 130px;
}

.whf-input:focus {
  border-color: var(--webinar);
}

.whf-group.whf-search .whf-input {
  min-width: 220px;
}

.whf-clear-btn {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  align-self: flex-end;
}

.whf-clear-btn:hover {
  background: var(--hover);
  color: var(--text);
}

/* ── History table ── */

#webinar-history-tbody tr.webinar-history-row {
  cursor: pointer;
}

.wh-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 12px;
}

.wh-topic {
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-duration {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  white-space: nowrap;
}

/* ── History action cell — two buttons side by side ── */

.webinar-history-row td:last-child {
  white-space: nowrap;
}

/* ── View Dashboard button — outlined style ── */

.wsm-view-btn {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--card-border) !important;
}

.wsm-view-btn:hover {
  background: var(--hover) !important;
  color: var(--text) !important;
  border-color: var(--card-border) !important;
}

/* ── Load button ── */

.webinar-load-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--webinar);
  background: var(--webinar-bg);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.webinar-load-btn:hover {
  background: rgba(217, 70, 239, 0.14);
  border-color: rgba(217, 70, 239, 0.25);
}

/* ── Empty + loading states ── */

.webinar-history-loading {
  padding: 40px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}

/* ── History table header note ── */

.webinar-history-note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-style: italic;
}

/* ══════════════════════════════════════════════
   MINI STATS — selector panel quick-view
   ══════════════════════════════════════════════ */

.wsm-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.wsm-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 4px;
}

.wsm-stat + .wsm-stat {
  border-left: 1px solid var(--border);
}

.wsm-stat-val {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.wsm-stat-val.wsm-empty {
  color: var(--text-light);
  font-weight: 500;
}

.wsm-stat-lbl {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
}

/* Mini funnel bars */

.wsm-funnel-bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.wsm-bar-row {
  display: grid;
  grid-template-columns: 62px 1fr 34px;
  align-items: center;
  gap: 8px;
}

.wsm-bar-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

.wsm-bar-track {
  height: 7px;
  background: var(--tag-bg);
  border-radius: 4px;
  overflow: hidden;
}

.wsm-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wsm-bar-purple { background: var(--webinar); opacity: 0.9; }
.wsm-bar-blue   { background: #A78BCA; }
.wsm-bar-green  { background: #7BBF9E; }

.wsm-bar-count {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  text-align: right;
}

/* ── Last webinar reference — appears in selector panel when upcoming ── */
.wsm-last-webinar {
  /* no top gap — this is the only content shown when pending */
}

.wsm-last-webinar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.wsm-last-webinar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wsm-last-webinar-eyebrow {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--webinar);
}

.wsm-last-webinar-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.wsm-last-webinar-date {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.wsm-last-webinar-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.wsm-last-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}

.wsm-last-stats-row .wsm-stat + .wsm-stat {
  border-left: 1px solid var(--border);
}

/* ══════════════════════════════════════════════
   REPORTS TAB — Espeon post-webinar intelligence
   ══════════════════════════════════════════════ */

/* Espeon identity header */

.espeon-reports-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--webinar);
  border-radius: 10px;
}

.espeon-id-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.espeon-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--webinar-bg);
  border: 1.5px solid var(--webinar);
  color: var(--webinar);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.01em;
}

.espeon-id-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.espeon-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.espeon-role {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.espeon-mandate {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 480px;
  text-align: right;
}

/* Empty state */

.espeon-empty-state {
  padding: 36px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.espeon-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.espeon-empty-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 440px;
}

/* Preview card */

.espeon-preview-card {
  width: 100%;
  max-width: 680px;
  margin-top: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 22px 24px 24px;
}

.espeon-preview-heading {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-light);
  margin-bottom: 18px;
}

.espeon-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

.espeon-preview-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.espeon-preview-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.espeon-icon-purple { background: var(--webinar-bg); color: var(--webinar); }
.espeon-icon-green  { background: var(--green-bg,  rgba(16,185,129,0.1)); color: var(--green); }
.espeon-icon-amber  { background: var(--blue-bg,   rgba(59,130,246,0.1)); color: var(--blue); }
.espeon-icon-blue   { background: var(--blue-bg,   rgba(59,130,246,0.1)); color: var(--blue); }

.espeon-preview-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.espeon-preview-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .espeon-reports-header {
    flex-direction: column;
  }
  .espeon-mandate {
    text-align: left;
  }
  .espeon-preview-grid {
    grid-template-columns: 1fr;
  }
  .wsm-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 0;
  }
}

/* ── Espeon Report Cards ── */

.espeon-loading {
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.espeon-report-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.espeon-report-card:hover {
  border-color: var(--webinar);
}

.espeon-report-card-header {
  padding: 16px 20px;
}

.espeon-report-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.espeon-report-date {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.espeon-trend-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.espeon-trend-green { background: rgba(16,185,129,0.12); color: var(--green); }
.espeon-trend-amber { background: var(--blue-bg); color: var(--blue); }
.espeon-trend-red   { background: rgba(239,68,68,0.12);  color: var(--red);   }

.espeon-report-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.espeon-report-card-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.espeon-report-card-stats strong {
  color: var(--text);
  font-weight: 600;
}

.espeon-hs         { }
.espeon-hs-green strong { color: var(--green); }
.espeon-hs-amber strong { color: var(--amber); }
.espeon-hs-red   strong { color: var(--red);   }

.espeon-report-card-body {
  padding: 0 20px 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.espeon-block-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 16px 0 6px;
}

.espeon-block-para {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ══════════════════════════════════════════════════════════════
   VIEWING LABEL — funnel selector panel
   ══════════════════════════════════════════════════════════════ */

.webinar-viewing-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--webinar);
  opacity: 0.7;
  margin-bottom: 2px;
}

.webinar-upcoming-notice {
  font-size: 10px;
  font-weight: 600;
  color: var(--webinar);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════════════════
   WEBINAR SNAPSHOT MODAL
   ══════════════════════════════════════════════════════════════ */

.wsm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px 40px;
  overflow-y: auto;
  animation: wsm-fade-in 0.18s ease;
}

@keyframes wsm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wsm-modal {
  width: 100%;
  max-width: 820px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.12),
    0 16px 64px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  animation: wsm-slide-up 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] .wsm-modal {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 16px 64px rgba(0, 0, 0, 0.6);
}

@keyframes wsm-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Header ── */

.wsm-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--card-border);
  background: var(--hover);
}

.wsm-modal-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--webinar);
  opacity: 0.8;
  margin-bottom: 4px;
}

.wsm-modal-topic {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.wsm-modal-date {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.wsm-close-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-top: 2px;
}

.wsm-close-btn:hover {
  background: var(--hover);
  color: var(--text);
}

/* ── Loading state ── */

.wsm-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 0;
}

.wsm-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--card-border);
  border-top-color: var(--webinar);
  border-radius: 50%;
  animation: wsm-spin 0.7s linear infinite;
}

@keyframes wsm-spin {
  to { transform: rotate(360deg); }
}

.wsm-loading-text {
  font-size: 13px;
  color: var(--text-light);
}

/* ── Error state ── */

.wsm-error-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 40px 28px;
  font-size: 13px;
  color: var(--red);
}

/* ── KPI sections ── */

.wsm-section {
  padding: 20px 28px 0;
}

.wsm-section:last-child {
  padding-bottom: 28px;
}

.wsm-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: 10px;
  border-left: 2.5px solid var(--webinar);
  margin-bottom: 12px;
}

.wsm-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wsm-kpi-card {
  flex: 1 1 140px;
  min-width: 120px;
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-left: 5px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
}

.wsm-kpi-card.status-green { border-left-color: var(--green); }
.wsm-kpi-card.status-amber { border-left-color: var(--amber); }
.wsm-kpi-card.status-red   { border-left-color: var(--red);   }

.wsm-kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.wsm-kpi-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.wsm-kpi-value.empty {
  color: var(--text-light);
  font-size: 18px;
}

/* ── Health score ── */

.wsm-health-row {
  border-top: 1px solid var(--card-border);
  margin-top: 8px;
}

.wsm-health-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 3px solid var(--webinar) !important;
  background: var(--webinar-bg) !important;
}

.wsm-health-score {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.wsm-health-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Linked reports section ── */

.wsm-report-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.wsm-report-link:last-child {
  margin-bottom: 0;
}

.wsm-report-link:hover {
  background: var(--hover);
}

.wsm-report-link-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wsm-report-link-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wsm-report-link-stats {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.wsm-report-link-arrow {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--webinar);
  font-weight: 700;
  white-space: nowrap;
}

.wsm-no-reports {
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
  padding: 4px 0;
}

/* ── Open state: report row gets bottom border only when body follows ── */
.wsm-report-link--open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  background: var(--hover);
}

/* ── Inline expanded report body ── */
.wsm-report-inline-body {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 16px 18px 20px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}

.wsm-report-inline-loading {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.wsm-report-inline-body .espeon-block-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 16px 0 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}

.wsm-report-inline-body .espeon-block-heading:first-child {
  margin-top: 0;
}

.wsm-report-inline-body .espeon-block-para {
  color: var(--text-muted);
  margin-bottom: 4px;
}

