:root {
  --sp-primary: #1a3c5e;
  --sp-primary-light: #234e7a;
  --sp-accent: #e67e22;
  --sp-accent-hover: #d35400;
  --sp-green: #27ae60;
  --sp-sidebar-w: 240px;
  --sp-body-bg: #f0f2f5;
  --sp-card-shadow: 0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
}

/* ──────────────────────────────
   GLOBAL
────────────────────────────── */
body { font-family: 'Inter', system-ui, sans-serif; background: var(--sp-body-bg); }

/* ──────────────────────────────
   LANDING PAGE
────────────────────────────── */
.lp-navbar {
  background: var(--sp-primary);
  padding: 14px 0;
}
.lp-navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: -.5px;
}
.lp-navbar .navbar-brand span { color: var(--sp-accent); }

.hero {
  background: linear-gradient(135deg, var(--sp-primary) 0%, #0d2137 100%);
  padding: 100px 0 80px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(230,126,34,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}
.hero h1 span { color: var(--sp-accent); }
.hero p.lead { color: rgba(255,255,255,.78); font-size: 1.15rem; }
.hero .badge-pill {
  background: rgba(230,126,34,.2);
  color: var(--sp-accent);
  border: 1px solid rgba(230,126,34,.4);
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 12px;
  display: inline-block;
  margin-bottom: 16px;
}
.btn-accent {
  background: var(--sp-accent);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 8px;
  transition: background .2s;
}
.btn-accent:hover { background: var(--sp-accent-hover); color: #fff; }
.btn-outline-light-sp {
  border: 1.5px solid rgba(255,255,255,.4);
  color: #fff;
  background: transparent;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 8px;
  transition: all .2s;
}
.btn-outline-light-sp:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Hero mockup */
.hero-mockup {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
}
.hero-mockup .mock-bar {
  background: #f1f3f5;
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
}
.mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-bar .dot-r { background: #ff5f56; }
.mock-bar .dot-y { background: #ffbd2e; }
.mock-bar .dot-g { background: #27c93f; }
.mock-bar .url-bar {
  flex: 1;
  background: #fff;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: .72rem;
  color: #888;
  margin-left: 8px;
}

/* Stats section */
.stats-strip {
  background: var(--sp-primary);
  color: #fff;
  padding: 48px 0;
}
.stat-item { text-align: center; }
.stat-item .number { font-size: 2.4rem; font-weight: 800; color: var(--sp-accent); }
.stat-item .label { font-size: .85rem; color: rgba(255,255,255,.65); margin-top: 4px; }

/* Features */
.feature-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  height: 100%;
  box-shadow: var(--sp-card-shadow);
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.1); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-icon.blue { background: #e8f4fd; color: #1a6fc4; }
.feature-icon.orange { background: #fef0e6; color: var(--sp-accent); }
.feature-icon.green { background: #e8f8f0; color: var(--sp-green); }
.feature-icon.purple { background: #f0ebf8; color: #7c3aed; }
.feature-icon.teal { background: #e0f7f4; color: #0d9488; }
.feature-icon.red { background: #fde8e8; color: #dc2626; }
.feature-card h5 { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.feature-card p { font-size: .88rem; color: #6b7280; margin: 0; }

/* Pricing */
.pricing-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--sp-card-shadow);
  position: relative;
  border: 2px solid transparent;
  transition: border-color .2s;
}
.pricing-card.featured {
  border-color: var(--sp-accent);
}
.pricing-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--sp-accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 50px;
}
.pricing-card .plan-name { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; }
.pricing-card .price { font-size: 2.4rem; font-weight: 800; color: var(--sp-primary); line-height: 1; margin: 8px 0 4px; }
.pricing-card .price span { font-size: 1rem; font-weight: 400; color: #9ca3af; }
.pricing-card .price-desc { font-size: .82rem; color: #9ca3af; margin-bottom: 20px; }
.pricing-feature { font-size: .88rem; color: #374151; padding: 5px 0; border-bottom: 1px solid #f3f4f6; display: flex; gap: 8px; align-items: center; }
.pricing-feature .bi { color: var(--sp-green); font-size: .9rem; }
.pricing-feature.dim { color: #9ca3af; }
.pricing-feature.dim .bi { color: #d1d5db; }

/* Steps */
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--sp-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Testimonial */
.testimonial-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--sp-card-shadow);
}
.testimonial-card .quote { font-size: .95rem; color: #374151; font-style: italic; margin-bottom: 16px; }
.testimonial-card .author { font-weight: 700; font-size: .88rem; }
.testimonial-card .org { font-size: .82rem; color: #6b7280; }

/* Footer */
.lp-footer { background: #0d2137; color: rgba(255,255,255,.6); padding: 48px 0 24px; }
.lp-footer .footer-brand { font-weight: 700; font-size: 1.2rem; color: #fff; }
.lp-footer .footer-brand span { color: var(--sp-accent); }
.lp-footer h6 { color: #fff; font-weight: 600; margin-bottom: 12px; }
.lp-footer a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .88rem; display: block; margin-bottom: 6px; }
.lp-footer a:hover { color: #fff; }
.lp-footer .border-top { border-color: rgba(255,255,255,.1) !important; }

/* ──────────────────────────────
   APP LAYOUT (SIDEBAR)
────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sp-sidebar-w);
  background: var(--sp-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: -.3px;
}
.sidebar-brand span { color: var(--sp-accent); }
.sidebar-broadcaster {
  padding: 12px 20px;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-broadcaster strong { color: rgba(255,255,255,.85); display: block; font-size: .88rem; text-transform: none; letter-spacing: 0; }
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-section { padding: 12px 20px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.35); }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .9rem;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.sidebar-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: var(--sp-accent); font-weight: 500; }
.sidebar-link .bi { font-size: 1.05rem; opacity: .8; }
.sidebar-link .badge-count {
  margin-left: auto;
  background: var(--sp-accent);
  color: #fff;
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: 50px;
  font-weight: 600;
}
.sidebar-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 12px 0;
}

.app-main {
  margin-left: var(--sp-sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-topbar .page-title { font-weight: 700; font-size: 1.1rem; color: var(--sp-primary); margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--sp-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .85rem;
}

.app-content { padding: 28px; flex: 1; }

/* KPI cards */
.kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: var(--sp-card-shadow);
}
.kpi-card .kpi-label { font-size: .8rem; color: #6b7280; text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.kpi-card .kpi-value { font-size: 2rem; font-weight: 800; color: var(--sp-primary); line-height: 1.1; margin: 6px 0 4px; }
.kpi-card .kpi-delta { font-size: .82rem; }
.kpi-card .kpi-delta.up { color: var(--sp-green); }
.kpi-card .kpi-delta.down { color: #ef4444; }
.kpi-card .kpi-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

/* Generic card */
.sp-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--sp-card-shadow);
  overflow: hidden;
}
.sp-card .sp-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sp-card .sp-card-header h6 { margin: 0; font-weight: 700; font-size: .95rem; color: var(--sp-primary); }
.sp-card .sp-card-body { padding: 20px; }

/* Status badges */
.badge-status { font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 50px; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-draft { background: #f3f4f6; color: #6b7280; }
.badge-closed { background: #fee2e2; color: #991b1b; }
.badge-scheduled { background: #e0e7ff; color: #3730a3; }
.badge-panel { background: #ede9fe; color: #5b21b6; }
.badge-newsletter { background: #e0f2fe; color: #0369a1; }

/* Table */
.sp-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; color: #9ca3af; font-weight: 600; border-bottom: 1px solid #f3f4f6; padding: 10px 16px; }
.sp-table td { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid #f9fafb; font-size: .9rem; }
.sp-table tr:last-child td { border-bottom: none; }
.sp-table tr:hover td { background: #f9fafb; }

/* Survey builder */
.question-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.question-card:hover { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(147,197,253,.15); }
.question-card .drag-handle { cursor: grab; color: #9ca3af; }
.question-card .q-number {
  width: 24px; height: 24px;
  background: var(--sp-primary);
  color: #fff;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.add-question-btn {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  color: #6b7280;
  cursor: pointer;
  transition: all .2s;
  font-size: .9rem;
}
.add-question-btn:hover { border-color: var(--sp-accent); color: var(--sp-accent); background: #fef9f5; }

/* Newsletter composer */
.nl-composer { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; height: calc(100vh - 140px); }
.nl-panel { background: #fff; border-radius: 12px; box-shadow: var(--sp-card-shadow); display: flex; flex-direction: column; overflow: hidden; }
.nl-panel-header { padding: 14px 20px; border-bottom: 1px solid #f3f4f6; font-weight: 700; font-size: .9rem; color: var(--sp-primary); display: flex; align-items: center; gap: 8px; }
.nl-panel-body { flex: 1; overflow-y: auto; padding: 20px; }
.nl-preview-email { max-width: 540px; margin: 0 auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.nl-preview-header { background: var(--sp-primary); padding: 20px; text-align: center; }
.nl-preview-body { padding: 28px 24px; }
.nl-preview-footer { background: #f9fafb; padding: 16px 24px; text-align: center; font-size: .78rem; color: #9ca3af; border-top: 1px solid #f3f4f6; }

/* Login page */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0d2137 0%, var(--sp-primary) 100%); }
.login-card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.login-logo { font-size: 1.5rem; font-weight: 800; color: var(--sp-primary); text-align: center; margin-bottom: 8px; }
.login-logo span { color: var(--sp-accent); }

/* Mediabank */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.media-item { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--sp-card-shadow); cursor: pointer; transition: transform .15s; }
.media-item:hover { transform: scale(1.02); }
.media-item .media-thumb { height: 110px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 2rem; }
.media-item .media-info { padding: 8px 10px; }
.media-item .media-name { font-size: .78rem; font-weight: 600; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item .media-meta { font-size: .7rem; color: #9ca3af; }

/* Misc */
.section-title { font-size: 1.8rem; font-weight: 800; color: var(--sp-primary); }
.section-sub { color: #6b7280; margin-top: 8px; }
.text-accent { color: var(--sp-accent) !important; }
.bg-primary-sp { background: var(--sp-primary) !important; }
