/* Novarex Affiliate Manager — Frontend Styles */

.nvx-aff-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
  font-family: inherit;
}

/* Benefits grid */
.nvx-aff-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.nvx-aff-benefit {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.nvx-aff-benefit-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.nvx-aff-benefit h3 { margin: 0 0 0.375rem; font-size: 0.9375rem; }
.nvx-aff-benefit p  { margin: 0; font-size: 0.8125rem; color: #6b7280; }

/* Card */
.nvx-aff-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

/* Form fields */
.nvx-aff-field { margin-bottom: 1rem; }
.nvx-aff-field label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.375rem; color: #111; }
.nvx-aff-field input,
.nvx-aff-field textarea {
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5625rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.nvx-aff-field input:focus,
.nvx-aff-field textarea:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.nvx-req { color: #ef4444; }
.nvx-opt { color: #9ca3af; font-weight: 400; }

/* Buttons */
.nvx-aff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.nvx-aff-btn:active { transform: scale(0.97); }
.nvx-aff-btn-primary { background: #5b21b6; color: #fff; }
.nvx-aff-btn-primary:hover { background: #4c1d95; color: #fff; }
.nvx-aff-btn-outline {
  background: transparent;
  color: #5b21b6;
  border: 1.5px solid #5b21b6;
}
.nvx-aff-btn-outline:hover { background: #f5f3ff; }

/* Messages */
.nvx-aff-msg {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.nvx-aff-msg-success { background: #f0fdf4; border: 1.5px solid #86efac; color: #166534; }
.nvx-aff-msg-error   { background: #fef2f2; border: 1.5px solid #fca5a5; color: #991b1b; }
.nvx-aff-msg-warning { background: #fffbeb; border: 1.5px solid #fcd34d; color: #92400e; }
.nvx-aff-msg-info    { background: #eff6ff; border: 1.5px solid #93c5fd; color: #1e40af; }

/* Dashboard header */
.nvx-aff-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Stats grid */
.nvx-aff-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.nvx-aff-stat-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.nvx-stat-highlight { border-color: #7c3aed; background: #faf5ff; }
.nvx-stat-label { margin: 0 0 0.25rem; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; }
.nvx-stat-value { margin: 0; font-size: 1.75rem; font-weight: 900; color: #111; }
.nvx-stat-highlight .nvx-stat-value { color: #5b21b6; }

/* Referral link row */
.nvx-aff-link-row { display: flex; gap: 0.5rem; }
.nvx-aff-link-row input {
  flex: 1;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  background: #f9fafb;
  color: #374151;
}

/* Progress bar */
.nvx-aff-progress-bar {
  background: #e5e7eb;
  border-radius: 999px;
  height: 8px;
  margin: 0.75rem 0 0.5rem;
  overflow: hidden;
}
.nvx-aff-progress-fill {
  background: linear-gradient(90deg, #7c3aed, #5b21b6);
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Activity feed */
.nvx-aff-activity-feed { display: flex; flex-direction: column; gap: 0.625rem; }
.nvx-aff-activity-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 10px;
}
.nvx-aff-activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.nvx-aff-activity-body { flex: 1; min-width: 0; }
.nvx-activity-label { margin: 0; font-size: 0.8125rem; font-weight: 700; }
.nvx-activity-detail { margin: 0.125rem 0 0; font-size: 0.75rem; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nvx-aff-activity-time { font-size: 0.75rem; color: #9ca3af; white-space: nowrap; flex-shrink: 0; }

/* Code box */
.nvx-aff-code-box {
  background: #f5f3ff;
  border: 1.5px solid #ddd6fe;
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .nvx-aff-link-row { flex-direction: column; }
  .nvx-aff-dashboard-header { flex-direction: column; align-items: flex-start; }
}
