/* ============================================
   ConvertIQ v2 – Design System
   Typography, colors, buttons, borders
   ============================================ */

:root {
  /* Brand — single source of truth. active_company_brand() / user theme
     override these via :root, and every gradient/border/focus now derives
     from them (incl. rgba via --ci-magenta-rgb), so no hardcoded magenta leaks. */
  --ci-magenta: #E6007A;
  --ci-magenta2: #FF2AA1;
  --ci-magenta-dark: #c60069;
  --ci-magenta-rgb: 230, 0, 122;
  --ci-magenta-tint: rgba(var(--ci-magenta-rgb), 0.12);
  --ci-magenta-border: rgba(var(--ci-magenta-rgb), 0.35);

  /* Pastels – soothing palette that pairs with the brand colour */
  --ci-pastel-blush: var(--ci-magenta-tint);
  --ci-pastel-lavender: var(--ci-pastel-blush);
  --ci-pastel-sky: #f0f4ff;
  --ci-pastel-sage: #f4f6f3;
  --ci-pastel-peach: #fff8f3;
  --ci-pastel-mint: #f0f9f7;

  /* Neutrals */
  --ci-dark: #111111;
  --ci-white: #ffffff;
  --ci-gray-50: #f9fafb;
  --ci-gray-100: #f3f4f6;
  --ci-gray-200: #e5e7eb;
  --ci-gray-300: #d1d5db;
  --ci-gray-500: #6b7280;
  --ci-gray-600: #4b5563;
  --ci-gray-700: #374151;
  --ci-gray-800: #1f2937;
  --ci-gray-900: #111827;

  /* Semantic – softer backgrounds */
  --ci-text: var(--ci-gray-800);
  --ci-text-secondary: var(--ci-gray-600);
  --ci-text-muted: var(--ci-gray-500);
  --ci-border: var(--ci-gray-200);
  --ci-border-light: var(--ci-gray-100);
  --ci-bg-body: #ffffff;
  --ci-bg-card: #ffffff;
  --ci-bg-soft: var(--ci-pastel-blush);
  --ci-danger: #b91c1c;
  --ci-danger-hover: #991b1b;

  /* Typography */
  --ci-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ci-font-size-base: 0.9375rem;
  --ci-line-height: 1.5;
  --ci-page-title-size: 1.5rem;
  --ci-heading5-size: 1.0625rem;

  /* Spacing & shape */
  --ci-radius: 8px;
  --ci-radius-lg: 12px;
  --ci-radius-xl: 16px;
  --ci-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --ci-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --ci-shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* ------------------------------------------
   Base
   ------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--ci-font);
  font-size: var(--ci-font-size-base);
  line-height: var(--ci-line-height);
  color: var(--ci-text);
  background: var(--ci-bg-body);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------
   Typography
   ------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ci-font);
  color: var(--ci-text);
}

.page-title {
  font-weight: 800;
  font-size: var(--ci-page-title-size);
  letter-spacing: -0.02em;
  color: var(--ci-text);
}

h5.fw-bold,
.card-kpi h5.fw-bold {
  font-size: var(--ci-heading5-size);
  font-weight: 700;
  color: var(--ci-text);
}

.muted {
  color: var(--ci-text-muted) !important;
}

.text-muted {
  color: var(--ci-text-muted) !important;
}

.small.muted,
.muted.small {
  color: var(--ci-text-muted) !important;
  font-size: 0.8125rem;
}

/* ------------------------------------------
   Buttons
   ------------------------------------------ */
.btn {
  font-family: var(--ci-font);
  font-weight: 600;
  border-radius: var(--ci-radius);
  border-width: 1px;
}

.btn-ci {
  background: var(--ci-magenta);
  border-color: var(--ci-magenta);
  color: var(--ci-white);
  font-weight: 600;
}

.btn-ci:hover {
  background: var(--ci-magenta-dark);
  border-color: var(--ci-magenta-dark);
  color: var(--ci-white);
}

.btn-outline-secondary {
  color: var(--ci-text-secondary);
  border-color: var(--ci-border);
  background: var(--ci-white);
}

.btn-outline-secondary:hover {
  color: var(--ci-gray-700);
  border-color: var(--ci-gray-300);
  background: var(--ci-pastel-lavender);
}

.btn-outline-danger {
  color: var(--ci-danger);
  border-color: var(--ci-border);
  background: var(--ci-white);
}

.btn-outline-danger:hover {
  color: var(--ci-white);
  border-color: var(--ci-danger);
  background: var(--ci-danger-hover);
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
}

/* ------------------------------------------
   Cards
   ------------------------------------------ */
.card {
  font-family: var(--ci-font);
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius-lg);
  background: var(--ci-bg-card);
  box-shadow: var(--ci-shadow-sm);
}

.card-kpi {
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius-lg);
  box-shadow: var(--ci-shadow);
  background: var(--ci-bg-card);
}

.card.bg-soft,
.card-kpi.bg-soft {
  background: var(--ci-pastel-blush);
  border-color: rgba(var(--ci-magenta-rgb), 0.08);
}

.card-kpi .muted.small,
.card-kpi .small.muted {
  color: var(--ci-text-muted);
}

/* Card headers – grey background, theme magenta title (consistent across app) */
.card-header.bg-pastel-blush,
.card-header.bg-pastel-lavender,
.card-header.bg-pastel-sky,
.card-header.bg-pastel-mint {
  background: var(--ci-gray-100) !important;
}
.card-header.bg-light h5,
.card-header.bg-light h6,
.card-header.bg-pastel-blush h5,
.card-header.bg-pastel-blush h6,
.card-header.bg-pastel-lavender h5,
.card-header.bg-pastel-lavender h6,
.card-header.bg-pastel-sky h5,
.card-header.bg-pastel-sky h6,
.card-header.bg-pastel-mint h5,
.card-header.bg-pastel-mint h6 {
  color: var(--ci-magenta) !important;
}

/* ------------------------------------------
   Tables
   ------------------------------------------ */
.table {
  color: var(--ci-text);
}

.table thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ci-text-secondary);
  text-transform: none;
  border-bottom: 1px solid var(--ci-border);
  padding: 0.75rem;
}

.table tbody td {
  padding: 0.75rem;
  border-color: var(--ci-border-light);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: var(--ci-pastel-blush);
}

.table-bordered {
  border-color: var(--ci-border);
}

.table-bordered th,
.table-bordered td {
  border-color: var(--ci-border);
}

/* ------------------------------------------
   Forms
   ------------------------------------------ */
.form-label {
  font-weight: 600;
  color: var(--ci-text);
  font-size: 0.875rem;
}

.form-control,
.form-select {
  font-family: var(--ci-font);
  font-size: var(--ci-font-size-base);
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  color: var(--ci-text);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ci-magenta);
  box-shadow: 0 0 0 3px var(--ci-pastel-blush);
}

.form-control::placeholder {
  color: var(--ci-text-muted);
}

/* Multi-select checkboxes – magenta tick when checked */
.ci-multiselect .form-check {
  margin-bottom: 0.25rem;
}
.ci-check-magenta.form-check-input:checked,
.form-check-input.ci-check-magenta:checked {
  background-color: var(--ci-magenta);
  border-color: var(--ci-magenta);
}
.ci-check-magenta.form-check-input:focus,
.form-check-input.ci-check-magenta:focus {
  box-shadow: 0 0 0 0.2rem var(--ci-pastel-blush);
}

/* Targeting step – sections and select actions */
.ci-targeting-section {
  border-color: var(--ci-border) !important;
  background: var(--ci-white) !important;
  box-shadow: var(--ci-shadow-sm);
}
.ci-targeting-section .form-label { font-size: 0.875rem; }
.ci-select-actions { font-size: 0.8125rem; }
.ci-select-actions .btn-link { text-decoration: none; color: var(--ci-text-secondary); }
.ci-select-actions .btn-link:hover { color: var(--ci-magenta); }

/* Section header */
.ci-section-head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}
.ci-section-head .ci-section-icon {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--ci-radius);
  background: var(--ci-magenta-tint);
  color: var(--ci-magenta);
  font-size: 1.0625rem;
}
.ci-section-head .ci-section-title { font-weight: 600; font-size: 0.95rem; color: var(--ci-text); line-height: 1.2; }
.ci-section-head .ci-section-sub { font-size: 0.8125rem; color: var(--ci-text-muted); line-height: 1.3; margin-top: 1px; }

/* Targeting mode selector cards */
.ci-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.875rem;
}
.ci-mode-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin: 0;
  padding: 1rem 1.125rem;
  border: 1.5px solid var(--ci-border);
  border-radius: var(--ci-radius-lg);
  background: var(--ci-white);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ci-mode-card:hover { border-color: var(--ci-magenta-border); box-shadow: var(--ci-shadow-sm); }
.ci-mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.ci-mode-card:has(input:checked) {
  border-color: var(--ci-magenta);
  background: var(--ci-magenta-tint);
}
.ci-mode-card .ci-mode-icon {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--ci-radius);
  background: var(--ci-gray-100);
  color: var(--ci-text-secondary);
  font-size: 1.3rem;
  transition: background .15s ease, color .15s ease;
}
.ci-mode-card:has(input:checked) .ci-mode-icon { background: var(--ci-magenta); color: #fff; }
.ci-mode-card .ci-mode-title { font-weight: 600; font-size: 0.9375rem; color: var(--ci-text); line-height: 1.25; }
.ci-mode-card .ci-mode-desc { font-size: 0.8125rem; color: var(--ci-text-muted); margin-top: 0.1875rem; line-height: 1.4; }
.ci-mode-card .ci-mode-check {
  position: absolute; top: 0.75rem; right: 0.875rem;
  color: var(--ci-magenta); font-size: 1.15rem;
  opacity: 0; transform: scale(0.8);
  transition: opacity .15s ease, transform .15s ease;
}
.ci-mode-card:has(input:checked) .ci-mode-check { opacity: 1; transform: scale(1); }

/* Segmented toggle (e.g. API / SFTP) */
.ci-segment {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--ci-gray-100);
  border-radius: var(--ci-radius);
}
.ci-segment label {
  margin: 0;
  padding: 0.4375rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ci-text-secondary);
  border-radius: calc(var(--ci-radius) - 2px);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.ci-segment label:hover { color: var(--ci-text); }
.ci-segment input { position: absolute; opacity: 0; pointer-events: none; }
.ci-segment label:has(input:checked) {
  background: var(--ci-white);
  color: var(--ci-magenta);
  box-shadow: var(--ci-shadow-sm);
}

/* Inline info / hint box */
.ci-hint-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  background: var(--ci-gray-50);
  border: 1px solid var(--ci-border-light);
  border-radius: var(--ci-radius);
  font-size: 0.8125rem;
  color: var(--ci-text-secondary);
}

/* Tom Select overrides – match app design */
.ts-wrapper .ts-control {
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  padding: 0.35rem 0.5rem;
  min-height: 38px;
}
.ts-wrapper.focus .ts-control,
.ts-wrapper .ts-control:focus-within {
  border-color: var(--ci-magenta);
  box-shadow: 0 0 0 3px var(--ci-pastel-blush);
}
.ts-wrapper .ts-dropdown {
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  box-shadow: var(--ci-shadow);
}
.ts-wrapper .ts-dropdown .option.active,
.ts-wrapper .ts-dropdown .option.selected {
  background: var(--ci-pastel-blush);
  color: var(--ci-magenta);
}
.ts-wrapper .ts-dropdown .option:hover {
  background: var(--ci-pastel-lavender);
}
.ts-wrapper .ts-dropdown .dropdown-input {
  border-bottom: 1px solid var(--ci-border);
  padding: 0.4rem 0.5rem;
}
.ts-wrapper .ts-dropdown .dropdown-input input {
  font-size: 0.875rem;
  padding: 0.2rem 0;
}
.ts-wrapper.multi .ts-control > div {
  background: var(--ci-pastel-blush);
  border: 1px solid rgba(var(--ci-magenta-rgb), 0.18);
  color: var(--ci-magenta);
  border-radius: 4px;
}
.ts-wrapper.multi .ts-control > div .remove {
  border-left-color: rgba(var(--ci-magenta-rgb), 0.4);
}
.ts-wrapper.multi .ts-control > div .remove:hover {
  background: var(--ci-magenta);
  color: #fff;
}

/* Dropdown option checkboxes */
.ts-option-with-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ts-wrapper .ts-dropdown .option .ci-option-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ci-gray-300);
  border-radius: 3px;
  background: var(--ci-white);
  transition: border-color 0.15s, background 0.15s;
}
.ts-wrapper .ts-dropdown .option.selected .ci-option-checkbox {
  background: var(--ci-magenta);
  border-color: var(--ci-magenta);
}
.ts-wrapper .ts-dropdown .option.selected .ci-option-checkbox::after {
  content: '\2713';
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}
.ts-wrapper .ts-dropdown .option .ts-option-text {
  flex: 1;
}

/* ------------------------------------------
   Badges & Alerts
   ------------------------------------------ */
.badge-ci {
  background: var(--ci-pastel-blush);
  color: var(--ci-magenta);
  border: 1px solid rgba(var(--ci-magenta-rgb), 0.2);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.alert {
  border-radius: var(--ci-radius);
  border: 1px solid transparent;
  font-family: var(--ci-font);
}

.alert-light.border {
  border-color: var(--ci-border) !important;
  background: var(--ci-pastel-sky);
  color: var(--ci-text);
}

/* ------------------------------------------
   Nav Tabs
   ------------------------------------------ */
.nav-tabs {
  border-bottom: 1px solid var(--ci-border);
}

.nav-tabs .nav-link {
  font-weight: 600;
  color: var(--ci-text-secondary);
  border: 1px solid transparent;
  border-radius: var(--ci-radius) var(--ci-radius) 0 0;
  padding: 0.5rem 1rem;
}

.nav-tabs .nav-link:hover {
  color: var(--ci-magenta);
  border-color: var(--ci-border);
  background: var(--ci-pastel-blush);
}

.nav-tabs .nav-link.active {
  color: var(--ci-magenta);
  background: var(--ci-white);
  border-color: var(--ci-border) var(--ci-border) var(--ci-bg-card);
}

/* Nav Pills – theme magenta for active (e.g. Inquiry Management tabs) */
.nav-pills .nav-link {
  font-weight: 600;
  color: var(--ci-text-secondary);
  background: var(--ci-white);
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  padding: 0.5rem 1rem;
}
.nav-pills .nav-link:hover {
  color: var(--ci-magenta);
  border-color: var(--ci-magenta-border);
  background: var(--ci-pastel-blush);
}
.nav-pills .nav-link.active {
  color: var(--ci-white);
  background: var(--ci-magenta);
  border-color: var(--ci-magenta);
}

/* ------------------------------------------
   Sidebar
   ------------------------------------------ */
.ci-sidebar-col {
  position: relative;
  z-index: 20;
}

.sidebar {
  min-height: 100vh;
  background: var(--ci-white);
  border-right: 1px solid var(--ci-border);
  font-family: var(--ci-font);
  position: relative;
  z-index: 10;
}

.sidebar .brand,
.sidebar .text-white {
  color: var(--ci-text) !important;
}

.sidebar .text-secondary {
  color: var(--ci-text-muted) !important;
}

.sidebar .nav-link {
  color: var(--ci-gray-700);
  border-radius: var(--ci-radius);
  border: 1px solid transparent;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  z-index: 1;
  display: block;
}

.sidebar .nav-link:hover {
  color: var(--ci-magenta);
  background: var(--ci-pastel-blush);
  border-color: rgba(var(--ci-magenta-rgb), 0.12);
}

.sidebar .nav-link.active {
  color: var(--ci-magenta);
  background: var(--ci-pastel-blush);
  border-color: rgba(var(--ci-magenta-rgb), 0.2);
  font-weight: 600;
}

.sidebar .sidebar-tip {
  background: var(--ci-pastel-lavender);
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
}

.sidebar .sidebar-tip .text-white {
  color: var(--ci-text) !important;
}

.sidebar .border-secondary {
  border-color: var(--ci-border) !important;
}

.sidebar .text-danger-emphasis {
  color: var(--ci-danger) !important;
}

.sidebar .nav-item.border-top {
  border-top: 1px solid var(--ci-border) !important;
}

.sidebar .ci-logo-sm {
  width: 40px;
  height: 40px;
  font-weight: 800;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ConvertIQ text logo – IQ in magenta */
.ci-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.ci-brand-iq {
  color: var(--ci-magenta);
  font-weight: 800;
}
.ci-brand-hero {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ci-brand-hero .ci-brand-iq {
  color: var(--ci-magenta);
}

/* Logo in sidebar – above nav */
.sidebar-logo {
  flex-shrink: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ci-border);
}
.sidebar .sidebar-logo .ci-brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  display: inline-block;
}
.sidebar .sidebar-logo .ci-brand-iq {
  color: var(--ci-magenta);
  font-weight: 800;
}
.sidebar-logo-img {
  display: block;
  height: 52px;
  width: auto;
  object-fit: contain;
}
.ci-logo-hero-img {
  max-width: 300px;
  height: auto;
  display: inline-block;
}

/* ------------------------------------------
   Topbar / Navbar
   ------------------------------------------ */
.navbar.ci-gradient,
.topbar.ci-gradient {
  color: var(--ci-white);
  font-family: var(--ci-font);
}

/* White topbar – main app header */
.navbar.ci-topbar-white {
  background: var(--ci-white);
  border-bottom: 1px solid var(--ci-border);
  font-family: var(--ci-font);
  box-shadow: var(--ci-shadow-sm);
}

.ci-topbar-white .ci-topbar-title {
  color: var(--ci-text);
}

.ci-topbar-white .ci-topbar-subtitle {
  color: var(--ci-text-muted);
}

.ci-gradient {
  background: linear-gradient(135deg, var(--ci-magenta) 0%, var(--ci-magenta2) 45%, #e8a8c8 100%);
}

/* ------------------------------------------
   Main content area
   ------------------------------------------ */
.ci-main {
  min-height: 100vh;
  background: var(--ci-bg-body);
}

.ci-footer {
  background: var(--ci-white);
  border-top-color: var(--ci-border) !important;
  font-family: var(--ci-font);
}

/* ------------------------------------------
   Login / standalone auth pages
   ------------------------------------------ */
.ci-login-page {
  min-height: 100vh;
  background: var(--ci-white);
  font-family: var(--ci-font);
}

.ci-login-page .ci-gradient {
  background: linear-gradient(135deg, var(--ci-magenta) 0%, var(--ci-magenta2) 45%, #e8a8c8 100%);
}

.ci-landing-page .text-secondary {
  color: rgba(255, 255, 255, 0.75) !important;
}

.ci-logo-lg {
  width: 64px;
  height: 64px;
  font-weight: 800;
  font-size: 1.375rem;
  flex-shrink: 0;
}

/* ------------------------------------------
   Stepper (campaign wizard)
   ------------------------------------------ */
.stepper {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.step {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--ci-border);
  background: var(--ci-pastel-lavender);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ci-text-secondary);
}

.step.active {
  border-color: var(--ci-magenta-border);
  background: var(--ci-pastel-blush);
  color: var(--ci-magenta);
}

/* Modern single-line progressive stepper (campaign wizard) */
.ci-steps {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  gap: 0;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.ci-steps__item {
  position: relative;
  flex: 1 1 0;
  min-width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* progress connector to the previous node */
.ci-steps__item::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: var(--ci-border, #e2e4ea);
  border-radius: 3px;
}
.ci-steps__item:first-child::before { display: none; }
.ci-steps__item.done::before,
.ci-steps__item.active::before { background: var(--ci-magenta, #c71585); }
.ci-steps__dot {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: #fff;
  border: 2px solid var(--ci-border, #e2e4ea);
  color: #9aa3b2;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ci-steps__item.done .ci-steps__dot {
  background: var(--ci-magenta, #c71585);
  border-color: var(--ci-magenta, #c71585);
  color: #fff;
}
.ci-steps__item.active .ci-steps__dot {
  background: var(--ci-magenta, #c71585);
  border-color: var(--ci-magenta, #c71585);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--ci-magenta-rgb), 0.18);
  transform: scale(1.08);
}
.ci-steps__label {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: #8a93a6;
  max-width: 92px;
  padding: 0 4px;
}
.ci-steps__item.done .ci-steps__label { color: #4b5563; }
.ci-steps__item.active .ci-steps__label { color: var(--ci-magenta, #c71585); }

/* ------------------------------------------
   Utilities
   ------------------------------------------ */
.bg-light {
  background-color: var(--ci-gray-100) !important;
}
.right-summary {
  position: sticky;
  top: 16px;
}

/* Market filters card header – neutral background instead of bright pink */
.ci-market-filters-header {
  background: var(--ci-gray-100);
}

/* Progress bar (market, etc.) */
.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--ci-gray-200);
}

.progress-bar.ci-gradient {
  border-radius: 999px;
}

/* Links in content */
a:not(.btn):not(.nav-link) {
  color: var(--ci-magenta);
  font-weight: 500;
}

a:not(.btn):not(.nav-link):hover {
  color: var(--ci-magenta-dark);
}

/* Dropdown in topbar */
.dropdown-menu {
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  box-shadow: var(--ci-shadow);
}

.dropdown-item {
  font-family: var(--ci-font);
  font-size: var(--ci-font-size-base);
}

.dropdown-item-text {
  color: var(--ci-text-muted);
}

.ci-pre-wrap {
  white-space: pre-wrap;
}

/* Invitation landing page – consistent container, soothing UI */
.ci-landing-page {
  min-height: 100vh;
  background: var(--ci-bg-body);
  font-family: var(--ci-font);
  color: var(--ci-text);
}

/* Single content width for entire landing (no big/small container jump) */
.ci-landing-container {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.ci-landing-page .ci-landing-nav {
  background: var(--ci-white);
  border-bottom: 1px solid var(--ci-border);
  color: var(--ci-text);
}

.ci-landing-page .ci-landing-nav .ci-landing-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ci-landing-page .ci-landing-nav .ci-brand-iq {
  color: var(--ci-magenta);
}

.ci-landing-page .ci-landing-nav .text-white,
.ci-landing-page .ci-landing-nav .opacity-75 {
  color: var(--ci-text-muted) !important;
  opacity: 1;
}

/* Section backgrounds – alternating soft/white for soothing flow */
.ci-landing-page .ci-landing-section-hero {
  background: linear-gradient(180deg, var(--ci-pastel-blush) 0%, var(--ci-white) 100%);
  border-bottom: 1px solid var(--ci-border);
}

.ci-landing-page .ci-landing-section-alt {
  background: var(--ci-pastel-sky);
}

.ci-landing-page .ci-landing-section-white {
  background: var(--ci-white);
  border-bottom: 1px solid var(--ci-border);
}

.ci-landing-page .ci-landing-section-soft {
  background: var(--ci-pastel-blush);
}

.ci-landing-page .card {
  background: var(--ci-white);
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius-lg);
  box-shadow: var(--ci-shadow-sm);
}

/* Offer card – invitation ID + buy: consistent, calming */
.ci-landing-page .ci-landing-offer-card {
  background: var(--ci-white);
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius-lg);
  box-shadow: var(--ci-shadow);
  padding: 1.75rem 2rem;
}

.ci-landing-page .ci-landing-offer-card .form-control,
.ci-landing-page .ci-landing-offer-card .form-control:focus {
  border-radius: var(--ci-radius);
  border-color: var(--ci-border);
}

.ci-landing-page .ci-landing-offer-card .form-control:focus {
  box-shadow: 0 0 0 3px var(--ci-magenta-tint);
}

.ci-landing-page .muted {
  color: var(--ci-text-muted);
}

.ci-landing-page .text-secondary {
  color: var(--ci-text-muted) !important;
}

.ci-landing-card {
  background: var(--ci-pastel-blush);
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius-lg);
  padding: 1.25rem 1.5rem;
}

/* Alerts on landing – soft, consistent */
.ci-landing-page .alert-success {
  background: var(--ci-pastel-mint);
  border-color: var(--ci-border);
  color: var(--ci-text);
}

.ci-landing-page .alert-danger {
  background: var(--ci-pastel-peach);
  border-color: var(--ci-border);
  color: var(--ci-text);
}

/* Footer – soft dark, not harsh */
.ci-landing-page .ci-landing-footer {
  background: var(--ci-gray-800);
  border-top: 1px solid var(--ci-border);
}

/* Pastel utilities – use for soft sections */
.bg-pastel-blush { background-color: var(--ci-pastel-blush) !important; }
.bg-pastel-lavender { background-color: var(--ci-pastel-lavender) !important; }
.bg-pastel-sky { background-color: var(--ci-pastel-sky) !important; }
.bg-pastel-sage { background-color: var(--ci-pastel-sage) !important; }
.bg-pastel-peach { background-color: var(--ci-pastel-peach) !important; }
.bg-pastel-mint { background-color: var(--ci-pastel-mint) !important; }

/* KPI / insight cards – label + value (used on Dashboard, Market, Analytics, Campaign detail) */
.ci-insight-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ci-text-muted); }
.ci-insight-value { font-size: 1.25rem; font-weight: 700; color: var(--ci-text); }
.text-ci-magenta { color: var(--ci-magenta); }

/* Calling – Assigned prospects list: selected uses theme (not blue) */
.ci-calling-prospects .list-group-item {
  color: var(--ci-text);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.ci-calling-prospects .list-group-item:hover {
  background-color: var(--ci-pastel-lavender);
  color: var(--ci-text);
}
.ci-calling-prospects .list-group-item.ci-prospect-selected {
  background-color: var(--ci-pastel-blush);
  color: var(--ci-text);
  border-left: 3px solid var(--ci-magenta) !important;
  font-weight: 600;
}
.ci-calling-prospects .list-group-item.ci-prospect-selected .text-muted {
  color: var(--ci-text-secondary) !important;
}

/* Campaign detail – Content tab: segment list active = light pink (not blue) */
.ci-segment-item.active {
  background-color: var(--ci-pastel-blush) !important;
  border-color: var(--ci-magenta-border) !important;
  color: var(--ci-text) !important;
}
.ci-segment-item.active .badge-ci {
  color: var(--ci-magenta) !important;
}

/* ------------------------------------------
   Dashboard – matches app theme (grey headers, magenta accents)
   ------------------------------------------ */
.ci-dash-page {
  background: var(--ci-bg-body);
  padding: 1rem;
  padding-bottom: 1.5rem;
  border-radius: var(--ci-radius);
}

.ci-dash-title {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ci-border);
  margin-bottom: 1rem;
}

.ci-dash-card {
  background: var(--ci-white) !important;
  border: 1px solid var(--ci-gray-200) !important;
  border-radius: var(--ci-radius);
  box-shadow: var(--ci-shadow-sm);
}
.ci-dash-card .ci-insight-label {
  color: var(--ci-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ci-dash-card .ci-insight-value {
  color: var(--ci-magenta);
  font-size: 1.5rem;
  font-weight: 700;
}

.ci-dash-card-header {
  background: var(--ci-gray-100) !important;
  border-bottom: 1px solid var(--ci-gray-200) !important;
  font-weight: 600;
  font-size: 0.9375rem;
}
.ci-dash-card-header h5 {
  color: var(--ci-magenta) !important;
}

.ci-dash-table thead th {
  background: var(--ci-gray-100);
  color: var(--ci-gray-700);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--ci-gray-200);
  padding: 0.75rem 1rem;
}
.ci-dash-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ci-gray-100);
}
.ci-dash-table tbody tr:hover {
  background: var(--ci-gray-50);
}
.ci-dash-table tbody tr:nth-child(even) {
  background: var(--ci-white);
}
.ci-dash-table tbody tr:nth-child(even):hover {
  background: var(--ci-gray-50);
}

.ci-dash-filters {
  background: var(--ci-white) !important;
  border: 1px solid var(--ci-gray-200) !important;
  border-radius: var(--ci-radius);
  box-shadow: var(--ci-shadow-sm);
}
.ci-dash-filters .card-header h5 {
  color: var(--ci-magenta) !important;
}
