/* Affiliate Panel Styles */

.header {
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.header .logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
  transition: color 0.3s ease;
}

.header .logo a:hover {
  color: var(--primary-light);
}

.header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.header nav a:hover {
  color: var(--primary-color);
}

/* Affiliate Login/Register Page */
.affiliate-page {
  min-height: 100vh;
  padding: 80px 20px 60px;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0, 206, 201, 0.05) 0%, transparent 50%),
    var(--bg-dark);
}

.affiliate-hero {
  text-align: center;
  margin-bottom: 60px;
}

.affiliate-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.affiliate-hero > p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.affiliate-forms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.form-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.1), transparent);
  transition: left 0.6s ease;
}

.form-section:hover {
  border-color: var(--primary-color);
  box-shadow: 0 20px 50px rgba(108, 92, 231, 0.2);
  transform: translateY(-5px);
}

.form-section:hover::before {
  left: 100%;
}

.form-header {
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.form-badge {
  display: inline-block;
  background: rgba(108, 92, 231, 0.2);
  color: var(--primary-light);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.form-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.form-section > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

.form-group small {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
  position: relative;
  z-index: 2;
  margin-top: 10px;
}

.form-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.6);
}

.form-submit:active {
  transform: translateY(-1px);
}

.message-box {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 600;
  animation: slideIn 0.3s ease;
  position: relative;
  z-index: 2;
}

.message-box.success {
  background: rgba(0, 184, 148, 0.15);
  border: 1px solid rgba(0, 184, 148, 0.3);
  color: #00b894;
}

.message-box.error {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

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

/* Dashboard Section */
.dashboard-section {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.dashboard-header > div h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.dashboard-header > div p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(108, 92, 231, 0.2);
  border-color: var(--primary-color);
}

.status-badge {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.status-badge.approved {
  background: rgba(0, 184, 148, 0.2);
  color: #00b894;
  border: 1px solid rgba(0, 184, 148, 0.3);
}

.status-badge.pending {
  background: rgba(253, 203, 110, 0.2);
  color: #fdcb6e;
  border: 1px solid rgba(253, 203, 110, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--primary-color);
  background: rgba(108, 92, 231, 0.1);
}

.stat-icon {
  font-size: 2.5rem;
  min-width: 60px;
  text-align: center;
}

.stat-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.referral-box {
  background: rgba(0, 206, 201, 0.1);
  border: 1px solid rgba(0, 206, 201, 0.3);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 40px;
}

.referral-box h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.link-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.link-container input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 206, 201, 0.3);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.btn-copy {
  padding: 12px 24px;
  background: var(--secondary-color);
  color: var(--bg-dark);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 206, 201, 0.4);
}

.link-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.sales-section {
  margin-top: 40px;
}

.sales-section h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 20px;
}

#salesList {
  display: grid;
  gap: 15px;
}

.sale-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.sale-item:hover {
  border-color: var(--primary-color);
  background: rgba(108, 92, 231, 0.05);
}

.sale-info h4 {
  font-weight: 700;
  margin-bottom: 5px;
}

.sale-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.sale-amount {
  text-align: center;
}

.sale-amount div {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--secondary-color);
}

.sale-amount small,
.sale-commission small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sale-commission {
  text-align: center;
}

.sale-commission div {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-light);
}

.sale-customer {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.sale-status {
  text-align: center;
}

.badge-paid {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0, 206, 201, 0.2);
  color: #00cec9;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-pending-small {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(253, 203, 110, 0.2);
  color: #fdcb6e;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-approved {
  color: #00b894;
}

.badge-pending {
  color: #fdcb6e;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
  display: block;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.empty-state small {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 968px) {
  .affiliate-forms-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .form-section {
    padding: 30px;
  }

  .affiliate-hero h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    gap: 15px;
  }

  .header nav {
    width: 100%;
    justify-content: center;
  }

  .affiliate-page {
    padding: 60px 15px 40px;
  }

  .form-section {
    padding: 25px;
  }

  .affiliate-hero h1 {
    font-size: 1.5rem;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 15px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .sale-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .sale-amount {
    align-self: flex-end;
  }
}
