/* Affiliate dashboard skin — presentation only. */

.aff-dash {
  --aff-ink: #1a1a1a;
  --aff-muted: #6b6558;
  --aff-line: #e3dfd2;
  --aff-blue: #2563eb;
  --aff-blue-hover: #1d4ed8;
  --aff-gold: #c4a35a;
  --aff-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  border: 1px solid var(--aff-line);
  border-radius: 14px;
  background: #fff;
  color: var(--aff-ink);
  font-family: var(--aff-sans);
  box-shadow: 0 10px 28px rgba(26, 26, 26, 0.06);
}

.aff-dash,
.aff-dash * {
  font-family: var(--aff-sans) !important;
}

.aff-dash,
.aff-dash p,
.aff-dash h1,
.aff-dash h2,
.aff-dash h3,
.aff-dash h4,
.aff-dash span,
.aff-dash strong,
.aff-dash b,
.aff-dash td,
.aff-dash th,
.aff-dash label,
.aff-dash li,
.aff-dash a {
  color: var(--aff-ink);
}

.aff-dash h2,
.aff-dash h3,
.aff-dash .aff-dash-title {
  color: #1a1a1a !important;
}

.aff-dash .aff-code,
.aff-dash #affCode,
.aff-dash #affOtpInput,
.aff-dash input,
.aff-dash select,
.aff-dash button,
.aff-dash td,
.aff-dash th {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.aff-dash-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--aff-line);
}

.aff-dash-bar h2,
.aff-dash-bar .aff-dash-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--aff-ink);
}

.aff-dash-bar p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--aff-muted) !important;
}

.aff-pill-secure {
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid #b7e0c5;
  border-radius: 999px;
  background: #e8f6ee;
  color: #157a4b;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  white-space: nowrap;
}

.aff-dash-body {
  padding: 16px 18px 18px;
}

#affPanel-dash {
  margin: -16px -18px -18px;
}

.aff-note a,
.aff-dash-foot a,
.aff-dash a {
  color: var(--aff-ink);
  text-underline-offset: 2px;
}

.aff-dash a.aff-btn {
  text-decoration: none;
}

.aff-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--aff-ink);
}

.aff-dash input[type="email"],
.aff-dash input[type="text"],
.aff-dash input[type="tel"],
.aff-dash select.aff-field,
.aff-dash .aff-copy-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--aff-line);
  border-radius: 10px;
  background: #fff;
  color: var(--aff-ink);
  padding: 0 12px;
  font-size: 15px;
  outline: none;
}

.aff-dash input:focus,
.aff-dash select:focus {
  border-color: var(--aff-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

.aff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

.aff-btn-primary,
.aff-btn-primary:disabled,
.aff-dash button.aff-btn-primary[disabled] {
  background: var(--aff-blue) !important;
  color: #fff !important;
  border-color: var(--aff-blue) !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

.aff-btn-primary:hover,
.aff-btn-primary:disabled:hover {
  background: var(--aff-blue-hover) !important;
  border-color: var(--aff-blue-hover) !important;
  color: #fff !important;
}

.aff-btn-primary:disabled,
.aff-dash button.aff-btn-primary[disabled] {
  cursor: not-allowed;
}

.aff-btn-secondary {
  background: #fff;
  color: var(--aff-ink);
  border-color: var(--aff-line);
}

.aff-btn-secondary:hover {
  border-color: #cfc9b8;
  background: #faf9f5;
}

.aff-btn-ghost {
  width: auto;
  height: 32px;
  padding: 0 10px;
  background: transparent;
  color: var(--aff-muted);
  border-color: var(--aff-line);
  font-size: 12px;
}

.aff-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--aff-line);
  color: var(--aff-muted);
  font-size: 12px;
}

.aff-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aff-trust svg {
  width: 16px;
  height: 16px;
  stroke: var(--aff-gold);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.aff-trust-sep {
  color: #cfc9b8;
}

.aff-status {
  margin-top: 12px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.aff-dash-signed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--aff-line);
}

.aff-dash-signed h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.aff-dash-email {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--aff-muted) !important;
}

.aff-signed-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aff-code-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--aff-line);
  border-radius: 999px;
  background: #faf9f5;
  padding: 4px 4px 4px 12px;
}

.aff-code-chip #affCode {
  font-size: 13px;
  font-weight: 700;
  color: var(--aff-ink);
}

.aff-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px 4px;
}

.aff-kpi {
  border: 1px solid var(--aff-line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #faf9f5;
}

.aff-kpi span {
  display: block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--aff-muted);
}

.aff-kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--aff-ink);
}

.aff-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 18px 4px;
}

.aff-product {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--aff-line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.aff-product h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aff-muted);
}

.aff-bal-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--aff-muted);
}

.aff-bal-row b {
  color: var(--aff-ink);
  font-size: 15px;
  font-weight: 700;
}

.aff-copy-row {
  display: flex;
  gap: 8px;
}

.aff-copy-row .aff-copy-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  font-size: 12px;
  color: var(--aff-muted);
}

.aff-copy-row .aff-btn {
  width: auto;
  height: 40px;
  padding: 0 12px;
  flex-shrink: 0;
}

.aff-product .aff-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--aff-muted);
}

.aff-payout-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.aff-radios {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.aff-radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aff-activity {
  padding: 12px 18px 8px;
}

.aff-activity h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.aff-activity table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.aff-activity th {
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--aff-muted);
  padding: 8px 6px;
  border-bottom: 1px solid var(--aff-line);
}

.aff-activity td {
  padding: 10px 6px;
  border-bottom: 1px solid #f0ece3;
  color: var(--aff-ink);
  vertical-align: middle;
}

.aff-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.aff-chip-pending {
  background: #fff6db;
  color: #8a6414;
}

.aff-chip-available {
  background: #e8f6ee;
  color: #157a4b;
}

.aff-chip-paid {
  background: #eef2ff;
  color: #3730a3;
}

.aff-dash-foot {
  padding: 12px 18px 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--aff-muted);
}

.aff-dash-foot a {
  color: var(--aff-ink);
  text-decoration: underline;
}

.aff-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--aff-muted);
}

.aff-space {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html[data-theme="light"] .aff-dash input[type="email"],
html[data-theme="light"] .aff-dash input[type="text"],
html[data-theme="light"] .aff-dash input[type="tel"],
html[data-theme="light"] .aff-dash select,
html[data-theme="dark"] .aff-dash input[type="email"],
html[data-theme="dark"] .aff-dash input[type="text"],
html[data-theme="dark"] .aff-dash input[type="tel"],
html[data-theme="dark"] .aff-dash select {
  background: #fff !important;
  color: #1a1a1a !important;
  border-color: #e3dfd2 !important;
}

html[data-theme="light"] .aff-dash input:focus,
html[data-theme="light"] .aff-dash select:focus,
html[data-theme="dark"] .aff-dash input:focus,
html[data-theme="dark"] .aff-dash select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

/* Page body must stack above the fixed studio atmosphere (z-index: 0).
   Fade-in sections keep transform:translateY(0), which already creates a
   stacking context; FAQ and the privacy line do not, so they reserved
   height while painting underneath the overlay. */
.aff-page {
  position: relative;
  z-index: 1;
}

.aff-lower {
  margin-top: 60px;
  margin-bottom: 60px;
}

.aff-privacy-line {
  margin: 0 0 16px;
}

.aff-lower #faq {
  margin-top: 0;
}

@media (max-width: 720px) {
  .aff-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .aff-products {
    grid-template-columns: 1fr;
  }
  .aff-dash-signed {
    align-items: flex-start;
  }
}
