/* Nexora Pay · tema claro e botão sol/lua.
   Carregado por último em todas as páginas. O escuro ("Noite") continua o padrão; tudo aqui
   vale só com <html class="theme-light">. A cor principal (violeta #7c3aed / #6d28d9) é a mesma. */

/* ---------- Botão sol/lua ---------- */
.nx-tema {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.nx-tema-trilho {
  position: relative; display: inline-flex; align-items: center; gap: 0;
  width: 64px; height: 32px; padding: 3px; border-radius: 999px;
  background: rgba(20, 14, 34, .72); border: 1px solid rgba(196, 181, 253, .28);
}
.nx-tema-trilho > span:not(.nx-tema-bola) { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 24px; color: #9890b0; transition: color .25s; }
.nx-tema-bola {
  position: absolute; top: 3px; left: 3px; width: 28px; height: 24px; border-radius: 999px;
  background: #7c3aed; box-shadow: 0 4px 12px -4px rgba(124, 58, 237, .8);
  transform: translateX(30px); transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.nx-tema:not([aria-pressed="true"]) .nx-tema-trilho .nx-tema-lua,
.nx-tema[aria-pressed="true"] .nx-tema-trilho .nx-tema-sol { color: #fff; }
.nx-tema[aria-pressed="true"] .nx-tema-bola { transform: translateX(0); }
.nx-tema:focus-visible { outline: none; }
.nx-tema:focus-visible .nx-tema-trilho,
.nx-tema-icone:focus-visible { box-shadow: 0 0 0 3px rgba(167, 139, 250, .55); }
.nx-tema:hover .nx-tema-trilho { border-color: rgba(196, 181, 253, .5); }

/* Versão só ícone (cabeçalho do celular): mostra o astro do tema para onde vai mudar. */
.nx-tema-icone { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--rf-line-strong, #3c3058); background: var(--rf-surface, #140e22); color: var(--rf-text, #f2eefb); }
.nx-tema-icone .nx-tema-lua, .nx-tema-icone[aria-pressed="true"] .nx-tema-sol { display: none; }
.nx-tema-icone .nx-tema-sol, .nx-tema-icone[aria-pressed="true"] .nx-tema-lua { display: grid; }
.nx-tema-icone svg { width: 18px; height: 18px; }

/* Fixo no topo, nas páginas sem lugar próprio no cabeçalho. */
.nx-tema-flutuante { position: fixed; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); z-index: 60; }

.theme-light .nx-tema-trilho { background: #fff; border-color: #d5d0e4; box-shadow: 0 6px 18px -10px rgba(40, 24, 90, .35); }
.theme-light .nx-tema-trilho > span:not(.nx-tema-bola) { color: #625d75; }

@media (prefers-reduced-motion: reduce) { .nx-tema-bola { transition: none; } }

/* ---------- Tokens claros do design system "Noite" (landing, login, termos, cadastro) ---------- */
:root.theme-light {
  color-scheme: light;
  --noite: #f6f4fb;
  --noite-2: #eeeaf7;
  --placa: #ffffff;
  --placa-2: #f3f0fa;
  --linha: #e4dff0;
  --linha-forte: #cfc7e3;
  --texto: #16131f;
  --texto-2: #433e55;
  --texto-3: #625d75;
  --luz: #7c3aed;
  --luz-forte: #6d28d9;
  --luz-clara: #7c3aed;
  --luz-texto: #6d28d9;
  --luz-funda: #ede6ff;
  --ok: #0f7a4f; --ok-fundo: #e3f6ec;
  --erro: #b42343; --erro-fundo: #fde8ec;
  --alerta: #8a5a00; --alerta-fundo: #fdf1d8;
  --sombra-placa: 0 1px 2px rgba(22, 19, 31, .05), 0 24px 48px -28px rgba(40, 24, 90, .28);
  --estrelas: none;
}

/* ---------- Painel: ajustes de cores fixas do escuro ---------- */
.theme-light body.platform-body .nx-charge-amount-field input,
:root.theme-light:root:root body.platform-body .nx-charge-amount-field input { color: #16131f !important; }
:root.theme-light:root:root body.platform-body .nx-charge-amount-field > span { color: #6d28d9; }
.theme-light .nx-charge-chip.is-method { color: #5b21b6; background: #f3e8ff; border-color: #d8c7fb; }
.theme-light .nx-charge-chip.is-test { color: #5b21b6; }
.theme-light .nx-charge-chip.is-waiting { color: #8a5a00; background: #fdf1d8; border-color: #f3d79a; }
.theme-light .nx-charge-chip.is-paid { color: #0f7a4f; background: #e3f6ec; border-color: #a9e3c6; }
.theme-light .nx-charge-chip.is-failed { color: #b42343; background: #fde8ec; border-color: #f5b8c4; }
.theme-light .nx-journey-head h2 { color: #16131f; }
.theme-light .nx-journey-head p { color: #625d75; }
.theme-light .nx-checkout-preview { background: #ffffff; border-color: #d8c7fb; box-shadow: 0 14px 32px -20px rgba(91, 33, 182, .22); }
.theme-light .nx-preview-brand { border-bottom-color: #ece6f8; }
.theme-light .nx-preview-brand b, .theme-light .nx-preview-amount, .theme-light .nx-preview-summary h4 { color: #16131f; }
.theme-light .nx-preview-recipient b { color: #2f2940; }
.theme-light .nx-preview-badge { color: #5b21b6; background: #f3e8ff; border-color: #cdb8f5; }
.theme-light .nx-preview-desc { color: #4a445d; }
.theme-light .nx-preview-total > span, .theme-light .nx-preview-meta, .theme-light .nx-preview-field span { color: #625d75; }
.theme-light .nx-preview-items { border-color: #ece6f8; }
.theme-light .nx-preview-items b, .theme-light .nx-preview-items strong { color: #16131f; }
.theme-light .nx-preview-items small, .theme-light .nx-preview-recipient { color: #625d75; }
.theme-light .nx-builder-section, .theme-light .nx-product-row, .theme-light .nx-payer-fields-config > div, .theme-light .nx-payer-fields-config > label { background: #fff; border-color: #ded7ee; }
.theme-light .nx-builder-section-head h3, .theme-light .nx-payer-fields-config b { color: #16131f; }
.theme-light .nx-builder-section-head > span { color: #4c1d95; background: #ede9fe; border-color: #c4b5fd; }
.theme-light .nx-add-product { color: #5b21b6; background: #f6f1ff; border-color: #9f7aea; }
.theme-light .nx-payer-fields-config em { color: #5b21b6; }
.theme-light .nx-checkout-preview-frame { background: #ede7f6; border-color: #d8c7fb; }
.theme-light .nx-preview-device button.is-active { color: #fff; }
.theme-light .nx-preview-card-placeholder { background: linear-gradient(135deg, #5b21b6, #2e1065); }
.theme-light .nx-preview-tab { background: #f8f6fd; border-color: #e4ddf5; color: #574f6e; }
.theme-light .nx-preview-tab.is-active { background: #f3e8ff; border-color: #7c3aed; color: #5b21b6; }
.theme-light .nx-preview-body { background: #faf8fe; border-color: #ebe4f9; }
.theme-light .nx-preview-field i { background: #ffffff; border-color: #dfd7f3; }
.theme-light .nx-preview-return { background: #e3f6ec; border-color: #a9e3c6; color: #0f7a4f; }
.theme-light .nx-link-badge { color: #5b21b6; background: #f3e8ff; border-color: #d8c7fb; }

/* Cabeçalho do celular no painel: espaço para o botão ao lado da conta. */
.platform-body .platform-mobile-header [data-theme-slot] { display: contents; }
@media (max-width: 850px) {
  :root .platform-body .platform-mobile-header { grid-template-columns: 42px minmax(0, 1fr) 42px 42px !important; }
}

/* Lugar do botão na barra lateral (painel e admin). */
.nx-tema-sidebar { display: flex; margin: 4px 0 12px; }
.nx-tema-lugar { display: inline-flex; align-items: center; }

/* ---------- Céu estrelado: some no claro, vira um fundo lilás suave ---------- */
.theme-light .estrelas-vivas,
.theme-light .heroi-cena,
.theme-light .api-cena,
.theme-light .auth-ceu { display: none !important; }
.theme-light .cb .ceu,
.theme-light .fecho { background: radial-gradient(80% 90% at 50% 0%, #ede6ff 0%, #f6f4fb 70%) !important; }

/* ---------- Landing ---------- */
.theme-light .cb .topo { background: rgba(255, 255, 255, .82); border-bottom-color: #e4dff0; }
.theme-light .cb .topo nav a:hover,
.theme-light .cb a:hover,
.theme-light .cb .rodape a:hover,
.theme-light .cb .rodape-credito a:hover { color: #6d28d9; }
.theme-light .cb .bt:hover { color: #6d28d9; background: #f3eefe; }
.theme-light .cb .bt-luz,
.theme-light .cb .bt-luz:hover { color: #fff; }
.theme-light .cb .bt-luz:hover { background: #6d28d9; border-color: #6d28d9; }
.theme-light .cb ::selection { color: #16131f; }
.theme-light .heroi { background: radial-gradient(70% 80% at 85% 20%, #e4d8ff 0%, transparent 60%), radial-gradient(60% 60% at 0% 100%, #efe8ff 0%, transparent 60%), #f6f4fb; }
.theme-light .heroi-placa h1 { text-shadow: none; }
.theme-light .heroi-fatos { border-top-color: #e4dff0; }
.theme-light .cb .placa-vidro { background: rgba(255, 255, 255, .9); border-color: #e4dff0; box-shadow: 0 30px 60px -30px rgba(40, 24, 90, .35); }
.theme-light .cobranca-qr { background: #fff; box-shadow: 0 0 0 1px #d8c7fb, 0 20px 40px -20px rgba(124, 58, 237, .5); }
.theme-light .cobranca-qr .qr-cel { background: #1b0a3d; }
.theme-light .api { background: #f6f4fb; }
.theme-light .api::before { background: radial-gradient(60% 80% at 100% 50%, #e9e0ff 0%, transparent 70%); }
.theme-light .api-texto code { background: #ede6ff; color: #5b21b6; }
.theme-light .recursos-lista svg { background: #f3eefe; box-shadow: 0 0 0 1px #d8c7fb; }
.theme-light .trilha.acesa .passo-n { color: #fff; }
.theme-light .plano-escolhido { background: linear-gradient(160deg, #7c3aed 0%, #6d28d9 60%, #5b21b6 100%); }
.theme-light .plano-escolhido :is(h3, .plano-preco strong, li) { color: #fff; }
.theme-light .plano-escolhido .plano-preco span { color: #ede6ff; }
.theme-light .plano-escolhido li::before { background: #fff; }
.theme-light .cb .whitelabel h3,
.theme-light .cb .whitelabel .plano-preco strong { color: #f2eefb; }
.theme-light .cb .whitelabel-texto > p,
.theme-light .cb .whitelabel ul { color: #ddd5eb; }
.theme-light .cb .whitelabel-preco .plano-preco span { color: #c8badb; }
.theme-light .cb .whitelabel-selo { color: #eee7ff; }
.theme-light .cb .whitelabel li::before { background: #c4b5fd; }
.theme-light .fecho-placa { background: #fff; border: 1px solid #e4dff0; }
.theme-light .lead-modal::backdrop { background: rgba(22, 19, 31, .35); }
.theme-light .lead-modal-close:hover { color: #16131f; }

/* ---------- Login e cadastro ---------- */
.theme-light body.auth-body { background: radial-gradient(70% 60% at 50% 0%, #e4d8ff 0%, #f6f4fb 70%) fixed !important; }
.theme-light .auth-brand img { filter: none; }
.theme-light .auth-card { background: #fff !important; border-color: #e4dff0 !important; box-shadow: 0 30px 70px -30px rgba(40, 24, 90, .35) !important; }
.theme-light .auth-tabs { background: #f3f0fa; }
.theme-light .auth-tab:hover { color: #6d28d9; }
.theme-light .auth-tab.active { color: #fff; }
.theme-light .auth-heading h1 { color: #16131f; }
.theme-light body.auth-body .auth-input-wrap input,
.theme-light body.auth-body .auth-input-wrap input:focus { background: #fff !important; }
.theme-light .auth-input-wrap input:-webkit-autofill { box-shadow: 0 0 0 1000px #fff inset !important; }
.theme-light .auth-mfa-setup { background: #f6f4fb; }
.theme-light .auth-body .nx-link:hover, .theme-light .auth-switch button:hover, .theme-light .auth-footer-info a:hover { color: #5b21b6; }

/* ---------- Termos e privacidade ---------- */
.theme-light .legal-faixa { background: linear-gradient(180deg, #e4d8ff, #f6f4fb) !important; }
.theme-light .legal-placa { background: #fff; border-color: #e4dff0; box-shadow: 0 30px 60px -30px rgba(40, 24, 90, .25); }

/* ---------- Documentação da API ---------- */
.theme-light body:has(> .top) {
  --ink: #f6f4fb;
  --surface: #ffffff;
  --surface-2: #f1edfa;
  --line: #e4dff0;
  --text: #16131f;
  --text-2: #433e55;
  --muted: #625d75;
  --accent: #6d28d9;
  --accent-strong: #7c3aed;
}
.theme-light body:has(> .top) { background: radial-gradient(70% 50% at 85% -10%, #e4d8ff, transparent 60%), #f6f4fb; }
.theme-light .top { background: rgba(255, 255, 255, .85); }
.theme-light .top nav a:hover, .theme-light .toc a:hover { color: #6d28d9; }
.theme-light .top nav a.cta, .theme-light .top nav a.cta:hover { color: #fff; }
.theme-light body:has(> .top) a:hover { color: #5b21b6; }
.theme-light body:has(> .top) ::selection { color: #16131f; }
.theme-light body:has(> .top) :not(pre) > code { color: #5b21b6; background: #f1eafe; }
.theme-light body:has(> .top) pre { --code-bg: #16121f; box-shadow: 0 12px 30px -20px rgba(40, 24, 90, .5); }
.theme-light .verb.post { background: #ede6ff; color: #5b21b6; }
.theme-light .verb.get { background: #e3f6ec; color: #0f7a4f; }
.top nav .nx-tema-lugar { margin-right: 4px; }

/* ---------- Checkout (página de pagamento do cliente) ---------- */
html.theme-light:has(.checkout-shell) { background: #f6f4fb; }
html.theme-light body:has(.checkout-shell) {
  color: #16131f !important;
  background: radial-gradient(80% 50% at 50% 0%, #e4d8ff 0%, #f6f4fb 70%) fixed, #f6f4fb !important;
  --ink: #16131f; --muted: #625d75; --purple: #6d28d9; --purple-light: #ffffff; --line: #d5d0e4; --line-subtle: #e4dff0; --surface: #ffffff; --soft: #f3f0fa;
}
html.theme-light body:has(.checkout-shell)::before { display: none; }
html.theme-light .checkout-card { background: #fff !important; border-color: #e4dff0 !important; color: #16131f !important; box-shadow: 0 30px 70px -30px rgba(40, 24, 90, .3) !important; }
html.theme-light .checkout-summary, html.theme-light .card-security-badge,
html.theme-light :is(.checkout-receipt-box, .checkout-failed-box, .checkout-notice-card, .checkout-receipt-card, .checkout-failed-card) { background: #f6f4fb !important; border-color: #e4dff0 !important; color: #433e55 !important; }
html.theme-light .checkout-summary span, html.theme-light .checkout-message, html.theme-light .checkout-error,
html.theme-light :is(.checkout-success-subtitle, .checkout-failed-subtitle, .checkout-failed-instruction) { color: #433e55 !important; }
html.theme-light :is(.checkout-summary-label, .checkout-trust-badge, .checkout-trust-text, .receipt-label, .receipt-header, .receipt-security-note) { color: #625d75 !important; }
html.theme-light :is(.checkout-summary strong, .checkout-summary-amount, .checkout-section-title, .checkout-trust-text strong, .checkout-success-title, .checkout-failed-title, .receipt-value, .receipt-amount, .checkout-field) { color: #16131f !important; }
html.theme-light .checkout-method-card { background: #fff !important; border-color: #d5d0e4 !important; color: #433e55 !important; }
html.theme-light .checkout-method-card:hover { border-color: #7c3aed !important; color: #16131f !important; }
html.theme-light .checkout-method-card.active { background: #f3eefe !important; border-color: #7c3aed !important; color: #5b21b6 !important; box-shadow: 0 0 0 1px #c4b5fd, 0 10px 26px -14px rgba(124, 58, 237, .6) !important; }
html.theme-light .checkout-method-card .pix-svg { color: #0d9488 !important; }
html.theme-light :is(.checkout-field input, .checkout-field select, .checkout-field textarea, .mp-field) { background: #fff !important; border-color: #d5d0e4 !important; color: #16131f !important; }
html.theme-light .checkout-field-label { color: #16131f !important; }
html.theme-light .checkout-button.checkout-button-secondary, html.theme-light .checkout-button.outline { color: #16131f !important; border-color: #d5d0e4 !important; }
html.theme-light .checkout-button.checkout-button-secondary:hover, html.theme-light .checkout-button.outline:hover { border-color: #7c3aed !important; background: #f3eefe !important; }
html.theme-light .checkout-qr { box-shadow: 0 0 0 1px #d8c7fb, 0 20px 40px -20px rgba(124, 58, 237, .5) !important; }
html.theme-light .checkout-status { background: #f3eefe !important; border-color: #d8c7fb !important; color: #5b21b6 !important; }
html.theme-light .checkout-status.paid { background: #e3f6ec !important; border-color: #a9e3c6 !important; color: #0f7a4f !important; }
html.theme-light .checkout-status.failed { background: #fde8ec !important; border-color: #f5b8c4 !important; color: #b42343 !important; }
html.theme-light .checkout-help-btn { color: #6d28d9 !important; }
html.theme-light .checkout-help-dialog { background: #fff !important; color: #16131f !important; border-color: #e4dff0 !important; }
html.theme-light .checkout-trust-divider, html.theme-light .receipt-divider { background: #e4dff0 !important; border-color: #e4dff0 !important; }
html.theme-light .receipt-code { background: #f3f0fa !important; color: #433e55 !important; }

/* ---------- Cadastro da empresa (onboarding/KYC) ---------- */
html.theme-light:has(body.onboarding-body) { background: #f6f4fb; color-scheme: light; }
html.theme-light body.onboarding-body { background: radial-gradient(80% 50% at 50% 0%, #e4d8ff 0%, #f6f4fb 70%) fixed, #f6f4fb !important; color: #16131f !important; }
html.theme-light .onboarding-top .button.outline { background: #fff !important; border-color: #d5d0e4 !important; color: #16131f !important; }
html.theme-light .onboarding-card { background: #fff !important; border-color: #e4dff0 !important; color: #16131f !important; box-shadow: 0 30px 70px -30px rgba(40, 24, 90, .3) !important; }
html.theme-light :is(.onboarding-heading h1, .onboarding-card legend, .onboarding-card label, .kyc-status, .kyc-optional-profile summary, .kyc-form-message) { color: #16131f !important; }
html.theme-light :is(.onboarding-heading p, .onboarding-card .kyc-hint, .address-lookup-hint, .onboarding-card .kyc-check, .onboarding-card .kyc-consent, .kyc-operation-warning) { color: #433e55 !important; }
html.theme-light .onboarding-card fieldset { border-top-color: #e4dff0 !important; }
html.theme-light :is(.onboarding-card input:not([type=checkbox]):not([type=radio]):not([type=file]), .onboarding-card select, .onboarding-card textarea) { background: #fff !important; border-color: #d5d0e4 !important; color: #16131f !important; }
html.theme-light .onboarding-card input[type="file"] { background: #f6f4fb !important; border-color: #cfc7e3 !important; color: #433e55 !important; }
html.theme-light .onboarding-card input[type="file"]::file-selector-button { background: #7c3aed !important; border-color: #7c3aed !important; }
html.theme-light :is(.kyc-status, .kyc-optional-profile, .kyc-owner-row) { background: #f6f4fb !important; border-color: #e4dff0 !important; }
html.theme-light .kyc-operation-warning { background: #f3eefe !important; border-color: #d8c7fb !important; }
html.theme-light .kyc-operation-warning strong, html.theme-light .onboarding-card a { color: #5b21b6 !important; }
html.theme-light .onboarding-card .button.outline { color: #5b21b6 !important; border-color: #7c3aed !important; }
html.theme-light .onboarding-card .button.outline:hover { background: #f3eefe !important; color: #5b21b6 !important; }
html.theme-light .kyc-optional-profile summary span, html.theme-light .auth-footnote { color: #625d75 !important; }

/* Celular: no cabeçalho apertado, o botão vira um círculo com o astro do tema para onde vai mudar. */
@media (max-width: 560px) {
  .nx-tema:not(.nx-tema-icone) .nx-tema-trilho { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .nx-tema:not(.nx-tema-icone) .nx-tema-bola,
  .nx-tema:not(.nx-tema-icone) .nx-tema-trilho .nx-tema-lua,
  .nx-tema:not(.nx-tema-icone)[aria-pressed="true"] .nx-tema-trilho .nx-tema-sol { display: none; }
  .nx-tema:not(.nx-tema-icone)[aria-pressed="true"] .nx-tema-trilho .nx-tema-lua { display: grid; }
  .nx-tema:not(.nx-tema-icone) .nx-tema-trilho > span { color: var(--rf-text, #f2eefb) !important; }
  .theme-light .nx-tema:not(.nx-tema-icone) .nx-tema-trilho > span { color: #16131f !important; }
  .cb .topo-acoes { gap: 4px; }
  .cb .topo-acoes .bt-pequeno { white-space: nowrap; padding: 0 12px; }
}
