/**
 * ProRank Performance Module - Unified Design System
 * 
 * ONE consistent design for ALL Performance pages
 * No more fucking inconsistencies!
 */

/* ============================================
   CORE DESIGN TOKENS
   ============================================ */
:root {
  --prorank-primary: #2563eb;         /* Professional Blue - trust & reliability */
  --prorank-primary-dark: #1d4ed8;    /* Darker blue for hover states */
  --prorank-secondary: #10b981;       /* Vibrant Green - growth & prosperity */
  --prorank-accent: #fb923c;          /* Energetic Orange - CTAs & urgency */
  --prorank-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --prorank-success: #10b981;
  --prorank-warning: #fbbf24;
  --prorank-error: #ef4444;
  --prorank-info: #2563eb;
  
  --prorank-bg: #ffffff;              /* Clean white background */
  --prorank-bg-secondary: #f9fafb;    /* Light gray for sections */
  --prorank-bg-tertiary: #f3f4f6;     /* Slightly darker gray */
  --prorank-border: #e5e7eb;
  --prorank-border-dark: #d1d5db;
  
  --prorank-text: #374151;            /* Charcoal gray for main text */
  --prorank-text-secondary: #6b7280;  /* Medium gray for secondary text */
  --prorank-text-tertiary: #9ca3af;   /* Light gray for tertiary text */
  
  --prorank-radius: 12px;
  --prorank-radius-sm: 8px;
  --prorank-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --prorank-shadow-lg: 0 10px 40px rgba(37, 99, 235, 0.15);
}

/* ============================================
   UNIVERSAL CONTAINER
   ============================================ */
.prorank-performance-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  animation: fadeIn 0.3s ease;
  background: transparent !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   UNIVERSAL HEADER (Same for ALL pages)
   ============================================ */
.prorank-performance-header {
  background: var(--prorank-gradient);
  color: white;
  padding: 32px;
  border-radius: var(--prorank-radius);
  margin-bottom: 32px;
  box-shadow: var(--prorank-shadow-lg);
}

.prorank-performance-header h1,
.prorank-performance-header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: white;
}

.prorank-performance-header p {
  margin: 0;
  opacity: 0.95;
  font-size: 16px;
  color: white;
}

/* ============================================
   UNIVERSAL STATS GRID (Same for ALL pages)
   ============================================ */
.prorank-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prorank-stat-card {
  background: #ffffff !important;
  border: 2px solid #cccccc;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

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

.prorank-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--prorank-primary);
  margin-bottom: 8px;
  display: block;
}

.prorank-stat-label {
  font-size: 14px;
  color: var(--prorank-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   UNIVERSAL CARD DESIGN (Same for ALL pages)
   ============================================ */
.prorank-card {
  background: #ffffff !important;
  border: 2px solid #cccccc;
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.prorank-card:hover {
  box-shadow: var(--prorank-shadow);
  border-color: var(--prorank-border-dark);
}

.prorank-card-header {
  padding: 20px 24px;
  background: #f5f5f5 !important;
  border-bottom: 2px solid #cccccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prorank-card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--prorank-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.prorank-card-header .dashicons {
  color: var(--prorank-primary);
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.prorank-card-body {
  padding: 24px;
  background: #ffffff !important;
}

/* ============================================
   UNIVERSAL FORM CONTROLS
   ============================================ */
.prorank-control-group {
  margin-bottom: 20px;
}

.prorank-control-group:last-child {
  margin-bottom: 0;
}

.prorank-control-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--prorank-text);
  font-size: 14px;
}

.prorank-control-group input[type="text"],
.prorank-control-group input[type="number"],
.prorank-control-group input[type="password"],
.prorank-control-group textarea,
.prorank-control-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius-sm);
  font-size: 14px;
  transition: all 0.2s ease;
}

.prorank-control-group input:focus,
.prorank-control-group textarea:focus,
.prorank-control-group select:focus {
  outline: none;
  border-color: var(--prorank-primary);
  box-shadow: 0 0 0 3px rgba(115, 102, 240, 0.1);
}

/* ============================================
   UNIVERSAL TOGGLE CONTROL
   ============================================ */
.prorank-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f5f5f5 !important;
  border-radius: 8px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.prorank-toggle:hover {
  background: #eeeeee !important;
}

.prorank-toggle-label {
  flex: 1;
}

.prorank-toggle-label strong {
  display: block;
  margin-bottom: 4px;
  color: var(--prorank-text);
  font-size: 15px;
}

.prorank-toggle-label span {
  display: block;
  color: var(--prorank-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* ============================================
   CUSTOM TOGGLE COMPONENT (NO CHECKBOX)
   ============================================ */
.prorank-custom-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
}

.prorank-custom-toggle:focus-visible {
  outline: 2px solid var(--prorank-primary);
  outline-offset: 2px;
  border-radius: 24px;
}

.prorank-toggle-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: background 0.2s ease;
}

.prorank-custom-toggle.is-checked .prorank-toggle-track {
  background: #0369a1;
}

.prorank-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.prorank-custom-toggle.is-checked .prorank-toggle-thumb {
  transform: translateX(20px);
}

.prorank-custom-toggle.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prorank-custom-toggle:hover:not(.is-disabled) .prorank-toggle-track {
  opacity: 0.9;
}

/* Hide all checkbox inputs inside toggles */
.prorank-performance-container input[type="checkbox"],
.prorank-module-control input[type="checkbox"],
.prorank-module-toggle input[type="checkbox"],
.prorank-performance-container .components-checkbox-control__input,
.prorank-module-control .components-checkbox-control__input,
.prorank-module-toggle .components-checkbox-control__input,
.prorank-performance-container .components-checkbox-control__input-container,
.prorank-module-control .components-checkbox-control__input-container,
.prorank-module-toggle .components-checkbox-control__input-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* Style the actual toggle switch */
.prorank-performance-container .components-form-toggle,
.prorank-module-control .components-form-toggle,
.prorank-module-toggle .components-form-toggle {
  width: 44px !important;
  height: 24px !important;
  background: #cbd5e1 !important;
  border-radius: 24px !important;
  position: relative !important;
  transition: background 0.2s ease !important;
  padding: 0 !important;
  border: 0 !important;
  margin: 0 !important;
}

.prorank-performance-container .components-form-toggle.is-checked,
.prorank-module-control .components-form-toggle.is-checked,
.prorank-module-toggle .components-form-toggle.is-checked {
  background: #0369a1 !important;
}

.prorank-performance-container .components-form-toggle__track,
.prorank-module-control .components-form-toggle__track,
.prorank-module-toggle .components-form-toggle__track {
  background: transparent !important;
  border: none !important;
}

.prorank-performance-container .components-form-toggle__thumb,
.prorank-module-control .components-form-toggle__thumb,
.prorank-module-toggle .components-form-toggle__thumb {
  width: 20px !important;
  height: 20px !important;
  background: white !important;
  border-radius: 50% !important;
  position: absolute !important;
  top: 2px !important;
  left: 2px !important;
  transition: transform 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  border: none !important;
  margin: 0 !important;
}

.prorank-performance-container .components-form-toggle.is-checked .components-form-toggle__thumb,
.prorank-module-control .components-form-toggle.is-checked .components-form-toggle__thumb,
.prorank-module-toggle .components-form-toggle.is-checked .components-form-toggle__thumb {
  transform: translateX(20px) !important;
  background: white !important;
}

/* ============================================
   UNIVERSAL BUTTONS
   ============================================ */
.prorank-btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.prorank-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.prorank-btn:hover::before {
  transform: translateX(100%);
}

.prorank-btn-primary {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);  /* Orange gradient for primary CTAs */
  color: white;
  box-shadow: 0 4px 15px rgba(251, 146, 60, 0.4);
}

.prorank-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #5a72e8 0%, #6b3f95 100%);
}

.prorank-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.prorank-btn-secondary {
  background: #ffffff;
  color: #374151;   /* Charcoal gray text */
  border: 2px solid #e5e7eb;
  position: relative;
}

.prorank-btn-secondary:hover {
  background: #2563eb;   /* Blue on hover for secondary buttons */
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(115, 102, 240, 0.25);
}

.prorank-btn-secondary:active {
  transform: translateY(0);
}

.prorank-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.prorank-btn:disabled::before {
  display: none;
}

/* Icon animations in buttons */
.prorank-btn .dashicons {
  transition: transform 0.3s ease;
}

.prorank-btn:hover .dashicons {
  transform: rotate(10deg) scale(1.1);
}

.prorank-btn:hover .dashicons-update {
  transform: rotate(180deg);
}

.prorank-btn:hover .dashicons-download {
  transform: translateY(2px);
}

.prorank-btn:hover .dashicons-trash {
  transform: rotate(-10deg) scale(1.1);
}

/* Button sizes */
.prorank-btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.prorank-btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* Ensure small secondary buttons also have good contrast */
.prorank-btn-secondary.prorank-btn-sm:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* Special Save/Submit button styling */
.prorank-btn-primary[style*="minWidth"] {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
}

.prorank-btn-primary[style*="minWidth"]:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
  transform: translateY(-3px);
}

/* Saving state animation */
.prorank-btn-primary:disabled {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ============================================
   UNIVERSAL STATUS BADGES
   ============================================ */
.prorank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.prorank-badge-success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #047857;   /* Green text for success */
}

.prorank-badge-warning {
  background: linear-gradient(135deg, #fed7aa, #fbbf24);
  color: #92400e;
}

.prorank-badge-error {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
}

.prorank-badge-info {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;   /* Blue text for info */
}

.prorank-badge-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
}

.prorank-badge-secondary {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  color: #374151;
}

/* ============================================
   UNIVERSAL PROGRESS BAR
   ============================================ */
.prorank-progress {
  margin: 20px 0;
}

.prorank-progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.prorank-progress-label {
  font-size: 14px;
  color: var(--prorank-text);
  font-weight: 500;
}

.prorank-progress-value {
  font-size: 14px;
  color: var(--prorank-primary);
  font-weight: 600;
}

.prorank-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--prorank-border);
  border-radius: 4px;
  overflow: hidden;
}

.prorank-progress-fill {
  height: 100%;
  background: var(--prorank-gradient);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.prorank-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ============================================
   UNIVERSAL NOTICE/ALERT
   ============================================ */
.prorank-notice {
  padding: 16px;
  border-radius: var(--prorank-radius-sm);
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.prorank-notice-info {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-left: 4px solid var(--prorank-info);
  color: #1e40af;
}

.prorank-notice-success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-left: 4px solid var(--prorank-success);
  color: #065f46;
}

.prorank-notice-warning {
  background: linear-gradient(135deg, #fed7aa, #fbbf24);
  border-left: 4px solid var(--prorank-warning);
  color: #92400e;
}

.prorank-notice-error {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-left: 4px solid var(--prorank-error);
  color: #991b1b;
}

.prorank-notice .dashicons {
  font-size: 20px;
  flex-shrink: 0;
}

/* ============================================
   UNIVERSAL ACTIONS BAR
   ============================================ */
.prorank-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--prorank-border);
}

.prorank-actions-center {
  justify-content: center;
}

.prorank-actions-right {
  justify-content: flex-end;
}

/* ============================================
   LOCKED STATE (For non-Pro features)
   ============================================ */
.prorank-locked {
  position: relative;
  pointer-events: none;
}

.prorank-locked::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
  border-radius: inherit;
  z-index: 1;
}

.prorank-locked-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  padding: 32px;
  background: #ffffff;
  border-radius: var(--prorank-radius);
  box-shadow: var(--prorank-shadow-lg);
}

.prorank-locked-message .dashicons {
  font-size: 48px;
  color: var(--prorank-text-tertiary);
  margin-bottom: 16px;
}

.prorank-locked-message h3 {
  margin: 0 0 12px 0;
  color: var(--prorank-text);
  font-size: 20px;
}

.prorank-locked-message p {
  margin: 0 0 20px 0;
  color: var(--prorank-text-secondary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .prorank-performance-container {
    padding: 16px;
  }
  
  .prorank-performance-header {
    padding: 24px 20px;
  }
  
  .prorank-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .prorank-actions {
    flex-direction: column;
  }
  
  .prorank-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Dark mode removed - not used in this plugin */

/* ============================================
   UTILITY CLASSES
   ============================================ */
.prorank-mt-16 { margin-top: 16px; }
.prorank-mt-24 { margin-top: 24px; }
.prorank-mt-32 { margin-top: 32px; }
.prorank-mb-16 { margin-bottom: 16px; }
.prorank-mb-24 { margin-bottom: 24px; }
.prorank-mb-32 { margin-bottom: 32px; }
.prorank-text-center { text-align: center; }
.prorank-text-right { text-align: right; }
.prorank-flex { display: flex; }
.prorank-flex-center { display: flex; align-items: center; justify-content: center; }
.prorank-gap-8 { gap: 8px; }
.prorank-gap-12 { gap: 12px; }
.prorank-gap-16 { gap: 16px; }

/* Spin animation for loading icons */
.dashicons.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   PERFORMANCE PAGE SPECIFIC STYLES
   ============================================ */

/* Main Performance Page Container */
.prorank-performance-page {
  /* ProRank Brand Colors */
  --pr-purple: #2563eb;
  --pr-purple-light: #3b82f6;
  --pr-purple-dark: #1d4ed8;
  --pr-pink: #ff6b35;
  --pr-orange: #ff6b35;
  --pr-gradient-subtle: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  --pr-gradient-accent: linear-gradient(135deg, #ff6b35 0%, #ff8554 100%);
  
  /* Full width with padding */
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* Apply prorank-admin-page class for unified theme */
.prorank-performance-page.prorank-admin-page {
  background: transparent;
}

/* Enhanced Header with Dynamic Gradient and Shimmer Animation */
.prorank-performance-header {
  position: relative;
  padding: 48px 40px 32px;
  overflow: hidden;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  margin: -20px -20px 40px -20px;
  box-shadow: 0 10px 40px -10px rgba(37, 99, 235, 0.4);
}

.prorank-performance-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20%;
  right: -20%;
  height: 4px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #ff6b35 15%,
    #4a5568 35%,
    #2d3748 50%, 
    #4a5568 65%,
    #ff6b35 85%,
    transparent 100%
  );
  animation: shimmer 8s ease-in-out infinite;
  filter: blur(1px);
}

@keyframes shimmer {
  0%, 100% { opacity: 0.6; transform: translateX(-100px); }
  50% { opacity: 1; transform: translateX(100px); }
}

.prorank-header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  padding: 0 20px;
}

.prorank-header-left h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #ffffff;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.prorank-header-left p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Performance Stats Cards */
.prorank-header-stats {
  display: flex;
  gap: 16px;
}

.prorank-stat-card {
  position: relative;
  text-align: center;
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.prorank-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, 
    rgba(115, 102, 240, 0.5) 0%, 
    rgba(236, 72, 153, 0.5) 33%, 
    rgba(249, 115, 22, 0.5) 66%,
    rgba(115, 102, 240, 0.5) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-rotate 4s linear infinite;
}

@keyframes border-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.prorank-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(236, 72, 153, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.25);
}

.prorank-stat-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -1px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.prorank-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  margin-top: 8px;
}

/* Content Container */
.prorank-performance-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px 40px;
  position: relative;
}

/* Tab styles: Uses shared _tabs.css */

/* Module Control and Settings Content */
.prorank-module-control {
  display: none !important;
}

/* Settings Content */
.prorank-settings-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* Beta Card, Pro Callout, Module Locked Styles */
.prorank-beta-card {
  background: linear-gradient(135deg, #f8f7ff 0%, #fdf4ff 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(115, 102, 240, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.prorank-beta-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--pr-purple);
}

.prorank-beta-card p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 16px 0;
  line-height: 1.6;
}

/* Professional Pro Callout */
.prorank-pro-callout {
  position: relative;
  background: linear-gradient(135deg, #f8f7ff 0%, #fdf4ff 100%);
  border-radius: 12px;
  padding: 32px;
  margin-top: 40px;
  overflow: hidden;
  border: 1px solid rgba(115, 102, 240, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.prorank-pro-callout::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(115, 102, 240, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.prorank-pro-callout::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pr-purple);
}

.prorank-pro-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.prorank-pro-content h4 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--pr-purple);
}

.prorank-pro-content p {
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 24px 0;
  line-height: 1.6;
}

.prorank-pro-button {
  display: inline-block;
  background: var(--pr-purple);
  color: white;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  border: none;
}

.prorank-pro-button:hover {
  background: var(--pr-purple-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  color: white;
  text-decoration: none;
}

/* Module Locked State */
.prorank-module-locked {
  text-align: center;
  padding: 48px 32px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.prorank-module-locked h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #1f2937;
}

.prorank-module-locked p {
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 20px 0;
}

/* Loading Spinner Styles */
.prorank-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.prorank-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--pr-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Dark Mode Support */
body.admin-color-midnight .prorank-performance-page,
body.admin-color-ocean .prorank-performance-page,
body.admin-color-ectoplasm .prorank-performance-page,
body.admin-color-coffee .prorank-performance-page,
body.admin-color-blue .prorank-performance-page,
body.admin-color-modern .prorank-performance-page {
  background: #1e1e1e;
}

/* Content Container Dark Mode */
body.admin-color-midnight .prorank-performance-content,
body.admin-color-ocean .prorank-performance-content,
body.admin-color-ectoplasm .prorank-performance-content,
body.admin-color-coffee .prorank-performance-content,
body.admin-color-blue .prorank-performance-content,
body.admin-color-modern .prorank-performance-content {
  background: transparent;
}

/* Settings Content Dark Mode */
body.admin-color-midnight .prorank-settings-content,
body.admin-color-ocean .prorank-settings-content,
body.admin-color-ectoplasm .prorank-settings-content,
body.admin-color-coffee .prorank-settings-content,
body.admin-color-blue .prorank-settings-content,
body.admin-color-modern .prorank-settings-content {
  background: transparent;
}

/* Tab Content Dark Mode */
body.admin-color-midnight .prorank-tab-content,
body.admin-color-ocean .prorank-tab-content,
body.admin-color-ectoplasm .prorank-tab-content,
body.admin-color-coffee .prorank-tab-content,
body.admin-color-blue .prorank-tab-content,
body.admin-color-modern .prorank-tab-content {
  background: transparent;
}

/* Settings Panel Dark Mode */
body.admin-color-midnight .prorank-settings-panel,
body.admin-color-ocean .prorank-settings-panel,
body.admin-color-ectoplasm .prorank-settings-panel,
body.admin-color-coffee .prorank-settings-panel,
body.admin-color-blue .prorank-settings-panel,
body.admin-color-modern .prorank-settings-panel {
  background: transparent;
}

/* Tab dark mode: Uses shared _tabs.css */

/* Cards Dark Mode */
body.admin-color-midnight .prorank-settings-panel .components-card,
body.admin-color-ocean .prorank-settings-panel .components-card,
body.admin-color-ectoplasm .prorank-settings-panel .components-card,
body.admin-color-coffee .prorank-settings-panel .components-card,
body.admin-color-blue .prorank-settings-panel .components-card,
body.admin-color-modern .prorank-settings-panel .components-card {
  background: #2c2c2c;
  border-color: #3c3c3c;
}

body.admin-color-midnight .prorank-settings-panel .components-card__header,
body.admin-color-ocean .prorank-settings-panel .components-card__header,
body.admin-color-ectoplasm .prorank-settings-panel .components-card__header,
body.admin-color-coffee .prorank-settings-panel .components-card__header,
body.admin-color-blue .prorank-settings-panel .components-card__header,
body.admin-color-modern .prorank-settings-panel .components-card__header {
  border-bottom-color: #3c3c3c;
}

/* Form Controls Dark Mode */
body.admin-color-midnight .prorank-performance-page .components-text-control__input,
body.admin-color-midnight .prorank-performance-page .components-textarea-control__input,
body.admin-color-midnight .prorank-performance-page .components-select-control__input,
body.admin-color-ocean .prorank-performance-page .components-text-control__input,
body.admin-color-ocean .prorank-performance-page .components-textarea-control__input,
body.admin-color-ocean .prorank-performance-page .components-select-control__input,
body.admin-color-ectoplasm .prorank-performance-page .components-text-control__input,
body.admin-color-ectoplasm .prorank-performance-page .components-textarea-control__input,
body.admin-color-ectoplasm .prorank-performance-page .components-select-control__input,
body.admin-color-coffee .prorank-performance-page .components-text-control__input,
body.admin-color-coffee .prorank-performance-page .components-textarea-control__input,
body.admin-color-coffee .prorank-performance-page .components-select-control__input,
body.admin-color-blue .prorank-performance-page .components-text-control__input,
body.admin-color-blue .prorank-performance-page .components-textarea-control__input,
body.admin-color-blue .prorank-performance-page .components-select-control__input,
body.admin-color-modern .prorank-performance-page .components-text-control__input,
body.admin-color-modern .prorank-performance-page .components-textarea-control__input,
body.admin-color-modern .prorank-performance-page .components-select-control__input {
  background: #1e1e1e;
  border-color: #3c3c3c;
  color: #e2e4e7;
}

body.admin-color-midnight .prorank-performance-page .components-text-control__input:hover,
body.admin-color-midnight .prorank-performance-page .components-textarea-control__input:hover,
body.admin-color-midnight .prorank-performance-page .components-select-control__input:hover,
body.admin-color-ocean .prorank-performance-page .components-text-control__input:hover,
body.admin-color-ocean .prorank-performance-page .components-textarea-control__input:hover,
body.admin-color-ocean .prorank-performance-page .components-select-control__input:hover,
body.admin-color-ectoplasm .prorank-performance-page .components-text-control__input:hover,
body.admin-color-ectoplasm .prorank-performance-page .components-textarea-control__input:hover,
body.admin-color-ectoplasm .prorank-performance-page .components-select-control__input:hover,
body.admin-color-coffee .prorank-performance-page .components-text-control__input:hover,
body.admin-color-coffee .prorank-performance-page .components-textarea-control__input:hover,
body.admin-color-coffee .prorank-performance-page .components-select-control__input:hover,
body.admin-color-blue .prorank-performance-page .components-text-control__input:hover,
body.admin-color-blue .prorank-performance-page .components-textarea-control__input:hover,
body.admin-color-blue .prorank-performance-page .components-select-control__input:hover,
body.admin-color-modern .prorank-performance-page .components-text-control__input:hover,
body.admin-color-modern .prorank-performance-page .components-textarea-control__input:hover,
body.admin-color-modern .prorank-performance-page .components-select-control__input:hover {
  border-color: #4c4c4c;
}

/* Pro Callout Dark Mode */
body.admin-color-midnight .prorank-pro-callout,
body.admin-color-ocean .prorank-pro-callout,
body.admin-color-ectoplasm .prorank-pro-callout,
body.admin-color-coffee .prorank-pro-callout,
body.admin-color-blue .prorank-pro-callout,
body.admin-color-modern .prorank-pro-callout {
  background: linear-gradient(135deg, #2c2c2c 0%, #363636 100%);
  border-color: #4c4c4c;
}

body.admin-color-midnight .prorank-pro-content p,
body.admin-color-ocean .prorank-pro-content p,
body.admin-color-ectoplasm .prorank-pro-content p,
body.admin-color-coffee .prorank-pro-content p,
body.admin-color-blue .prorank-pro-content p,
body.admin-color-modern .prorank-pro-content p {
  color: #b4b9be;
}

/* Module Locked Dark Mode */
body.admin-color-midnight .prorank-module-locked,
body.admin-color-ocean .prorank-module-locked,
body.admin-color-ectoplasm .prorank-module-locked,
body.admin-color-coffee .prorank-module-locked,
body.admin-color-blue .prorank-module-locked,
body.admin-color-modern .prorank-module-locked {
  background: #2c2c2c;
  border-color: #3c3c3c;
}

body.admin-color-midnight .prorank-module-locked h3,
body.admin-color-ocean .prorank-module-locked h3,
body.admin-color-ectoplasm .prorank-module-locked h3,
body.admin-color-coffee .prorank-module-locked h3,
body.admin-color-blue .prorank-module-locked h3,
body.admin-color-modern .prorank-module-locked h3 {
  color: #e2e4e7;
}

body.admin-color-midnight .prorank-module-locked p,
body.admin-color-ocean .prorank-module-locked p,
body.admin-color-ectoplasm .prorank-module-locked p,
body.admin-color-coffee .prorank-module-locked p,
body.admin-color-blue .prorank-module-locked p,
body.admin-color-modern .prorank-module-locked p {
  color: #b4b9be;
}

/* Toggle and tab dark mode: Uses shared CSS */

/* Beta Card Dark Mode */
body.admin-color-midnight .prorank-beta-card,
body.admin-color-ocean .prorank-beta-card,
body.admin-color-ectoplasm .prorank-beta-card,
body.admin-color-coffee .prorank-beta-card,
body.admin-color-blue .prorank-beta-card,
body.admin-color-modern .prorank-beta-card {
  background: linear-gradient(135deg, #2c2c2c 0%, #363636 100%);
  border-color: #4c4c4c;
}

body.admin-color-midnight .prorank-beta-card h4,
body.admin-color-ocean .prorank-beta-card h4,
body.admin-color-ectoplasm .prorank-beta-card h4,
body.admin-color-coffee .prorank-beta-card h4,
body.admin-color-blue .prorank-beta-card h4,
body.admin-color-modern .prorank-beta-card h4 {
  color: #e2e4e7;
}

body.admin-color-midnight .prorank-beta-card p,
body.admin-color-ocean .prorank-beta-card p,
body.admin-color-ectoplasm .prorank-beta-card p,
body.admin-color-coffee .prorank-beta-card p,
body.admin-color-blue .prorank-beta-card p,
body.admin-color-modern .prorank-beta-card p {
  color: #b4b9be;
}

/* Additional Dark Mode Fixes for WordPress Components */
body.admin-color-midnight .components-base-control__label,
body.admin-color-ocean .components-base-control__label,
body.admin-color-ectoplasm .components-base-control__label,
body.admin-color-coffee .components-base-control__label,
body.admin-color-blue .components-base-control__label,
body.admin-color-modern .components-base-control__label {
  color: #b4b9be;
}

body.admin-color-midnight .components-base-control__help,
body.admin-color-ocean .components-base-control__help,
body.admin-color-ectoplasm .components-base-control__help,
body.admin-color-coffee .components-base-control__help,
body.admin-color-blue .components-base-control__help,
body.admin-color-modern .components-base-control__help {
  color: #9ca3af;
}

/* Fix any inline styles with white backgrounds */
body.admin-color-midnight .prorank-performance-page *[style*="background-color: white"],
body.admin-color-midnight .prorank-performance-page *[style*="background: white"],
body.admin-color-midnight .prorank-performance-page *[style*="background-color:#fff"],
body.admin-color-midnight .prorank-performance-page *[style*="background:#fff"],
body.admin-color-midnight .prorank-performance-page *[style*="background-color: #ffffff"],
body.admin-color-midnight .prorank-performance-page *[style*="background: #ffffff"],
body.admin-color-ocean .prorank-performance-page *[style*="background-color: white"],
body.admin-color-ocean .prorank-performance-page *[style*="background: white"],
body.admin-color-ocean .prorank-performance-page *[style*="background-color:#fff"],
body.admin-color-ocean .prorank-performance-page *[style*="background:#fff"],
body.admin-color-ocean .prorank-performance-page *[style*="background-color: #ffffff"],
body.admin-color-ocean .prorank-performance-page *[style*="background: #ffffff"],
body.admin-color-ectoplasm .prorank-performance-page *[style*="background-color: white"],
body.admin-color-ectoplasm .prorank-performance-page *[style*="background: white"],
body.admin-color-ectoplasm .prorank-performance-page *[style*="background-color:#fff"],
body.admin-color-ectoplasm .prorank-performance-page *[style*="background:#fff"],
body.admin-color-ectoplasm .prorank-performance-page *[style*="background-color: #ffffff"],
body.admin-color-ectoplasm .prorank-performance-page *[style*="background: #ffffff"],
body.admin-color-coffee .prorank-performance-page *[style*="background-color: white"],
body.admin-color-coffee .prorank-performance-page *[style*="background: white"],
body.admin-color-coffee .prorank-performance-page *[style*="background-color:#fff"],
body.admin-color-coffee .prorank-performance-page *[style*="background:#fff"],
body.admin-color-coffee .prorank-performance-page *[style*="background-color: #ffffff"],
body.admin-color-coffee .prorank-performance-page *[style*="background: #ffffff"],
body.admin-color-blue .prorank-performance-page *[style*="background-color: white"],
body.admin-color-blue .prorank-performance-page *[style*="background: white"],
body.admin-color-blue .prorank-performance-page *[style*="background-color:#fff"],
body.admin-color-blue .prorank-performance-page *[style*="background:#fff"],
body.admin-color-blue .prorank-performance-page *[style*="background-color: #ffffff"],
body.admin-color-blue .prorank-performance-page *[style*="background: #ffffff"],
body.admin-color-modern .prorank-performance-page *[style*="background-color: white"],
body.admin-color-modern .prorank-performance-page *[style*="background: white"],
body.admin-color-modern .prorank-performance-page *[style*="background-color:#fff"],
body.admin-color-modern .prorank-performance-page *[style*="background:#fff"],
body.admin-color-modern .prorank-performance-page *[style*="background-color: #ffffff"],
body.admin-color-modern .prorank-performance-page *[style*="background: #ffffff"] {
  background: #2c2c2c !important;
}

/* Target ProRank admin page specifically */
body.admin-color-midnight.prorank-seo_page_prorank-performance #wpbody,
body.admin-color-ocean.prorank-seo_page_prorank-performance #wpbody,
body.admin-color-ectoplasm.prorank-seo_page_prorank-performance #wpbody,
body.admin-color-coffee.prorank-seo_page_prorank-performance #wpbody,
body.admin-color-blue.prorank-seo_page_prorank-performance #wpbody,
body.admin-color-modern.prorank-seo_page_prorank-performance #wpbody {
  background-color: #1e1e1e !important;
}

body.admin-color-midnight.prorank-seo_page_prorank-performance #wpcontent,
body.admin-color-ocean.prorank-seo_page_prorank-performance #wpcontent,
body.admin-color-ectoplasm.prorank-seo_page_prorank-performance #wpcontent,
body.admin-color-coffee.prorank-seo_page_prorank-performance #wpcontent,
body.admin-color-blue.prorank-seo_page_prorank-performance #wpcontent,
body.admin-color-modern.prorank-seo_page_prorank-performance #wpcontent {
  background: #1e1e1e !important;
}

/* Make sure all text is visible */
body.admin-color-midnight .prorank-performance-page,
body.admin-color-ocean .prorank-performance-page,
body.admin-color-ectoplasm .prorank-performance-page,
body.admin-color-coffee .prorank-performance-page,
body.admin-color-blue .prorank-performance-page,
body.admin-color-modern .prorank-performance-page {
  color: #e2e4e7;
}

/* Fix inline paragraph text color in dark mode */
body.admin-color-midnight .prorank-tab-content p,
body.admin-color-ocean .prorank-tab-content p,
body.admin-color-ectoplasm .prorank-tab-content p,
body.admin-color-coffee .prorank-tab-content p,
body.admin-color-blue .prorank-tab-content p,
body.admin-color-modern .prorank-tab-content p {
  color: #b4b9be !important;
}

/* Fix settings card background */
body.admin-color-midnight .prorank-settings-card,
body.admin-color-ocean .prorank-settings-card,
body.admin-color-ectoplasm .prorank-settings-card,
body.admin-color-coffee .prorank-settings-card,
body.admin-color-blue .prorank-settings-card,
body.admin-color-modern .prorank-settings-card {
  background: #2c2c2c !important;
  color: #e2e4e7 !important;
}

/* Fix WordPress Notices in dark mode */
body.admin-color-midnight .prorank-performance-page .components-notice,
body.admin-color-ocean .prorank-performance-page .components-notice,
body.admin-color-ectoplasm .prorank-performance-page .components-notice,
body.admin-color-coffee .prorank-performance-page .components-notice,
body.admin-color-blue .prorank-performance-page .components-notice,
body.admin-color-modern .prorank-performance-page .components-notice {
  background: #3c3c3c !important;
  border-color: #4c4c4c !important;
  color: #e2e4e7 !important;
}

/* Stat Cards Dark Mode */
body.admin-color-midnight .prorank-stat-card,
body.admin-color-ocean .prorank-stat-card,
body.admin-color-ectoplasm .prorank-stat-card,
body.admin-color-coffee .prorank-stat-card,
body.admin-color-blue .prorank-stat-card,
body.admin-color-modern .prorank-stat-card {
  background: rgba(44, 44, 44, 0.9) !important;
  border-color: rgba(60, 60, 60, 0.5) !important;
}

body.admin-color-midnight .prorank-stat-value,
body.admin-color-ocean .prorank-stat-value,
body.admin-color-ectoplasm .prorank-stat-value,
body.admin-color-coffee .prorank-stat-value,
body.admin-color-blue .prorank-stat-value,
body.admin-color-modern .prorank-stat-value {
  color: #e2e4e7 !important;
}

body.admin-color-midnight .prorank-stat-label,
body.admin-color-ocean .prorank-stat-label,
body.admin-color-ectoplasm .prorank-stat-label,
body.admin-color-coffee .prorank-stat-label,
body.admin-color-blue .prorank-stat-label,
body.admin-color-modern .prorank-stat-label {
  color: #b4b9be !important;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .prorank-header-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .prorank-header-stats {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .prorank-tab-navigation {
    padding: 3px;
  }
  
  .prorank-tab-button {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .prorank-module-control {
    flex-wrap: wrap;
  }
  
  .prorank-module-left {
    width: 100%;
    margin-bottom: 12px;
  }
}
