/* ==========================================================================
   SalesPulse Admin Styles
   ========================================================================== */

:root {
  /* WPMatcha Brand Palette */
  --sp-primary: #607d66;
  --sp-primary-hover: #3e5242;
  --sp-primary-light: #dce3dd;
  --sp-success: #10b981;
  --sp-warning: #f59e0b;
  --sp-danger: #ef4444;
  --sp-info: #3b82f6;
  --sp-dark: #2c3b30;
  --sp-text: #333333;
  --sp-text-light: #6b7c70;
  --sp-border: #e2e8e4;
  --sp-bg: #f2f5f3;
  --sp-white: #ffffff;
  --sp-radius: 12px;
  --sp-radius-sm: 8px;
  --sp-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --sp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --sp-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --sp-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.salespulse-admin-wrap {

  margin: 20px 40px 0px 0px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Material Symbols sizing */
.salespulse-admin-wrap .material-symbols-outlined {
  font-size: 20px;
  vertical-align: middle;
  line-height: 1;
}

/* ── Admin Layout: Sidebar + Main ───────────────── */
.sp-admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 600px;
  border-radius: var(--sp-radius);
  overflow: hidden;
  border: 1px solid var(--sp-border);
  background: var(--sp-bg);
}

/* ── Dark Sidebar ───────────────────────────────── */
.sp-sidebar {
  background: #1e2327;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.sp-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
}

.sp-sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--sp-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-sidebar-logo-icon .material-symbols-outlined {
  font-size: 20px;
  color: #fff;
}

.sp-sidebar-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.sp-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
  flex: 1;
}

.sp-sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.sp-sidebar-nav-item .material-symbols-outlined {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
}

.sp-sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.sp-sidebar-nav-item:hover .material-symbols-outlined {
  color: rgba(255, 255, 255, 0.7);
}

.sp-sidebar-nav-item.active {
  background: rgba(96, 125, 102, 0.1);
  border-left: 4px solid var(--sp-primary);
  color: #fff;
  font-weight: 600;
}

.sp-sidebar-nav-item.active .material-symbols-outlined {
  color: var(--sp-primary);
}

/* Plan badge */
.sp-sidebar-plan {
  margin: auto 14px 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.sp-plan-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.sp-plan-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 8px;
}

.sp-plan-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.sp-plan-bar-fill {
  width: 30%;
  height: 100%;
  background: var(--sp-primary);
  border-radius: 4px;
}

/* ── Main Content ───────────────────────────────── */
.sp-main-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Bar */
.sp-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 24px;
  background: var(--sp-white);
  border-bottom: 1px solid var(--sp-border);
}

.sp-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sp-header-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-header-toggle-label {
  font-size: 13px;
  color: var(--sp-text-light);
  font-weight: 500;
}

.sp-live-indicator {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sp-live-indicator.active {
  display: inline-flex;
}

.sp-live-indicator::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  animation: sp-pulse 1.5s ease-in-out infinite;
}

@keyframes sp-pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.sp-header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sp-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-header-avatar .material-symbols-outlined {
  color: var(--sp-text-light);
  font-size: 20px;
}

/* Global Toggle */
.salespulse-global-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--sp-text);
}

.salespulse-global-toggle input[type="checkbox"] {
  display: none;
}

.salespulse-toggle-slider {
  position: relative;
  width: 48px;
  height: 26px;
  background: #cbd5e1;
  border-radius: 26px;
  transition: background 0.3s;
}

.salespulse-toggle-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}

.salespulse-global-toggle input:checked+.salespulse-toggle-slider {
  background: var(--sp-success);
}

.salespulse-global-toggle input:checked+.salespulse-toggle-slider::after {
  transform: translateX(22px);
}

/* Tab Content */
.salespulse-tab-content {
  display: none;
  background: var(--sp-bg);
  padding: 28px;
  min-height: 400px;
  flex: 1;
}

.salespulse-tab-content.active {
  display: block;
}

/* ==========================================================================
   Dashboard — Stat Cards (Stitch Design)
   ========================================================================== */
.sp-stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.sp-stat-card {
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 22px 24px;
  transition: box-shadow var(--sp-transition), transform var(--sp-transition);
}

.sp-stat-card:hover {
  box-shadow: var(--sp-shadow-md);
  transform: translateY(-2px);
}

.sp-stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sp-stat-card-label {
  font-size: 13px;
  color: var(--sp-text-light);
  margin: 0;
  font-weight: 500;
}

.sp-stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-stat-card-icon .material-symbols-outlined {
  font-size: 22px;
  color: #fff;
}

.sp-icon-primary {
  background: linear-gradient(135deg, #607d66, #4a6350);
}

.sp-icon-blue {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.sp-icon-amber {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.sp-icon-emerald {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.sp-stat-card-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--sp-dark);
  line-height: 1.2;
  margin: 0 0 6px;
}

.sp-stat-card-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.sp-stat-card-trend .material-symbols-outlined {
  font-size: 16px;
}

.sp-trend-up {
  color: var(--sp-success);
}

.sp-trend-down {
  color: var(--sp-danger);
}

.sp-trend-neutral {
  color: var(--sp-text-light);
}

/* ==========================================================================
   Notifications Tab — Stitch 2-Column Layout
   ========================================================================== */
.sp-notif-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

/* ── Notification List (Left) ─────────────────────────────── */
.sp-notif-main {
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  overflow: hidden;
}

.sp-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--sp-border);
}

.sp-notif-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--sp-dark);
}

.sp-notif-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
}

.sp-search-box .material-symbols-outlined {
  font-size: 18px;
  color: var(--sp-text-light);
}

.sp-search-box input {
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  width: 160px;
  font-family: inherit;
  padding: 0;
  margin: 0;
  min-height: auto;
  line-height: normal;
}

.sp-search-box input::placeholder {
  color: var(--sp-text-light);
}

.sp-btn-add-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--sp-primary);
  color: var(--sp-white);
  border: none;
  border-radius: var(--sp-radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--sp-transition);
}

.sp-btn-add-new:hover {
  background: var(--sp-primary-hover);
}

.sp-btn-add-new .material-symbols-outlined {
  font-size: 18px;
}

/* Column Headers */
.sp-notif-columns {
  display: grid;
  grid-template-columns: 80px 1fr 110px 140px 80px;
  gap: 8px;
  padding: 12px 24px;
  background: var(--sp-bg);
  border-bottom: 1px solid var(--sp-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--sp-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#sp-notifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
}

/* Notification Row */
.sp-notif-row {
  display: grid;
  grid-template-columns: 80px 1fr 110px 140px 80px;
  gap: 8px;
  align-items: center;
  padding: 16px 20px;
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  transition: box-shadow var(--sp-transition);
}

.sp-notif-row:hover {
  box-shadow: var(--sp-shadow-md);
}

/* Status cell */
.sp-notif-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-notif-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sp-notif-dot.active {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.sp-notif-dot.inactive {
  background: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(203, 213, 225, 0.2);
}

.sp-notif-toggle {
  position: relative;
  width: 36px;
  height: 20px;
}

.sp-notif-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sp-notif-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #cbd5e1;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.2s;
}

.sp-notif-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}

.sp-notif-toggle input:checked+.sp-notif-toggle-slider {
  background: var(--sp-primary);
}

.sp-notif-toggle input:checked+.sp-notif-toggle-slider::before {
  transform: translateX(16px);
}

.sp-notif-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--sp-border);
}

.sp-notif-avatar .material-symbols-outlined {
  font-size: 18px;
  color: #fff;
}

.sp-avatar-green {
  background: rgba(96, 125, 102, 0.1);
}

.sp-avatar-green .material-symbols-outlined {
  color: var(--sp-primary);
}

.sp-avatar-orange {
  background: #fff7ed;
}

.sp-avatar-orange .material-symbols-outlined {
  color: #f97316;
}

.sp-avatar-blue {
  background: #eff6ff;
}

.sp-avatar-blue .material-symbols-outlined {
  color: #3b82f6;
}

.sp-avatar-amber {
  background: #fffbeb;
}

.sp-avatar-amber .material-symbols-outlined {
  color: #f59e0b;
}

.sp-avatar-purple {
  background: #f5f3ff;
}

.sp-avatar-purple .material-symbols-outlined {
  color: #8b5cf6;
}

.sp-avatar-teal {
  background: #f0fdfa;
}

.sp-avatar-teal .material-symbols-outlined {
  color: #14b8a6;
}

/* Details cell */
.sp-notif-details {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sp-notif-text {
  min-width: 0;
}

.sp-notif-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--sp-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-notif-desc {
  font-size: 12px;
  color: var(--sp-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Type badge */
.sp-notif-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sp-type-purchase {
  background: var(--sp-primary-light);
  color: var(--sp-primary-hover);
}

.sp-type-signup {
  background: #d1fae5;
  color: #059669;
}

.sp-type-review {
  background: #fef3c7;
  color: #d97706;
}

.sp-type-visitor_count {
  background: #ffe4cc;
  color: #c2410c;
}

.sp-type-on_fire {
  background: #ffedd5;
  color: #ea580c;
}

.sp-type-countdown {
  background: #e0f2fe;
  color: #0369a1;
}

.sp-type-custom {
  background: #ede9fe;
  color: #6d28d9;
}

.sp-type-download_stats {
  background: #dbeafe;
  color: #2563eb;
}

.sp-type-notification_bar {
  background: #dbeafe;
  color: #2563eb;
}

/* ── Modal Type Badge Grid ─────────────────────────── */
.sp-modal-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.sp-modal-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--sp-border);
  background: var(--sp-white);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
  position: relative;
}

.sp-modal-type-badge:hover {
  border-color: var(--sp-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.sp-modal-type-badge.selected {
  border-color: var(--sp-primary);
  background: var(--sp-primary-light);
  box-shadow: 0 0 0 2px rgba(96, 125, 102, 0.18);
}

.sp-badge-icon {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.sp-badge-label {
  font-weight: 600;
  color: var(--sp-text);
  white-space: nowrap;
  line-height: 1;
}

.sp-badge-pro {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
  margin-left: 2px;
}

.sp-pro-badge-type {
  opacity: 0.55;
  cursor: not-allowed;
}

.sp-pro-badge-type:hover {
  border-color: var(--sp-border);
  box-shadow: none;
}

/* Inline PRO badge inside template card names */
.sp-pro-badge-inline {
  display: inline-block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1px 4px;
  border-radius: 3px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  vertical-align: middle;
  margin-left: 3px;
  line-height: 1.4;
}

/* Unavailable type — requires missing plugin */
.sp-type-unavailable {
  opacity: 0.45;
  cursor: not-allowed;
  position: relative;
}

.sp-type-unavailable:hover {
  border-color: var(--sp-border);
  box-shadow: none;
}

.sp-badge-req {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* Sidebar unavailable cards */
.sp-sidebar-type-card.sp-type-unavailable {
  opacity: 0.45;
  cursor: not-allowed;
}

.sp-sidebar-type-card.sp-type-unavailable:hover {
  border-color: var(--sp-border);
  background: var(--sp-white);
}

/* ── Icon Picker ──────────────────────────────────── */
.sp-icon-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-icon-preview {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--sp-border);
  background: var(--sp-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sp-icon-preview .material-symbols-outlined {
  font-size: 24px;
  color: var(--sp-primary);
}

.sp-icon-preview img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
}

.sp-icon-change-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--sp-text);
  font-family: inherit;
  transition: all 0.15s;
}

.sp-icon-change-btn:hover {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
}

.sp-icon-change-btn .sp-badge-pro {
  font-size: 8px;
  padding: 1px 5px;
}

.sp-icon-reset-btn {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--sp-text-light);
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  text-decoration: underline;
}

.sp-icon-reset-btn:hover {
  color: var(--sp-danger);
}

.sp-icon-picker-panel {
  margin-top: 10px;
  padding: 12px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  border-radius: 8px;
}

.sp-icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin-bottom: 10px;
  max-height: 180px;
  overflow-y: auto;
}

.sp-icon-picker-item {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: var(--sp-white);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.sp-icon-picker-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--sp-text-light);
}

.sp-icon-picker-item:hover {
  border-color: var(--sp-primary);
  background: var(--sp-primary-light);
}

.sp-icon-picker-item:hover .material-symbols-outlined {
  color: var(--sp-primary);
}

.sp-icon-picker-item.selected {
  border-color: var(--sp-primary);
  background: var(--sp-primary-light);
  box-shadow: 0 0 0 2px rgba(96, 125, 102, 0.18);
}

.sp-icon-picker-item.selected .material-symbols-outlined {
  color: var(--sp-primary);
}

.sp-icon-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--sp-white);
  border: 1px dashed var(--sp-border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--sp-text-light);
  font-family: inherit;
  transition: all 0.15s;
  width: 100%;
  justify-content: center;
}

.sp-icon-upload-btn:hover {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
  background: var(--sp-primary-light);
}

.sp-icon-upload-btn .material-symbols-outlined {
  font-size: 16px;
}

/* Engagement cell */
.sp-notif-engagement {
  font-size: 13px;
  color: var(--sp-text);
}

.sp-engagement-ctr {
  font-weight: 700;
  font-size: 14px;
  color: var(--sp-dark);
}

.sp-engagement-ctr-label {
  font-weight: 600;
  font-size: 11px;
  color: var(--sp-text-light);
  margin-right: 4px;
}

.sp-engagement-detail {
  font-size: 11px;
  color: var(--sp-text-light);
  margin-top: 2px;
}

/* Actions cell */
.sp-notif-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.sp-notif-row:hover .sp-notif-actions {
  opacity: 1;
}

.sp-notif-action-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}

.sp-notif-action-btn .material-symbols-outlined {
  font-size: 18px;
  color: var(--sp-text-light);
}

.sp-notif-action-btn:hover {
  background: var(--sp-bg);
}

.sp-notif-action-btn:hover .material-symbols-outlined {
  color: var(--sp-primary);
}

.sp-notif-action-btn.sp-action-delete:hover .material-symbols-outlined {
  color: var(--sp-danger);
}

/* Pagination */
.sp-notif-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--sp-border);
}

.sp-pagination-info {
  font-size: 13px;
  color: var(--sp-text-light);
}

.sp-pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sp-page-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  background: var(--sp-white);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  color: var(--sp-text);
  font-family: inherit;
}

.sp-page-btn:hover {
  border-color: var(--sp-primary);
  color: var(--sp-primary);
}

.sp-page-btn.active {
  background: var(--sp-primary);
  border-color: var(--sp-primary);
  color: #fff;
}

.sp-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.sp-page-btn .material-symbols-outlined {
  font-size: 16px;
}

/* ── Quick Builder Sidebar (Right) ────────────────────────── */
.sp-notif-sidebar {
  position: sticky;
  top: 50px;
}

.sp-sidebar-builder {
  background: #F2F1ED;
  border-left: 1px solid var(--sp-border);
  border-radius: 0;
  padding: 20px;
}

.sp-sidebar-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sp-sidebar-builder-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--sp-dark);
}

.sp-builder-step {
  font-size: 10px;
  font-weight: 600;
  color: var(--sp-text-light);
  letter-spacing: 0.5px;
}

.sp-sidebar-builder-desc {
  font-size: 13px;
  color: var(--sp-text-light);
  margin: 0 0 16px;
}

.sp-sidebar-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.sp-sidebar-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  background: var(--sp-white);
  border: 2px solid var(--sp-border);
  border-radius: var(--sp-radius);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--sp-text);
}

.sp-sidebar-type-card .material-symbols-outlined {
  font-size: 24px;
  color: var(--sp-text-light);
  transition: color 0.2s;
}

.sp-sidebar-type-card:hover {
  border-color: var(--sp-primary);
  background: var(--sp-primary-light);
}

.sp-sidebar-type-card:hover .material-symbols-outlined {
  color: var(--sp-primary);
}

.sp-sidebar-type-card.selected {
  border-color: var(--sp-primary);
  background: var(--sp-primary-light);
  color: var(--sp-primary-hover);
}

.sp-sidebar-type-card.selected .material-symbols-outlined {
  color: var(--sp-primary);
}

.sp-sidebar-tip {
  background: var(--sp-bg);
  border-radius: var(--sp-radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.sp-sidebar-tip h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-dark);
}

.sp-sidebar-tip p {
  margin: 0;
  font-size: 12px;
  color: var(--sp-text-light);
  line-height: 1.5;
}

.sp-sidebar-continue-btn {
  width: 100%;
  padding: 12px;
  background: var(--sp-danger);
  color: #fff;
  border: none;
  border-radius: var(--sp-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.sp-sidebar-continue-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.sp-sidebar-continue-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Modal */
.salespulse-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.salespulse-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.salespulse-modal-content {
  position: relative;
  background: var(--sp-white);
  border-radius: var(--sp-radius);
  width: 1070px;
  max-width: 96vw;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--sp-shadow-lg);
  animation: spModalSlideIn 0.2s ease;
  display: flex;
  flex-direction: column;
}

@keyframes spModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.salespulse-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--sp-border);
}

.salespulse-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.salespulse-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--sp-text-light);
  padding: 0;
  line-height: 1;
}

.salespulse-modal-body {
  padding: 0;
  flex: 1;
  overflow: hidden;
  display: flex;
  min-height: 0;
}

/* Two-column modal layout */
.sp-modal-layout {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
}

.sp-modal-form-col {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  min-height: 0;
}

/* Sticky live preview column */
.sp-modal-preview-col {
  width: 260px;
  min-width: 240px;
  background: #1a1f2e;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--sp-border);
  border-radius: 0 var(--sp-radius) 0 0;
  position: relative;
  overflow: hidden;
}

.sp-modal-preview-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sp-modal-preview-header .material-symbols-outlined {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.4);
}

/* Browser chrome mock */
.sp-modal-preview-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.sp-modal-preview-browser {
  background: #2a3047;
  border-radius: 8px 8px 0 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sp-mpb-dots {
  display: flex;
  gap: 4px;
}

.sp-mpb-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.sp-mpb-dots span:nth-child(1) {
  background: #ff5f57;
}

.sp-mpb-dots span:nth-child(2) {
  background: #febc2e;
}

.sp-mpb-dots span:nth-child(3) {
  background: #28c840;
}

.sp-mpb-bar {
  flex: 1;
  background: #1a1f2e;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-family: monospace;
}

/* Preview area — positions popup in correct corner */
.sp-modal-preview-area {
  flex: 1;
  background: #242a3d;
  border-radius: 0 0 8px 8px;
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

/* Live preview popup positioned by corner */
.sp-modal-preview-area .sp-live-preview {
  position: absolute;
  max-width: 220px;
  font-size: 11px;
  pointer-events: none;
  transition: all 0.25s ease;
  margin: 10px;
}

.sp-preview-bottom-left .sp-live-preview {
  bottom: 0;
  left: 0;
}

.sp-preview-bottom-right .sp-live-preview {
  bottom: 0;
  right: 0;
}

.sp-preview-top-left .sp-live-preview {
  top: 0;
  left: 0;
}

.sp-preview-top-right .sp-live-preview {
  top: 0;
  right: 0;
}

/* Default position */
.sp-modal-preview-area:not([class*=sp-preview-]) .sp-live-preview {
  bottom: 0;
  left: 0;
}

/* Make sp-notification render inside admin */
.sp-modal-preview-area .sp-notification {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.sp-modal-preview-area .sp-notification-image {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sp-modal-preview-area .sp-notification-emoji .material-symbols-outlined {
  font-size: 24px;
  color: #4a7c59;
}

.sp-modal-preview-area .sp-notification-content {
  flex: 1;
  min-width: 0;
}

.sp-modal-preview-area .sp-notification-message {
  font-size: 11px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.4;
  word-break: break-word;
}

.sp-modal-preview-area .sp-notification-time {
  font-size: 9px;
  color: #94a3b8;
  margin-top: 2px;
}

.sp-modal-preview-area .sp-notification-verified {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 8px;
  color: #94a3b8;
}

.sp-modal-preview-position-hint {
  text-align: center;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  padding: 6px 0 0;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

/* ── Per-template preview styles ─────────────────────── */
/* Classic: clean white with left green accent border */
.sp-modal-preview-area .sp-template-classic {
  background: #fff;
  border-left: 3px solid #4a7c59;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

/* Minimal: no border, ultra-light */
.sp-modal-preview-area .sp-template-minimal {
  background: #fff;
  border: none;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.sp-modal-preview-area .sp-template-minimal .sp-notification-message {
  font-weight: 400;
}

/* Bold: dark background, white text */
.sp-modal-preview-area .sp-template-bold {
  background: #1e293b;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.sp-modal-preview-area .sp-template-bold .sp-notification-message {
  color: #fff;
}

.sp-modal-preview-area .sp-template-bold .sp-notification-time {
  color: rgba(255, 255, 255, 0.5);
}

.sp-modal-preview-area .sp-template-bold .sp-notification-verified {
  color: rgba(255, 255, 255, 0.3);
}

.sp-modal-preview-area .sp-template-bold .sp-notification-emoji .material-symbols-outlined {
  color: #6ee7b7;
}

/* Rounded: very pill-like corners */
.sp-modal-preview-area .sp-template-rounded {
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Glass: frosted glass effect */
.sp-modal-preview-area .sp-template-glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sp-modal-preview-area .sp-template-glass .sp-notification-message {
  color: #fff;
}

.sp-modal-preview-area .sp-template-glass .sp-notification-time {
  color: rgba(255, 255, 255, 0.6);
}

.sp-modal-preview-area .sp-template-glass .sp-notification-verified {
  color: rgba(255, 255, 255, 0.4);
}

/* Gradient: purple-to-blue gradient */
.sp-modal-preview-area .sp-template-gradient {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.sp-modal-preview-area .sp-template-gradient .sp-notification-message {
  color: #fff;
  font-weight: 600;
}

.sp-modal-preview-area .sp-template-gradient .sp-notification-time {
  color: rgba(255, 255, 255, 0.7);
}

.sp-modal-preview-area .sp-template-gradient .sp-notification-verified {
  color: rgba(255, 255, 255, 0.4);
}

.sp-modal-preview-area .sp-template-gradient .sp-notification-emoji .material-symbols-outlined {
  color: #fde68a;
}

/* Dark Modern: dark with subtle gradient */
.sp-modal-preview-area .sp-template-dark-modern {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.sp-modal-preview-area .sp-template-dark-modern .sp-notification-message {
  color: #e2e8f0;
}

.sp-modal-preview-area .sp-template-dark-modern .sp-notification-time {
  color: rgba(255, 255, 255, 0.4);
}

.sp-modal-preview-area .sp-template-dark-modern .sp-notification-verified {
  color: rgba(255, 255, 255, 0.25);
}

.sp-modal-preview-area .sp-template-dark-modern .sp-notification-emoji .material-symbols-outlined {
  color: #38bdf8;
}

/* Compact: smaller and tighter */
.sp-modal-preview-area .sp-template-compact {
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.sp-modal-preview-area .sp-template-compact .sp-notification-message {
  font-size: 10px;
}

.sp-modal-preview-area .sp-template-compact .sp-notification-time {
  font-size: 8px;
}

.sp-modal-preview-area .sp-template-compact .sp-notification-image {
  width: 24px;
  height: 24px;
}

.sp-modal-preview-area .sp-template-compact .sp-notification-emoji .material-symbols-outlined {
  font-size: 16px;
}

/* Neon */
.sp-modal-preview-area .sp-template-neon {
  background: #0a0a0a;
  border: 1px solid #ff00ff;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.4);
}

.sp-modal-preview-area .sp-template-neon .sp-notification-message {
  color: #ff00ff;
}

.sp-modal-preview-area .sp-template-neon .sp-notification-time {
  color: rgba(255, 0, 255, 0.5);
}

/* ── PRO Template Preview Styles ─────────────────── */

/* Neumorphism: soft shadows, light grey extruded look */
.sp-modal-preview-area .sp-template-neumorphism {
  background: #e0e5ec;
  border-radius: 14px;
  border: none;
  box-shadow: 5px 5px 10px #b8bec7, -5px -5px 10px #ffffff;
}

.sp-modal-preview-area .sp-template-neumorphism .sp-notification-message {
  color: #4a5568;
}

.sp-modal-preview-area .sp-template-neumorphism .sp-notification-time {
  color: #94a3b8;
}

/* Card 3D: white with thick bottom shadow for depth */
.sp-modal-preview-area .sp-template-card-3d {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 0 #cbd5e1;
  transform: perspective(400px) rotateX(2deg);
}

.sp-modal-preview-area .sp-template-card-3d .sp-notification-message {
  color: #1e293b;
}

/* Floating Bubble: very rounded, colourful gradient */
.sp-modal-preview-area .sp-template-floating-bubble {
  background: linear-gradient(135deg, #f0f9ff, #fae8ff);
  border-radius: 50px;
  border: 1.5px solid #d8b4fe;
  box-shadow: 0 8px 24px rgba(167, 139, 250, 0.3);
  padding: 8px 18px;
}

.sp-modal-preview-area .sp-template-floating-bubble .sp-notification-message {
  color: #6d28d9;
}

.sp-modal-preview-area .sp-template-floating-bubble .sp-notification-time {
  color: #a78bfa;
}

/* Aurora: animated rainbow gradient top-border */
.sp-modal-preview-area .sp-template-aurora {
  background: #0f0f1a;
  border-radius: 12px;
  border-top: 3px solid;
  border-image: linear-gradient(90deg, #ff0080, #7928ca, #00cfff) 1;
  box-shadow: 0 0 20px rgba(121, 40, 202, 0.3);
}

.sp-modal-preview-area .sp-template-aurora .sp-notification-message {
  color: #e2e8f0;
}

.sp-modal-preview-area .sp-template-aurora .sp-notification-time {
  color: rgba(255, 255, 255, 0.4);
}

.sp-modal-preview-area .sp-template-aurora .sp-notification-emoji .material-symbols-outlined {
  color: #7928ca;
}

/* Spotlight: dark with a glowing centre highlight */
.sp-modal-preview-area .sp-template-spotlight {
  background: radial-gradient(circle at 30% 50%, #1e293b 0%, #0f172a 70%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
}

.sp-modal-preview-area .sp-template-spotlight .sp-notification-message {
  color: #f1f5f9;
}

.sp-modal-preview-area .sp-template-spotlight .sp-notification-time {
  color: rgba(255, 255, 255, 0.35);
}

.sp-modal-preview-area .sp-template-spotlight .sp-notification-emoji .material-symbols-outlined {
  color: #3b82f6;
}

/* Retro: cream background, chunky border */
.sp-modal-preview-area .sp-template-retro {
  background: #fef9c3;
  border: 3px solid #1a1a1a;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #1a1a1a;
}

.sp-modal-preview-area .sp-template-retro .sp-notification-message {
  color: #1a1a1a;
  font-family: monospace;
}

.sp-modal-preview-area .sp-template-retro .sp-notification-time {
  color: #713f12;
}

/* Frosted: stronger glass / translucent */
.sp-modal-preview-area .sp-template-frosted {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.sp-modal-preview-area .sp-template-frosted .sp-notification-message {
  color: #fff;
}

.sp-modal-preview-area .sp-template-frosted .sp-notification-time {
  color: rgba(255, 255, 255, 0.55);
}

/* Elegant: black with gold accent */
.sp-modal-preview-area .sp-template-elegant {
  background: #0a0a0a;
  border: 1px solid #c9a84c;
  border-radius: 2px;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
}

.sp-modal-preview-area .sp-template-elegant .sp-notification-message {
  color: #f5f0e0;
  font-style: italic;
}

.sp-modal-preview-area .sp-template-elegant .sp-notification-time {
  color: #c9a84c;
}

.sp-modal-preview-area .sp-template-elegant .sp-notification-emoji .material-symbols-outlined {
  color: #c9a84c;
}

/* Brutalist: bold black border, high contrast */
.sp-modal-preview-area .sp-template-brutalist {
  background: #fff;
  border: 3px solid #000;
  border-radius: 0;
  box-shadow: 5px 5px 0 #000;
}

.sp-modal-preview-area .sp-template-brutalist .sp-notification-message {
  color: #000;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 10px;
}

.sp-modal-preview-area .sp-template-brutalist .sp-notification-time {
  color: #555;
}

/* Pastel: soft pink/mint rounded card */
.sp-modal-preview-area .sp-template-pastel {
  background: linear-gradient(135deg, #fce7f3, #d1fae5);
  border-radius: 16px;
  border: 1.5px solid #fbcfe8;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.12);
}

.sp-modal-preview-area .sp-template-pastel .sp-notification-message {
  color: #831843;
}

.sp-modal-preview-area .sp-template-pastel .sp-notification-time {
  color: #ec4899;
}

/* Material: white card with elevation shadow, green header bar */
.sp-modal-preview-area .sp-template-material {
  background: #fff;
  border-radius: 4px;
  border-top: 4px solid #00897b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.12);
}

.sp-modal-preview-area .sp-template-material .sp-notification-message {
  color: rgba(0, 0, 0, 0.87);
}

.sp-modal-preview-area .sp-template-material .sp-notification-time {
  color: rgba(0, 0, 0, 0.54);
}

.sp-modal-preview-area .sp-template-material .sp-notification-emoji .material-symbols-outlined {
  color: #00897b;
}

/* Cyberpunk: dark, yellow/cyan neon accents */
.sp-modal-preview-area .sp-template-cyberpunk {
  background: #0d0d0d;
  border: 1px solid #f0e040;
  border-left: 3px solid #00ffe0;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(240, 224, 64, 0.3), inset 0 0 20px rgba(0, 255, 224, 0.04);
}

.sp-modal-preview-area .sp-template-cyberpunk .sp-notification-message {
  color: #f0e040;
  font-family: monospace;
}

.sp-modal-preview-area .sp-template-cyberpunk .sp-notification-time {
  color: #00ffe0;
}

/* Toast: simple notification bar style (no image area, text-only) */
.sp-modal-preview-area .sp-template-toast {
  background: #1e293b;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.sp-modal-preview-area .sp-template-toast .sp-notification-message {
  color: #f8fafc;
  font-size: 11px;
}

.sp-modal-preview-area .sp-template-toast .sp-notification-time {
  color: rgba(255, 255, 255, 0.45);
}

/* Animated Border: white card with rainbow border */
.sp-modal-preview-area .sp-template-animated-border {
  background: #fff;
  border-radius: 12px;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 2px #667eea, 0 4px 20px rgba(102, 126, 234, 0.25);
}

.sp-modal-preview-area .sp-template-animated-border .sp-notification-message {
  color: #1e293b;
}

.sp-modal-preview-area .sp-template-animated-border .sp-notification-emoji .material-symbols-outlined {
  color: #667eea;
}




.salespulse-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--sp-border);
  background: var(--sp-bg);
  border-radius: 0 0 var(--sp-radius) var(--sp-radius);
  flex-shrink: 0;
}

/* Form Fields */
.salespulse-field {
  margin-bottom: 18px;
}

.salespulse-field label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--sp-dark);
  margin-bottom: 6px;
}

.salespulse-field input[type="text"],
.salespulse-field input[type="url"],
.salespulse-field input[type="number"],
.salespulse-field select,
.salespulse-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--sp-text);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.salespulse-field input:focus,
.salespulse-field select:focus,
.salespulse-field textarea:focus {
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 2px rgba(96, 125, 102, 0.2);
  outline: none;
}

.salespulse-field .description {
  font-size: 12px;
  color: var(--sp-text-light);
  margin-top: 4px;
}

.salespulse-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Merge Tags */
.salespulse-merge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.salespulse-merge-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--sp-primary-light);
  color: var(--sp-primary-hover);
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  cursor: pointer;
  transition: background var(--sp-transition);
  border: none;
}

.salespulse-merge-tag:hover {
  background: #c9d5cc;
}

/* Device Visibility Toggles */
.sp-device-toggles {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.sp-device-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  cursor: pointer;
  transition: border-color var(--sp-transition), background var(--sp-transition);
  font-size: 13px;
}

.sp-device-toggle:hover {
  border-color: var(--sp-accent);
  background: rgba(96, 125, 102, 0.06);
}

.sp-device-toggle input[type="checkbox"]:checked+.sp-device-icon {
  opacity: 1;
}

.sp-device-icon {
  font-size: 18px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

/* Page Type Toggles */
.sp-page-type-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin-top: 6px;
}

.sp-page-type-toggles label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

/* Consent textarea */
#sp-consent-message {
  width: 100%;
  resize: vertical;
  min-height: 60px;
  padding: 8px 12px;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  font-size: 13px;
  font-family: inherit;
}

/* Templates Grid */
.salespulse-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

/* ── Templates Tab – Showcase ── */
.sp-tpl-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
}

.sp-tpl-section-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.sp-tpl-section-header .description {
  margin: 0;
  color: var(--sp-text-light);
  font-size: 13px;
}

.sp-tpl-count {
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-text-light);
  white-space: nowrap;
}

/* Popup template showcase grid */
.sp-tpl-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.sp-tpl-showcase-card {
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}

.sp-tpl-showcase-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

.sp-tpl-showcase-preview {
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  background: var(--sp-bg);
  border-bottom: 1px solid var(--sp-border);
}

.sp-tpl-showcase-preview .sp-preview-popup {
  max-width: 100%;
  font-size: 12px;
}

.sp-tpl-showcase-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.sp-tpl-showcase-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--sp-dark);
}

.sp-tpl-showcase-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 10px;
  border-radius: 12px;
}

.sp-tpl-badge-free {
  background: #e8f5e9;
  color: #2e7d32;
}

.sp-tpl-badge-pro {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  color: #e65100;
}

/* Bar template showcase grid – 2 columns, full-width previews */
.sp-tpl-bar-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.sp-tpl-bar-card {
  overflow: hidden;
}

.sp-tpl-bar-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--sp-radius-sm) var(--sp-radius-sm) 0 0;
  min-height: 48px;
}

.sp-bar-prev-msg {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-bar-prev-cta {
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Countdown preview boxes */
.sp-bar-prev-countdown {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.sp-bar-prev-cd-box {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.sp-bar-prev-cd-box small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  opacity: .7;
}

/* Split duo preview */
.sp-bar-prev-split {
  display: flex;
  padding: 0 !important;
  gap: 0 !important;
}

.sp-bar-prev-split-left,
.sp-bar-prev-split-right {
  font-size: 12px;
  font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .sp-tpl-showcase-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .sp-tpl-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-tpl-bar-showcase-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .sp-tpl-showcase-grid {
    grid-template-columns: 1fr;
  }
}

.salespulse-template-preview {
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  padding: 20px;
}

.salespulse-template-preview h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

/* Template Preview Popups (admin preview) */
.sp-preview-popup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--sp-white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 340px;
}

.sp-popup-image {
  flex-shrink: 0;
}

.sp-popup-image-placeholder {
  width: 48px;
  height: 48px;
  background: var(--sp-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.sp-popup-message {
  font-size: 13px;
  font-weight: 500;
  color: var(--sp-dark);
  line-height: 1.4;
}

.sp-popup-time {
  font-size: 11px;
  color: var(--sp-text-light);
  margin-top: 2px;
}

.sp-popup-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--sp-text-light);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Bold Template */
.sp-template-bold {
  background: #1e1b4b;
  border-left: 4px solid var(--sp-primary);
}

.sp-template-bold .sp-popup-message {
  color: #e0e7ff;
}

.sp-template-bold .sp-popup-time {
  color: #818cf8;
}

.sp-template-bold .sp-popup-close {
  color: #818cf8;
}

.sp-template-bold .sp-popup-image-placeholder {
  background: #312e81;
}

/* Minimal Template */
.sp-template-minimal {
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--sp-white);
  border-left: 3px solid var(--sp-success);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Rounded Template */
.sp-template-rounded {
  border-radius: 50px;
  padding: 10px 20px 10px 10px;
}

.sp-template-rounded .sp-popup-image-placeholder {
  border-radius: 50%;
  width: 42px;
  height: 42px;
  background: #d1fae5;
}

/* Glass Template */
.sp-template-glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Settings Form */
.salespulse-settings-form {
  max-width: 800px;
}

.salespulse-settings-section {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--sp-border);
}

.salespulse-settings-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--sp-dark);
}

.salespulse-settings-actions {
  margin-top: 20px;
}

/* Toast */
.salespulse-toast {
  position: fixed;
  top: 40px;
  right: 20px;
  z-index: 100001;
  padding: 12px 24px;
  background: var(--sp-dark);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--sp-shadow-lg);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s;
  pointer-events: none;
}

.salespulse-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.salespulse-toast.success {
  background: var(--sp-success);
}

.salespulse-toast.error {
  background: var(--sp-danger);
}

/* Footer */
.salespulse-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--sp-white);
  border-top: 1px solid var(--sp-border);
  border-radius: 0 0 var(--sp-radius) var(--sp-radius);
  font-size: 13px;
  color: var(--sp-text-light);
}

.sp-footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sp-footer-brand {
  font-weight: 600;
  color: var(--sp-primary);
}

.sp-footer-sep {
  color: var(--sp-border);
}

.sp-footer-links {
  display: flex;
  gap: 20px;
}

.sp-footer-links a {
  color: var(--sp-text-light);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.sp-footer-links a:hover {
  color: var(--sp-primary);
}

/* Empty State */
.salespulse-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--sp-text-light);
}

.salespulse-empty-state .material-symbols-outlined {
  font-size: 48px;
  color: var(--sp-border);
  margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
  .sp-stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-setup-cta-illustration {
    display: none;
  }
}

@media (max-width: 782px) {
  .salespulse-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .salespulse-tabs {
    overflow-x: auto;
  }

  .salespulse-tab {
    white-space: nowrap;
    padding: 12px 16px;
    font-size: 13px;
  }

  .sp-stat-cards {
    grid-template-columns: 1fr;
  }

  .salespulse-field-row {
    grid-template-columns: 1fr;
  }

  .salespulse-templates-grid {
    grid-template-columns: 1fr;
  }

  .salespulse-notification-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sp-quick-builder-grid {
    grid-template-columns: 1fr;
  }

  .sp-quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .sp-dashboard-bottom {
    grid-template-columns: 1fr;
  }

  .sp-gopro-comparison th,
  .sp-gopro-comparison td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .salespulse-footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ==========================================================================
   v2.0 New Components
   ========================================================================== */

/* ── Search / Filter Bar ──────────────────────────────────── */
.sp-notifications-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.sp-search-box {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.sp-search-box input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  font-size: 14px;
  color: var(--sp-text);
  background: var(--sp-white);
  transition: border-color var(--sp-transition);
  box-sizing: border-box;
}

.sp-search-box input:focus {
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 2px rgba(96, 125, 102, 0.2);
  outline: none;
}

.sp-search-box .dashicons {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sp-text-light);
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.sp-filter-select {
  padding: 9px 12px;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  font-size: 14px;
  color: var(--sp-text);
  background: var(--sp-white);
  cursor: pointer;
}

/* ── Notification Inline Stats ────────────────────────────── */
.sp-notification-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--sp-text-light);
  margin-top: 4px;
}

.sp-notification-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sp-notification-stats .dashicons {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

/* ── Quick Builder Wizard ─────────────────────────────────── */
.sp-quick-builder-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-quick-builder-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.sp-quick-builder {
  position: relative;
  background: var(--sp-white);
  border-radius: var(--sp-radius);
  width: 800px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--sp-shadow-lg);
  animation: spModalSlideIn 0.3s ease;
}

.sp-quick-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--sp-border);
}

.sp-quick-builder-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--sp-dark);
}

.sp-quick-builder-header h2 span {
  font-weight: 400;
  font-size: 14px;
  color: var(--sp-text-light);
  margin-left: 8px;
}

.sp-quick-builder-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--sp-text-light);
  padding: 0;
  line-height: 1;
}

/* Steps indicator */
.sp-wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 28px;
  background: var(--sp-bg);
  border-bottom: 1px solid var(--sp-border);
}

.sp-wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sp-text-light);
  font-weight: 500;
}

.sp-wizard-step.active {
  color: var(--sp-primary-hover);
  font-weight: 600;
}

.sp-wizard-step.completed {
  color: var(--sp-success);
}

.sp-wizard-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--sp-border);
  color: var(--sp-text-light);
}

.sp-wizard-step.active .sp-wizard-step-number {
  background: var(--sp-primary);
  color: var(--sp-white);
}

.sp-wizard-step.completed .sp-wizard-step-number {
  background: var(--sp-success);
  color: var(--sp-white);
}

.sp-wizard-step-divider {
  flex: 1;
  height: 2px;
  background: var(--sp-border);
  margin: 0 12px;
}

.sp-wizard-step-divider.completed {
  background: var(--sp-success);
}

/* Wizard body */
.sp-quick-builder-body {
  padding: 28px;
}

.sp-quick-builder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sp-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--sp-bg);
  border: 2px solid var(--sp-border);
  border-radius: var(--sp-radius);
  cursor: pointer;
  transition: all var(--sp-transition);
  text-align: center;
}

.sp-type-card:hover {
  border-color: var(--sp-primary);
  background: var(--sp-primary-light);
  box-shadow: var(--sp-shadow-md);
  transform: translateY(-2px);
}

.sp-type-card.selected {
  border-color: var(--sp-primary);
  background: var(--sp-primary-light);
  box-shadow: 0 0 0 3px rgba(96, 125, 102, 0.15);
}

.sp-type-card-icon {
  font-size: 32px;
  line-height: 1;
}

.sp-type-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sp-dark);
}

.sp-type-card-desc {
  font-size: 12px;
  color: var(--sp-text-light);
  line-height: 1.4;
}

.sp-type-card .sp-pro-badge {
  font-size: 10px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Notification Bar type card accent */
.sp-type-card-bar {
  border: 2px dashed var(--sp-primary) !important;
  background: var(--sp-primary-light) !important;
}

.sp-type-card-bar.selected {
  border-style: solid !important;
}

/* Field Row (side-by-side fields) */
.salespulse-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Popup Template Preview Grid ───────────────────── */
.sp-popup-tpl-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 2fr 2fr;
  gap: 12px;
}

.sp-modal-tpl-grid .sp-popup-tpl-preview {
  gap: 6px;
  padding: 6px 8px;
}

.sp-modal-tpl-grid .sp-popup-tpl-msg {
  font-size: 9px;
}

.sp-modal-tpl-grid .sp-popup-tpl-avatar {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

.sp-modal-tpl-grid .sp-popup-tpl-name {
  font-size: 10px;
}

.sp-popup-tpl-card {
  cursor: pointer;
  border: 2px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  padding: 8px;
  transition: all var(--sp-transition);
  text-align: center;
}

.sp-popup-tpl-card:hover {
  border-color: var(--sp-primary);
  box-shadow: var(--sp-shadow);
}

.sp-popup-tpl-card.selected {
  border-color: var(--sp-primary);
  background: var(--sp-primary-light);
}

.sp-popup-tpl-name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--sp-text);
  margin-top: 6px;
}

/* Popup preview — toast shape */
.sp-popup-tpl-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  min-height: 44px;
}

.sp-popup-tpl-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f0fdf4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.sp-popup-tpl-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 2px;
}

.sp-popup-tpl-msg {
  font-weight: 600;
  font-size: 11px;
  color: var(--sp-text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-popup-tpl-time {
  font-size: 9px;
  color: var(--sp-text-light);
  line-height: 1;
}

/* ── Popup Template Theme Styles (Stitch-inspired) ── */

/* Classic — clean white card, subtle shadow */
.sp-popup-tpl-classic {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* Minimal — flat border, no shadow */
.sp-popup-tpl-minimal {
  background: #fff;
  border: 1px solid #e2e8e4;
  box-shadow: none;
  border-radius: 6px;
}

/* Bold — dark navy bg, blue accent bar */
.sp-popup-tpl-bold {
  background: #0f172a;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
}

.sp-popup-tpl-bold .sp-popup-tpl-msg {
  color: #f1f5f9;
}

.sp-popup-tpl-bold .sp-popup-tpl-time {
  color: #94a3b8;
}

.sp-popup-tpl-bold .sp-popup-tpl-avatar {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #334155;
}

/* Rounded — pill shape, soft pastel blue */
.sp-popup-tpl-rounded {
  border-radius: 50px;
  padding: 8px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.sp-popup-tpl-rounded .sp-popup-tpl-avatar {
  border-radius: 50%;
  background: #bfdbfe;
}

.sp-popup-tpl-rounded .sp-popup-tpl-time {
  color: #64748b;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Glass — frosted glass with colorful bg blurs */
.sp-popup-tpl-glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  position: relative;
}

.sp-popup-tpl-glass .sp-popup-tpl-avatar {
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Gradient — purple-to-blue gradient */
.sp-popup-tpl-gradient {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-radius: 8px;
}

.sp-popup-tpl-gradient .sp-popup-tpl-msg {
  color: #fff;
  font-weight: 600;
}

.sp-popup-tpl-gradient .sp-popup-tpl-time {
  color: #c7d2fe;
}

.sp-popup-tpl-gradient .sp-popup-tpl-avatar {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Dark Modern — charcoal, no left bar */
.sp-popup-tpl-dark-modern {
  background: #1e1e1e;
  border: 1px solid #374151;
  border-radius: 8px;
}

.sp-popup-tpl-dark-modern .sp-popup-tpl-msg {
  color: #e2e8e4;
}

.sp-popup-tpl-dark-modern .sp-popup-tpl-time {
  color: #64748b;
  font-family: monospace;
}

.sp-popup-tpl-dark-modern .sp-popup-tpl-avatar {
  background: #374151;
}

/* Compact — ultra small one-line */
.sp-popup-tpl-compact {
  padding: 5px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8e4;
  min-height: 28px;
}

.sp-popup-tpl-compact .sp-popup-tpl-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
}

.sp-popup-tpl-compact .sp-popup-tpl-msg {
  font-size: 9px;
}

.sp-popup-tpl-compact .sp-popup-tpl-time {
  display: inline;
  font-size: 8px;
  color: #94a3b8;
  margin-left: 4px;
}

/* Custom template preview */
.sp-popup-tpl-custom {
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0f9ff, #ecfdf5);
  border: 1.5px dashed #6ee7b7;
  min-height: 34px;
}

.sp-popup-tpl-custom .sp-popup-tpl-msg {
  font-size: 9px;
  color: #0f766e;
  font-weight: 600;
}

.sp-popup-tpl-custom .sp-popup-tpl-time {
  font-size: 8px;
  color: #6ee7b7;
}

/* ── PRO Popup Template Thumbnails ───────────────────── */
.sp-popup-tpl-neon {
  background: #0a0a0a;
  border: 1px solid #ff00ff;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(255, 0, 255, 0.5);
}

.sp-popup-tpl-neon .sp-popup-tpl-msg {
  color: #ff00ff;
}

.sp-popup-tpl-neumorphism {
  background: #e0e5ec;
  border: none;
  border-radius: 14px;
  box-shadow: 5px 5px 10px #b8bec7, -5px -5px 10px #ffffff;
}

.sp-popup-tpl-neumorphism .sp-popup-tpl-msg {
  color: #4a5568;
}

.sp-popup-tpl-card-3d {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 6px 0 #cbd5e1;
}

.sp-popup-tpl-card-3d .sp-popup-tpl-msg {
  color: #1e293b;
}

.sp-popup-tpl-floating-bubble {
  background: linear-gradient(135deg, #f0f9ff, #fae8ff);
  border: 1.5px solid #d8b4fe;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(167, 139, 250, 0.3);
  padding: 8px 18px;
}

.sp-popup-tpl-floating-bubble .sp-popup-tpl-msg {
  color: #6d28d9;
}

.sp-popup-tpl-aurora {
  background: #0f0f1a;
  border: 3px solid #7928ca;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(121, 40, 202, 0.4);
}

.sp-popup-tpl-aurora .sp-popup-tpl-msg {
  color: #e2e8f0;
}

.sp-popup-tpl-spotlight {
  background: radial-gradient(circle at 30% 50%, #1e293b 0%, #0f172a 70%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.sp-popup-tpl-spotlight .sp-popup-tpl-msg {
  color: #f1f5f9;
}

.sp-popup-tpl-retro {
  background: #fef9c3;
  border: 3px solid #1a1a1a;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #1a1a1a;
}

.sp-popup-tpl-retro .sp-popup-tpl-msg {
  color: #1a1a1a;
}

.sp-popup-tpl-frosted {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sp-popup-tpl-frosted .sp-popup-tpl-msg {
  color: #1e293b;
}

.sp-popup-tpl-elegant {
  background: #0a0a0a;
  border: 1px solid #c9a84c;
  border-radius: 2px;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
}

.sp-popup-tpl-elegant .sp-popup-tpl-msg {
  color: #f5f0e0;
}

.sp-popup-tpl-brutalist {
  background: #fff;
  border: 3px solid #000;
  border-radius: 0;
  box-shadow: 5px 5px 0 #000;
}

.sp-popup-tpl-brutalist .sp-popup-tpl-msg {
  color: #000;
}

.sp-popup-tpl-pastel {
  background: linear-gradient(135deg, #fce7f3, #d1fae5);
  border: 1.5px solid #fbcfe8;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.12);
}

.sp-popup-tpl-pastel .sp-popup-tpl-msg {
  color: #831843;
}

.sp-popup-tpl-material {
  background: #fff;
  border-top: 4px solid #00897b;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.12);
}

.sp-popup-tpl-material .sp-popup-tpl-msg {
  color: rgba(0, 0, 0, 0.87);
}

.sp-popup-tpl-cyberpunk {
  background: #0d0d0d;
  border: 1px solid #f0e040;
  border-left: 3px solid #00ffe0;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(240, 224, 64, 0.3);
}

.sp-popup-tpl-cyberpunk .sp-popup-tpl-msg {
  color: #f0e040;
}

.sp-popup-tpl-toast {
  background: #1e293b;
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.sp-popup-tpl-toast .sp-popup-tpl-msg {
  color: #f8fafc;
}

.sp-popup-tpl-animated-border {
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 0 0 2px #667eea, 0 4px 20px rgba(102, 126, 234, 0.25);
}

.sp-popup-tpl-animated-border .sp-popup-tpl-msg {
  color: #1e293b;
}

/* ── PRO Template Card Lock Overlay ─────────────────── */
/* Card container must be relative for the badge overlay */
.sp-popup-tpl-card.sp-pro-tpl,
.sp-modal-tpl-card.sp-pro-tpl {
  position: relative;
  overflow: hidden;
}

/* Dim slightly so it's clear it's a premium card */
.sp-popup-tpl-card.sp-pro-tpl .sp-popup-tpl-preview,
.sp-modal-tpl-card.sp-pro-tpl .sp-popup-tpl-preview {
  opacity: 0.8;
}

/* Golden PRO badge pinned to top-right of each card */
.sp-popup-tpl-card.sp-pro-tpl::before,
.sp-modal-tpl-card.sp-pro-tpl::before {
  content: "PRO";
  position: absolute;
  top: 5px;
  right: 5px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 5px;
  border-radius: 3px;
  z-index: 2;
  line-height: 1.4;
}

/* On hover, show with slight lift to indicate clickable */
.sp-popup-tpl-card.sp-pro-tpl:hover,
.sp-modal-tpl-card.sp-pro-tpl:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}


.sp-custom-style-panel {
  background: #f8fafc;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 16px;
  margin-top: 4px;
}

.sp-custom-style-panel>label {
  font-size: 12px;
  font-weight: 700;
  color: var(--sp-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: block;
}

.sp-custom-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin-bottom: 14px;
}

.sp-custom-style-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sp-custom-style-row>label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sp-text-light);
  margin: 0;
}

.sp-custom-style-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-custom-style-control input[type="color"] {
  width: 32px;
  height: 32px;
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}

.sp-custom-style-control input[type="text"] {
  width: 80px;
  padding: 5px 8px;
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  font-size: 12px;
  font-family: monospace;
  color: var(--sp-text);
}

.sp-custom-style-control input[type="range"] {
  flex: 1;
  accent-color: var(--sp-primary);
}

.sp-range-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--sp-primary);
  min-width: 28px;
  text-align: right;
}

.sp-custom-select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  color: var(--sp-text);
  background: var(--sp-white);
}

/* Live preview */
.sp-custom-style-preview-wrap {
  margin-top: 12px;
  border-top: 1px solid var(--sp-border);
  padding-top: 12px;
}

.sp-custom-preview-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sp-text-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 8px;
}

.sp-custom-style-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  max-width: 300px;
  transition: all 0.2s ease;
}

.sp-csp-avatar {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.sp-csp-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sp-csp-msg {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-csp-time {
  font-size: 10px;
  color: #64748b;
}

/* ── PRO Popup Templates ── */

/* Neon Glow — black bg, pink neon glow border */
.sp-popup-tpl-neon-glow {
  background: #000;
  border: 1px solid rgba(236, 72, 153, 0.5);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.4), 0 0 30px rgba(236, 72, 153, 0.15);
  border-radius: 8px;
}

.sp-popup-tpl-neon-glow .sp-popup-tpl-msg {
  color: #ec4899;
  font-weight: 700;
}

.sp-popup-tpl-neon-glow .sp-popup-tpl-time {
  color: #fce7f3;
}

.sp-popup-tpl-neon-glow .sp-popup-tpl-avatar {
  border: 1px solid #ec4899;
  background: rgba(236, 72, 153, 0.1);
}

/* Elegant — cream bg, serif font, gold accent */
.sp-popup-tpl-elegant {
  background: #FFFDF5;
  border: 1px solid #E8E1C4;
  border-radius: 3px;
}

.sp-popup-tpl-elegant .sp-popup-tpl-msg {
  color: #4A4A4A;
  font-family: 'Georgia', serif;
  font-weight: 700;
}

.sp-popup-tpl-elegant .sp-popup-tpl-time {
  color: #888;
  font-family: 'Georgia', serif;
  font-style: italic;
}

.sp-popup-tpl-elegant .sp-popup-tpl-avatar {
  background: rgba(212, 175, 55, 0.1);
  color: #D4AF37;
  border-radius: 50%;
}

/* Sliding — white card with motion trail effect */
.sp-popup-tpl-sliding {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  transform: translateX(3px);
}

.sp-popup-tpl-sliding::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 2px;
  width: 100%;
  height: 80%;
  background: rgba(96, 165, 250, 0.15);
  border-radius: 8px;
  filter: blur(3px);
  transform: skewX(12deg);
  z-index: -1;
}

/* Floating — 3D elevated with deep shadow */
.sp-popup-tpl-floating {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-3px);
}

.sp-popup-tpl-floating .sp-popup-tpl-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4f46e5;
}

/* PRO badge overlay on popup template cards */
.sp-popup-tpl-card.sp-pro-tpl .sp-popup-tpl-name::after {
  content: 'PRO';
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.sp-popup-tpl-card.sp-pro-tpl {
  opacity: 0.65;
  pointer-events: none;
  position: relative;
}

/* ── Bar Template Preview Grid ─────────────────────── */
.sp-bar-tpl-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text);
  margin-bottom: 12px;
}

.sp-bar-tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sp-bar-tpl-card {
  cursor: pointer;
  border: 2px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  padding: 8px;
  transition: all var(--sp-transition);
  text-align: center;
}

.sp-bar-tpl-card:hover {
  border-color: var(--sp-primary);
  box-shadow: var(--sp-shadow);
}

.sp-bar-tpl-card.selected {
  border-color: var(--sp-primary);
  background: var(--sp-primary-light);
  box-shadow: 0 0 0 3px rgba(96, 125, 102, 0.2);
}

.sp-bar-tpl-card-name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--sp-text);
  margin-top: 6px;
}

/* ── Bar Template Preview Styles (Exact Stitch Design) ── */

/* Base preview bar */
.sp-bar-tpl-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 600;
  min-height: 36px;
  letter-spacing: 0.02em;
  overflow: hidden;
  position: relative;
}

.sp-bar-tpl-preview-msg {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-bar-tpl-preview-cta {
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
}

/* ── 1. Classic ── */
/* Stitch: dark navy bg, text LEFT, CTA button RIGHT (space-between) */
.sp-bar-tpl-preview-classic {
  background: #1a1a2e;
  color: #fff;
  justify-content: space-between;
}

.sp-bar-tpl-preview-classic .sp-bar-tpl-preview-cta {
  background: #3b82f6;
  color: #fff;
  border-radius: 4px;
  padding: 4px 12px;
}

/* ── 2. Minimal ── */
/* Stitch: white bg, subtle border, text centered, no CTA */
.sp-bar-tpl-preview-minimal {
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  justify-content: center;
}

/* ── 3. Banner ── */
/* Stitch: amber bg, MEGA text centered, bold CTA, gap-6 */
.sp-bar-tpl-preview-banner {
  background: #f59e0b;
  color: #fff;
  justify-content: center;
  gap: 14px;
  padding: 12px 14px;
}

.sp-bar-tpl-preview-banner .sp-bar-tpl-preview-msg {
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.sp-bar-tpl-preview-banner .sp-bar-tpl-preview-cta-bold {
  background: #fff;
  color: #d97706;
  font-weight: 800;
  border-radius: 4px;
  text-transform: uppercase;
  padding: 4px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ── 4. Split Duo ── */
/* Stitch: two halves — dark navy left, coral/rose right, skewed divider between */
.sp-bar-tpl-preview-split {
  background: transparent;
  color: #fff;
  padding: 0;
  gap: 0;
  min-height: 36px;
}

.sp-bar-tpl-preview-split .sp-bar-split-left-prev {
  background: #1a1a2e;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 14px;
  height: 100%;
}

.sp-bar-tpl-preview-split .sp-bar-split-right-prev {
  background: #f43f5e;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 14px;
  height: 100%;
  position: relative;
}

.sp-bar-tpl-preview-split .sp-bar-split-right-prev::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: #1a1a2e;
  transform: skewX(-12deg);
  transform-origin: bottom;
}

.sp-bar-tpl-preview-split .sp-bar-tpl-preview-cta-split {
  color: #fff;
  border-bottom: 1px solid #fff;
  background: transparent;
  padding: 0 0 1px 0;
  border-radius: 0;
  margin-left: 8px;
}

/* ── 5. Sticky Ribbon ── */
/* Stitch: red bg, centered text, ribbon edge notches on sides */
.sp-bar-tpl-preview-ribbon {
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  justify-content: center;
  position: relative;
  margin: 4px 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sp-bar-tpl-preview-ribbon::before,
.sp-bar-tpl-preview-ribbon::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  background: #991b1b;
}

.sp-bar-tpl-preview-ribbon::before {
  left: -3px;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.sp-bar-tpl-preview-ribbon::after {
  right: -3px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* ── 6. Countdown Split ── */
/* Stitch: slate bg, text LEFT uppercase, countdown boxes RIGHT */
.sp-bar-tpl-preview-countdown {
  background: #1e293b;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  justify-content: space-between;
}

.sp-bar-tpl-cd-boxes {
  display: flex;
  gap: 4px;
}

.sp-bar-tpl-cd-box {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  font-weight: 700;
  font-size: 11px;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.sp-bar-tpl-cd-box small {
  font-size: 8px;
  color: #64748b;
  margin-left: 1px;
}

/* ── 7. Gradient Flash ── */
/* Stitch: purple-to-blue gradient, text LEFT with sparkle, glass pill CTA RIGHT */
.sp-bar-tpl-preview-gradient {
  background: linear-gradient(to right, #7c3aed, #3b82f6);
  color: #fff;
  justify-content: space-between;
}

.sp-bar-tpl-preview-gradient .sp-bar-tpl-preview-cta-glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  color: #fff;
  padding: 3px 12px;
}

/* ── 8. Neon Bar ── */
/* Stitch: black bg, cyan neon text centered, cyan border pill CTA */
.sp-bar-tpl-preview-neon {
  background: #000;
  justify-content: center;
  gap: 14px;
  padding: 12px 14px;
}

.sp-bar-tpl-preview-neon .sp-bar-tpl-preview-msg {
  color: #00f5ff;
  text-shadow: 0 0 5px #00f5ff, 0 0 10px #00f5ff;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 10px;
}

.sp-bar-tpl-preview-neon .sp-bar-tpl-preview-cta {
  background: transparent;
  border: 1px solid #00f5ff;
  color: #00f5ff;
  border-radius: 20px;
  box-shadow: 0 0 5px #00f5ff, inset 0 0 5px #00f5ff;
  padding: 3px 14px;
  font-size: 9px;
  text-transform: uppercase;
}

/* ── 9. Animated Pulse ── */
/* Stitch: dark gray bg, pulse dot, centered text */
.sp-bar-tpl-preview-pulse {
  background: #1f2937;
  color: #e5e7eb;
  justify-content: center;
}

.sp-bar-pulse-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  animation: sp-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

@keyframes sp-pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* ── 10. Premium Glass ── */
/* Stitch: golden gradient bg, serif italic text LEFT, thin border CTA RIGHT */
.sp-bar-tpl-preview-glass {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  justify-content: space-between;
  padding: 14px 14px;
}

.sp-bar-tpl-preview-glass .sp-bar-tpl-preview-msg {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
}

.sp-bar-tpl-preview-glass .sp-bar-tpl-preview-cta {
  border: 1px solid rgba(180, 130, 50, 0.5);
  color: #92400e;
  background: transparent;
  border-radius: 2px;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 3px 12px;
}

/* ── Custom template ── */
.sp-bar-tpl-preview-custom {
  background: #f9fafb;
  color: #6b7c70;
  border: 2px dashed #d1d5db;
  justify-content: center;
  font-size: 12px;
}

/* PRO badge on bar template cards */
.sp-bar-tpl-card.sp-pro-tpl .sp-bar-tpl-card-name::after {
  content: 'PRO';
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.sp-bar-tpl-card.sp-pro-tpl {
  opacity: 0.65;
  pointer-events: none;
  position: relative;
}

.sp-quick-builder-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 28px;
  border-top: 1px solid var(--sp-border);
  background: var(--sp-bg);
  border-radius: 0 0 var(--sp-radius) var(--sp-radius);
}

/* ── Dashboard Bottom Row ─────────────────────────────────── */
.sp-dashboard-bottom {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

/* ── Setup Wizard CTA (Stitch) ───────────────────────────── */
.sp-setup-cta {
  display: flex;
  align-items: stretch;
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.sp-setup-cta-content {
  flex: 1;
  padding: 32px;
}

.sp-setup-cta-content h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--sp-dark);
}

.sp-setup-cta-content p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--sp-text-light);
  line-height: 1.6;
}

.sp-setup-checklist {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.sp-setup-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--sp-text);
  padding: 5px 0;
}

.sp-check-icon {
  color: var(--sp-primary);
  font-size: 18px !important;
}

.sp-btn-wizard {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--sp-primary);
  color: var(--sp-white);
  border: none;
  border-radius: var(--sp-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--sp-transition);
  font-family: inherit;
}

.sp-btn-wizard:hover {
  background: var(--sp-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(96, 125, 102, 0.3);
}

.sp-btn-wizard .material-symbols-outlined {
  font-size: 18px;
}

/* CTA Illustration */
.sp-setup-cta-illustration {
  width: 280px;
  background: linear-gradient(135deg, var(--sp-primary-light), #d4e5cc);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.sp-cta-mockup-card {
  width: 140px;
  background: var(--sp-white);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.sp-mockup-line {
  height: 8px;
  border-radius: 4px;
  background: var(--sp-border);
  margin-bottom: 8px;
}

.sp-mockup-line-title {
  width: 60%;
  background: var(--sp-primary);
}

.sp-mockup-line-full {
  width: 100%;
}

.sp-mockup-line-mid {
  width: 75%;
}

.sp-mockup-line-short {
  width: 45%;
  margin-bottom: 0;
}

.sp-mockup-image {
  width: 100%;
  height: 50px;
  border-radius: 6px;
  background: linear-gradient(135deg, #dce3dd, #c9d5cc);
  margin-bottom: 10px;
}

.sp-cta-mockup-popup {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  background: var(--sp-white);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  align-items: center;
}

.sp-mockup-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sp-primary);
  flex-shrink: 0;
}

.sp-mockup-popup-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sp-mockup-popup-lines .sp-mockup-line {
  margin-bottom: 0;
  height: 6px;
}

/* ── Activity Section ────────────────────────────────────── */
.sp-activity-section {
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 24px;
}

.sp-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sp-section-title-row h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--sp-dark);
}

.sp-view-all-link {
  font-size: 13px;
  color: var(--sp-primary);
  text-decoration: none;
  font-weight: 500;
}

.sp-view-all-link:hover {
  color: var(--sp-primary-hover);
  text-decoration: underline;
}

.sp-activity-table-wrap {
  overflow-x: auto;
}

.sp-activity-table {
  width: 100%;
  border-collapse: collapse;
}

.sp-activity-table thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sp-border);
}

.sp-activity-table tbody td {
  padding: 12px;
  font-size: 13px;
  color: var(--sp-text);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.sp-activity-table tbody tr:last-child td {
  border-bottom: none;
}

.sp-activity-empty {
  text-align: center;
  color: var(--sp-text-light) !important;
  padding: 30px 12px !important;
}

/* ── Quick Actions Section ───────────────────────────────── */
.sp-quick-actions-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-quick-actions-section h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--sp-dark);
}

.sp-quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sp-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 14px;
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  cursor: pointer;
  transition: all var(--sp-transition);
  text-decoration: none;
  color: var(--sp-text);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
}

.sp-quick-action:hover {
  background: var(--sp-primary-light);
  border-color: var(--sp-primary);
  color: var(--sp-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--sp-shadow);
}

.sp-quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sp-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-quick-action-icon .material-symbols-outlined {
  color: var(--sp-primary);
  font-size: 22px;
}

.sp-quick-action-icon.sp-qa-neutral {
  background: var(--sp-bg);
}

.sp-quick-action-icon.sp-qa-neutral .material-symbols-outlined {
  color: var(--sp-text-light);
}

.sp-quick-action:hover .sp-quick-action-icon {
  background: var(--sp-primary);
}

.sp-quick-action:hover .sp-quick-action-icon .material-symbols-outlined {
  color: #fff;
}

/* ── PRO Upsell Card ─────────────────────────────────────── */
.sp-upsell-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #3e5242, #3e5242);
  border-radius: var(--sp-radius);
  padding: 20px 24px;
  color: #fff;
}

.sp-upsell-content {
  flex: 1;
}

.sp-upsell-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin: 0 0 6px;
}

.sp-upsell-card h4 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.sp-upsell-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--sp-transition);
}

.sp-upsell-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.sp-upsell-deco .material-symbols-outlined {
  font-size: 40px;
  opacity: 0.3;
}

/* ── Go Pro Tab ───────────────────────────────────────────── */
.sp-gopro-header {
  text-align: center;
  padding: 40px 20px 30px;
}

.sp-gopro-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--sp-dark);
  margin: 0 0 10px;
}

.sp-gopro-header p {
  font-size: 16px;
  color: var(--sp-text-light);
  margin: 0;
  max-width: 500px;
  margin: 0 auto;
}

.sp-gopro-comparison {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  overflow: hidden;
  margin-bottom: 30px;
}

.sp-gopro-comparison th,
.sp-gopro-comparison td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--sp-border);
  font-size: 14px;
}

.sp-gopro-comparison th {
  background: var(--sp-dark);
  color: var(--sp-white);
  font-weight: 600;
}

.sp-gopro-comparison th:first-child {
  text-align: left;
}

.sp-gopro-comparison th:not(:first-child) {
  text-align: center;
}

.sp-gopro-comparison td:not(:first-child) {
  text-align: center;
}

.sp-gopro-comparison tr:last-child td {
  border-bottom: none;
}

.sp-gopro-comparison tr:nth-child(even) td {
  background: var(--sp-bg);
}

.sp-gopro-comparison .sp-check {
  color: var(--sp-success);
  font-size: 18px;
}

.sp-gopro-comparison .sp-cross {
  color: var(--sp-text-light);
  font-size: 14px;
}

.sp-gopro-cta {
  text-align: center;
  padding: 10px 0 30px;
}

.sp-btn-pro {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--sp-primary), var(--sp-primary-hover));
  color: var(--sp-white);
  border: none;
  border-radius: var(--sp-radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--sp-transition);
  box-shadow: 0 4px 14px rgba(96, 125, 102, 0.35);
}

.sp-btn-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(96, 125, 102, 0.45);
  color: var(--sp-white);
}

/* ── Pro Badge (inline) ───────────────────────────────────── */
.sp-badge-pro {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Notification Duplicate Button ────────────────────────── */
.salespulse-notification-item-actions .sp-btn-duplicate {
  color: var(--sp-text-light);
}

.salespulse-notification-item-actions .sp-btn-duplicate:hover {
  border-color: var(--sp-info);
  color: var(--sp-info);
}

/* ── Bold template admin preview fix ──────────────────────── */
.sp-template-bold {
  background: var(--sp-dark);
  border-left: 4px solid var(--sp-primary);
}

.sp-template-bold .sp-popup-image-placeholder {
  background: #3e5242;
}

/* ── NEW Badge ────────────────────────────────────────────── */
.sp-badge-new {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Admin template previews for new templates ───────────── */
.sp-template-gradient {
  background: linear-gradient(135deg, #607d66, #3e5242);
  border-radius: 14px;
  color: #fff;
}

.sp-template-gradient .sp-popup-message,
.sp-template-gradient .sp-popup-time {
  color: #fff;
}

.sp-template-gradient .sp-popup-close {
  color: rgba(255, 255, 255, 0.7);
}

.sp-template-dark-modern {
  background: #1a1d23;
  border-radius: 14px;
  border-left: 3px solid #607d66;
  color: #e4e4e7;
}

.sp-template-dark-modern .sp-popup-message {
  color: #e4e4e7;
}

.sp-template-dark-modern .sp-popup-time {
  color: #71717a;
}

.sp-template-dark-modern .sp-popup-close {
  color: #71717a;
}

.sp-template-compact {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  font-size: 12px;
}

.sp-template-compact .sp-popup-message {
  font-size: 12px;
}

/* ==========================================================================
   Analytics Tab — Stat Cards (Stitch Design)
   ========================================================================== */
#salespulse-tab-analytics>h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--sp-dark);
  margin: 0 0 20px;
}

.sp-analytics-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.sp-analytics-card {
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 22px 20px;
  transition: box-shadow var(--sp-transition), transform var(--sp-transition);
  position: relative;
  overflow: hidden;
}

.sp-analytics-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sp-primary);
  opacity: 0;
  transition: opacity var(--sp-transition);
}

.sp-analytics-card:hover {
  box-shadow: var(--sp-shadow-md);
  transform: translateY(-2px);
}

.sp-analytics-card:hover::before {
  opacity: 1;
}

.sp-analytics-card-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--sp-dark);
  line-height: 1.1;
  margin-bottom: 6px;
}

.sp-analytics-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Analytics Pro overlay */
.sp-analytics-chart-placeholder {
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 40px 32px;
  text-align: center;
}

.sp-analytics-pro-overlay .dashicons {
  font-size: 40px;
  width: 40px;
  height: 40px;
  color: var(--sp-primary);
  margin-bottom: 12px;
  display: block;
}

.sp-analytics-pro-overlay h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--sp-dark);
  margin: 0 0 8px;
}

.sp-analytics-pro-overlay p {
  font-size: 14px;
  color: var(--sp-text-light);
  margin: 0 0 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.sp-btn-pro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--sp-primary);
  color: #fff !important;
  border-radius: var(--sp-radius-sm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all var(--sp-transition);
  border: none;
  cursor: pointer;
}

.sp-btn-pro:hover {
  background: var(--sp-primary-hover);
  box-shadow: 0 4px 12px rgba(96, 125, 102, 0.3);
  transform: translateY(-1px);
}

/* ==========================================================================
   Settings Tab — Card-Based Sections (Stitch Design)
   ========================================================================== */
#salespulse-tab-settings>h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--sp-dark);
  margin: 0 0 20px;
}

.salespulse-settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
}

.salespulse-settings-section {
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  overflow: hidden;
}

.salespulse-settings-section>h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--sp-dark);
  background: #fafaf8;
  border-bottom: 1px solid var(--sp-border);
}

.salespulse-settings-section>h3 .material-symbols-outlined {
  font-size: 20px;
  color: var(--sp-primary);
}

.salespulse-settings-section>p.description {
  margin: 0;
  padding: 12px 24px 0;
  font-size: 13px;
  color: var(--sp-text-light);
}

.salespulse-settings-section>.salespulse-field,
.salespulse-settings-section>.salespulse-field-row {
  padding: 12px 24px;
}

.salespulse-settings-section>.salespulse-field:last-child,
.salespulse-settings-section>.salespulse-field-row:last-child {
  padding-bottom: 20px;
}

/* Field rows — two-column grid */
.salespulse-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Individual field */
.salespulse-field {
  margin-bottom: 4px;
}

.salespulse-field>label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-dark);
  margin-bottom: 6px;
  cursor: pointer;
}

.salespulse-field>label>input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sp-primary);
  margin: 0;
  cursor: pointer;
}

.salespulse-field input[type="text"],
.salespulse-field input[type="number"],
.salespulse-field input[type="url"],
.salespulse-field input[type="color"],
.salespulse-field input[type="datetime-local"],
.salespulse-field select,
.salespulse-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--sp-dark);
  background: #fafaf8;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.salespulse-field input:focus,
.salespulse-field select:focus,
.salespulse-field textarea:focus {
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 3px rgba(96, 125, 102, 0.12);
  background: var(--sp-white);
}

.salespulse-field input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 2px;
  cursor: pointer;
}

.salespulse-field p.description {
  font-size: 12px;
  color: var(--sp-text-light);
  margin: 4px 0 0;
}

/* Device toggles (Settings → Behavior) */
.sp-device-toggles {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.sp-device-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fafaf8;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--sp-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.sp-device-toggle:hover {
  border-color: var(--sp-primary);
}

.sp-device-toggle input[type="checkbox"]:checked~.sp-device-icon,
.sp-device-toggle input[type="checkbox"]:checked~* {
  color: var(--sp-primary);
}

.sp-device-icon {
  font-size: 16px;
}

/* Page type toggles */
.sp-page-type-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.sp-page-type-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sp-dark);
  cursor: pointer;
}

.sp-page-type-toggles label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sp-primary);
  margin: 0;
}

/* Save button area */
.salespulse-settings-actions {
  padding: 0 4px;
}

.sp-save-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: var(--sp-primary);
  color: #fff;
  border: none;
  border-radius: var(--sp-radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--sp-transition);
}

.sp-save-settings-btn:hover {
  background: var(--sp-primary-hover);
  box-shadow: 0 4px 12px rgba(96, 125, 102, 0.3);
}

.sp-save-settings-btn .material-symbols-outlined {
  font-size: 18px;
}