/* Marketplace Control Center Styles */

.marketplace-control-center {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 24px;
}

/* KPI Bar */
.marketplace-kpi-bar {
  margin-bottom: 32px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.kpi-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.kpi-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 12px;
  flex-shrink: 0;
}

.kpi-content {
  flex: 1;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
  margin-bottom: 4px;
}

.kpi-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* Main Content */
.marketplace-content {
  max-width: 1200px;
  margin: 0 auto;
}

.marketplace-header {
  text-align: center;
  margin-bottom: 48px;
}

.marketplace-title {
  font-size: 36px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 12px 0;
}

.marketplace-description {
  font-size: 18px;
  color: #6b7280;
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
}

/* Channel Grid */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* Channel Card */
.channel-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.channel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.channel-card.connected::before {
  opacity: 1;
}

.channel-card.disconnected::before {
  background: linear-gradient(90deg, #6b7280, #4b5563);
}

.channel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.channel-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.channel-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  flex-shrink: 0;
}

.channel-logo .channel-logo-img,
.channel-logo .channel-logo-fallback {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.channel-logo .channel-logo-fallback {
  font-size: 12px;
  font-weight: 800;
}

.channel-info {
  flex: 1;
}

.channel-name {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.channel-description {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.channel-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.status-indicator.connected {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-indicator.disconnected {
  background: #6b7280;
  box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.2);
}

.status-text {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

/* Channel Details */
.channel-details {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.channel-store,
.channel-sync {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.channel-store:last-child,
.channel-sync:last-child {
  margin-bottom: 0;
}

.store-label,
.sync-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.store-name,
.sync-time {
  font-size: 13px;
  color: #1f2937;
  font-weight: 600;
}

/* Channel Metrics */
.channel-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.metric {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
}

.metric-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* Channel Actions */
.channel-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.action-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.action-btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.action-btn.primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}

.action-btn.secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.action-btn.secondary:hover {
  background: #e5e7eb;
  color: #1f2937;
}

.action-btn.soft {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.action-btn.soft:hover {
  background: #f9fafb;
  color: #374151;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.7;
}

.empty-title {
  font-size: 28px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 12px 0;
}

.empty-description {
  font-size: 16px;
  color: #6b7280;
  margin: 0 0 40px 0;
  max-width: 500px;
  margin: 0 auto 40px auto;
}

/* Onboarding Grid */
.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.onboarding-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.onboarding-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}

.onboarding-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  margin: 0 auto 16px auto;
}

.onboarding-logo .channel-logo-img,
.onboarding-logo .channel-logo-fallback {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.onboarding-logo .channel-logo-fallback {
  font-size: 11px;
  font-weight: 800;
}

.onboarding-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.onboarding-description {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.onboarding-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.onboarding-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .marketplace-control-center {
    padding: 20px;
  }
  
  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
  }
  
  .kpi-card {
    padding: 20px;
  }
  
  .kpi-value {
    font-size: 20px;
  }
  
  .channel-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .marketplace-control-center {
    padding: 16px;
  }
  
  .marketplace-title {
    font-size: 28px;
  }
  
  .marketplace-description {
    font-size: 16px;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .kpi-card {
    padding: 16px;
  }
  
  .kpi-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  
  .kpi-value {
    font-size: 18px;
  }
  
  .channel-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .channel-card {
    padding: 20px;
  }
  
  .channel-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .channel-status {
    align-self: center;
  }
  
  .channel-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .channel-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .empty-state {
    padding: 60px 24px;
  }
  
  .onboarding-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .marketplace-control-center {
    padding: 12px;
  }
  
  .marketplace-title {
    font-size: 24px;
  }
  
  .kpi-card {
    padding: 12px;
  }
  
  .kpi-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .kpi-value {
    font-size: 16px;
  }
  
  .channel-card {
    padding: 16px;
  }
  
  .channel-logo {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .empty-state {
    padding: 40px 16px;
  }
  
  .empty-icon {
    font-size: 48px;
  }
  
  .empty-title {
    font-size: 24px;
  }
}
