/* =============================================================================
   SmartMBX Academy — "SMBX Academy Partners" affiliate skin.

   Layers on TOP of assets/style.css + assets/store.css (both loaded first on the
   partner-facing pages: partners.php and affiliate/*.php). Reuses the dark+gold
   brand tokens (--gold, --panel, --ink, …) with safe fallbacks so the look holds
   even if a token is absent. Scoped to .aff-* classes — touches nothing else.
   ============================================================================ */

.aff-eyebrow {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold, #c9a227);
  margin: 0 0 10px;
}

.aff-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  margin: 0 0 12px;
  color: var(--ink, #f1ecdf);
}

.aff-lead {
  color: var(--ink-muted, #9a96a8);
  font-size: 17px;
  line-height: 1.6;
  max-width: 60ch;
}

.aff-section {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 40px 0 18px;
  color: var(--ink, #f1ecdf);
}

/* --- Cards / auth panels --------------------------------------------------- */
.aff-card {
  background: linear-gradient(180deg, var(--panel, #101521), var(--panel-2, #0c111c));
  border: 1px solid var(--line, #1e2230);
  border-radius: var(--r-lg, 18px);
  padding: 26px 26px 28px;
  max-width: 560px;
  margin: 0 0 22px;
}

.aff-auth { max-width: 580px; margin: 6vh auto 8vh; }

.aff-card label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
  color: var(--ink-soft, #ece9f5);
  font-size: 14px;
}
.aff-card input[type="text"],
.aff-card input[type="email"],
.aff-card input[type="password"],
.aff-card input[type="number"],
.aff-card select {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-2, #070b16);
  border: 1px solid var(--line-2, #2a2f40);
  border-radius: var(--r-sm, 9px);
  color: var(--ink, #f1ecdf);
  font: inherit;
}
.aff-card input:focus,
.aff-card select:focus {
  outline: none;
  border-color: var(--gold, #c9a227);
  box-shadow: 0 0 0 3px var(--gold-hair, rgba(201,162,39,.34));
}
.aff-card .form-actions { margin-top: 22px; }
.aff-card .help { color: var(--ink-muted, #9a96a8); font-size: 13px; margin-top: 8px; }
.aff-card .help a, .aff-lead a { color: var(--gold2, #e8b84b); }

/* --- Public landing hero --------------------------------------------------- */
.aff-hero { max-width: 820px; margin: 7vh auto 2vh; text-align: center; }
.aff-hero-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--ink, #f1ecdf);
}
.aff-hero-title .aff-rate { color: var(--gold2, #e8b84b); }
.aff-rate { color: var(--gold2, #e8b84b); }
.aff-hero-lead {
  color: var(--ink-muted, #9a96a8);
  font-size: 18px;
  line-height: 1.65;
  max-width: 64ch;
  margin: 0 auto 26px;
}
.aff-hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 8px 0 14px; }
.aff-hero-cta .btn { width: auto; padding: 13px 26px; }
.aff-honest {
  color: var(--ink-muted, #9a96a8);
  font-size: 13px;
  font-style: italic;
  margin-top: 16px;
}

/* --- "How it works" steps -------------------------------------------------- */
.aff-steps, .aff-why, .aff-faq { max-width: 980px; margin: 0 auto; }
.aff-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.aff-step {
  background: linear-gradient(180deg, var(--panel, #101521), var(--panel-2, #0c111c));
  border: 1px solid var(--line, #1e2230);
  border-radius: var(--r-md, 13px);
  padding: 22px;
}
.aff-step-n {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad-gold, linear-gradient(95deg, #c9a227, #e8b84b));
  color: #1a1306;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  margin-bottom: 12px;
}
.aff-step h3 { margin: 0 0 6px; color: var(--ink, #f1ecdf); font-size: 18px; }
.aff-step p { margin: 0; color: var(--ink-muted, #9a96a8); font-size: 14px; line-height: 1.55; }

.aff-why-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.aff-why-list li {
  padding: 14px 16px;
  background: var(--panel-2, #0c111c);
  border: 1px solid var(--line, #1e2230);
  border-radius: var(--r-sm, 9px);
  color: var(--ink-muted, #9a96a8);
  line-height: 1.55;
}
.aff-why-list strong { color: var(--ink-soft, #ece9f5); }

.aff-faq-item { padding: 16px 0; border-bottom: 1px solid var(--line, #1e2230); }
.aff-faq-item h3 { margin: 0 0 6px; color: var(--ink, #f1ecdf); font-size: 17px; }
.aff-faq-item p { margin: 0; color: var(--ink-muted, #9a96a8); line-height: 1.6; }

/* --- Dashboard ------------------------------------------------------------- */
.aff-dash { max-width: 980px; margin: 4vh auto 8vh; }
.aff-dash-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; margin-bottom: 22px;
}
.aff-signout .btn { width: auto; padding: 8px 16px; }

.aff-partner-os {
  margin: 28px 0 34px; padding: clamp(24px,4vw,38px); overflow: hidden;
  border: 1px solid rgba(6,25,43,.16); border-radius: 26px;
  background:
    radial-gradient(540px 260px at 100% 0, rgba(0,162,107,.17), transparent 68%),
    linear-gradient(145deg, #06192b, #0a2b38 72%, #073b31);
  color: #fff; box-shadow: 0 26px 70px rgba(6,25,43,.18);
}
.aff-partner-os .aff-eyebrow { color: #8ce4be; }
.aff-partner-os h2 {
  max-width: 780px; margin: 10px 0 12px; color: #fff;
  font-family: var(--font-display, Georgia, serif); font-size: clamp(30px,4vw,48px); line-height: 1.02;
}
.aff-partner-os .aff-lead { max-width: 820px; margin: 0; color: rgba(255,255,255,.67); }
.aff-partner-flow { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 28px; }
.aff-partner-flow a {
  min-height: 164px; padding: 18px; color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: rgba(255,255,255,.045);
  transition: transform .3s ease,border-color .3s ease,background .3s ease;
}
.aff-partner-flow a:hover { transform: translateY(-3px); border-color: rgba(140,228,190,.42); background: rgba(255,255,255,.075); }
.aff-partner-flow small { display: block; color: #8ce4be; font: 700 9px/1 var(--font-mono,monospace); letter-spacing: .12em; }
.aff-partner-flow b { display: block; margin: 24px 0 8px; color: #fff; font-family: var(--font-display,Georgia,serif); font-size: 19px; }
.aff-partner-flow span { color: rgba(255,255,255,.57); font-size: 12px; line-height: 1.45; }
.aff-partner-boundary { margin: 16px 0 0; color: rgba(255,255,255,.52); font-size: 11.5px; line-height: 1.55; }

.aff-link-card { max-width: 100%; }
.aff-linkbox {
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  word-break: break-all;
  background: var(--bg-2, #070b16);
  border: 1px solid var(--gold-hair, rgba(201,162,39,.34));
  border-radius: var(--r-sm, 9px);
  padding: 14px 16px;
  color: var(--gold2, #e8b84b);
  margin: 6px 0 16px;
}
.aff-link-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.aff-link-actions .btn { width: auto; padding: 10px 20px; }

.aff-qr-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.aff-qr {
  background: #fff;
  border-radius: var(--r-sm, 9px);
  padding: 8px;
  width: 220px; height: 220px;
}
.aff-qr-fallback { color: var(--ink-muted, #9a96a8); font-size: 13px; }

/* KPI tiles (dashboard) */
.aff-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.aff-kpi {
  background: linear-gradient(180deg, var(--panel, #101521), var(--panel-2, #0c111c));
  border: 1px solid var(--line, #1e2230);
  border-radius: var(--r-md, 13px);
  padding: 18px 20px;
}
.aff-kpi .v { font-family: var(--font-display, Georgia, serif); font-size: 28px; color: var(--gold2, #e8b84b); }
.aff-kpi .k { color: var(--ink-soft, #ece9f5); font-size: 13px; margin-top: 4px; font-weight: 600; }
.aff-kpi .sub { color: var(--ink-muted, #9a96a8); font-size: 11px; margin-top: 2px; }

/* Commission history table */
.aff-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 14px;
}
.aff-table th, .aff-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line, #1e2230);
}
.aff-table th {
  color: var(--ink-muted, #9a96a8);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.aff-table td { color: var(--ink, #f1ecdf); }
.aff-table .mono { font-family: var(--font-mono, monospace); }

.aff-empty {
  padding: 22px;
  text-align: center;
  color: var(--ink-muted, #9a96a8);
  background: var(--panel-2, #0c111c);
  border: 1px dashed var(--line-2, #2a2f40);
  border-radius: var(--r-md, 13px);
}

/* Status tags */
.aff-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-2, #2a2f40);
  color: var(--ink-muted, #9a96a8);
}
.aff-tag.paid     { color: #8be0a4; border-color: rgba(139,224,164,.4); }
.aff-tag.approved { color: var(--gold2, #e8b84b); border-color: var(--gold-hair, rgba(201,162,39,.34)); }
.aff-tag.pending  { color: #e8c97a; border-color: rgba(232,201,122,.4); }
.aff-tag.void     { color: #d79090; border-color: rgba(215,144,144,.4); }

.aff-table .mono.muted, .mono.muted { color: var(--ink-muted, #9a96a8); }

@media (max-width: 560px) {
  .aff-dash-head { flex-direction: column; }
  .aff-table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (max-width: 900px) { .aff-partner-flow { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .aff-partner-flow { grid-template-columns: 1fr; } }
