/* KOVRA | Paleta pública coherente, 2026-10-18
   Sólo se reutilizan los tokens oficiales definidos en kovra-themes.css.
   Nunca se invierten textos por filtros ni se alteran precios, datos o lógica. */
@media (max-width:1024px) {
  html body.auth-premium-page:has(.auth-register-shell) {
    --bg:var(--theme-bg);
    --card:var(--theme-surface);
    --card2:var(--theme-surface-2);
    --border:var(--theme-border);
    --green:var(--theme-accent);
    --green-soft:var(--theme-accent-soft);
    --text:var(--theme-text);
    --soft:var(--theme-text-2);
    --auth-bg:var(--theme-bg);
    --auth-panel:var(--theme-surface);
    --auth-panel-2:var(--theme-surface-2);
    --auth-line:var(--theme-border);
    --auth-line-soft:var(--theme-border);
    --auth-green:var(--theme-accent);
    --auth-green-2:var(--theme-accent-strong);
    --auth-text:var(--theme-text);
    --auth-soft:var(--theme-text-2);
    background:var(--theme-bg)!important;
    color:var(--theme-text)!important;
  }
  html body.auth-premium-page .auth-register-shell,
  html body.auth-premium-page .auth-register-card,
  html body.auth-premium-page .auth-register-card .form-card,
  html body.auth-premium-page .auth-register-card .id-preview-card {
    color:var(--theme-text)!important;
    border-color:var(--theme-border)!important;
  }
  html body.auth-premium-page .auth-register-card {
    background:var(--theme-surface)!important;
    box-shadow:0 10px 28px rgba(0,0,0,.09)!important;
  }
  html body.auth-premium-page .auth-register-card::before {
    background:none!important;
  }
  html body.auth-premium-page .auth-register-card .form-card,
  html body.auth-premium-page .auth-register-card .id-preview-card {
    background:var(--theme-surface-2)!important;
  }
  html body.auth-premium-page .auth-register-card :is(h1,h2,.workspace-choice-copy strong,.id-preview-card p b) {
    color:var(--theme-text)!important;
  }
  html body.auth-premium-page .auth-register-card :is(.register-header span,.eyebrow,.id-preview-card>strong) {
    color:var(--theme-accent)!important;
  }
  html body.auth-premium-page .auth-register-card :is(.workspace-choice-intro,.workspace-choice-help,.workspace-choice-copy small,.id-preview-card p,.id-preview-card>span,.auth-trust-line,.name-availability,.identity-validation-note) {
    color:var(--theme-text-2)!important;
  }
  html body.auth-premium-page .auth-register-card .field>span {
    color:var(--theme-text-2)!important;
  }
  html body.auth-premium-page .auth-register-card .field :is(input,select,textarea) {
    background:var(--theme-input)!important;
    color:var(--theme-text)!important;
    border:1px solid var(--theme-border-strong)!important;
    -webkit-text-fill-color:var(--theme-text)!important;
    caret-color:var(--theme-accent)!important;
    box-shadow:none!important;
  }
  html body.auth-premium-page .auth-register-card .field :is(input,select,textarea)::placeholder {
    opacity:1!important;
    color:var(--theme-muted)!important;
    -webkit-text-fill-color:var(--theme-muted)!important;
  }
  html body.auth-premium-page .auth-register-card .field :is(input,select,textarea):focus {
    outline:2px solid var(--theme-accent)!important;
    outline-offset:1px!important;
    border-color:var(--theme-accent)!important;
  }
  html body.auth-premium-page .auth-register-card .field :is(input,select,textarea).validation-error {
    border-color:var(--theme-danger)!important;
  }
  html body.auth-premium-page .auth-register-card :is(.name-availability,.identity-validation-note).available {
    color:var(--theme-success)!important;
    text-shadow:none!important;
  }
  html body.auth-premium-page .auth-register-card :is(.name-availability,.identity-validation-note).unavailable {
    color:var(--theme-danger)!important;
    text-shadow:none!important;
  }
  html body.auth-premium-page .auth-register-card :is(.name-availability,.identity-validation-note).checking {
    color:var(--theme-warning)!important;
    text-shadow:none!important;
  }
  html body.auth-premium-page .auth-register-card .auth-mode-tabs {
    border-color:var(--theme-border)!important;
  }
  html body.auth-premium-page .auth-register-card .auth-tab {
    color:var(--theme-text-2)!important;
  }
  html body.auth-premium-page .auth-register-card .auth-tab.active {
    color:var(--theme-accent)!important;
  }
  html body.auth-premium-page .auth-register-card .auth-tab.active::after {
    background:var(--theme-accent)!important;
    box-shadow:none!important;
  }
  html body.auth-premium-page .auth-register-card .auth-tab+.auth-tab {
    border-color:var(--theme-border)!important;
  }
  html body.auth-premium-page .auth-register-card .workspace-choice-card {
    background:var(--theme-surface)!important;
    border-color:var(--theme-border)!important;
    color:var(--theme-text)!important;
  }
  html body.auth-premium-page .auth-register-card .workspace-choice-icon {
    background:var(--theme-accent-soft)!important;
    color:var(--theme-accent)!important;
  }
  html body.auth-premium-page .auth-register-card .workspace-choice-check {
    border-color:var(--theme-border-strong)!important;
  }
  html body.auth-premium-page .auth-register-card .workspace-choice-card:has(input:checked) {
    background:var(--theme-accent-soft)!important;
    border-color:var(--theme-accent)!important;
    box-shadow:inset 0 0 0 1px var(--theme-accent)!important;
  }
  html body.auth-premium-page .auth-register-card .workspace-choice-card:has(input:checked) .workspace-choice-check {
    background:var(--theme-accent)!important;
    border-color:var(--theme-accent)!important;
    color:var(--theme-on-accent)!important;
  }
  html body.auth-premium-page .auth-register-card .workspace-choice-card:has(input:focus-visible) {
    outline:3px solid var(--theme-accent)!important;
    outline-offset:2px!important;
  }
  html body.auth-premium-page .auth-register-card .create-button {
    background:var(--theme-accent)!important;
    border:1px solid var(--theme-accent)!important;
    color:var(--theme-on-accent)!important;
    -webkit-text-fill-color:var(--theme-on-accent)!important;
  }
  html body.auth-premium-page .auth-register-card .back-button {
    background:var(--theme-surface-2)!important;
    border-color:var(--theme-border-strong)!important;
    color:var(--theme-text)!important;
  }
  html body.auth-premium-page .toast {
    background:var(--theme-surface)!important;
    border-color:var(--theme-border-strong)!important;
    color:var(--theme-text)!important;
  }

  /* Consentimiento: ocupa toda el área segura, con texto real visible en
     cada tema y sin dejar ver ni habilitar el formulario subyacente. */
  html body.auth-premium-page.signup-consent-pending #signupConsentOverlay {
    background:var(--theme-bg)!important;
    color:var(--theme-text)!important;
  }
  html body.auth-premium-page.signup-consent-pending #signupConsentOverlay .signup-consent-card {
    background:var(--theme-bg)!important;
    color:var(--theme-text)!important;
    border-color:var(--theme-border)!important;
  }
  html body.auth-premium-page #signupConsentOverlay .signup-consent-heading :is(h2,.signup-consent-version),
  html body.auth-premium-page #signupConsentOverlay .signup-consent-lead,
  html body.auth-premium-page #signupConsentOverlay .signup-consent-point strong,
  html body.auth-premium-page #signupConsentOverlay .signup-consent-check span:last-child {
    color:var(--theme-text)!important;
    text-shadow:none!important;
  }
  html body.auth-premium-page #signupConsentOverlay :is(.signup-consent-copy,.signup-consent-point p,.signup-consent-links,.signup-consent-version) {
    color:var(--theme-text-2)!important;
  }
  html body.auth-premium-page #signupConsentOverlay :is(.signup-consent-eyebrow,.signup-consent-section-label,.signup-consent-lead strong) {
    color:var(--theme-accent)!important;
  }
  html body.auth-premium-page #signupConsentOverlay :is(.signup-consent-scope,.signup-consent-point,.signup-consent-check) {
    background:var(--theme-surface)!important;
    border-color:var(--theme-border)!important;
    box-shadow:none!important;
  }
  html body.auth-premium-page #signupConsentOverlay .signup-consent-point-mark {
    background:var(--theme-accent-soft)!important;
    color:var(--theme-accent)!important;
    border-color:var(--theme-border-strong)!important;
  }
  html body.auth-premium-page #signupConsentOverlay :is(.signup-consent-links a,.signup-consent-card a) {
    color:var(--theme-accent)!important;
  }
  html body.auth-premium-page #signupConsentOverlay .signup-consent-box {
    background:var(--theme-input)!important;
    border-color:var(--theme-border-strong)!important;
    color:transparent!important;
  }
  html body.auth-premium-page #signupConsentOverlay .signup-consent-check input:checked+.signup-consent-box {
    background:var(--theme-accent)!important;
    border-color:var(--theme-accent)!important;
    color:var(--theme-on-accent)!important;
  }
  html body.auth-premium-page #signupConsentOverlay .signup-consent-check:has(input:checked) {
    background:var(--theme-accent-soft)!important;
    border-color:var(--theme-accent)!important;
  }
  html body.auth-premium-page #signupConsentOverlay .signup-consent-continue {
    background:var(--theme-accent)!important;
    color:var(--theme-on-accent)!important;
    box-shadow:none!important;
  }
  html body.auth-premium-page #signupConsentOverlay .signup-consent-continue:disabled {
    opacity:1!important;
    background:var(--theme-surface-3)!important;
    color:var(--theme-muted)!important;
    border:1px solid var(--theme-border)!important;
  }
  html body.auth-premium-page #signupConsentOverlay .signup-consent-back {
    color:var(--theme-text-2)!important;
  }
  html body.auth-premium-page #signupConsentOverlay :is(a,button):focus-visible,
  html body.auth-premium-page #signupConsentOverlay .signup-consent-check:focus-within {
    outline:2px solid var(--theme-accent)!important;
  }

  /* External Préstamos plan view: neutralize legacy invoice disclosure only;
     normal pricing cards already consume KOVRA semantic theme tokens. */
  html body.kovra-plans-page :is(.billing-disclosure,.billing-disclosure-content) {
    background:var(--theme-surface)!important;
    border-color:var(--theme-border)!important;
    color:var(--theme-text)!important;
  }
  html body.kovra-plans-page .billing-disclosure-summary-copy strong {
    color:var(--theme-text)!important;
  }
  html body.kovra-plans-page .billing-disclosure-summary-copy small {
    color:var(--theme-muted)!important;
  }
  html body.kovra-plans-page .billing-disclosure-summary-copy span,
  html body.kovra-plans-page .billing-disclosure-arrow {
    color:var(--theme-accent)!important;
  }
}

/* Outside the app, Negocios plan cards must use the SAME theme saved by
   KOVRA. This also fixes unreadable card text on Agua 2, Claro and Arena. */
html body.kovra-business-plans-public {
  background:var(--theme-bg)!important;
  color:var(--theme-text)!important;
}
html body.kovra-business-plans-public .top {
  border-color:var(--theme-border)!important;
}
html body.kovra-business-plans-public .back,
html body.kovra-business-plans-public .limit {
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border-strong)!important;
  color:var(--theme-text)!important;
}
html body.kovra-business-plans-public .eyebrow,
html body.kovra-business-plans-public h1 span,
html body.kovra-business-plans-public .foot a,
html body.kovra-business-plans-public li::before {
  color:var(--theme-accent)!important;
}
html body.kovra-business-plans-public :is(.intro,.subtitle,.price small,.limit span,.foot) {
  color:var(--theme-text-2)!important;
}
html body.kovra-business-plans-public .plans article {
  background:var(--theme-surface)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html body.kovra-business-plans-public .plans article.recommended {
  border-color:var(--theme-accent)!important;
  box-shadow:inset 0 0 0 1px var(--theme-accent)!important;
}
html body.kovra-business-plans-public .plans :is(h2,.price strong,.limit strong,li) {
  color:var(--theme-text)!important;
}
html body.kovra-business-plans-public .plans .badge {
  background:var(--theme-accent-soft)!important;
  border-color:var(--theme-accent)!important;
  color:var(--theme-accent)!important;
}
html body.kovra-business-plans-public .plans .choose {
  background:var(--theme-accent)!important;
  color:var(--theme-on-accent)!important;
}
html body.kovra-business-plans-public .plans :is(.choose,.back):focus-visible {
  outline:3px solid var(--theme-accent)!important;
}

/* Legal links reached from the registration notice also follow the selected
   palette (previous --legal-text and --legal-accent were fixed to dark green). */
html body.legal-body {
  --legal-bg:var(--theme-bg);
  --legal-panel:var(--theme-surface);
  --legal-panel-2:var(--theme-surface-2);
  --legal-border:var(--theme-border);
  --legal-border-color:var(--theme-border);
  --legal-text:var(--theme-text);
  --legal-muted:var(--theme-muted);
  --legal-accent:var(--theme-accent);
  --legal-accent-soft:var(--theme-accent-soft);
  background:var(--theme-bg)!important;
  color:var(--theme-text)!important;
}
html body.legal-body :is(.legal-hero,.legal-card,.legal-back,.legal-contact a) {
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-border)!important;
}
html body.legal-body :is(.legal-meta,.legal-footer,.legal-footer a) {
  color:var(--theme-text-2)!important;
}
html body.legal-body :is(.legal-kicker,.legal-card a) {
  color:var(--theme-accent)!important;
}
html body.legal-body .legal-callout {
  background:var(--theme-accent-soft)!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-border)!important;
}
