/* Public brand companion to home.css. Opt-in only: never styles the app or checkout.
   Existing print styles and all form/validation behavior remain independent. */
@media screen {
  html:has(body.tp-brand) { min-height: 100%; background: #0c0918; color-scheme: dark; }
  body.tp-public.tp-brand {
    --tp-brand-text: #f9f8fd;
    --tp-brand-muted: #b8b3c9;
    --tp-brand-purple: #c7b1ff;
    --tp-brand-line: rgba(220,205,255,.16);
    --tp-brand-panel: linear-gradient(145deg,rgba(30,27,53,.94),rgba(13,18,36,.96));
    --tp-public-focus: #c7b1ff;
    --lime: #a8ff00;
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    color: var(--tp-brand-text);
    font-family: "Poppins",system-ui,-apple-system,"Segoe UI",sans-serif;
    background:
      radial-gradient(ellipse 900px 720px at 95% 5%,rgba(123,44,255,.34),transparent 75%),
      radial-gradient(ellipse 800px 620px at 0% 55%,rgba(32,99,178,.18),transparent 75%),
      linear-gradient(145deg,#080e20 0%,#151030 55%,#0c0918 100%);
  }
  body.tp-brand, body.tp-brand * { box-sizing: border-box; }
  body.tp-brand :is(a,button,input,select):focus-visible { outline: 3px solid #c7b1ff; outline-offset: 4px; }
  body.tp-brand > header {
    background: rgba(12,9,24,.94); border-bottom-color: var(--tp-brand-line);
    box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  body.tp-brand > header img { height: 40px; }
  body.tp-brand > header .btn-login { color: #eee7ff; }
  body.tp-brand .public-menu { background: transparent; border: 0; }
  body.tp-brand :is(.public-menu a,.tp-support-trigger):hover { color: #c7b1ff; background: rgba(163,131,250,.1); }
  body.tp-brand > main { flex: 1; }
  body.tp-brand footer { color: var(--tp-brand-muted); border-top-color: var(--tp-brand-line); }
  body.tp-brand :is(.tp-alert,.password-alert) { background: #19172b; color: var(--tp-brand-text); }

  /* Flat, clear actions: lime for the main task, purple for navigation. */
  body.tp-public.tp-brand :is(.btn-register,.btn-lime,.password-primary-btn,.legal-btn-primary,.tp-verify-primary,.plan-button,.login-panel .btn-login) {
    --tp-action-bg: #a8ff00; --tp-action-hover: #baff38; --tp-action-active: #9aeb00;
    --tp-action-border: #c4ff56; --tp-action-text: #142100;
    --tp-action-gradient: none; --tp-action-hover-gradient: none; --tp-action-active-gradient: none;
    --tp-action-shadow: 0 5px 24px rgba(168,255,0,.12); --tp-action-highlight: none;
    font-weight: 600; border-radius: 10px;
  }
  body.tp-public.tp-brand :is(.btn-voltar,.password-secondary-btn,.legal-btn-ghost,.tp-verify-secondary,.create-account a) {
    --tp-action-bg: transparent; --tp-action-hover: #282037; --tp-action-active: #20192d;
    --tp-action-border: #756287; --tp-action-text: #eee7ff;
    --tp-action-gradient: none; --tp-action-hover-gradient: none; --tp-action-active-gradient: none;
    --tp-action-shadow: none; --tp-action-highlight: none;
    font-weight: 600; border-radius: 10px;
  }
  body.tp-public.tp-brand :is(header .btn-register,.create-account a:not(.btn-secondary-link)) {
    --tp-action-bg: #7846dd; --tp-action-hover: #8855ed; --tp-action-active: #6635c6;
    --tp-action-border: #a782f1; --tp-action-text: #fff;
    --tp-action-shadow: 0 5px 18px rgba(98,49,200,.2);
  }

  /* Consistent inputs; no changes to their names, required states or masks. */
  body.tp-brand :is(.form-control,.password-field input) {
    width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px;
    background: #101426; border: 1px solid #5c566f; color: var(--tp-brand-text);
    font: inherit; font-size: .92rem; box-shadow: none;
    transition: border-color .18s ease,box-shadow .18s ease;
  }
  body.tp-brand :is(.form-control,.password-field input)::placeholder { color: #a6a0b5; opacity: 1; }
  body.tp-brand :is(.form-control,.password-field input):focus {
    background: #12162b; border-color: #a383fa; color: var(--tp-brand-text);
    box-shadow: 0 0 0 3px rgba(163,131,250,.18); outline: none;
  }
  body.tp-brand :is(.form-control,.password-field input):user-invalid { border-color: #ff7d92; }
  body.tp-brand input:-webkit-autofill {
    -webkit-text-fill-color: #f9f8fd; caret-color: #f9f8fd;
    -webkit-box-shadow: 0 0 0 1000px #101426 inset;
  }

  /* Registration: the same spacious, restrained surfaces as the home. */
  .tp-brand .tp-register-landing { color: inherit; }
  .tp-brand .register-container { width: min(100%,1080px); margin: auto; padding: 64px 24px; }
  .tp-brand :is(.form-card,.tp-verification-card) {
    width: 100%; padding: clamp(28px,5vw,56px); border: 1px solid var(--tp-brand-line);
    border-radius: 24px; background: var(--tp-brand-panel);
    box-shadow: 0 24px 60px rgba(0,0,0,.22);
  }
  .tp-brand .title { margin: 0 0 12px; font-size: clamp(2rem,4vw,2.8rem); font-weight: 700; letter-spacing: -.045em; }
  .tp-brand .subtitle { margin: 0 0 32px; color: var(--tp-brand-muted); line-height: 1.75; }
  .tp-brand .section-title { margin: 32px 0 20px; padding-left: 12px; border-left: 3px solid #a383fa; font-size: 1rem; font-weight: 600; }
  .tp-brand .form-label { margin-bottom: 8px; color: #e4deef; font-size: .88rem; }
  .tp-brand .form-card .row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 24px; margin: 0; }
  .tp-brand .form-card .row > [class*="col-"] { min-width: 0; width: auto; padding: 0; margin-bottom: 0 !important; }
  .tp-brand .form-card .row + .row, .tp-brand .form-card #dadosCnpj { margin-top: 22px; }
  .tp-brand .form-card .endereco-linha1 { grid-template-columns: minmax(0,1fr) minmax(0,3fr); }
  .tp-brand .form-card :is(.endereco-linha2,.endereco-linha3) { grid-template-columns: minmax(0,3fr) minmax(0,1fr); margin-top: 22px; }
  .tp-brand :is(.info-box,.password-state) { padding: 20px; border: 1px solid rgba(163,131,250,.24); border-radius: 12px; background: rgba(163,131,250,.07); color: #d5cce8; line-height: 1.7; font-size: .9rem; }
  .tp-brand .info-box strong { color: #c4ff56; }
  .tp-brand .form-check-label { color: var(--tp-brand-muted); font-size: .86rem; line-height: 1.7; }
  .tp-brand .form-check-label a { color: #c7b1ff; text-underline-offset: 3px; }
  .tp-brand .form-check-input { background-color: #101426; border-color: #8d7f9e; }
  .tp-brand .form-check-input:checked { background-color: #7846dd; border-color: #a782f1; }
  .tp-brand .form-check-input:focus { box-shadow: 0 0 0 3px rgba(163,131,250,.2); }
  .tp-brand .form-buttons { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
  .tp-brand .form-card .senha-checklist { padding: 0; margin: 12px 0 0; list-style: none; font-size: .84rem; line-height: 1.7; }
  .tp-brand .form-card .senha-checklist li { color: #ff7d92; }
  .tp-brand .form-card .senha-checklist li.valid { color: #a8ff00; }
  .tp-brand :is(.cf-turnstile,.cf-turnstile iframe) { max-width: 100%; }

  /* Access pages keep the form in focus and use the home typography alongside it. */
  body.tp-brand.tp-login { display: block; }
  .tp-brand :is(.login-wrapper,.password-recovery-shell) {
    width: min(1120px,calc(100% - 64px)); min-height: 100vh; min-height: 100svh; min-height: 100dvh;
    margin: 0 auto; padding-block: 56px; display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,430px); align-items: center; gap: clamp(32px,6vw,88px);
  }
  .tp-brand :is(.public-access-copy,.password-recovery-copy) { min-width: 0; padding: 0; display: block; }
  .tp-brand .password-recovery-copy-inner { padding: 0; }
  .tp-brand :is(.public-access-copy h1,.password-recovery-copy h1) {
    margin: 20px 0; font-size: clamp(2.4rem,4vw,3.7rem); letter-spacing: -.045em; line-height: 1.12; font-weight: 700;
  }
  .tp-brand .public-access-copy h1 span { color: #a8ff00; }
  .tp-brand :is(.public-access-copy > p:last-child,.password-recovery-copy p) { color: var(--tp-brand-muted); font-size: .95rem; line-height: 1.8; }
  .tp-brand :is(.public-access-eyebrow,.password-recovery-copy .eyebrow) { margin: 0; padding: 0; border: 0; border-radius: 0; color: #c7b1ff; background: none; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
  .tp-brand :is(.login-panel,.password-recovery-panel) {
    width: 100%; max-width: none; min-height: 0; padding: 38px 32px;
    border: 1px solid var(--tp-brand-line); border-radius: 22px; background: var(--tp-brand-panel);
    box-shadow: 0 24px 60px rgba(0,0,0,.22); backdrop-filter: none; -webkit-backdrop-filter: none;
    position: relative; overflow: visible;
  }
  .tp-brand .password-recovery-panel::before { content: none; }
  .tp-brand :is(.login-logo img,.password-recovery-logo) { width: min(200px,80%); height: auto; display: block; margin-inline: auto; }
  .tp-brand .login-title { color: var(--tp-brand-muted); font-size: .95rem; }
  .tp-brand .login-panel label { margin-bottom: 8px; font-size: .88rem; color: #e4deef; font-weight: 600; }
  .tp-brand .create-account { margin-top: 24px; text-align: center; font-size: .85rem; color: var(--tp-brand-muted); }
  .tp-brand .create-account span { display: block; margin-bottom: 12px; }
  .tp-brand .create-account .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .tp-brand .create-account a { padding: 10px 14px; font-size: .8rem; }
  .tp-brand .password-recovery-kicker { color: #c7b1ff; letter-spacing: .06em; }
  .tp-brand .password-recovery-title { font-weight: 700; font-size: 1.5rem; }
  .tp-brand .password-recovery-subtitle { color: var(--tp-brand-muted); }
  .tp-brand .tp-verification-card { width: min(620px,calc(100% - 32px)); margin: 64px auto; }
  .tp-brand .tp-verification-card h1 { margin: 0 0 16px; font-size: 1.7rem; font-weight: 700; letter-spacing: -.035em; }
  .tp-brand .tp-verification-card p { color: var(--tp-brand-muted); line-height: 1.75; margin-bottom: 24px; }
  .tp-brand .tp-verification-actions { display: flex; flex-wrap: wrap; gap: 12px; }

  /* Trial selection and public documents use the same palette and card finish. */
  body.tp-brand.tp-plan-choice::before { content: none; }
  .tp-brand .plan-choice-page { min-height: 100vh; min-height: 100svh; min-height: 100dvh; padding-block: 64px; }
  .tp-brand .plan-card { background: var(--tp-brand-panel); border-color: var(--tp-brand-line); border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.2); backdrop-filter: none; }
  .tp-brand .plan-card-featured { border-color: #9869ef; box-shadow: 0 18px 60px rgba(123,44,255,.12); }
  .tp-brand .plan-choice-title { letter-spacing: -.045em; font-weight: 700; }
  .tp-brand :is(.plan-choice-subtitle,.plan-short) { color: var(--tp-brand-muted); }
  .tp-brand .plan-trial-badge { color: #c7b1ff; background: rgba(163,131,250,.1); border-color: rgba(163,131,250,.3); }
  .tp-brand.legal-body { --legal-muted: #b8b3c9; --legal-soft: #aaa3bc; --legal-border: var(--tp-brand-line); --legal-lime: #c7b1ff; }
  .tp-brand :is(.legal-hero,.legal-document,.legal-toc) { background: var(--tp-brand-panel); border-radius: 22px; border-color: var(--tp-brand-line); }
  .tp-brand .legal-hero::before { background: radial-gradient(ellipse at 90% 0%,rgba(123,44,255,.14),transparent 65%); }
  .tp-brand :is(.legal-meta-card,.legal-request-step,.legal-callout) { border-radius: 12px; }
  .tp-brand :is(.legal-kicker,.legal-callout) { background: rgba(163,131,250,.07); border-color: rgba(163,131,250,.22); }
  .tp-brand .legal-title { font-weight: 700; letter-spacing: -.04em; }
  .tp-brand .legal-toc a:hover { color: #c7b1ff; background: rgba(163,131,250,.1); }

  @media (max-width:900px) {
    .tp-brand :is(.login-wrapper,.password-recovery-shell) { width: min(600px,calc(100% - 40px)); grid-template-columns: minmax(0,1fr); gap: 30px; padding-block: 36px; }
    .tp-brand .public-access-copy { display: none; }
    .tp-brand .password-recovery-copy h1 { font-size: 2rem; }
    .tp-brand .password-recovery-copy p { font-size: .88rem; }
    .tp-brand .password-recovery-panel { min-height: 0; }
  }
  @media (max-width:768px) {
    .tp-brand .register-container { padding: 32px 16px; }
    .tp-brand .form-card .row { grid-template-columns: minmax(0,1fr); gap: 20px; }
    .tp-brand .form-card { padding: 28px 22px; border-radius: 18px; }
    .tp-brand .form-buttons { flex-direction: column-reverse; align-items: stretch; }
    .tp-brand :is(.btn-salvar,.btn-voltar) { width: 100%; margin-left: 0; text-align: center; }
    .tp-brand .form-card :is(.endereco-linha2,.endereco-linha3) { margin-top: 20px; }
  }
  @media (max-width:520px) {
    body.tp-brand :is(.form-control,.password-field input) { font-size: 1rem; }
    body.tp-brand > header { padding: 14px 16px; flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 14px 10px; }
    body.tp-brand > header img { height: auto; width: 145px; }
    body.tp-brand > header nav { gap: 13px; }
    body.tp-brand > header nav > a { font-size: .73rem; }
    body.tp-brand > header .btn-register { padding: 9px 12px; border-radius: 8px; }
    body.tp-brand .public-menu { width: 100%; margin: 0; padding: 0; justify-content: space-between; border-radius: 0; gap: 5px; }
    body.tp-brand :is(.public-menu > a,.tp-support-trigger) { font-size: .73rem; padding: 6px 8px; }
    .tp-brand .form-card { padding: 26px 18px; }
    .tp-brand :is(.login-wrapper,.password-recovery-shell) { width: calc(100% - 32px); padding-block: 28px; }
    .tp-brand :is(.login-panel,.password-recovery-panel) { padding: 30px 22px; border-radius: 18px; }
    .tp-brand .tp-verification-card { margin-block: 32px; }
    .tp-brand .tp-verification-actions a { width: 100%; text-align: center; }
  }
  @media (max-width:360px) {
    body.tp-brand > header img { width: 125px; }
    body.tp-brand > header nav { gap: 9px; }
    body.tp-brand > header nav > a { font-size: .67rem; }
    .tp-brand .create-account .links { flex-direction: column; }
  }
  @media (prefers-reduced-motion:reduce) {
    body.tp-brand :is(.form-control,.password-field input) { transition: none; }
  }
}
