/* ==========================
   APP SHELL
========================== */

.sp-app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.3s ease;
}

.sp-app-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

/* ==========================
   SIDEBAR
========================== */

.sp-sidebar {
  background: radial-gradient(circle at top left, #241217 0, #090305 55%);
  border-right: 1px solid var(--sp-border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1rem 1.2rem;
}

.sp-sidebar-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--sp-text);
  font-weight: 600;
}

.sp-sidebar-toggle {
  background: none;
  border: none;
  color: var(--sp-text-soft);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sp-text);
}

.sp-sidebar.collapsed .sp-sidebar-toggle .material-icons {
  transform: rotate(180deg);
}

.sp-sidebar-logo img {
  width: 28px;
  height: 28px;
  border-radius: 0.8rem;
  box-shadow: 0 0 18px rgba(255, 123, 41, 0.7);
}

.sp-sidebar-nav {
  display: grid;
  gap: 0.3rem;
  margin-bottom: auto;
}

.sp-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.45rem 0.7rem;
  background: transparent;
  color: var(--sp-text-soft);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background var(--sp-transition), color var(--sp-transition),
    border-color var(--sp-transition), transform var(--sp-transition-fast);
}

.sp-sidebar-link:hover {
  background: rgba(22, 10, 9, 0.9);
  color: var(--sp-text);
}

.sp-sidebar-link.is-active {
  background: radial-gradient(circle at left, #ff7b29 0, #7b3611 55%, #170b0a 100%);
  color: #1a1110;
  border-color: rgba(255, 237, 213, 0.7);
  transform: translateX(2px);
}

.sp-sidebar-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  min-width: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-sidebar-text {
  transition: opacity 0.3s ease, width 0.3s ease;
}

/* Collapsed sidebar styles */
.sp-sidebar.collapsed {
  width: 72px;
}

.sp-sidebar.collapsed .sp-sidebar-logo span {
  display: none;
}

.sp-sidebar.collapsed .sp-sidebar-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sp-sidebar.collapsed .sp-sidebar-link {
  justify-content: center;
  gap: 0;
  padding: 0.6rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.sp-sidebar.collapsed .sp-sidebar-link.is-active {
  transform: none;
  background: var(--sp-accent);
  border-color: var(--sp-accent);
  box-shadow: 0 0 12px var(--sp-accent-soft, rgba(255, 123, 41, 0.3));
}

.sp-sidebar.collapsed .sp-sidebar-footer {
  padding: 0 0.5rem;
}

.sp-sidebar.collapsed .sp-sidebar-policy-links {
  display: none; /* Hide policy links when collapsed */
}

.sp-sidebar.collapsed .sp-sidebar-logout-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.sp-sidebar.collapsed .sp-logout-text {
  display: none;
}

.sp-sidebar.collapsed .sp-sidebar-meta {
  display: none;
}

/* Jobs notification badge */
.sp-jobs-notification {
  background: var(--sp-btn-gradient, linear-gradient(135deg, #ff7b29 0%, #ff5722 100%));
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: auto;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  min-width: 1.2rem;
  height: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(255, 123, 41, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

/* Keep badge distinct on the active Jobs button */
.sp-sidebar-link.is-active .sp-jobs-notification {
  background: var(--sp-danger);
  box-shadow: 0 2px 6px rgba(255, 74, 92, 0.35);
  border-color: rgba(255, 255, 255, 0.25);
}

/* In collapsed sidebar, badge should sit on the icon (not affect centering) */
.sp-sidebar.collapsed .sp-jobs-notification {
  position: absolute;
  top: 4px;
  right: 4px;
  margin-left: 0;
  z-index: 1;
}

.sp-sidebar-footer {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: var(--sp-text-muted);
}

.sp-sidebar-policy-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--sp-border-subtle);
}

.sp-sidebar-mini-link {
  border: none;
  background: none;
  color: var(--sp-text-soft);
  padding: 0;
  cursor: pointer;
  font-size: 0.82rem;
  text-align: left;
}

.sp-sidebar-mini-link:hover {
  color: var(--sp-primary-strong);
}

.sp-sidebar-logout-btn {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--sp-bg-elevated);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.5rem;
  color: var(--sp-text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sp-sidebar-logout-btn:hover {
  background: var(--sp-danger);
  border-color: var(--sp-danger);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 77, 92, 0.3);
}

.sp-logout-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.sp-sidebar-meta {
  margin-top: 0.4rem;
}

/* ==========================
   TOPBAR
========================== */

.sp-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sp-topbar {
  padding: 1.1rem 1.5rem 0.8rem;
  border-bottom: 1px solid var(--sp-border-subtle);
  background: radial-gradient(circle at top, #1f1113 0, #050203 60%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sp-topbar-left {
  max-width: 520px;
}

.sp-topbar-title {
  margin-bottom: 0.2rem;
  font-size: 1.4rem;
}

.sp-topbar-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--sp-text-muted);
}

.sp-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* User pill */

.sp-user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(21, 10, 9, 0.95);
  border: 1px solid rgba(92, 54, 40, 0.9);
}

.sp-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #ffedd5 0, #ff7b29 45%, #7b3611 100%);
  color: #1a1110;
  font-size: 0.8rem;
  font-weight: 700;
}

.sp-user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sp-user-meta span {
  font-size: 0.8rem;
}

.sp-user-email {
  color: var(--sp-text-muted);
}

/* AI Usage Chip */
.sp-ai-usage-chip {
  display: flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 122, 26, 0.1);
  border: 1px solid rgba(255, 122, 26, 0.3);
  color: #ff7a1a;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Email Usage Chip */
.sp-email-usage-chip {
  display: flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

/* Monthly Email Usage Chip */
.sp-monthly-email-usage-chip {
  display: flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

/* Achievement Tracker */
.sp-achievement-tracker {
  display: flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #a855f7;
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

/* ==========================
   MAIN CONTENT AREA
========================== */

.sp-main-content {
  flex: 1;
  padding: 1.5rem;
  display: grid;
}

/* ==========================
   PANELS
========================== */

.sp-panel {
  display: none; /* Hidden by default, shown via JavaScript */
}

.sp-panel--active {
  display: block;
}

/* Panels */

.sp-panel {
  display: none;
  flex-direction: column;
  gap: 1.1rem;
}

.sp-panel.is-visible {
  display: flex;
}

.sp-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.sp-panel-bottom {
  margin-top: 1.2rem;
}

/* Cards */

.sp-card {
  border-radius: var(--sp-radius-lg);
  background: radial-gradient(circle at top left, #2a1a1a 0, #151010 70%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--sp-shadow-subtle);
  padding: 1rem 1rem;
  position: relative;
  overflow: hidden;
}

.sp-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at top left, rgba(255, 123, 41, 0.22), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.sp-card > * {
  position: relative;
}

/* Metric cards */

.sp-card-metric h2 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sp-text-muted);
}

.sp-metric-value {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.sp-metric-note {
  font-size: 0.82rem;
  color: var(--sp-text-soft);
}

/* Progress bar for AI usage */
.sp-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--sp-bg-elevated);
  border-radius: 4px;
  margin: 0.5rem 0;
  overflow: hidden;
}

.sp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sp-accent), var(--sp-accent-hover));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Plan status colors */
.sp-plan-pro {
  color: var(--sp-accent);
}

.sp-plan-free {
  color: var(--sp-text-muted);
}

/* Wide card (overview bottom) */

.sp-card-wide {
  padding: 1.2rem 1.2rem;
}

.sp-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.sp-card-subtitle {
  font-size: 0.9rem;
  color: var(--sp-text-soft);
}

.sp-card-body {
  font-size: 0.86rem;
}

.sp-card-placeholder {
  border-radius: 0.8rem;
  border: 1px dashed rgba(148, 121, 104, 0.6);
  padding: 0.8rem;
  background: rgba(10, 5, 5, 0.7);
}

.sp-card-note {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--sp-text-muted);
}

/* Panel header + actions */

.sp-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sp-panel-header h2 {
  font-size: 1.1rem;
}

.sp-panel-header p {
  font-size: 0.9rem;
  color: var(--sp-text-soft);
}

.sp-panel-actions {
  display: flex;
  gap: 0.6rem;
}

/* Table card */

.sp-card-table {
  padding: 1rem;
}

/* Settings */

.sp-card-settings {
  padding: 1.5rem;
}

.sp-settings-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--sp-border-subtle);
}

.sp-settings-section:last-child {
  border-bottom: none;
  margin-bottom: 1.5rem;
}

.sp-settings-section h3 {
  margin: 0 0 0.5rem 0;
  color: var(--sp-text);
  font-size: 1.1rem;
  font-weight: 600;
}

.sp-settings-help {
  margin: 0 0 1rem 0;
  color: var(--sp-text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.sp-settings-input-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.sp-settings-input-group input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.5rem;
  background: var(--sp-bg-elevated);
  color: var(--sp-text);
  font-size: 0.9rem;
}

.sp-settings-input-group input:focus {
  outline: none;
  border-color: var(--sp-accent);
  box-shadow: 0 0 0 2px var(--sp-accent-soft);
}

.sp-verification-result {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.sp-verification-result.success {
  background: var(--sp-success-soft, rgba(34, 197, 94, 0.1));
  border: 1px solid var(--sp-success, #22c55e);
  color: var(--sp-success);
}

.sp-verification-result.error {
  background: var(--sp-danger-soft, rgba(255, 77, 92, 0.1));
  border: 1px solid var(--sp-danger, #ff4d5c);
  color: var(--sp-danger);
}

.sp-verification-result.info {
  background: var(--sp-bg-soft);
  border: 1px solid var(--sp-border-strong);
  color: var(--sp-text-muted);
}

.sp-recommendation-display {
  background: var(--sp-bg-elevated);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top: 0.5rem;
}

.sp-recommendation-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sp-recommendation-value span:first-child {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sp-accent);
}

.sp-recommendation-unit {
  color: var(--sp-text-muted);
  font-size: 0.9rem;
}

.sp-recommendation-explanation {
  margin: 0;
  color: var(--sp-text-soft);
  font-size: 0.85rem;
  line-height: 1.4;
}

.sp-warmup-toggle {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--sp-bg-elevated);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sp-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--sp-text);
  flex: 1;
}

.sp-toggle-label input[type="checkbox"] {
  display: none;
}

.sp-toggle-slider {
  position: relative;
  width: 50px;
  height: 28px;
  background: var(--sp-bg-secondary);
  border-radius: 14px;
  transition: all 0.3s ease;
  border: 2px solid var(--sp-border-subtle);
}

.sp-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sp-toggle-label input[type="checkbox"]:checked + .sp-toggle-slider {
  background: var(--sp-accent);
  border-color: var(--sp-accent);
}

.sp-toggle-label input[type="checkbox"]:checked + .sp-toggle-slider::before {
  transform: translateX(22px);
  background: white;
}

.sp-toggle-text {
  font-weight: 600;
  color: var(--sp-text);
  flex: 1;
}

.sp-toggle-status {
  font-size: 0.85rem;
  color: var(--sp-text-muted);
  font-weight: 500;
  min-width: 60px;
  text-align: right;
}

.sp-warmup-info {
  background: linear-gradient(135deg, var(--sp-bg-elevated) 0%, var(--sp-bg-soft) 100%);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sp-warmup-schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.sp-warmup-phase {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--sp-bg-primary);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sp-warmup-phase:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sp-phase-label {
  color: var(--sp-text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.sp-phase-value {
  color: var(--sp-accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.sp-phase-value {
  color: var(--sp-accent);
  font-weight: 600;
}

.sp-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.sp-settings-grid label {
  display: block;
  font-weight: 600;
  color: var(--sp-text);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.sp-settings-grid input[type="number"],
.sp-settings-grid input[type="time"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.5rem;
  background: var(--sp-bg-elevated);
  color: var(--sp-text);
  font-size: 0.9rem;
}

.sp-settings-grid input:focus {
  outline: none;
  border-color: var(--sp-accent);
  box-shadow: 0 0 0 2px var(--sp-accent-soft);
}

.sp-settings-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-settings-inline span {
  color: var(--sp-text-muted);
  font-size: 0.9rem;
}

.sp-settings-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--sp-border-subtle);
  margin-bottom: 1.5rem;
}

.sp-card-note {
  background: var(--sp-bg-soft);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sp-card-note ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
}

.sp-card-note li {
  margin-bottom: 0.25rem;
}

.sp-card-note li:last-child {
  margin-bottom: 0;
}

/* Toast Notifications */
.sp-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 500;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.3s ease-out;
}

.sp-toast-success {
  background: var(--sp-success, #22c55e);
}

.sp-toast-error {
  background: var(--sp-danger, #ff4d5c);
}

.sp-toast-info {
  background: var(--sp-accent, #ff7b29);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 1024px) {
  .sp-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Settings grid is now always single column */
}

@media (max-width: 880px) {
  .sp-app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .sp-sidebar {
    padding-inline: 0.5rem;
  }

  .sp-sidebar-logo span {
    display: none;
  }

  .sp-sidebar-text {
    display: none;
  }

  .sp-sidebar-link {
    justify-content: center;
    padding-inline: 0.4rem;
  }

  .sp-sidebar-toggle {
    display: none; /* Hide toggle on mobile since it's always collapsed */
  }

  .sp-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .sp-topbar-right {
    align-self: stretch;
    justify-content: space-between;
  }

  .sp-panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .sp-main-content {
    padding: 1rem;
  }

  .sp-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .sp-panel-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* ==========================
   MODALS (SLIDE-IN PANELS)
========================== */

.sp-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}

.sp-modal-backdrop[hidden] {
  opacity: 0;
}

.sp-modal-backdrop:not([hidden]) {
  pointer-events: auto;
  opacity: 1;
}

.sp-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 660px;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  overflow-y: auto;
  z-index: 1001;
  pointer-events: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-modal.sp-modal--open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.sp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(10px);
}

.sp-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
}

.sp-modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.sp-modal-close:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.sp-modal-body {
  padding: 1.5rem;
}

/* Form enhancements */
.sp-form {
  display: grid;
  gap: 1.25rem;
}

.sp-form-field {
  display: grid;
  gap: 0.5rem;
}

.sp-form-field span {
  font-size: 0.9rem;
  font-weight: 500;
  color: #d1d5db;
}

.sp-form-field input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid var(--sp-border-subtle);
  background: rgba(19, 10, 10, 0.95);
  color: var(--sp-text);
  font: inherit;
  transition: all 0.2s ease;
}

.sp-form-field input:focus {
  outline: 1px solid var(--sp-primary);
  border-color: var(--sp-primary);
}

.sp-form-field input[type="color"] {
  width: 5rem;
  height: 3rem;
  padding: 0.25rem;
  border-radius: 0.6rem;
  border: 1px solid var(--sp-border-subtle);
  background: rgba(19, 10, 10, 0.95);
  cursor: pointer;
}

.sp-form-field input[type="color"]:focus {
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 3px rgba(255, 123, 41, 0.2);
}

.sp-form-field textarea,
.sp-form-field select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid var(--sp-border-subtle);
  background: rgba(19, 10, 10, 0.95);
  color: var(--sp-text);
  font: inherit;
  transition: all 0.2s ease;
}

.sp-form-field textarea:focus,
.sp-form-field select:focus {
  outline: 1px solid var(--sp-primary);
  border-color: var(--sp-primary);
}

/* Placeholder dropdown for sequence editor */
#placeholder-select {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 2px solid #555;
  background: #333;
  color: #fff;
  font-size: 1rem;
  min-width: 140px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#placeholder-select:focus {
  outline: none;
  border-color: #ff7b29;
  box-shadow: 0 0 0 3px rgba(255, 123, 41, 0.2);
}

#placeholder-select option {
  background: #333;
  color: #fff;
  padding: 0.5rem;
}

.sp-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.sp-btn-primary {
  background: var(--sp-btn-gradient, linear-gradient(135deg, #ff7b29 0%, #ff5722 100%));
  color: #ffffff;
  box-shadow: 0 4px 12px var(--sp-primary-soft);
}

.sp-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--sp-primary-soft);
}

/* Action button variants for table rows */
.sp-btn--small {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.sp-btn-outline {
  border: 1px solid var(--sp-accent);
  color: var(--sp-accent);
  background: transparent;
}

.sp-btn-outline:hover {
  background: var(--sp-primary-soft);
  border-color: var(--sp-accent-hover);
  color: var(--sp-accent-hover);
}

.sp-btn-ghost {
  background: transparent;
  border: none;
  color: var(--sp-accent);
  font-weight: 600;
}

.sp-btn-ghost:hover {
  color: var(--sp-accent-hover);
}

.sp-btn--secondary {
  background: var(--sp-btn-gradient, linear-gradient(135deg, #ff7b29 0%, #ff5722 100%));
  color: #1a1110;
  box-shadow: 0 2px 8px var(--sp-primary-soft);
}

.sp-btn--secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--sp-primary-soft);
}

.sp-btn--danger {
  background: var(--sp-btn-gradient, linear-gradient(135deg, #ff7b29 0%, #ff5722 100%));
  color: #1a1110;
  box-shadow: 0 2px 8px var(--sp-primary-soft);
}

.sp-btn--danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 123, 41, 0.4);
}

.sp-form-footnote {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #9ca3af;
  text-align: center;
}

.sp-form-note {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(255, 123, 41, 0.1);
  border: 1px solid rgba(255, 123, 41, 0.2);
  border-radius: 6px;
  font-size: 0.9rem;
  color: #d97706;
  text-align: center;
}

.sp-link-btn {
  background: none;
  border: none;
  color: #ff7b29;
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
}

.sp-link-btn:hover {
  color: #ffb873;
}

/* Placeholder options styling */
.sp-placeholder-fieldset {
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.6rem;
  padding: 1rem;
  background: rgba(19, 10, 10, 0.95);
}

.sp-placeholder-fieldset legend {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sp-text);
  padding: 0 0.5rem;
  margin-bottom: 0.5rem;
}

.sp-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.sp-placeholder-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  cursor: pointer;
}

.sp-placeholder-option:hover {
  background: rgba(255, 123, 41, 0.1);
  border-color: rgba(255, 123, 41, 0.3);
}

.sp-placeholder-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ff7b29;
  cursor: pointer;
}

.sp-placeholder-code {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 0.3rem;
  color: #ff7b29;
  border: 1px solid rgba(255, 123, 41, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
  .sp-modal {
    width: 100%;
  }
}

/* ==========================
   TABLES
========================== */

.sp-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.sp-table-wrapper--scrollable {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid rgba(60, 38, 40, 0.8);
  border-radius: 0.5rem;
}

.sp-table-wrapper--scrollable .sp-table {
  margin: 0;
}

.sp-table-wrapper--scrollable .sp-table-header--sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 5, 5, 0.95);
  backdrop-filter: blur(10px);
}

.sp-table-wrapper--scrollable .sp-table-header--sticky::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 123, 41, 0.3);
}

/* ==========================
   PAGINATION
========================== */

.sp-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(60, 38, 40, 0.8);
}

.sp-pagination-info {
  font-size: 0.85rem;
  color: var(--sp-text-muted);
}

.sp-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-pagination-size {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--sp-text-muted);
}

.sp-pagination-size select {
  padding: 0.2rem 0.4rem;
  background: rgba(20, 10, 10, 0.5);
  border: 1px solid rgba(60, 38, 40, 0.8);
  border-radius: 0.3rem;
  color: var(--sp-text);
  font-size: 0.8rem;
}

.sp-pagination-size select:focus {
  outline: none;
  border-color: var(--sp-accent);
}

.sp-pagination-pages {
  display: flex;
  gap: 0.25rem;
}

.sp-pagination-page {
  padding: 0.25rem 0.5rem;
  background: rgba(20, 10, 10, 0.5);
  border: 1px solid rgba(60, 38, 40, 0.8);
  border-radius: 0.3rem;
  color: var(--sp-text);
  text-decoration: none;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sp-pagination-page:hover {
  background: rgba(20, 10, 10, 0.7);
}

.sp-pagination-page.active {
  background: var(--sp-accent);
  color: #000;
  border-color: var(--sp-accent);
}

.sp-pagination-page.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.sp-table thead {
  background: rgba(10, 5, 5, 0.9);
}

.sp-table th,
.sp-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(60, 38, 40, 0.8);
  text-align: left;
}

.sp-table th {
  font-weight: 500;
  color: var(--sp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.sp-table tr:hover td {
  background: rgba(20, 10, 10, 0.7);
}

.sp-table-empty td {
  text-align: center;
  color: var(--sp-text-muted);
}

.sp-table-filters th {
  padding: 0.3rem 0.6rem;
  border-bottom: none;
}

.sp-filter-input {
  width: 100%;
  padding: 0.3rem 0.4rem;
  background: rgba(20, 10, 10, 0.5);
  border: 1px solid rgba(60, 38, 40, 0.8);
  border-radius: 0.3rem;
  color: var(--sp-text);
  font-size: 0.8rem;
}

.sp-filter-input::placeholder {
  color: var(--sp-text-muted);
}

.sp-filter-input:focus {
  outline: none;
  border-color: var(--sp-accent);
  box-shadow: 0 0 0 2px rgba(255, 123, 41, 0.2);
}

.sp-filter-select {
  width: 100%;
  padding: 0.3rem 0.4rem;
  background: rgba(20, 10, 10, 0.5);
  border: 1px solid rgba(60, 38, 40, 0.8);
  border-radius: 0.3rem;
  color: var(--sp-text);
  font-size: 0.8rem;
}

.sp-filter-select:focus {
  outline: none;
  border-color: var(--sp-accent);
  box-shadow: 0 0 0 2px rgba(255, 123, 41, 0.2);
}

.edit-name,
.edit-email,
.edit-company,
.edit-tag {
  width: 100%;
  padding: 0.2rem 0.3rem;
  background: rgba(20, 10, 10, 0.5);
  border: 1px solid rgba(60, 38, 40, 0.8);
  border-radius: 0.3rem;
  color: var(--sp-text);
  font-size: 0.86rem;
}

.edit-name:focus,
.edit-email:focus,
.edit-company:focus,
.edit-tag:focus {
  outline: none;
  border-color: var(--sp-accent);
  box-shadow: 0 0 0 2px rgba(255, 123, 41, 0.2);
}

/* ==========================
   IMPORT STATUS
========================== */

.sp-import-status {
  margin: 0.6rem 0 0.4rem;
  font-size: 0.8rem;
  color: var(--sp-text-muted);
  min-height: 1rem;
}

.sp-import-status strong {
  color: var(--sp-primary);
}

.sp-btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

.sp-sequence-contacts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sp-sequence-contacts-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.1rem;
  border-bottom: 1px solid rgba(60, 38, 40, 0.6);
  font-size: 0.85rem;
  color: #ffffff;
}

.sp-sequence-contacts-list li:last-child {
  border-bottom: none;
}

.sp-sequence-contacts-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  cursor: pointer;
  color: #ffffff;
}

.sp-sequence-contacts-list .sp-contact-name {
  color: #ffffff;
}

/* ==========================
   EMAIL PREVIEW
========================== */

.sp-email-preview-meta {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.9rem;
  color: white;
}

.sp-email-preview-meta div + div {
  margin-top: 0.2rem;
}

.sp-email-preview-body-wrapper {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.7rem;
}

.sp-email-preview-body-title {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: white;
}

.sp-email-preview-body {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap; /* preserve line breaks */
  background: rgba(0, 0, 0, 0.4);
  border-radius: 0.5rem;
  padding: 0.8rem;
  max-height: 320px;
  overflow-y: auto;
  color: white;
}

.sp-job-cancelled {
  opacity: 0.5;
  font-style: italic;
}

/* === Preview Tabs === */
.sp-preview-tabs {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  margin: 1rem 0;
}

.sp-preview-tab {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sp-preview-tab--active {
  background: #ff7a1a;
  color: #050509;
}

/* Content switching */
.sp-preview-content {
  display: none;
}

.sp-preview-content--active {
  display: block;
}

/* HTML preview iframe */
.sp-preview-html-frame {
  width: 100%;
  min-height: 380px;
  max-height: 520px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0b0b11;
}

/* Job status styles */
.status {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-pending {
  background: rgba(255, 123, 41, 0.2);
  color: #ff7b29;
}

.status-sent {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.status-cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

            .sp-card-locked {
              background: radial-gradient(ellipse at 60% 0%, rgba(255,122,26,0.13) 0%, rgba(24,24,36,0.98) 80%);
              border-radius: 18px;
              padding: 2rem 2.5rem 1.5rem 2.5rem;
              margin: 2rem auto 2.5rem auto;
              max-width: 600px;
              box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
              display: flex;
              align-items: flex-start;
              gap: 1.5rem;
            }
            .sp-locked-badge {
              display: flex;
              align-items: center;
              gap: 0.5rem;
              font-size: 1.08rem;
              color: #FF7A1A;
              font-weight: 600;
              margin-top: 0.2rem;
            }
            .sp-locked-badge svg {
              display: inline-block;
              vertical-align: middle;
            }
            .sp-locked-content h3 {
              margin: 0 0 0.3rem 0;
              font-size: 1.18rem;
              color: #fff;
              font-weight: 600;
            }
            .sp-locked-content p {
              margin: 0 0 1.1rem 0;
              color: #e6e6f0;
              font-size: 1.01rem;
            }
            .sp-card-verification {
              background: #181824;
              border-radius: 18px;
              padding: 2rem 2.5rem;
              margin: 2rem auto 2.5rem auto;
              max-width: 780px;
              box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
            }
            .sp-verification-step {
              margin-bottom: 2.2rem;
            }
            .sp-verification-step-header {
              display: flex;
              align-items: center;
              margin-bottom: 0.5rem;
            }
            .sp-verification-step-number {
              display: inline-block;
              background: #FF7A1A;
              color: #fff;
              font-weight: bold;
              border-radius: 50%;
              width: 2.1rem;
              height: 2.1rem;
              text-align: center;
              line-height: 2.1rem;
              font-size: 1.2rem;
              margin-right: 1rem;
              box-shadow: 0 1px 4px 0 rgba(0,0,0,0.10);
            }
            .sp-verification-step-title {
              font-size: 1.15rem;
              font-weight: 600;
              color: #fff;
            }
            .sp-verification-help {
              color: #bdbdd6;
              font-size: 1.01rem;
              margin-bottom: 0.7rem;
            }
            .sp-verification-recommend {
              color: #FF7A1A;
              font-weight: 500;
            }
            .sp-verification-input-row {
              display: flex;
              gap: 1rem;
              margin-bottom: 0.7rem;
            }
            .sp-input {
              background: #23233a;
              border: 1px solid rgba(255,255,255,0.08);
              border-radius: 8px;
              color: #fff;
              padding: 0.7rem 1rem;
              font-size: 1.05rem;
              flex: 1 1 0;
              outline: none;
              transition: border 0.2s;
            }
            .sp-input:focus {
              border: 1.5px solid #FF7A1A;
            }
            .sp-btn-ghost {
              background: none;
              border: 1.5px solid #44445a;
              color: #FF7A1A;
              font-weight: 600;
              border-radius: 8px;
              padding: 0.7rem 1.2rem;
              transition: border 0.2s, background 0.2s;
            }
            .sp-btn-ghost:hover {
              border: 1.5px solid #FF7A1A;
              background: rgba(255,122,26,0.07);
            }
            .sp-verification-info {
              color: #bdbdd6;
              font-size: 0.98rem;
              margin-bottom: 0.5rem;
              margin-top: 0.2rem;
            }
            .sp-verification-divider {
              height: 2px;
              width: 100%;
              background: linear-gradient(90deg, var(--sp-accent), transparent);
              border-radius: 999px;
              margin: 2.2rem 0 2.2rem 0;
            }
            .sp-dns-records-table {
              width: 100%;
              border-collapse: collapse;
              font-size: 0.86rem;
              margin-bottom: 0.7rem;
            }
            .sp-dns-records-table thead {
              background: rgba(10, 5, 5, 0.9);
            }
            .sp-dns-records-table th,
            .sp-dns-records-table td {
              padding: 0.6rem 0.8rem;
              border-bottom: 1px solid rgba(60, 38, 40, 0.8);
              text-align: left;
            }
            .sp-dns-records-table th {
              font-weight: 500;
              color: var(--sp-text-muted);
              text-transform: uppercase;
              letter-spacing: 0.06em;
              font-size: 0.75rem;
            }
            .sp-dns-records-table tbody tr:hover td {
              background: rgba(20, 10, 10, 0.7);
            }
            .sp-dns-value {
              font-family: 'Courier New', monospace;
              background: rgba(20, 10, 10, 0.5);
              padding: 0.2rem 0.4rem;
              border-radius: 3px;
              font-size: 0.8rem;
              word-break: break-all;
            }
            .sp-btn-xs {
              font-size: 0.93rem;
              padding: 0.4rem 0.9rem;
              border-radius: 7px;
            }
            .sp-btn-primary {
              background: var(--sp-btn-gradient, linear-gradient(90deg, #FF7A1A 80%, #ffb36b 100%));
              color: #fff;
              border: none;
              border-radius: 8px;
              font-weight: 600;
              padding: 0.7rem 1.5rem;
              box-shadow: 0 1px 8px 0 rgba(0,0,0,0.07);
              transition: background 0.2s;
            }
            .sp-btn-primary:hover {
              background: var(--sp-btn-gradient-hover, linear-gradient(90deg, #ffb36b 0%, #FF7A1A 100%));
            }
            .sp-verification-status {
              margin-top: 0.7rem;
              font-size: 1.08rem;
              font-weight: 600;
              border-radius: 7px;
              padding: 0.3rem 1.1rem;
              display: inline-block;
            }
            .sp-status-pending {
              background: rgba(255,122,26,0.13);
              color: #FF7A1A;
            }
            .sp-status-verified {
              background: rgba(46, 204, 113, 0.13);
              color: #2ecc71;
            }
            .sp-status-failed {
              background: rgba(231, 76, 60, 0.13);
              color: #e74c3c;
            }
            .sp-verification-note {
              color: #bdbdd6;
              font-size: 0.97rem;
              margin-top: 0.5rem;
            }

                        .sp-card-guide {
              background: #181824;
              border-radius: 18px;
              padding: 2rem 2.5rem;
              margin: 2rem auto 2.5rem auto;
              max-width: 900px;
              box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
            }
            .sp-guide-list {
              list-style: none;
              margin: 0;
              padding: 0;
            }
            .sp-guide-step {
              margin-bottom: 2.2rem;
              padding-bottom: 2.2rem;
              border-bottom: 1px solid rgba(255,255,255,0.07);
            }
            .sp-guide-step:last-child {
              border-bottom: none;
              margin-bottom: 0;
              padding-bottom: 0;
            }
            .sp-guide-step-header {
              display: flex;
              align-items: center;
              margin-bottom: 0.5rem;
            }
            .sp-guide-step-number {
              display: inline-block;
              background: #FF7A1A;
              color: #fff;
              font-weight: bold;
              border-radius: 50%;
              width: 2.1rem;
              height: 2.1rem;
              text-align: center;
              line-height: 2.1rem;
              font-size: 1.2rem;
              margin-right: 1rem;
              box-shadow: 0 1px 4px 0 rgba(0,0,0,0.10);
            }
            .sp-guide-step-title {
              font-size: 1.15rem;
              font-weight: 600;
              color: #fff;
            }
            .sp-guide-video-placeholder {
              margin-top: 1rem;
              margin-bottom: 0.5rem;
            }
            .sp-guide-video-frame {
              width: 100%;
              max-width: 800px;
              height: 450px;
              background: linear-gradient(135deg, #23233a 60%, #181824 100%);
              border: 2px dashed #44445a;
              border-radius: 12px;
              display: flex;
              align-items: center;
              justify-content: center;
              color: #8888a0;
              font-size: 1.1rem;
              font-style: italic;
              margin: 0 auto;
              box-shadow: 0 1px 8px 0 rgba(0,0,0,0.07);
            }
            .sp-guide-video-section {
              margin-bottom: 2rem;
            }
            .sp-guide-video-section:last-child {
              margin-bottom: 0;
            }
            .sp-guide-video-section h3 {
              font-size: 1.2rem;
              font-weight: 600;
              color: #fff;
              margin-bottom: 0.5rem;
            }
            .sp-guide-video-section p {
              color: #ccc;
              margin-bottom: 1rem;
              font-size: 0.95rem;
            }
            .pro-only {
              display: none;
            }
            .pro-only.pro-visible {
              display: block;
            }

/* ==========================
   QUICK START CHECKLIST (FLOATING)
========================== */

.sp-quick-start-floating {
  position: fixed;
  top: 100px;
  right: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 1000;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-20px);
}

.sp-quick-start-floating.visible {
  opacity: 1;
  transform: translateY(0);
}

.sp-quick-start-floating.collapsed .sp-floating-content {
  display: none;
}

.sp-quick-start-floating.completed {
  display: none !important;
}

.sp-floating-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem 1rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sp-floating-header h3 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-floating-toggle {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-floating-toggle:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.sp-floating-content {
  padding: 1.5rem 2rem 2rem;
  max-height: 70vh;
  overflow-y: auto;
}

.sp-checklist-subtitle {
  color: #ccc;
  font-size: 0.9rem;
  margin: 0 0 1.5rem 0;
}

.sp-checklist-items {
  display: grid;
  gap: 1rem;
}

.sp-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.sp-checklist-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.sp-checklist-item.completed {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.3);
}

.sp-checklist-status {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.sp-checklist-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  text-align: center;
  line-height: 24px;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.sp-checklist-item.completed .sp-checklist-icon {
  background: #2ecc71;
  content: "✓";
}

.sp-checklist-item.completed .sp-checklist-icon:before {
  content: "✓";
}

.sp-checklist-content {
  flex: 1;
}

.sp-checklist-content h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.sp-checklist-content p {
  color: #ccc;
  font-size: 0.85rem;
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.sp-checklist-content .sp-btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .sp-quick-start-floating {
    top: 80px;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

/* ==========================
   ANALYTICS
========================== */

.sp-analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.sp-summary-card {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
}

.sp-summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sp-text);
  margin-bottom: 0.5rem;
}

.sp-summary-label {
  font-size: 0.875rem;
  color: var(--sp-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ==========================
   SEQUENCE PREVIEW PANEL
========================== */

.sp-sequence-preview-panel {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 500px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 140px);
  min-width: 400px;
  min-height: 300px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 1003;
  display: flex;
  flex-direction: column;
  cursor: move;
  resize: none; /* We'll handle resize manually */
  overflow: hidden; /* Prevent content overflow during resize */
}

.sp-sequence-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--sp-border-subtle);
  background: var(--sp-bg-secondary);
  border-radius: 8px 8px 0 0;
  cursor: move;
}

.sp-sequence-preview-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-sequence-preview-zoom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.sp-sequence-preview-zoom-btn {
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  color: var(--sp-text);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sp-sequence-preview-zoom-btn:hover:not(:disabled) {
  background: var(--sp-primary);
  color: white;
  border-color: var(--sp-primary);
}

.sp-sequence-preview-nav-btn {
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  color: var(--sp-text);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sp-sequence-preview-nav-btn:hover:not(:disabled) {
  background: var(--sp-primary);
  color: white;
  border-color: var(--sp-primary);
}

.sp-sequence-preview-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sp-sequence-preview-step-info {
  font-size: 0.9rem;
  color: var(--sp-text-muted);
  min-width: 80px;
  text-align: center;
}

.sp-sequence-preview-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sp-text);
}

.sp-sequence-preview-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--sp-text-muted);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sp-sequence-preview-close:hover {
  color: var(--sp-text);
  background: var(--sp-bg-hover);
}

.sp-sequence-preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0; /* Allow flex item to shrink below content size */
}

.sp-sequence-preview-meta {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--sp-border-subtle);
  background: var(--sp-bg-secondary);
  font-size: 0.9rem;
}

.sp-sequence-preview-meta > div {
  margin-bottom: 0.25rem;
}

.sp-sequence-preview-meta > div:last-child {
  margin-bottom: 0;
}

.sp-sequence-preview-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sp-sequence-preview-tabs {
  display: flex;
  border-bottom: 1px solid var(--sp-border-subtle);
}

.sp-sequence-preview-tab {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--sp-text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.sp-sequence-preview-tab.active {
  color: var(--sp-primary);
  border-bottom-color: var(--sp-primary);
}

.sp-sequence-preview-tab:hover {
  color: var(--sp-text);
}

.sp-sequence-preview-iframe-container {
  flex: 1;
  overflow: auto;
}

.sp-sequence-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.sp-sequence-preview-text {
  flex: 1;
  padding: 1rem;
  overflow: auto;
  background: var(--sp-bg);
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.sp-sequence-preview-text pre {
  margin: 0;
  color: var(--sp-text);
}

/* Resize handle */
.sp-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: nw-resize;
  background: linear-gradient(-45deg, transparent 0%, transparent 40%, var(--sp-primary) 40%, var(--sp-primary) 60%, transparent 60%, transparent 100%);
}

.sp-resize-handle-se {
  bottom: 0;
  right: 0;
}

/* ===== UPGRADE PANEL STYLES ===== */

.sp-card-status {
  background: var(--sp-primary-soft);
  border: 1px solid var(--sp-accent);
  margin-bottom: 2rem;
}

.sp-status-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sp-status-icon {
  font-size: 2rem;
  opacity: 0.8;
}

.sp-status-info h3 {
  margin: 0 0 0.25rem 0;
  color: var(--sp-text);
  font-size: 1.1rem;
}

.sp-status-info p {
  margin: 0;
  color: var(--sp-text-secondary);
  font-size: 0.9rem;
}

.sp-card-upgrade {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.2);
  margin-bottom: 2rem;
}

.sp-upgrade-header {
  text-align: center;
  margin-bottom: 2rem;
}

.sp-upgrade-header h3 {
  margin: 0 0 0.5rem 0;
  color: var(--sp-text);
  font-size: 1.3rem;
}

.sp-upgrade-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: #22c55e;
  margin: 0;
}

.sp-upgrade-period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--sp-text-secondary);
}

.sp-upgrade-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.sp-upgrade-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.sp-feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.sp-feature-content h4 {
  margin: 0 0 0.25rem 0;
  color: var(--sp-text);
  font-size: 1rem;
  font-weight: 600;
}

.sp-feature-content p {
  margin: 0;
  color: var(--sp-text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

.sp-upgrade-cta {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(34, 197, 94, 0.2);
}

.sp-btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.sp-upgrade-note {
  margin: 1rem 0 0 0;
  font-size: 0.85rem;
  color: var(--sp-text-secondary);
  font-style: italic;
}

/* Pro benefits card for existing pro users */
.sp-card-pro-benefits {
  background: linear-gradient(135deg, var(--sp-bg-elevated) 0%, var(--sp-primary-soft) 100%);
  border: 1px solid var(--sp-accent);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sp-card-pro-benefits h3 {
  color: var(--sp-accent);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.sp-card-pro-benefits p {
  color: var(--sp-text);
  margin-bottom: 1rem;
}

.sp-pro-features {
  display: grid;
  gap: 0.5rem;
}

.sp-pro-feature {
  color: var(--sp-text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-card-comparison {
  background: var(--sp-card-bg);
  border: 1px solid var(--sp-border);
}

.sp-card-comparison h3 {
  margin: 0 0 1.5rem 0;
  color: var(--sp-text);
  font-size: 1.2rem;
  text-align: center;
}

.sp-comparison-table {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  overflow: hidden;
}

.sp-comparison-row {
  display: contents;
}

.sp-comparison-row > div {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--sp-border);
}

.sp-comparison-row:last-child > div {
  border-bottom: none;
}

.sp-comparison-header {
  background: var(--sp-bg-secondary);
  font-weight: 600;
}

.sp-comparison-feature {
  font-weight: 500;
  color: var(--sp-text);
}

.sp-comparison-maker {
  background: rgba(255, 123, 41, 0.05);
  color: var(--sp-text-secondary);
}

.sp-comparison-studio {
  background: rgba(34, 197, 94, 0.05);
  color: #22c55e;
  font-weight: 600;
}

/* Dark theme adjustments */
.sp-body.sp-theme-dark .sp-card-status {
  background: linear-gradient(135deg, rgba(255, 123, 41, 0.15), rgba(255, 123, 41, 0.08));
  border-color: rgba(255, 123, 41, 0.3);
}

.sp-body.sp-theme-dark .sp-card-upgrade {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.08));
  border-color: rgba(34, 197, 94, 0.3);
}

.sp-body.sp-theme-dark .sp-comparison-maker {
  background: rgba(255, 123, 41, 0.1);
}

.sp-body.sp-theme-dark .sp-comparison-studio {
  background: rgba(34, 197, 94, 0.1);
}

/* ==========================
   BILLING HISTORY CARD
========================== */

.sp-card-billing {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 0.8rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.sp-card-billing .sp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--sp-border-subtle);
}

.sp-card-billing .sp-card-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sp-text);
}

.sp-billing-list {
  max-height: 300px;
  overflow-y: auto;
}

.sp-billing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--sp-border-subtle);
}

.sp-billing-item:last-child {
  border-bottom: none;
}

.sp-billing-info {
  flex: 1;
}

.sp-billing-type {
  font-weight: 600;
  color: var(--sp-text);
  margin-bottom: 0.25rem;
}

.sp-billing-details {
  font-size: 0.85rem;
  color: var(--sp-text-muted);
}

.sp-billing-amount {
  font-weight: 600;
  color: var(--sp-accent);
}

.sp-billing-date {
  font-size: 0.8rem;
  color: var(--sp-text-muted);
  margin-top: 0.25rem;
}

.sp-billing-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--sp-text-muted);
}

.sp-billing-empty p {
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.sp-billing-empty small {
  font-size: 0.85rem;
}

.sp-billing-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sp-border-subtle);
}

.sp-billing-actions .sp-btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Dark theme adjustments for billing */
.sp-body.sp-theme-dark .sp-card-billing {
  background: var(--sp-bg-card);
  border-color: var(--sp-border);
}

.sp-body.sp-theme-dark .sp-billing-item {
  border-color: var(--sp-border-subtle);
}

.sp-body.sp-theme-dark .sp-card-billing .sp-card-header {
  border-color: var(--sp-border-subtle);
}

.sp-body.sp-theme-dark .sp-billing-actions {
  border-color: var(--sp-border-subtle);
}

/* ==========================
   POLICY PANELS
========================== */

.sp-panel-content {
  padding: 1.5rem;
  background: radial-gradient(circle at top left, #2a1a1a 0, #151010 70%);
  border-radius: var(--sp-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--sp-shadow-subtle);
}

.sp-panel-content h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--sp-text);
}

.sp-panel-intro {
  font-size: 0.9rem;
  color: var(--sp-text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-policy-section {
  margin-bottom: 2rem;
}

.sp-policy-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--sp-primary);
  font-weight: 600;
}

.sp-policy-section h4 {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  color: var(--sp-text);
  font-weight: 500;
}

.sp-policy-section p {
  line-height: 1.6;
  color: var(--sp-text-soft);
  margin-bottom: 1rem;
}

.sp-policy-section ul {
  margin: 0.5rem 0 1rem 1.5rem;
  padding: 0;
}

.sp-policy-section li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: var(--sp-text-soft);
}

.sp-policy-section li strong {
  color: var(--sp-text);
}

.sp-warning-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.6rem;
  padding: 1rem;
  margin: 1rem 0;
  color: #fca5a5;
}

.sp-warning-box strong {
  color: #ef4444;
  display: block;
  margin-bottom: 0.5rem;
}

.sp-subprocessor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.sp-subprocessor {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.6rem;
  padding: 1rem;
  text-align: center;
}

.sp-subprocessor strong {
  display: block;
  color: var(--sp-text);
  margin-bottom: 0.25rem;
}

.sp-subprocessor small {
  color: var(--sp-text-muted);
  font-size: 0.8rem;
}

/* Brand Theme Toggle */
.sp-brand-toggle-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.sp-brand-toggle-btn {
  width: 48px;
  height: 48px;
  background: var(--sp-bg-elevated);
  border: 1px solid var(--sp-border);
  border-radius: 50%;
  color: var(--sp-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.sp-brand-toggle-btn:hover {
  background: var(--sp-accent);
  color: white;
  transform: scale(1.05);
}

.sp-brand-theme-panel {
  background: var(--sp-bg-elevated);
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.sp-brand-theme-panel:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}

.sp-brand-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--sp-text);
  cursor: pointer;
}

.sp-brand-theme-toggle input[type="checkbox"] {
  display: none;
}

.sp-toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--sp-bg-secondary);
  border-radius: 12px;
  transition: background 0.3s ease;
}

.sp-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.sp-brand-theme-toggle input[type="checkbox"]:checked + .sp-toggle-slider {
  background: var(--sp-accent);
}

.sp-brand-theme-toggle input[type="checkbox"]:checked + .sp-toggle-slider::before {
  transform: translateX(20px);
}

@media (max-width: 768px) {
  .sp-brand-toggle-container {
    bottom: 1rem;
    right: 1rem;
  }

  .sp-brand-toggle-btn {
    width: 44px;
    height: 44px;
  }

  .sp-brand-theme-panel {
    min-width: 180px;
    padding: 0.75rem;
  }
}

.sp-brand-toggle-container.sp-brand-toggle-visible {
  display: flex !important;
}

.sp-brand-toggle-btn.sp-brand-toggle-visible {
  display: flex !important;
}

.sp-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.sp-status-badge.sp-status-verified {
  background: var(--sp-success-bg);
  color: var(--sp-success);
}

.sp-status-badge.sp-status-pending {
  background: var(--sp-warning-bg);
  color: var(--sp-warning);
}

.sp-status-badge.sp-status-failed {
  background: var(--sp-error-bg);
  color: var(--sp-error);
}

.sp-status-badge.sp-status-not-started {
  background: var(--sp-bg-secondary);
  color: var(--sp-text-muted);
}

.sp-dns-records {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sp-dns-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--sp-bg-secondary);
  border-radius: 0.5rem;
  border: 1px solid var(--sp-border);
}

.sp-dns-record-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.sp-dns-type {
  font-weight: 600;
  color: var(--sp-accent);
  font-size: 0.875rem;
}

.sp-dns-name,
.sp-dns-value {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  word-break: break-all;
}

.sp-dns-priority {
  font-size: 0.75rem;
  color: var(--sp-text-muted);
}

.sp-copy-btn {
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.sp-sender-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
}

.sp-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sp-form-row label {
  font-weight: 500;
  color: var(--sp-text);
}

.sp-form-row input {
  padding: 0.75rem;
  border: 1px solid var(--sp-border);
  border-radius: 0.5rem;
  background: var(--sp-bg);
  color: var(--sp-text);
  font-size: 1rem;
}

.sp-form-row input:focus {
  outline: none;
  border-color: var(--sp-accent);
  box-shadow: 0 0 0 2px var(--sp-accent-alpha);
}

/* ==========================
   DOMAIN REPUTATION DISPLAY
========================== */

.sp-domain-reputation {
  margin-bottom: 2rem;
}

.sp-reputation-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  position: relative;
  background: conic-gradient(
    var(--sp-accent) 0deg,
    var(--sp-accent) var(--reputation-angle, 306deg),
    rgba(255, 255, 255, 0.1) var(--reputation-angle, 306deg),
    rgba(255, 255, 255, 0.1) 360deg
  );
  box-shadow: 0 0 20px rgba(255, 123, 41, 0.3);
}

.sp-reputation-score-circle::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #1a1a1a 0%, #0d0d0d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-reputation-score-value {
  position: relative;
  font-size: 2rem;
  font-weight: 700;
  color: var(--sp-text);
  z-index: 1;
}

.sp-reputation-score-label {
  position: relative;
  font-size: 0.8rem;
  color: var(--sp-text-muted);
  margin-top: 0.25rem;
  z-index: 1;
}

.sp-reputation-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sp-reputation-metric {
  background: rgba(26, 26, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--sp-radius);
  padding: 1rem;
  text-align: center;
}

.sp-reputation-metric-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--sp-text);
  margin-bottom: 0.25rem;
}

.sp-reputation-metric-label {
  font-size: 0.85rem;
  color: var(--sp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sp-reputation-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--sp-radius);
  font-size: 0.9rem;
  font-weight: 500;
}

.sp-reputation-status--excellent {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.sp-reputation-status--good {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.sp-reputation-status--fair {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.sp-reputation-status--poor {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.sp-reputation-status-icon {
  font-size: 1.1rem;
}

/* ==========================
   RECOMMENDED SETTINGS
========================== */

.sp-recommended-settings {
  background: rgba(26, 26, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--sp-radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sp-recommended-settings h4 {
  margin: 0 0 0.75rem 0;
  color: var(--sp-text);
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-recommended-settings h4::before {
  content: "💡";
  font-size: 1.1rem;
}

.sp-recommended-settings p {
  margin: 0 0 1.5rem 0;
  color: var(--sp-text-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}

.sp-settings-grid {
  display: grid;
  gap: 1.25rem;
}

.sp-setting-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(19, 10, 10, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--sp-radius);
  transition: all 0.2s ease;
  gap: 1rem;
}

.sp-setting-item:hover {
  background: rgba(19, 10, 10, 1);
  border-color: rgba(255, 123, 41, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 123, 41, 0.1);
}

.sp-setting-info {
  flex: 1;
}

.sp-setting-info h5 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sp-text);
}

.sp-setting-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--sp-text-muted);
  line-height: 1.4;
}

.sp-setting-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 123, 41, 0.1);
  border: 1px solid rgba(255, 123, 41, 0.3);
  border-radius: var(--sp-radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sp-accent);
  min-width: fit-content;
}

.sp-setting-value::before {
  content: "✓";
  color: var(--sp-accent);
  font-weight: bold;
}

/* ==========================
   PRO UPGRADE NOTICE
========================== */

.sp-pro-upgrade-notice {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(255, 123, 41, 0.05) 0%, rgba(255, 123, 41, 0.02) 100%);
  border: 1px solid rgba(255, 123, 41, 0.2);
  border-radius: var(--sp-radius-lg);
  margin: 1rem 0;
}

.sp-pro-upgrade-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.sp-pro-upgrade-icon .material-icons {
  font-size: 3rem;
  color: var(--sp-primary);
  opacity: 0.8;
}

.sp-pro-upgrade-notice h4 {
  color: var(--sp-text);
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.sp-pro-upgrade-notice p {
  color: var(--sp-text-soft);
  margin: 0 0 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sp-pro-upgrade-notice .sp-btn {
  margin-top: 0.5rem;
}

/* Plan-based feature gating */
.pro-only {
  display: none;
}

.pro-only.pro-visible {
  display: block;
}

/* ==========================
   QUICK START TEMPLATES
========================== */

.sp-templates-quick-start {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--sp-bg-elevated) 0%, var(--sp-bg) 100%);
  border-radius: 1rem;
  border: 1px solid var(--sp-border-subtle);
}

.sp-templates-quick-start h3 {
  margin: 0 0 0.5rem 0;
  color: var(--sp-text);
  font-size: 1.25rem;
  font-weight: 600;
}

.sp-templates-quick-start p {
  margin: 0 0 1.5rem 0;
  color: var(--sp-text-soft);
  font-size: 0.875rem;
}

.sp-template-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.sp-template-card {
  background: var(--sp-bg);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sp-template-card:hover {
  border-color: var(--sp-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.sp-template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sp-template-header h4 {
  margin: 0;
  color: var(--sp-text);
  font-size: 1rem;
  font-weight: 600;
}

.sp-template-category {
  background: var(--sp-primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.sp-template-preview {
  margin-bottom: 1rem;
}

.sp-template-subject {
  font-weight: 600;
  color: var(--sp-text);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  padding: 0.5rem;
  background: var(--sp-bg-elevated);
  border-radius: 0.375rem;
  border-left: 3px solid var(--sp-primary);
}

.sp-template-body {
  color: var(--sp-text-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 0.75rem;
  background: var(--sp-bg-elevated);
  border-radius: 0.375rem;
  max-height: 120px;
  overflow: hidden;
  position: relative;
}

.sp-template-body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--sp-bg-elevated));
  pointer-events: none;
}

.sp-template-signature {
  color: var(--sp-text-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
  background: var(--sp-bg-elevated);
  border-radius: 0.375rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--sp-primary);
  font-style: italic;
}

.sp-template-actions {
  display: flex;
  justify-content: flex-end;
}

.sp-template-actions .sp-btn {
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sp-template-cards {
    grid-template-columns: 1fr;
  }

  .sp-templates-quick-start {
    padding: 1rem;
  }

  .sp-template-card {
    padding: 1rem;
  }
}

/* ==========================
   CONTEXTUAL TIPS & GUIDANCE
========================== */

.sp-contextual-tip {
  margin-bottom: 1.5rem;
  animation: slideInFromTop 0.5s ease-out;
}

.sp-tip-content {
  background: linear-gradient(135deg, var(--sp-primary-light), var(--sp-primary));
  border: 1px solid var(--sp-primary);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sp-tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.sp-tip-text h4 {
  margin: 0 0 0.5rem 0;
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.sp-tip-text p {
  margin: 0 0 1rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.5;
}

.sp-tip-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sp-tip-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.sp-welcome-tip .sp-tip-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

/* ==========================
   SETUP PROGRESS INDICATOR
========================== */

.sp-setup-progress {
  margin-bottom: 2rem;
}

.sp-card-progress {
  background: var(--sp-bg-elevated);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 1rem;
  padding: 1.5rem;
}

.sp-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sp-progress-header h3 {
  margin: 0;
  color: var(--sp-text);
  font-size: 1.25rem;
  font-weight: 600;
}

.sp-progress-percentage {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sp-primary);
}

.sp-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.sp-progress-fill {
  height: 100%;
  background: #4CAF50;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.sp-progress-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.sp-progress-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-step-icon {
  font-size: 1rem;
  color: var(--sp-text-soft);
  transition: all 0.3s ease;
}

.sp-progress-step[data-step="completed"] .sp-step-icon {
  color: var(--sp-success);
}

.sp-progress-step[data-step="current"] .sp-step-icon {
  color: var(--sp-primary);
  animation: pulse 2s infinite;
}

.sp-step-label {
  font-size: 0.8125rem;
  color: var(--sp-text-soft);
  font-weight: 500;
}

.sp-progress-step[data-step="completed"] .sp-step-label {
  color: var(--sp-text);
}

.sp-progress-step[data-step="current"] .sp-step-label {
  color: var(--sp-primary);
  font-weight: 600;
}

/* ==========================
   ACHIEVEMENTS SECTION
========================== */

.sp-achievements {
  margin-bottom: 2rem;
}

.sp-card-achievements {
  background: var(--sp-bg-elevated);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 1rem;
  padding: 1.5rem;
}

.sp-achievements-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.sp-achievements-header h3 {
  margin: 0;
  color: var(--sp-text);
  font-size: 1.25rem;
  font-weight: 600;
}

.sp-achievements-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sp-achievements-count {
  font-size: 0.875rem;
  color: var(--sp-text-soft);
  font-weight: 500;
}

.sp-achievements-toggle {
  background: none;
  border: none;
  color: var(--sp-text-soft);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-achievements-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sp-text);
}

.sp-achievements-toggle .material-icons {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.sp-achievements-content {
  overflow: hidden;
  transition: all 0.3s ease;
  max-height: 1000px;
  opacity: 1;
}

.sp-achievements.collapsed .sp-achievements-content {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.sp-achievements.collapsed .sp-achievements-toggle .material-icons {
  transform: rotate(180deg);
}

.sp-achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.sp-achievement-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.sp-achievement-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.sp-badge-icon {
  font-size: 1.5rem;
  width: 2rem;
  text-align: center;
}

.sp-badge-content {
  flex: 1;
}

.sp-badge-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sp-text);
}

.sp-badge-content p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--sp-text-soft);
}

.sp-badge-status {
  font-size: 1.25rem;
  color: var(--sp-text-soft);
  transition: all 0.3s ease;
}

.sp-achievement-badge[data-earned="true"] .sp-badge-status {
  color: var(--sp-success);
}

.sp-achievement-badge[data-earned="true"] {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
}

.sp-achievement-badge.pro-only {
  border-color: rgba(255, 215, 0, 0.3);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 215, 0, 0.02) 100%);
}

.sp-achievement-badge.pro-only .sp-badge-content h4::after {
  content: " ✨";
  font-size: 0.8em;
}

.sp-achievement-badge.pro-only[data-earned="true"] {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-color: rgba(255, 215, 0, 0.5);
}

/* Animations */
@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes badgeEarned {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.sp-achievement-badge[data-earned="true"] .sp-badge-status {
  animation: badgeEarned 0.6s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sp-tip-content {
    flex-direction: column;
    gap: 0.75rem;
  }

  .sp-tip-actions {
    justify-content: center;
  }

  .sp-progress-steps {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .sp-progress-step {
    justify-content: center;
  }

  .sp-achievements-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .sp-achievement-badge {
    padding: 0.75rem;
  }
}
@media (max-width: 768px) {
  .sp-tip-content {
    flex-direction: column;
    gap: 0.75rem;
  }

  .sp-tip-actions {
    justify-content: center;
  }

  .sp-progress-steps {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .sp-progress-step {
    justify-content: center;
  }
}

/* Contact selector in template preview */
.sp-preview-contact-selector {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(20, 10, 10, 0.3);
  border: 1px solid rgba(60, 38, 40, 0.5);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-preview-contact-label {
  margin-bottom: 0;
  font-weight: 500;
  color: var(--sp-text);
  font-size: 0.9rem;
  white-space: nowrap;
}

.sp-preview-contact-dropdown {
  flex: 1;
  padding: 0.5rem;
  background: rgba(20, 10, 10, 0.5);
  border: 1px solid rgba(60, 38, 40, 0.8);
  border-radius: 0.3rem;
  color: var(--sp-text);
  font-size: 0.9rem;
}

.sp-preview-contact-dropdown:focus {
  outline: none;
  border-color: var(--sp-accent);
  box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}