*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:    #5B3EE6;
  --brand-dk: #3e2aa3;
  --brand-lt: #ede9fd;
  --accent:   #F97316;
  --green:    #16a34a;
  --green-lt: #dcfce7;
  --text:     #111827;
  --muted:    #6b7280;
  --border:   #e5e7eb;
  --bg:       #f8f7ff;
  --card:     #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── NAV ──────────────────────────────────── */
nav {
  background: var(--brand);
  color: white;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  height: 58px;
  box-shadow: 0 2px 8px rgba(91,62,230,.35);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-decoration: none;
  color: white;
  margin-right: 8px;
}

.nav-logo span { opacity: .55; font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}

.nav-link:hover { background: rgba(255,255,255,.12); color: white; }
.nav-link.active { background: rgba(255,255,255,.18); color: white; }

.nav-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.9);
  font-size: 0.82rem;
  font-weight: 600;
}

.nav-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  border: none;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  margin-left: 12px;
  text-decoration: none;
  transition: background .15s;
}

.nav-back:hover { background: rgba(255,255,255,.25); }

/* ── LAYOUT ───────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px;
}

/* ── SECTION HEADINGS ─────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
}

.section-header .count {
  font-size: 0.78rem;
  background: var(--brand-lt);
  color: var(--brand);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── WELCOME CARD ─────────────────────────── */
.welcome-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 40px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.welcome-greeting {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.welcome-intro {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.welcome-joke {
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  padding: 16px 20px;
  background: var(--brand-lt);
  border-left: 4px solid var(--brand);
  border-radius: 0 8px 8px 0;
}

/* ── TENANTS ──────────────────────────────── */
.tenant-row {
  display: flex;
  gap: 14px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.tenant-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 240px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .15s;
}

.tenant-chip:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.tenant-chip--at-risk {
  border: 2px solid var(--accent);
  box-shadow: 0 1px 6px rgba(249,115,22,.2);
}

.tenant-chip--at-risk:hover {
  box-shadow: 0 4px 16px rgba(249,115,22,.3);
}

.badge-at-risk {
  background: #fff7ed;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  border: 1px solid #fed7aa;
}

.tenant-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dk));
  color: white;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tenant-info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}

.tenant-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.tenant-pill {
  margin-left: auto;
  background: var(--green-lt);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}

/* ── EVENT CARDS ──────────────────────────── */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px 22px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .2s, transform .18s, border-color .2s;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0;
  transition: opacity .2s;
}

.event-card:hover {
  box-shadow: 0 8px 28px rgba(91,62,230,.14);
  transform: translateY(-3px);
  border-color: var(--brand);
}

.event-card:hover::before { opacity: 1; }

.event-emoji {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 14px;
  display: block;
}

.event-name {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.event-date {
  font-size: 0.78rem;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.event-tagline {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

/* ── TENANT DETAIL ────────────────────────── */
.tenant-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dk) 100%);
  color: white;
  padding: 36px 32px;
  border-radius: 18px;
  margin-bottom: 28px;
}

.tenant-hero--at-risk {
  background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
}

.tenant-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}

.tenant-hero-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .7;
  margin-bottom: 8px;
}

.tenant-hero h1 {
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.tenant-hero h1 .badge-at-risk {
  background: rgba(255,255,255,.2);
  color: white;
  border-color: rgba(255,255,255,.3);
  font-size: 0.72rem;
}

.tenant-hero-meta {
  font-size: 0.88rem;
  opacity: .8;
}

.tenant-hero-contact {
  text-align: right;
}

.tenant-hero-contact-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.tenant-hero-contact a {
  color: rgba(255,255,255,.8);
  font-size: 0.85rem;
  text-decoration: none;
}

.tenant-hero-contact a:hover { text-decoration: underline; }

.tenant-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.tenant-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.tenant-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1;
}

.tenant-stat-value span { font-size: 1rem; opacity: .5; }

.score-high { color: var(--green); }
.score-mid  { color: #d97706; }
.score-low  { color: #ef4444; }

.tenant-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ── RECOMMENDATIONS ──────────────────────── */
.recommendations-panel {
  background: linear-gradient(160deg, #1a1040 0%, #0f0a2e 100%);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}

.recommendations-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.recommendations-title {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: .8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recommendations-icon {
  color: #a78bfa;
  font-size: 1rem;
}

.recommendations-subtitle {
  font-size: 0.75rem;
  color: rgba(255,255,255,.45);
  font-style: italic;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.rec-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 20px;
}

.rec-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.rec-event-emoji { font-size: 1.8rem; line-height: 1; }

.rec-activation {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
}

.rec-event {
  font-size: 0.75rem;
  color: rgba(255,255,255,.5);
}

.rec-signals {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signal {
  border-radius: 8px;
  padding: 10px 12px;
}

.signal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.signal-icon { font-size: 0.85rem; }

.signal-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.signal-text {
  font-size: 0.78rem;
  line-height: 1.5;
}

.signal--competitor {
  background: rgba(249,115,22,.15);
  border: 1px solid rgba(249,115,22,.3);
}
.signal--competitor .signal-label { color: #fb923c; }
.signal--competitor .signal-text  { color: rgba(253,186,116,.85); }

.signal--building {
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.3);
}
.signal--building .signal-label { color: #60a5fa; }
.signal--building .signal-text  { color: rgba(147,197,253,.85); }

.signal--weather {
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.3);
}
.signal--weather .signal-label { color: #4ade80; }
.signal--weather .signal-text  { color: rgba(134,239,172,.85); }

.signal--pattern {
  background: rgba(167,139,250,.15);
  border: 1px solid rgba(167,139,250,.3);
}
.signal--pattern .signal-label { color: #c4b5fd; }
.signal--pattern .signal-text  { color: rgba(196,181,253,.85); }

.rec-prediction {
  margin-top: 14px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 14px 16px;
}

.rec-prediction-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.4);
  margin-bottom: 12px;
}

.confidence-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.confidence-high   { background: rgba(34,197,94,.2);  color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.confidence-medium { background: rgba(251,191,36,.2); color: #fbbf24; border: 1px solid rgba(251,191,36,.3); }
.confidence-low    { background: rgba(239,68,68,.2);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }

.rec-prediction-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.pred-metric {
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  padding: 10px 10px 8px;
  text-align: center;
}

.pred-metric-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  line-height: 1.1;
  margin-bottom: 3px;
}

.pred-metric-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: rgba(255,255,255,.4);
  margin-bottom: 2px;
}

.pred-metric-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,.35);
}

.pred-delta { color: #4ade80 !important; font-weight: 700; }

.rec-prediction-outcome {
  font-size: 0.78rem;
  color: rgba(255,255,255,.55);
  line-height: 1.55;
  font-style: italic;
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 10px;
  margin-top: 2px;
  margin-bottom: 10px;
}

.roi-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(74,222,128,.07);
  border: 1px solid rgba(74,222,128,.2);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.roi-metric { flex: 1; text-align: center; }

.roi-metric-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: rgba(255,255,255,.8);
  line-height: 1.1;
  margin-bottom: 2px;
}

.roi-profit   { color: #4ade80; }
.roi-multiple { color: #4ade80; font-size: 1.1rem; }

.roi-metric-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: rgba(255,255,255,.35);
}

.roi-divider {
  color: rgba(255,255,255,.2);
  font-size: 1rem;
  flex-shrink: 0;
}

.roi-basis {
  font-size: 0.72rem;
  color: rgba(74,222,128,.55);
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 4px;
}

.run-btn {
  width: 100%;
  margin-top: 14px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #5B3EE6, #7c3aed);
  border: none;
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  letter-spacing: .2px;
}

.run-btn:hover { opacity: .88; transform: translateY(-1px); }
.run-btn:active { transform: translateY(0); }

.run-btn--selected {
  background: linear-gradient(135deg, #16a34a, #15803d);
  cursor: default;
}

.run-btn--selected:hover { opacity: 1; transform: none; }

.run-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.run-btn--outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.8);
  font-size: 0.78rem;
}

.run-btn--outline:hover {
  background: rgba(255,255,255,.1);
  opacity: 1;
  transform: translateY(-1px);
}

.run-btn--autopilot {
  background: linear-gradient(135deg, #f97316, #ea580c);
  font-size: 0.78rem;
  letter-spacing: .3px;
}

.run-btn--autopilot:hover { opacity: .88; transform: translateY(-1px); }

/* ── AUTOPILOT PAGE ───────────────────────── */
.ap-sent-banner {
  background: linear-gradient(135deg, #166534 0%, #14532d 100%);
  color: white;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ap-sent-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  flex-shrink: 0;
}

.ap-sent-text { flex: 1; }

.ap-sent-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 3px;
}

.ap-sent-time {
  font-size: 0.8rem;
  opacity: .75;
}

.ap-sent-stats {
  display: flex;
  gap: 24px;
}

.ap-sent-stat { text-align: center; }

.ap-sent-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
}

.ap-sent-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  opacity: .65;
}

.ap-card {
  border-left: 3px solid #16a34a;
}

.ap-step-done {
  background: #16a34a !important;
  font-size: 0.82rem;
}

.ap-done-badge {
  background: #dcfce7;
  color: #166534;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.ap-dept-row {
  cursor: default;
  opacity: .85;
}

.ap-check {
  color: #16a34a;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.ap-rationale {
  margin-top: 14px;
  background: var(--brand-lt);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.8rem;
  color: #374151;
  line-height: 1.55;
}

.ap-rationale strong { color: var(--brand-dk); }

.ap-rationale-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--brand);
  margin-bottom: 4px;
  margin-right: 4px;
}

.ap-email-field {
  margin-bottom: 14px;
}

.ap-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.ap-field-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.ap-email-body {
  font-size: 0.82rem;
  font-family: inherit;
  line-height: 1.7;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  white-space: pre-wrap;
  color: var(--text);
  margin: 0;
}

.ap-schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 4px;
}

.ap-schedule-item {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.ap-cross-sent {
  background: #f0fdf4;
  border-color: #86efac;
}

.ap-override-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  background: white;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  font-size: 0.88rem;
}

.ap-override-btn:hover {
  background: var(--brand-lt);
  opacity: 1;
  transform: translateY(-1px);
}

/* ── TASK OVERLAY ─────────────────────────── */
@keyframes overlayIn  { from { opacity:0 } to { opacity:1 } }
@keyframes overlayOut { from { opacity:1 } to { opacity:0 } }

@keyframes planeFly {
  0%   { left: -80px; top: 52%; }
  15%  { top: 38%; }
  35%  { top: 60%; }
  55%  { top: 35%; }
  75%  { top: 56%; }
  100% { left: calc(100% + 80px); top: 48%; }
}

@keyframes trailPulse {
  0%, 100% { opacity: .08; }
  50%       { opacity: .18; }
}

@keyframes iconIn {
  0%   { transform: scale(.4) rotate(-10deg); opacity: 0; }
  70%  { transform: scale(1.15) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg);   opacity: 1; }
}

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

@keyframes warpFlash {
  0%   { background: rgba(139,92,246,.08); }
  40%  { background: rgba(139,92,246,.22); }
  100% { background: transparent; }
}

.ol-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #05050f 0%, #0d1424 60%, #05050f 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: overlayIn .35s ease;
}

.ol-overlay--fade-out { animation: overlayOut .5s ease forwards; }

.ol-overlay.ol-warp { animation: warpFlash .6s ease forwards; }

.ol-sky {
  width: 100%;
  height: 110px;
  position: relative;
  margin-bottom: 32px;
  overflow: hidden;
}

.ol-trail {
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  border-top: 2px dashed rgba(255,255,255,.1);
  transform: translateY(-1px);
  animation: trailPulse 2s ease-in-out infinite;
}

.ol-plane {
  position: absolute;
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 0 16px rgba(255,255,255,.5))
          drop-shadow(0 0 4px rgba(99,179,237,.8));
  animation: planeFly 3.2s cubic-bezier(.45,0,.55,1) infinite;
  color: white;
}

.ol-body {
  text-align: center;
  padding: 0 32px;
  max-width: 520px;
  width: 100%;
}

.ol-icon {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 16px;
  display: block;
  animation: iconIn .35s cubic-bezier(.34,1.56,.64,1) both;
}

.ol-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: white;
  line-height: 1.4;
  margin-bottom: 14px;
  animation: textIn .3s ease both;
  min-height: 2.8em;
}

.ol-text--timeskip {
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .5px;
}

.ol-step {
  font-size: 0.72rem;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.ol-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
}

.ol-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  transition: background .3s, transform .3s;
}

.ol-dot--done   { background: rgba(255,255,255,.35); }
.ol-dot--active {
  background: white;
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(255,255,255,.6);
}

/* ── POST-EVENT REPORT ────────────────────── */
.rp-banner {
  background: linear-gradient(135deg, #166534 0%, #14532d 100%);
  color: white;
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.rp-banner-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 4px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.rp-banner-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.rp-banner-sub {
  font-size: 0.88rem;
  opacity: .8;
  max-width: 380px;
  line-height: 1.5;
}

.rp-hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.rp-hero-stat { text-align: center; }

.rp-hero-val {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.rp-hero-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  opacity: .65;
}

.rp-profit { color: #86efac; }

/* ── compare bars ─────────────────────────── */
.rp-compare-row {
  margin-bottom: 20px;
}

.rp-compare-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.rp-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.rp-bar-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  width: 68px;
  flex-shrink: 0;
  text-align: right;
}

.rp-tag-predicted { color: var(--muted); }
.rp-tag-actual    { color: var(--green); }

.rp-bar-track {
  flex: 1;
  background: #f3f4f6;
  border-radius: 6px;
  height: 26px;
  overflow: hidden;
}

.rp-bar {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  transition: width .8s cubic-bezier(.4,0,.2,1);
  min-width: fit-content;
}

.rp-bar em { font-style: normal; opacity: .75; margin-left: 4px; font-size: .9em; }

.rp-bar--predicted {
  background: linear-gradient(90deg, #9ca3af, #d1d5db);
  color: #374151;
}

.rp-bar--actual {
  background: linear-gradient(90deg, var(--green), #22c55e);
}

/* ── ROI table ────────────────────────────── */
.rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.rp-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  padding: 0 12px 10px;
  border-bottom: 2px solid var(--border);
}

.rp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.rp-tr-total td {
  background: #f9fafb;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.rp-td-good { color: var(--green); font-weight: 700; }

/* ── email performance ────────────────────── */
.rp-email-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.rp-email-stat { }

.rp-email-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.rp-email-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  margin-bottom: 8px;
}

.rp-email-bar-track {
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
}

.rp-email-bar {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
  transition: width .8s ease;
}

.rp-email-bar--open   { background: #3b82f6; }
.rp-email-bar--click  { background: var(--accent); }
.rp-email-bar--attend { background: var(--green); }

/* ── insights ─────────────────────────────── */
.rp-insights { display: flex; flex-direction: column; gap: 12px; }

.rp-insight {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 10px;
  align-items: flex-start;
}

.rp-insight--positive {
  background: var(--green-lt);
  border: 1px solid #bbf7d0;
}

.rp-insight--tip {
  background: var(--brand-lt);
  border: 1px solid #c4b5fd;
}

.rp-insight-icon {
  font-size: 1rem;
  font-weight: 800;
  width: 24px;
  flex-shrink: 0;
  padding-top: 1px;
}

.rp-insight--positive .rp-insight-icon { color: var(--green); }
.rp-insight--tip      .rp-insight-icon { color: var(--brand); }

.rp-insight-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.rp-insight--positive .rp-insight-title { color: #166534; }
.rp-insight--tip      .rp-insight-title { color: var(--brand-dk); }

.rp-insight-body {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #374151;
}

.rp-insight-body strong { color: inherit; }

/* ── TENANT NOTES ─────────────────────────── */
.tenant-notes {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 8px;
}

.tenant-notes-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #92400e;
  margin-bottom: 6px;
}

.tenant-notes p {
  font-size: 0.88rem;
  color: #78350f;
  line-height: 1.6;
}

.activation-history {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.history-row:last-child { border-bottom: none; }
.history-row:hover { background: #fafafa; }

.history-main { flex: 1; }

.history-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.history-event {
  font-size: 0.78rem;
  color: var(--muted);
}

.history-meta { text-align: right; }

.history-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.history-attendees {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.history-score {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
  background: #f3f4f6;
}

.history-score.score-high { background: var(--green-lt); }
.history-score.score-mid  { background: #fef3c7; }
.history-score.score-low  { background: #fee2e2; }

/* ── EVENT CARDS ──────────────────────────── */
.event-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand);
}

.event-activation-count {
  background: var(--brand-lt);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── EVENT HERO ───────────────────────────── */
.event-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dk) 100%);
  color: white;
  padding: 40px 32px 36px;
  border-radius: 18px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}

.event-hero::after {
  content: attr(data-emoji);
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 7rem;
  opacity: .18;
  pointer-events: none;
  line-height: 1;
}

.event-hero-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .7;
  margin-bottom: 8px;
}

.event-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.3px;
  margin-bottom: 8px;
}

.event-hero-date {
  font-size: 0.85rem;
  opacity: .8;
  margin-bottom: 14px;
}

.event-hero-tagline {
  font-size: 1rem;
  opacity: .9;
  line-height: 1.55;
  max-width: 520px;
}

/* ── ACTIVATIONS ──────────────────────────── */
.activations-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin-bottom: 18px;
}

.activation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.activation-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: box-shadow .2s, transform .18s;
}

.activation-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.activation-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.activation-emoji {
  font-size: 2rem;
  line-height: 1;
}

.activation-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--brand);
  background: var(--brand-lt);
  padding: 3px 9px;
  border-radius: 10px;
}

.activation-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.activation-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.activation-stats {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
}

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

.stat label {
  color: #9ca3af;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.stat span { font-weight: 600; color: var(--text); }

.select-btn {
  width: 100%;
  margin-top: 16px;
  padding: 9px;
  border: 1.5px solid var(--brand);
  background: white;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.select-btn:hover  { background: var(--brand); color: white; }
.select-btn.selected { background: var(--brand); color: white; }

/* ── TOAST ────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #111827;
  color: white;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 999;
  white-space: nowrap;
}

.toast.show { transform: translateX(-50%) translateY(0); }

.loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

.error {
  text-align: center;
  padding: 80px 20px;
  color: #ef4444;
}

/* ── CUSTOMIZE PAGE ───────────────────────── */
.cx-header {
  margin-bottom: 32px;
}

.cx-breadcrumb {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.cx-breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}

.cx-breadcrumb a:hover { text-decoration: underline; }

.cx-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.cx-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}

.cx-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}

.cx-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 8px;
}

.cx-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
}

.cx-step {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cx-card-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.cx-card-meta span {
  font-weight: 800;
  color: var(--brand);
  font-size: 1rem;
}

.cx-card-hint {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

/* ── departments ──────────────────────────── */
.cx-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.dept-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.dept-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}

.dept-row:last-child { border-bottom: none; }
.dept-row:hover { background: #fafafa; }

.dept-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}

.dept-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
}

.dept-count {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

/* ── cross tenant ─────────────────────────── */
.cx-cross-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.cx-cross-badge {
  background: var(--brand-lt);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.cx-cross-card {
  border: 1.5px dashed var(--brand);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--brand-lt);
}

.cx-cross-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.cx-cross-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.cx-cross-meta strong { color: var(--brand); }

.cx-cross-reason {
  font-size: 0.8rem;
  color: #374151;
  line-height: 1.5;
}

.cx-cross-reason strong { color: var(--brand); }

.cx-cross-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.cx-cross-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* ── email fields ─────────────────────────── */
.cx-field {
  margin-bottom: 16px;
}

.cx-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.cx-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color .15s, box-shadow .15s;
}

.cx-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,62,230,.1);
}

.cx-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: "Menlo", "Monaco", monospace;
  color: var(--text);
  background: #fafafa;
  resize: vertical;
  line-height: 1.6;
  transition: border-color .15s;
}

.cx-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,62,230,.1);
}

.cx-char-count {
  text-align: right;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.cx-preview-btn {
  background: none;
  border: 1.5px solid var(--brand);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.cx-preview-btn:hover { background: var(--brand); color: white; }

.cx-preview {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.cx-preview-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  padding: 8px 16px;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}

.cx-preview-subject {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 16px 6px;
  border-bottom: 1px solid var(--border);
}

.cx-preview-body {
  font-size: 0.85rem;
  font-family: inherit;
  line-height: 1.7;
  padding: 14px 16px;
  white-space: pre-wrap;
  color: var(--text);
  margin: 0;
}

/* ── schedule section ─────────────────────── */
.cx-fields-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.cx-field-hint {
  font-size: 0.71rem;
  color: var(--brand);
  margin-top: 4px;
  font-style: italic;
}

/* ── actions ──────────────────────────────── */
.cx-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-bottom: 48px;
}

.cx-cancel {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: background .15s;
}

.cx-cancel:hover { background: #f3f4f6; }

.cx-schedule-btn {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dk));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  letter-spacing: .2px;
}

.cx-schedule-btn:hover  { opacity: .88; transform: translateY(-1px); }
.cx-schedule-btn:active { transform: translateY(0); }

.cx-schedule-btn--done {
  background: linear-gradient(135deg, #16a34a, #15803d);
  cursor: default;
}

.cx-schedule-btn--done:hover { opacity: 1; transform: none; }

/* ── AGENT ALERTS (dashboard) ─────────────── */
.aa-live-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: .4px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

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

.aa-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.aa-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.aa-card--onboarding::before { background: var(--brand); }
.aa-card--risk::before        { background: var(--accent); }

.aa-agent-badge {
  display: flex;
  align-items: center;
  gap: 7px;
}

.aa-agent-icon {
  font-size: 1rem;
}

.aa-agent-name {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}

.aa-body { display: flex; flex-direction: column; gap: 6px; }

.aa-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.aa-risk-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 1.4s ease-in-out infinite;
}

.aa-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.aa-detail {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  margin-top: 2px;
}

.aa-sequence {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--brand-lt);
  border-radius: 8px;
}

.aa-seq-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
}

.aa-seq-week {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--brand);
  min-width: 48px;
}

.aa-seq-name { color: var(--text); font-weight: 500; }

.aa-score-bar { margin-top: 8px; }

.aa-score-track {
  position: relative;
  height: 10px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: visible;
}

.aa-score-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--accent);
}

.aa-score-threshold {
  position: absolute;
  top: -4px; bottom: -4px;
  width: 2px;
  background: #9ca3af;
  border-radius: 2px;
}

.aa-score-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
  position: relative;
}

.aa-actions { margin-top: 4px; }

.aa-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity .15s, transform .1s;
}

.aa-btn:hover { opacity: .85; transform: translateY(-1px); }

.aa-btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dk));
  color: white;
}

.aa-btn--risk {
  background: linear-gradient(135deg, var(--accent), #ea580c);
  color: white;
}

/* ── SPACE SELECTION (customize) ─────────── */
.space-agent-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--brand-lt);
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.space-agent-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }

.space-agent-name {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--brand);
  margin-bottom: 4px;
}

.space-agent-desc { color: var(--text); }

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

.space-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: white;
}

.space-option input[type="radio"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--brand); }

.space-option:hover { border-color: var(--brand); }

.space-option--suggested {
  border-color: var(--brand);
  background: var(--brand-lt);
}

.space-option-inner { flex: 1; min-width: 0; }

.space-option-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.space-option-name { font-weight: 700; font-size: 0.88rem; }

.space-agent-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: white;
  background: var(--brand);
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}

.space-option-meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.space-util        { font-weight: 600; }
.space-util--low   { color: var(--green); }
.space-util--high  { color: var(--accent); }

.space-option-hint {
  font-size: 0.77rem;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 640px) {
  .aa-grid    { grid-template-columns: 1fr; }
  .space-grid { grid-template-columns: 1fr; }
}

/* ── REPORTS PAGE ─────────────────────────── */
.rpt-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.rpt-kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
}

.rpt-kpi-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -1px;
  line-height: 1.1;
}

.rpt-kpi-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.rpt-tenant-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.rpt-tenant-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.rpt-tenant-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 14px;
}

.rpt-tenant-name a {
  color: var(--brand);
  text-decoration: none;
}

.rpt-tenant-name a:hover { text-decoration: underline; }

.rpt-tenant-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.rpt-tenant-stat { }

.rpt-tenant-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.rpt-tenant-label {
  font-size: 0.73rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-top: 2px;
}

.rpt-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.rpt-filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--muted);
  transition: all .15s;
}

.rpt-filter-btn:hover { border-color: var(--brand); color: var(--brand); }

.rpt-filter-btn--active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.rpt-event-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rpt-event-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}

.rpt-event-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(91, 62, 230, .1);
}

.rpt-event-emoji {
  font-size: 2rem;
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}

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

.rpt-event-activation {
  font-weight: 700;
  font-size: 0.95rem;
}

.rpt-event-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.rpt-event-stats {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}

.rpt-event-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 64px;
}

.rpt-event-val {
  font-weight: 700;
  font-size: 1rem;
}

.rpt-event-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.rpt-event-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-left: 4px;
}

.rpt-delta {
  font-weight: 700;
  font-size: 1rem;
}

.rpt-delta--up   { color: var(--green); }
.rpt-delta--down { color: var(--accent); }

@media (max-width: 900px) {
  .rpt-kpi-row     { grid-template-columns: repeat(3, 1fr); }
  .rpt-tenant-row  { grid-template-columns: 1fr; }
  .rpt-event-stats { gap: 12px; }
}

@media (max-width: 600px) {
  .rpt-kpi-row    { grid-template-columns: repeat(2, 1fr); }
  .rpt-event-stats { display: none; }
}
