/* Modern Design System for SFMC Tools */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #06b6d4;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* FormBuilder specific variables */
  --drop-dash: #cbd5e1;
  --editing-bg: #f1f5f9;
  --editing-bd: #94a3b8;
  --indicator: #94a3b8;

  /* Brand color rules by domain (for charts, pills, accents) */
  /* Leads → green shades */
  --lead-500: #81C784; /* New Leads */
  --lead-600: #66BB6A;
  --lead-700: #43A047;
  /* Contacts → blue shades */
  --contact-500: #2196F3; /* Existing Contacts */
  --contact-600: #1E88E5;
  --contact-700: #1565C0;
  /* Existing Leads (neutral grey from import03) */
  --existing-lead-500: #A2ADB6;
  --existing-lead-600: #90A4AE;
  /* Duplicates → orange shades */
  --duplicate-500: #FFB74D;
  --duplicate-600: #FF9800;
  /* Errors → red */
  --error-500: #E53935;
  /* Skipped/Neutral */
  --neutral-500: #9E9E9E;
}

/* Global Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--light-bg);
}

/* Modern Header Styling */
.page-header {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--light-bg) 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-primary);
  padding-left: 1.5rem;
}

.page-title i {
  margin-right: 0.5rem;
  color: var(--primary-color);
  font-size: 2rem;
}

.page-title + small,
.page-title + p {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

.page-badge {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Standard step indicator used across all pages (1/3, 2/3, etc.) */
.step-indicator {
  display: inline-block;
  min-width: 60px;
  text-align: center;
  background: #f1f5f9; /* light gray */
  color: #334155;      /* slate-700 */
  border: 1px solid var(--border-color);
  font-size: 1.6rem;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Modern Form Styling */
.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.form-control, .form-select {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  background: var(--card-bg);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.form-control:hover, .form-select:hover {
  border-color: var(--primary-color);
}

/* Modern Button Styling */
.btn {
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
  color: white;
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-outline-secondary {
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--light-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Modern Card Styling */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--card-bg);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 2.5rem;
}

.card-header {
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-primary);
  padding: 2rem 2.5rem;
}

/* Modern Tab Navigation */
.nav-tabs {
  border: none;
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.nav-tabs .nav-link {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  position: relative;
}

.nav-tabs .nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.5);
}

.nav-tabs .nav-link.active {
  background: var(--card-bg);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* Auto-delete Slider Styling */
.auto-delete-container {
  background: linear-gradient(135deg, var(--light-bg) 0%, #f1f5f9 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 0.5rem;
}

.form-range {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  margin: 1rem 0;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.form-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
}

/* Preview Name Styling */
.name-preview {
  background: var(--light-bg);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-secondary);
  min-height: 3rem;
  display: flex;
  align-items: center;
}

/* Search Results Styling */
.search-result-item {
  transition: all 0.2s ease;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
}

.search-result-item {
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  background: var(--card-bg);
  cursor: pointer;
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

.search-result-item small {
  color: var(--text-secondary);
  font-weight: 400;
}

.search-result-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.08) 100%);
  border-left: 4px solid var(--primary-color);
  color: var(--text-primary) !important;
  font-weight: 600;
}

.search-result-item.active small {
  color: var(--text-secondary) !important;
  font-weight: 500;
}

/* List Group Modernization */
.list-group-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) !important;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  background: var(--card-bg);
}

.list-group-item:hover {
  background: var(--light-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.list-group-item-action {
  text-decoration: none;
  color: var(--text-primary);
}

/* Alert Styling */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.alert-danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #d97706;
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0284c7;
  border-left: 4px solid var(--info-color);
}

.alert-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #166534;
  border-left: 4px solid var(--success-color);
}

/* Stats Cards */
.stats-card {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--light-bg) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stats-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stats-content {
  flex: 1;
}

.stats-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  color: var(--text-primary);
}

.stats-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0.5rem 0 0 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Drag and Drop Styling (FormBuilder) */
.drop-block {
  min-height: 220px;
  border: 2px dashed var(--drop-dash);
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s ease;
  position: relative;
}

.drop-block:hover {
  border-color: var(--primary-color);
  background: #f1f5f9;
  box-shadow: var(--shadow-sm);
}

.drop-block p.placeholder {
  margin: 0;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 2rem 0;
}

.drop-indicator {
  height: 8px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--primary-color), #c7cfdb);
  margin: 8px 4px;
  outline: 1px solid rgba(0,0,0,.05);
  box-shadow: var(--shadow-sm);
}

/* Field Card Styling (FormBuilder) */
.field-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.field-card.dragging {
  opacity: 0.6;
  box-shadow: none;
  transform: rotate(2deg);
}

.field-card.editing {
  background: var(--editing-bg);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.field-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.orig-tag {
  position: absolute;
  top: -8px;
  left: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.field-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
}

.icon-btn {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.icon-btn:hover {
  background: var(--light-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: scale(1.05);
}

.field-title {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
}

.field-title .badge-hidden {
  margin-left: 0.5rem;
  font-size: 0.65rem;
  border: 1px solid #fecaca;
  color: #dc2626;
  background: #fef2f2;
  padding: 2px 6px;
  border-radius: 999px;
  vertical-align: middle;
}

.config-panel {
  border-top: 1px dashed var(--border-color);
  margin-top: 1rem;
  padding-top: 1rem;
}

.config-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.config-row .form-label {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.config-row .form-control-sm, .config-row .form-select-sm {
  font-size: 0.875rem;
}

.config-col-label {
  flex: 1 1 60%;
  min-width: 220px;
}

.config-col-type {
  flex: 1 1 40%;
  min-width: 160px;
}

/* Field List Styling (FormBuilder) */
#fieldList .list-group-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  background: var(--card-bg);
}

#fieldList .list-group-item:hover {
  background: var(--light-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#fieldList .hint {
  color: var(--text-muted);
}

.draggable-field {
  cursor: move;
}

/* Main Container */
main {
  padding: 2rem !important;
  background: var(--light-bg);
  min-height: 100vh;
}

/* Loading Spinner */
.spinner-border {
  color: var(--primary-color);
}


/* Form Builder Step Indicator Badges */
.list-group-item .badge {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  min-width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.list-group-item {
  align-items: flex-start !important;
  padding: 1rem 1.25rem;
}

.list-group-item .badge {
  margin-right: 1rem;
  margin-top: 0.125rem;
}

.list-group-item div {
  flex: 1;
  min-width: 0;
}

/* Utility Classes */
.color-lead { color: var(--lead-500) !important; }
.bg-lead { background: var(--lead-500) !important; }
.color-contact { color: var(--contact-500) !important; }
.bg-contact { background: var(--contact-500) !important; }
.color-existing-lead { color: var(--existing-lead-500) !important; }
.bg-existing-lead { background: var(--existing-lead-500) !important; }
.color-duplicate { color: var(--duplicate-500) !important; }
.bg-duplicate { background: var(--duplicate-500) !important; }
.color-error { color: var(--error-500) !important; }
.bg-error { background: var(--error-500) !important; }
.color-neutral { color: var(--neutral-500) !important; }
.bg-neutral { background: var(--neutral-500) !important; }
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-hover {
  transition: box-shadow 0.2s ease;
}

.shadow-hover:hover {
  box-shadow: var(--shadow-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-title {
    font-size: 1.875rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .page-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  main {
    padding: 1.5rem !important;
  }
  
  .form-control, .form-select {
    padding: 0.625rem 0.875rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .nav-tabs .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .stats-card {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .stats-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .stats-number {
    font-size: 2rem;
  }
  
  .stats-label {
    font-size: 0.8rem;
  }

  .config-row {
    flex-direction: column;
    align-items: stretch;
  }

  .config-col-label, .config-col-type {
    flex: 1 1 100%;
    min-width: auto;
  }
}

/* Override Bootstrap defaults for consistency */
.badge {
  font-weight: 500;
}

.bg-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%) !important;
}

.bg-secondary {
  background: var(--secondary-color) !important;
}

.bg-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%) !important;
}

.bg-warning {
  background: var(--warning-color) !important;
}

.bg-danger {
  background: var(--danger-color) !important;
}

.bg-info {
  background: var(--info-color) !important;
}

/* Dashboard specific styling */
.dashboard-stats {
  transition: transform 0.2s ease-in-out;
}

.dashboard-stats:hover {
  transform: translateY(-2px);
}

.dashboard-card {
  transition: all 0.3s ease;
  border: none;
  box-shadow: var(--shadow-sm);
}

.dashboard-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-icon {
  transition: transform 0.3s ease;
}

.dashboard-card:hover .tool-icon {
  transform: scale(1.1);
}

.welcome-badge {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.stats-icon {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.dashboard-stats:hover .stats-icon {
  opacity: 1;
}

.activity-card {
  background: linear-gradient(135deg, var(--light-bg) 0%, #e9ecef 100%);
  border: 1px solid var(--border-color);
}

/* Ensure consistent spacing */
.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.py-4 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

/* Enhanced Card Header Styling */
.card-header {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-header h1 i,
.card-header h2 i,
.card-header h3 i,
.card-header h4 i,
.card-header h5 i,
.card-header h6 i {
  color: var(--primary-color);
  font-size: 1.1em;
}

.card-header h1 + small,
.card-header h1 + p,
.card-header h2 + small,
.card-header h2 + p,
.card-header h3 + small,
.card-header h3 + p,
.card-header h4 + small,
.card-header h4 + p,
.card-header h5 + small,
.card-header h5 + p,
.card-header h6 + small,
.card-header h6 + p {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

/* Enhanced Page Headers in Cards */
.card .page-header {
  margin: -1rem -1rem 1rem -1rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card .page-title {
  padding-left: 0;
  font-size: 1.75rem;
}

/* Enhanced Section Headers */
.section-header {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-header h1,
.section-header h2,
.section-header h3,
.section-header h4,
.section-header h5,
.section-header h6 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.5rem;
}

.section-header i {
  color: var(--primary-color);
  font-size: 1.1em;
}

.section-header h1 + small,
.section-header h1 + p,
.section-header h2 + small,
.section-header h2 + p,
.section-header h3 + small,
.section-header h3 + p,
.section-header h4 + small,
.section-header h4 + p,
.section-header h5 + small,
.section-header h5 + p,
.section-header h6 + small,
.section-header h6 + p {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

/* Enhanced White Box Headers */
.bg-white h1,
.bg-white h2,
.bg-white h3,
.bg-white h4,
.bg-white h5,
.bg-white h6 {
  padding-left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bg-white h1 i,
.bg-white h2 i,
.bg-white h3 i,
.bg-white h4 i,
.bg-white h5 i,
.bg-white h6 i {
  color: var(--primary-color);
  font-size: 1.1em;
  margin-right: 0.5rem;
}

.bg-white h1 + small,
.bg-white h1 + p,
.bg-white h2 + small,
.bg-white h2 + p,
.bg-white h3 + small,
.bg-white h3 + p,
.bg-white h4 + small,
.bg-white h4 + p,
.bg-white h5 + small,
.bg-white h5 + p,
.bg-white h6 + small,
.bg-white h6 + p {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

/* Login Page Styles */
body.login-page {
  background: linear-gradient(135deg, #1a4a5c 0%, #2c5f7c 100%) !important;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  margin: 0;
  padding: 0;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  border: 1px solid #e2e8f0;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.btn-login {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 2rem;
  font-weight: 600;
  color: white;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  color: white;
}

.demo-credentials {
  background: #f8fafc;
  border-radius: 0.5rem;
  padding: 2rem;
  margin-top: 1rem;
  border: 1px solid #e2e8f0;
}

.demo-credentials h6 {
  color: #64748b;
  margin-bottom: 0.5rem;
}

.demo-credentials code {
  background: #e2e8f0;
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  color: #1e293b;
}

/* Comprehensive Mobile Responsiveness */
@media (max-width: 1200px) {
  .page-title {
    font-size: 2rem;
  }
  
  .page-header {
    padding: 1.5rem 0;
  }
  
  main {
    padding: 1.5rem !important;
  }
}

@media (max-width: 992px) {
  .page-title {
    font-size: 1.75rem;
    padding-left: 1rem;
  }
  
  .page-title + small,
  .page-title + p {
    padding-left: 1rem;
  }
  
  .card-header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .card-header h1,
  .card-header h2,
  .card-header h3,
  .card-header h4,
  .card-header h5,
  .card-header h6 {
    margin-left: 0.25rem;
  }
  
  .card-header h1 + small,
  .card-header h1 + p,
  .card-header h2 + small,
  .card-header h2 + p,
  .card-header h3 + small,
  .card-header h3 + p,
  .card-header h4 + small,
  .card-header h4 + p,
  .card-header h5 + small,
  .card-header h5 + p,
  .card-header h6 + small,
  .card-header h6 + p {
    padding-left: 1rem;
  }
  
  .section-header {
    padding-left: 1rem;
  }
  
  .section-header h1,
  .section-header h2,
  .section-header h3,
  .section-header h4,
  .section-header h5,
  .section-header h6 {
    margin-left: 0.25rem;
  }
  
  .section-header h1 + small,
  .section-header h1 + p,
  .section-header h2 + small,
  .section-header h2 + p,
  .section-header h3 + small,
  .section-header h3 + p,
  .section-header h4 + small,
  .section-header h4 + p,
  .section-header h5 + small,
  .section-header h5 + p,
  .section-header h6 + small,
  .section-header h6 + p {
    padding-left: 1rem;
  }
  
  .bg-white h1,
  .bg-white h2,
  .bg-white h3,
  .bg-white h4,
  .bg-white h5,
  .bg-white h6 {
    padding-left: 1rem;
  }
  
  .bg-white h1 + small,
  .bg-white h1 + p,
  .bg-white h2 + small,
  .bg-white h2 + p,
  .bg-white h3 + small,
  .bg-white h3 + p,
  .bg-white h4 + small,
  .bg-white h4 + p,
  .bg-white h5 + small,
  .bg-white h5 + p,
  .bg-white h6 + small,
  .bg-white h6 + p {
    padding-left: 1rem;
  }
}

@media (max-width: 768px) {
  /* Enhanced mobile styles */
  .page-title {
    font-size: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-left: 1rem;
  }
  
  .page-title i {
    font-size: 1.5rem;
  }
  
  .page-title + small,
  .page-title + p {
    padding-left: 1rem;
    font-size: 0.9rem;
  }
  
  .page-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  
  .page-header {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    margin-top: 1rem !important;
    padding-top: 1.5rem !important;
  }
  
  main {
    padding: 1rem !important;
    margin-top: 1rem !important;
    padding-top: 1.5rem !important;
  }
  
  /* Card adjustments */
  .card {
    margin-bottom: 1rem;
  }
  
  .card:first-child {
    margin-top: 1rem !important;
  }
  
  /* Add spacing to content containers */
  .container,
  .container-fluid {
    padding-top: 1rem !important;
  }
  
  /* Add spacing to page content */
  .page-content {
    margin-top: 1rem !important;
    padding-top: 1rem !important;
  }
  
  .card-header {
    padding: 1rem !important;
  }
  
  .card-body {
    padding: 1rem !important;
  }
  
  .card-header h1,
  .card-header h2,
  .card-header h3,
  .card-header h4,
  .card-header h5,
  .card-header h6 {
    font-size: 1.25rem;
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .card-header h1 i,
  .card-header h2 i,
  .card-header h3 i,
  .card-header h4 i,
  .card-header h5 i,
  .card-header h6 i {
    font-size: 1.25rem;
  }
  
  .card-header h1 + small,
  .card-header h1 + p,
  .card-header h2 + small,
  .card-header h2 + p,
  .card-header h3 + small,
  .card-header h3 + p,
  .card-header h4 + small,
  .card-header h4 + p,
  .card-header h5 + small,
  .card-header h5 + p,
  .card-header h6 + small,
  .card-header h6 + p {
    padding-left: 0;
    margin-top: 0.25rem;
  }
  
  /* Form adjustments */
  .form-control, .form-select {
    padding: 0.75rem;
    font-size: 1rem;
  }
  
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .btn-group .btn {
    width: auto;
    margin-bottom: 0;
  }
  
  /* Navigation adjustments */
  .nav-tabs {
    flex-wrap: wrap;
  }
  
  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    flex: 1;
    text-align: center;
  }
  
  /* Table responsiveness */
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
  }
  
  /* Stats cards */
  .stats-card {
    padding: 1rem;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .stats-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .stats-number {
    font-size: 1.75rem;
  }
  
  .stats-label {
    font-size: 0.8rem;
  }
  
  /* Grid adjustments */
  .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }
  
  .row > * {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Modal adjustments */
  .modal-dialog {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }
  
  .modal-content {
    border-radius: 0.5rem;
  }
  
  /* Alert adjustments */
  .alert {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  /* Badge adjustments */
  .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  
  /* Utility classes for mobile */
  .mobile-hidden {
    display: none !important;
  }
  
  .mobile-full-width {
    width: 100% !important;
  }
  
  .mobile-text-center {
    text-align: center !important;
  }
  
  .mobile-mb-2 {
    margin-bottom: 0.5rem !important;
  }
  
  .mobile-mb-3 {
    margin-bottom: 1rem !important;
  }
}

@media (max-width: 576px) {
  /* Extra small devices */
  .page-title {
    font-size: 1.25rem;
  }
  
  /* Enhanced mobile spacing for very small screens */
  main {
    margin-top: 0.75rem !important;
    padding-top: 1rem !important;
  }
  
  .page-header {
    margin-top: 0.75rem !important;
    padding-top: 1rem !important;
  }
  
  .card:first-child {
    margin-top: 0.75rem !important;
  }
  
  .container,
  .container-fluid {
    padding-top: 0.75rem !important;
  }
  
  .page-title i {
    font-size: 1.25rem;
  }
  
  .card-header h1,
  .card-header h2,
  .card-header h3,
  .card-header h4,
  .card-header h5,
  .card-header h6 {
    font-size: 1.1rem;
  }
  
  .stats-number {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
  
  .form-control, .form-select {
    padding: 0.625rem;
    font-size: 0.9rem;
  }
  
  .table th,
  .table td {
    padding: 0.375rem;
    font-size: 0.8rem;
  }
  
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .alert {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* Modern Campaign Member List Styling */
.modern-member-item {
  transition: all 0.2s ease;
  border-radius: var(--radius-lg) !important;
  margin-bottom: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  width: 100%;
  display: flex;
  flex-direction: column;
}

.modern-member-item:hover {
  background: var(--light-bg) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.member-info {
  min-width: 0;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 0;
  margin-right: 0;
}

.member-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
  word-break: break-word;
  width: 100%;
  display: block;
}

.member-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
  word-break: break-all;
  line-height: 1.4;
  width: 100%;
  display: block;
}

.member-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  background: var(--light-bg);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 2px;
  width: auto;
  max-width: 100%;
}

.member-id a {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.member-id a:hover {
  color: var(--primary-hover) !important;
  text-decoration: none !important;
}

.member-id a i {
  font-size: 0.7rem;
  margin-left: 4px;
}

.member-actions {
  flex-shrink: 0;
  width: auto;
  min-width: 32px;
}

.action-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  text-decoration: none;
}

.action-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  color: var(--primary-color);
  text-decoration: none;
}

/* Modern Section Headers */
.modern-section-header {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, var(--light-bg) 0%, #f1f5f9 100%) !important;
}

.section-icon {
  flex-shrink: 0;
}

.section-info h5 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.section-info p {
  font-size: 0.9rem;
  opacity: 0.8;
  color: var(--text-secondary);
  margin: 0;
}

/* Responsive adjustments for member items */
@media (max-width: 768px) {
  .modern-member-item {
    padding: 1rem !important;
    margin-bottom: 0.5rem;
  }

  .member-name {
    font-size: 0.95rem;
  }

  .member-email {
    font-size: 0.8rem;
  }

  .member-id {
    font-size: 0.7rem;
    padding: 1px 4px;
  }

  .action-btn {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .modern-member-item {
    padding: 0.875rem !important;
  }

  .action-btn {
    width: 100%;
    height: 32px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
  }

  .member-name {
    font-size: 0.9rem;
  }

  .member-email {
    font-size: 0.75rem;
  }

  .member-id {
    font-size: 0.65rem;
  }
}

/* Campaign Members Layout Optimization */
.campaign-members-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .campaign-members-container {
    flex-direction: row;
    gap: 2rem;
  }
  
  .campaign-members-container > .col-lg-6 {
    flex: 1;
    min-width: 0;
  }
}

/* Enhanced mobile layout for campaign members */
@media (max-width: 991px) {
  .campaign-members-container .col-lg-6 {
    width: 100% !important;
    margin-bottom: 1.5rem;
  }
  
  .campaign-members-container .col-lg-6:last-child {
    margin-bottom: 0;
  }
}

/* Ensure list items fill full width */
.list-group {
  width: 100%;
}

.list-group-item {
  width: 100%;
  display: block;
}

.modern-member-item {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.modern-member-item > div {
  width: 100%;
}

/* Force content to use full available space */
.modern-member-item .d-flex {
  width: 100% !important;
  min-width: 100% !important;
}

.modern-member-item .member-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 40px) !important;
}

.modern-member-item .member-name,
.modern-member-item .member-email,
.modern-member-item .member-id {
  width: 100% !important;
  max-width: 100% !important;
}

/* Enhanced Import Summary Styling */
.import-summary-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.import-summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--success-color) 0%, #059669 50%, var(--primary-color) 100%);
}

.import-summary-header {
  background: linear-gradient(135deg, var(--light-bg) 0%, #f1f5f9 100%);
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.import-summary-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.import-summary-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.import-summary-title {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.import-summary-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.import-summary-content {
  padding: 2rem;
}

.import-campaign-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  word-break: break-word;
}

.import-campaign-id {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: inline-block;
  transition: all 0.2s ease;
}

.import-campaign-id:hover {
  background: var(--card-bg);
  border-color: var(--primary-color);
  color: var(--text-primary);
}

.import-status-badge {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.import-status-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.import-status-badge:hover::before {
  left: 100%;
}

.import-status-icon {
  font-size: 1.25rem;
}

.import-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.import-action-btn {
  background: linear-gradient(135deg, #1565C0 0%, #0d47a1 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.import-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.import-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
  text-decoration: none;
}

.import-action-btn:hover::before {
  left: 100%;
}

.import-action-btn i {
  font-size: 1rem;
}

.import-chart-container {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}

.import-chart-container > div {
  width: 100% !important;
  height: 100% !important;
  min-height: 300px;
}


.import-chart-loading {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  z-index: 1;
  position: relative;
}

.import-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.import-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.import-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.import-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.import-stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.import-stat-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

/* Responsive Import Summary */
@media (max-width: 768px) {
  .import-summary-header {
    padding: 1.5rem;
  }
  
  .import-summary-content {
    padding: 1.5rem;
  }
  
  .import-summary-title {
    font-size: 1.5rem;
  }
  
  .import-summary-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }
  
  .import-campaign-name {
    font-size: 1.125rem;
  }
  
  .import-status-badge {
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
  }
  
  .import-action-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
  }
  
  .import-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .import-chart-container {
    min-height: 250px;
  }
  
  .import-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .import-stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .import-summary-header {
    padding: 1rem;
  }
  
  .import-summary-content {
    padding: 1rem;
  }
  
  .import-summary-title {
    font-size: 1.25rem;
  }
  
  .import-summary-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  .import-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Print styles */
@media print {
  .sidebar,
  .modern-sidebar,
  .btn,
  .nav-tabs,
  .pagination {
    display: none !important;
  }
  
  .page-header {
    background: none !important;
    border-bottom: 2px solid #000 !important;
  }
  
  .card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
  
  .table {
    border-collapse: collapse !important;
  }
  
  .table th,
  .table td {
    border: 1px solid #000 !important;
  }

  .modern-member-item {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #000 !important;
  }
}
