/* ── Language segmented control (used on standalone pages that don't load styles.css) ── */
.language-segmented-control { position: relative; display: grid; grid-template-columns: repeat(2, 3rem); align-items: center; padding: 0.3rem; border-radius: 0.85rem; background: rgba(50,50,50, 0.4); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.18); flex-shrink: 0;}
.language-segmented-thumb { position: absolute; top: 0.3rem; left: 0.3rem; width: 3rem; height: calc(100% - 0.6rem); border-radius: 0.65rem; background: linear-gradient(to right, var(--primary), #4f7df0); box-shadow: 0 0.2rem 0.6rem rgba(79, 70, 229, 0.35); transition: transform 0.22s ease;}
.language-segmented-control[data-locale="es"] .language-segmented-thumb { transform: translateX(3rem);}
.language-segmented-option { position: relative; z-index: 1; height: 2.2rem; border: 0; background: transparent; color: #cbd5e1; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: color 0.2s ease;}
.language-segmented-option.is-active { color: #ffffff;}

.affiliate-page-main {
  min-height: calc(100vh - 12rem);
  padding-top: 8.5rem;
  padding-bottom: 3.5rem;
}

.affiliate-page .affiliate-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.affiliate-page .affiliate-section-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: start;
}

.affiliate-page .affiliate-left-card,
.affiliate-page .affiliate-right-card {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0.25rem 1.5rem rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.affiliate-page .affiliate-left-card:hover,
.affiliate-page .affiliate-right-card:hover {
  box-shadow: 0 0.5rem 2rem rgba(79, 70, 229, 0.18);
  border-color: rgba(79, 70, 229, 0.28);
}

.affiliate-page .affiliate-left-card::before,
.affiliate-page .affiliate-right-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.22), transparent 60%),
    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.18), transparent 62%);
}

/* Override generic styles.css rules that add background/border to these inner divs */
.affiliate-page .affiliate-copy,
.affiliate-page .affiliate-form-card,
body.affiliate-page .affiliate-copy,
body.affiliate-page .affiliate-form-card {
  position: relative;
  overflow: visible;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.affiliate-page .affiliate-copy::before,
.affiliate-page .affiliate-form-card::before,
body.affiliate-page .affiliate-copy::before,
body.affiliate-page .affiliate-form-card::before {
  display: none !important;
}





.affiliate-page .affiliate-eyebrow,
.affiliate-page .affiliate-form-header {
  position: relative;
  z-index: 1;
}

.affiliate-page .affiliate-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0.25rem 0.75rem rgba(79, 70, 229, 0.35);
}

.affiliate-page .affiliate-copy h1,
.affiliate-page .affiliate-copy h2 {
  position: relative;
  z-index: 1;
  margin: 1.25rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.05;
  color: #f8fafc;
}

.affiliate-page .affiliate-lead {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.7;
}

.affiliate-page .affiliate-benefits {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.affiliate-page .affiliate-benefit {
  padding: 1.1rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.affiliate-page .affiliate-benefit:hover {
  transform: translateY(-0.2rem);
  border-color: rgba(79, 70, 229, 0.32);
  box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.35);
}

.affiliate-page .affiliate-benefit-wide {
  grid-column: auto;
  align-items: start;
}

.affiliate-page .affiliate-benefit-body {
  min-width: 0;
}

.affiliate-page .affiliate-benefit-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(79, 70, 229, 0.18);
  border: 1px solid rgba(79, 70, 229, 0.28);
  color: #e5e7eb;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 0.25rem 1rem rgba(79, 70, 229, 0.2);
}

.affiliate-page .affiliate-benefit-students .affiliate-benefit-value {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  box-shadow: 0 0.25rem 1rem rgba(251, 191, 36, 0.15);
}

.affiliate-page .affiliate-benefit-wide .affiliate-benefit-value {
  margin-bottom: 0.75rem;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
  box-shadow: 0 0.25rem 1rem rgba(16, 185, 129, 0.15);
}

.affiliate-page .affiliate-benefit h3 {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #f8fafc;
  font-weight: 700;
}

.affiliate-page .affiliate-benefit p {
  color: #94a3b8;
  line-height: 1.5;
  font-size: 0.85rem;
}

.affiliate-page .affiliate-form-header h2,
.affiliate-page .affiliate-form-header h3 {
  margin: 0 0 0.6rem;
  font-size: 1.8rem;
  color: #f8fafc;
}

.affiliate-page .affiliate-form-header p {
  color: #94a3b8;
  line-height: 1.6;
}

.affiliate-page .affiliate-form {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
}

.affiliate-page .affiliate-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.affiliate-page .affiliate-field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.affiliate-page .affiliate-field-full {
  grid-column: 1 / -1;
}

.affiliate-page .affiliate-field span {
  color: #e5e7eb;
  font-size: 0.95rem;
  font-weight: 600;
}

.affiliate-page .affiliate-field input,
.affiliate-page .affiliate-field textarea,
.affiliate-page .affiliate-field select {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.62);
  color: #f8fafc;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.affiliate-page .affiliate-field input::placeholder,
.affiliate-page .affiliate-field textarea::placeholder {
  color: #64748b;
}

.affiliate-page .affiliate-field input:focus,
.affiliate-page .affiliate-field textarea:focus,
.affiliate-page .affiliate-field select:focus {
  outline: none;
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(79, 70, 229, 0.55);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.affiliate-page .affiliate-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #94a3b8 50%),
    linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position:
    calc(100% - 1.1rem) calc(50% - 0.2rem),
    calc(100% - 0.8rem) calc(50% - 0.2rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
}

.affiliate-page .affiliate-field textarea {
  min-height: 10rem;
  resize: vertical;
}

.affiliate-page .affiliate-code-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem;
  gap: 0.75rem;
}

.affiliate-page .affiliate-code-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
  border: 1px solid rgba(79, 70, 229, 0.4);
  box-shadow: 0 0.25rem 1rem rgba(79, 70, 229, 0.15);
}

.affiliate-page .affiliate-code-preview-label {
  margin-bottom: 0.35rem;
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.affiliate-page .affiliate-code-preview strong {
  color: #ffffff;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.affiliate-page .affiliate-field-hint {
  color: #94a3b8;
  font-size: 0.82rem;
}

.affiliate-page .affiliate-form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.affiliate-page .affiliate-consent-list {
  display: grid;
  gap: 0.8rem;
  width: 100%;
}

.affiliate-page .affiliate-consent {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.75rem;
  align-items: start;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.5;
}

.affiliate-page .affiliate-consent input {
  margin-top: 0.2rem;
  accent-color: #6b64e6;
}

.affiliate-page .affiliate-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.affiliate-page .affiliate-form-actions .cta-btn {
  min-width: 14rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow: 0 0.25rem 0.75rem rgba(79, 70, 229, 0.3);
}

.affiliate-page .affiliate-form-actions .cta-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  box-shadow: 0 0.25rem 0.75rem rgba(79, 70, 229, 0.2);
}

.affiliate-page .affiliate-form-actions .cta-btn:hover {
  background: linear-gradient(to right, #5750d9, #0ea271);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5rem rgba(79, 70, 229, 0.45);
}

.affiliate-page .affiliate-form-note {
  color: #94a3b8;
  font-size: 0.92rem;
}

.affiliate-page .affiliate-form-status {
  min-height: 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.affiliate-page .affiliate-form-status.is-success {
  color: #34d399;
}

.affiliate-page .affiliate-form-status.is-error {
  color: #fca5a5;
}

/* ── Section divider ── */
.affiliate-page .affiliate-section-divider {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2rem 0 1.5rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.affiliate-page .affiliate-section-divider::before,
.affiliate-page .affiliate-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* ── Login block (right card) ── */
.affiliate-page .affiliate-login-block {
  position: relative;
  z-index: 1;
}

.affiliate-page .affiliate-login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.affiliate-page .affiliate-login-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.18);
  border: 1px solid rgba(79, 70, 229, 0.32);
  color: #a5b4fc;
  font-size: 1.4rem;
}

.affiliate-page .affiliate-login-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  color: #f8fafc;
}

.affiliate-page .affiliate-login-header p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.affiliate-page .affiliate-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.affiliate-page .affiliate-password-wrapper {
  position: relative;
}

.affiliate-page .affiliate-password-wrapper input {
  padding-right: 3rem;
}

.affiliate-page .affiliate-toggle-password {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.affiliate-page .affiliate-toggle-password:hover {
  color: #94a3b8;
}

.affiliate-page .affiliate-login-status {
  min-height: 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
}

.affiliate-page .affiliate-login-status.is-error {
  color: #fca5a5;
}

.affiliate-page .affiliate-login-status.is-success {
  color: #34d399;
}

.affiliate-page .affiliate-login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow: 0 0.25rem 0.75rem rgba(79, 70, 229, 0.3);
  margin-top: 0.25rem;
}

.affiliate-page .affiliate-login-btn:hover {
  background: linear-gradient(to right, #5750d9, #0ea271);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5rem rgba(79, 70, 229, 0.45);
}

.affiliate-page .affiliate-login-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* ── Sneakpeak block ── */
.affiliate-page .affiliate-sneakpeak-block {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.affiliate-page .affiliate-sneakpeak-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.affiliate-page .affiliate-sneakpeak-label i {
  color: #6366f1;
}

.affiliate-page .affiliate-sneakpeak-mockup {
  position: relative;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(15, 23, 42, 0.6);
  overflow: hidden;
  padding: 1rem;
  user-select: none;
  pointer-events: none;
}

.mockup-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mockup-kpi {
  padding: 0.75rem;
  border-radius: 0.6rem;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.18);
}

.mockup-kpi-label {
  display: block;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.mockup-kpi-value {
  position: relative;
  color: #e2e8f0;
  font-size: 1.2rem;
  font-weight: 700;
}

.mockup-blur-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(5px);
  background: rgba(15, 23, 42, 0.3);
  border-radius: 0.25rem;
}

.mockup-table {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
}

.mockup-table-header {
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}

.mockup-table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.1fr;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.4rem;
  color: #94a3b8;
}

.mockup-table-row:not(.mockup-table-header) {
  background: rgba(255, 255, 255, 0.03);
}

.mockup-cell-blur {
  filter: blur(4px);
  color: #e2e8f0;
}

.mockup-green { color: #34d399; font-weight: 600; }
.mockup-muted { color: #475569; }

.mockup-badge-active,
.mockup-badge-cancelled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.mockup-badge-active {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.mockup-badge-cancelled {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.mockup-coming-soon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(10, 15, 30, 0.72);
  backdrop-filter: blur(2px);
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mockup-coming-soon-overlay i {
  font-size: 1.4rem;
  color: #475569;
}



/* Forgot password link */
.affiliate-forgot-password-link {
  text-align: right;
  margin-top: -0.5rem;
  margin-bottom: 0.25rem;
}

.affiliate-forgot-password-link a {
  color: #94a3b8;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.affiliate-forgot-password-link a:hover {
  color: #cbd5e1;
  text-decoration: underline;
}

.affiliate-page .navbar-center a[aria-current="page"] {
  color: #e5e7eb;
}

.affiliate-page .footer-content {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .affiliate-page .affiliate-section-shell {
    grid-template-columns: 1fr;
  }
  /* En tablet las 3 tarjetas pasan a row de 3 si hay espacio, si no a 1 col */
  .affiliate-page .affiliate-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .affiliate-page-main {
    padding-top: 7rem;
    padding-bottom: 2.5rem;
  }

  .affiliate-page .affiliate-section {
    padding: 0 1.5rem 3rem;
  }

  .affiliate-page .affiliate-left-card,
  .affiliate-page .affiliate-right-card {
    padding: 1.5rem;
  }

  .affiliate-page .affiliate-benefits {
    grid-template-columns: 1fr;
  }

  .affiliate-page .affiliate-form-grid,
  .affiliate-page .affiliate-code-input,
  .affiliate-page .affiliate-benefit-wide {
    grid-template-columns: 1fr;
  }

  .affiliate-page .affiliate-benefit-wide {
    gap: 0.9rem;
  }

  .affiliate-page .affiliate-form-actions .cta-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .affiliate-page .affiliate-section {
    padding: 0 1rem 2.5rem;
  }

  .affiliate-page .affiliate-copy h1,
  .affiliate-page .affiliate-copy h2,
  .affiliate-page .affiliate-form-header h2,
  .affiliate-page .affiliate-form-header h3,
  .affiliate-page .affiliate-login-header h2 {
    font-size: 1.7rem;
  }
}

/* ══════════════════════════════════════════════════════════
   Standalone Pages (Forgot/Reset Password, Change Password)
   ══════════════════════════════════════════════════════════ */

.aff-standalone-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Ajuste: la navbar en páginas standalone */
.aff-standalone-navbar {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.aff-standalone-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  width: 100%;
}

.aff-standalone-shell > * {
  width: 100%;
  max-width: 28rem;
}

.aff-standalone-shell > .aff-standalone-card-wide {
  max-width: 32rem;
}

.aff-standalone-card {
  width: 100%;
  padding: 2.5rem 2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.aff-standalone-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.15), transparent 45%),
    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.08), transparent 40%);
}

.aff-standalone-card-wide {
  max-width: 32rem;
}

/* ── Header ── */
.aff-standalone-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.aff-standalone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.aff-standalone-icon i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 1.5rem;
  box-shadow: 0 0.25rem 1rem rgba(99, 102, 241, 0.2);
}

.aff-standalone-header h1 {
  margin: 0 0 0.7rem;
  font-size: 1.7rem;
  color: #f8fafc;
  font-weight: 700;
}

.aff-standalone-header p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ── Form ── */
.aff-standalone-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  z-index: 1;
}

.aff-standalone-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.aff-standalone-field label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #e5e7eb;
  font-size: 0.93rem;
  font-weight: 600;
}

.aff-standalone-field label i {
  color: #94a3b8;
  font-size: 0.85rem;
}

.aff-standalone-field input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.62);
  color: #f8fafc;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.aff-standalone-field input::placeholder {
  color: #64748b;
}

.aff-standalone-field input:focus {
  outline: none;
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(79, 70, 229, 0.55);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

/* Input with toggle password button */
.aff-standalone-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.aff-standalone-input-wrapper input {
  padding-right: 3rem;
}

.aff-standalone-toggle-pw {
  position: absolute;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.aff-standalone-toggle-pw:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.aff-standalone-toggle-pw:active {
  transform: scale(0.95);
}

/* ── Strength Bar ── */
.aff-standalone-strength {
  margin-top: -0.4rem;
}

.aff-standalone-strength-bar {
  height: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.aff-standalone-strength-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.aff-standalone-strength-fill.weak   { background: #f87171; }
.aff-standalone-strength-fill.medium { background: #fbbf24; }
.aff-standalone-strength-fill.strong { background: #34d399; }

.aff-standalone-strength-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  min-height: 1.1rem;
}

/* ── Password Rules ── */
.aff-standalone-rules {
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.aff-standalone-rules-title {
  margin: 0 0 0.65rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.aff-standalone-rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.aff-standalone-rule {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #475569;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.aff-standalone-rule i {
  font-size: 0.7rem;
  color: #334155;
  transition: color 0.2s ease;
}

.aff-standalone-rule.rule-ok {
  color: #34d399;
}

.aff-standalone-rule.rule-ok i {
  color: #34d399;
}

/* ── Status Message ── */
.aff-standalone-status {
  min-height: 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  line-height: 1.4;
}

.aff-standalone-status:empty {
  padding: 0;
  min-height: 0;
}

.aff-standalone-status.is-error {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.aff-standalone-status.is-success {
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.aff-standalone-status.is-info {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
}

/* ── Submit Button ── */
.aff-standalone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  background: linear-gradient(to right, #4f46e5, #7c3aed);
  color: #ffffff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 0.25rem 0.75rem rgba(79, 70, 229, 0.35);
}

.aff-standalone-btn:hover:not(:disabled) {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5rem rgba(79, 70, 229, 0.5);
}

.aff-standalone-btn:active:not(:disabled) {
  transform: translateY(0);
}

.aff-standalone-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.aff-standalone-btn i {
  font-size: 0.95rem;
}

/* ── Footer ── */
.aff-standalone-footer {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
  position: relative;
  z-index: 1;
}

.aff-standalone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #94a3b8;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.aff-standalone-link:hover {
  color: #cbd5e1;
  gap: 0.7rem;
}

.aff-standalone-link i {
  font-size: 0.8rem;
}

.aff-standalone-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.5;
}

.aff-standalone-info i {
  color: #475569;
  font-size: 0.95rem;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .aff-standalone-page {
    padding: 1.5rem 1rem;
  }

  .aff-standalone-card {
    padding: 2rem 1.5rem;
  }

  .aff-standalone-header h1 {
    font-size: 1.5rem;
  }
}

/* ══════════════════════════════════════════════════════════
   Change Password Page (within authenticated flow)
   ══════════════════════════════════════════════════════════ */

.aff-change-pw-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.aff-change-pw-shell{
  display: flex;
  justify-content: center;
}

.aff-change-pw-card {
  width: 100%;
  max-width: 28rem;
  padding: 2.5rem 2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.aff-change-pw-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.15), transparent 45%),
    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.08), transparent 40%);
}
.aff-change-pw-icon{
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}
/* Reuse standalone styles for change password page */
.aff-change-pw-header { 
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.aff-change-pw-header i:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 1.5rem;
  box-shadow: 0 0.25rem 1rem rgba(99, 102, 241, 0.2);
}

.aff-change-pw-header h1 {
  margin: 0 0 0.7rem;
  font-size: 1.7rem;
  color: #f8fafc;
  font-weight: 700;
}

.aff-change-pw-header p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Use standalone form components */
.aff-change-pw-form { 
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  z-index: 1;
}

.aff-change-pw-rules ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aff-change-pw-rules li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

@media (max-width: 480px) {
  .aff-change-pw-card {
    padding: 2rem 1.5rem;
  }
}

