/* Mainstage · Plataforma: telas de acesso (entrar, cadastro, parceria)
   Composição escura e imersiva, no mesmo padrão do site institucional. */

html.is-auth, html.is-auth body { background: #050507; }
html.is-auth .demo-bar { background: #08080a; border-bottom-color: rgba(255,255,255,.08); }

/* ---------- abertura e transição de entrada ---------- */
.ms-wipe { position: fixed; z-index: 9999; inset: 0; display: none; background: #E02424; pointer-events: none; }
html.wipe-on .ms-wipe { display: block; pointer-events: auto; }
.ms-wipe svg, .ms-enter__beam { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ms-enter { position: fixed; z-index: 9999; inset: 0; display: grid; place-items: center; overflow: hidden; background: #080809; }
.ms-enter__logo { position: relative; z-index: 1; width: clamp(96px, 12vw, 148px); height: auto; transform-origin: 50% 42.5%; }
.ms-enter__beam { z-index: 2; }

/* ---------- estrutura ---------- */
.shell-public--auth {
  --stage-w: 51.2%;
  --text: #FFFFFF; --text-2: rgba(255,255,255,.84); --text-3: rgba(255,255,255,.64);
  --surface: rgba(255,255,255,.045); --surface-2: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.12); --line-2: rgba(255,255,255,.2);
  --paper: transparent; --paper-2: rgba(255,255,255,.07);
  --red-ink: #FF4B4B; --red-tint: rgba(224,36,36,.16); --red-line: rgba(224,36,36,.45);
  --ok: #67D6A0; --ok-tint: rgba(103,214,160,.12); --warn: #F4B664; --warn-tint: rgba(244,182,100,.12);
  --info: #93AAFF; --info-tint: rgba(147,170,255,.12); --neutral: #D0D0D6; --neutral-tint: rgba(255,255,255,.08);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: calc(100svh - var(--demo-h)); color: #fff; background: #050507;
}

/* fundo animado */
.auth-bg { position: absolute; z-index: -1; inset: 0; pointer-events: none; }
.auth-bg__pane { position: absolute; top: 0; bottom: 0; overflow: hidden; background: #050507; }
.auth-bg__pane--stage { left: 0; width: var(--stage-w); }
.auth-bg__pane--form { left: var(--stage-w); right: 0; border-left: 1px solid rgba(224,36,36,.5); background: radial-gradient(ellipse 70% 38% at 100% 0%, rgba(224,36,36,.34), transparent 70%), linear-gradient(180deg, #08060a, #050507); }
.auth-bg__art { position: absolute; inset: 0; }
.auth-art { display: block; width: 100%; height: 100%; }
.auth-bg__pane--stage::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,7,.18), transparent 30%, transparent 72%, rgba(5,5,7,.3)); content: ""; }
.auth-bg__glow { position: absolute; z-index: 1; inset: 0; background: radial-gradient(ellipse 60% 42% at 50% 100%, rgba(224,36,36,.4), transparent 72%); mix-blend-mode: screen; opacity: .16; }
.auth-bg__pane--form .auth-bg__glow { background: radial-gradient(ellipse 60% 40% at 100% 0%, rgba(224,36,36,.4), transparent 72%); }
/* LED que corre pela linha do "M" */
.auth-led { opacity: .7; animation: authLed 10s linear infinite; }
.auth-led--b { animation-delay: -5s; opacity: .45; }
.auth-art__halo { animation: authBreath 6s ease-in-out infinite alternate; }
@keyframes authLed { to { stroke-dashoffset: -1000; } }
@keyframes authBreath { from { opacity: .3; } to { opacity: .62; } }

/* painel da marca */
.shell-public--auth .public-stage { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 4vw, 64px); background: none; color: #fff; overflow: visible; }
.shell-public--auth .public-stage::after { display: none; }
.public-stage__brand .brand__symbol { width: 40px; }
.public-stage__brand .brand__sign { height: 18px; }
.public-stage__copy { margin-block: auto; padding-block: 24px; }
.shell-public--auth .eyebrow--light { color: #FF3B3B; font-size: 12.5px; letter-spacing: .22em; }
.shell-public--auth .public-stage__title { max-width: 15ch; margin-top: 20px; font-size: clamp(46px, 5.4vw, 88px); line-height: 1.1; }
.shell-public--auth .public-stage__text { max-width: 44ch; margin-top: 22px; color: rgba(255,255,255,.9); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.65; }
.shell-public--auth .public-stage__foot { color: rgba(255,255,255,.72); font-size: 12.5px; }

/* painel do formulário */
.shell-public--auth .public-form { position: relative; z-index: 1; background: none; padding: clamp(28px, 4vw, 72px); }
.shell-public--auth .public-form__inner { width: min(500px, 100%); }
.shell-public--auth .public-form__title { font-size: clamp(34px, 3.2vw, 48px); font-weight: 800; letter-spacing: -.025em; }
.shell-public--auth .public-form__sub { margin-top: 10px; color: rgba(255,255,255,.84); font-size: clamp(15px, 1.15vw, 17px); }
.shell-public--auth .public-form__alt { margin-top: 28px; padding-top: 22px; font-size: 15px; }

/* texto por linhas e letras */
.shell-public--auth .line { display: block; clip-path: inset(-.42em -.12em -.12em -.12em); }
.shell-public--auth .char { display: inline-block; will-change: transform; }

/* campos */
.shell-public--auth .field + .field { margin-top: 20px; }
.shell-public--auth .field__label { font-size: 14px; }
.shell-public--auth .input, .shell-public--auth .select, .shell-public--auth .textarea {
  min-height: 54px; border-radius: 16px; border-color: rgba(255,255,255,.16);
  background-color: rgba(255,255,255,.045); color: #fff; font-size: 15.5px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .25s ease, box-shadow .3s ease, background .25s ease;
}
.shell-public--auth .textarea { min-height: 120px; }
.shell-public--auth .input::placeholder, .shell-public--auth .textarea::placeholder { color: rgba(255,255,255,.5); }
.shell-public--auth .input:hover, .shell-public--auth .select:hover, .shell-public--auth .textarea:hover { border-color: rgba(255,255,255,.34); }
.shell-public--auth .input:focus, .shell-public--auth .select:focus, .shell-public--auth .textarea:focus { border-color: rgba(255,255,255,.92); background-color: rgba(255,255,255,.07); box-shadow: 0 0 0 4px rgba(224,36,36,.24); }
.shell-public--auth .input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: inset 0 0 0 100px #14080a; caret-color: #fff; }
.shell-public--auth .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); }
.shell-public--auth .select { background-repeat: no-repeat; background-position: right 18px center; }
.shell-public--auth .select option { background: #fff; color: #141417; }
.shell-public--auth .input-icon > .i { z-index: 2; left: 18px; color: rgba(255,255,255,.7); transition: color .25s ease; }
.shell-public--auth .input-icon > .input { padding-left: 52px; }
.shell-public--auth .input-icon:focus-within > .i { color: #fff; }
.shell-public--auth .pass-wrap .input { padding-right: 54px; }
.shell-public--auth .pass-eye { top: 5px; right: 6px; border-radius: 12px; }
.shell-public--auth .icon-btn--light { color: rgba(255,255,255,.72); }
.shell-public--auth .icon-btn--light:hover { background: rgba(255,255,255,.1); color: #fff; }
.shell-public--auth .choice:has(input:checked) { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.shell-public--auth .choice { border-radius: 14px; border-color: rgba(255,255,255,.18); }
.shell-public--auth .choice:hover { border-color: rgba(255,255,255,.4); }
.shell-public--auth .choice__mark { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.04); }
.shell-public--auth .choice input:checked + .choice__mark { border-color: var(--red); background: var(--red); }
.shell-public--auth .pick { border-radius: 14px; }
.shell-public--auth .pick:has(input:checked) { box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.shell-public--auth .mfa-icon { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); }
.shell-public--auth .callout { border-radius: 14px; }

/* seletor com pílula que desliza */
.shell-public--auth .intent-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 5px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.07); }
.seg-pill { position: absolute; top: 5px; bottom: 5px; left: 5px; width: var(--w, calc(50% - 5px)); border-radius: 999px; background: linear-gradient(180deg, #fff, #ececf0); box-shadow: 0 8px 22px -8px rgba(0,0,0,.7); transform: translateX(var(--x, 0)); transition: transform .5s cubic-bezier(.2,.8,.2,1), width .5s cubic-bezier(.2,.8,.2,1); }
.shell-public--auth .intent-seg button { position: relative; z-index: 1; min-height: 46px; border-radius: 999px; background: transparent !important; box-shadow: none !important; color: rgba(255,255,255,.88); font-size: 14.5px; transition: color .3s ease; }
.shell-public--auth .intent-seg button[aria-pressed="true"] { color: #111114; }

/* botões */
.shell-public--auth .btn { min-height: 54px; border-radius: 999px; font-size: 15px; letter-spacing: .01em; transition: background .25s ease, border-color .25s ease, box-shadow .3s ease, filter .25s ease, transform .2s ease; }
.shell-public--auth .btn--primary { border-color: rgba(255,130,130,.32); background: linear-gradient(180deg, #F43236 0%, #C8141A 100%); box-shadow: 0 16px 36px -16px rgba(224,36,36,.95), inset 0 1px 0 rgba(255,255,255,.3); }
.shell-public--auth .btn--primary:hover:not(:disabled) { background: linear-gradient(180deg, #FF4145 0%, #D2171E 100%); box-shadow: 0 20px 44px -14px rgba(224,36,36,1), inset 0 1px 0 rgba(255,255,255,.34); }
.shell-public--auth .btn--primary:active:not(:disabled) { background: linear-gradient(180deg, #D81D22 0%, #B3121A 100%); }
.shell-public--auth .btn--secondary { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.035); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.shell-public--auth .btn--secondary:hover:not(:disabled) { border-color: rgba(255,255,255,.9); background: rgba(255,255,255,.09); }
.shell-public--auth .btn--ghost:hover:not(:disabled) { background: rgba(255,255,255,.08); color: #fff; }
.shell-public--auth .btn.is-pending::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.shell-public--auth .or-line { margin-block: 10px; }

/* ---------- celular e tablet: tudo em uma tela, sem rolagem ---------- */
@media (max-width: 900px) {
  .shell-public--auth { display: flex; flex-direction: column; background: #050507; }
  .shell-public--auth .public-stage { display: contents; }
  .public-stage__brand { order: 0; position: relative; z-index: 1; padding: clamp(10px, 1.8svh, 26px) 20px 0; }
  .public-stage__brand .brand__symbol { width: 32px; }
  .public-stage__brand .brand__sign { height: 14px; }
  .shell-public--auth .public-stage__copy { order: 1; position: relative; z-index: 1; margin: 0; padding: clamp(6px, 1.2svh, 18px) 20px clamp(6px, 1.2svh, 16px); }
  .shell-public--auth .eyebrow--light { font-size: 10.5px; letter-spacing: .2em; }
  .shell-public--auth .public-stage__title { max-width: 14ch; margin-top: clamp(6px, 1.1svh, 12px); font-size: clamp(28px, min(9.2vw, 4.3svh), 58px); line-height: 1; }
  .shell-public--auth .public-stage__text { display: block; max-width: 40ch; margin-top: clamp(6px, 1.2svh, 14px); color: rgba(255,255,255,.88); font-size: clamp(11.5px, 1.4svh, 16px); line-height: 1.42; }
  .shell-public--auth .public-form { order: 2; padding: clamp(8px, 1.5svh, 22px) 20px 0; }
  .shell-public--auth .public-form__inner { width: 100%; }
  .shell-public--auth .public-form__title { font-size: clamp(24px, 3.6svh, 38px); }
  .shell-public--auth .public-form__sub { margin-top: 2px; font-size: clamp(12.5px, 1.6svh, 16px); }
  .shell-public--auth .stack { --stack: clamp(6px, 1.2svh, 16px) !important; }
  .shell-public--auth .field + .field { margin-top: clamp(6px, 1svh, 18px); }
  .shell-public--auth .field { gap: 4px; }
  .shell-public--auth .field__label { font-size: 12.5px; }
  .shell-public--auth .public-form__inner .row--between { margin-top: -2px; }
  .shell-public--auth .input, .shell-public--auth .select { min-height: clamp(34px, 4.3svh, 54px); }
  .shell-public--auth .btn { min-height: clamp(36px, 4.6svh, 54px); font-size: 14px; }
  .shell-public--auth .or-line { margin-block: clamp(0px, .3svh, 10px); }
  .shell-public--auth .intent-seg { padding: 4px; }
  .seg-pill { top: 4px; bottom: 4px; left: 4px; }
  .shell-public--auth .intent-seg button { min-height: clamp(28px, 3.6svh, 46px); }
  .shell-public--auth .public-form__alt { margin-top: clamp(4px, .9svh, 22px); padding-top: clamp(4px, .9svh, 18px); text-align: center; font-size: 13.5px; }
  .shell-public--auth .public-form__inner .tiny { margin-top: clamp(4px, .8svh, 14px) !important; text-align: center; }
  .shell-public--auth .public-stage__foot { order: 3; position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: auto 20px 0; padding: clamp(5px, .8svh, 18px) 0 clamp(6px, 1svh, 20px); border-top: 1px solid rgba(255,255,255,.12); font-size: 10.5px; text-align: center; }
  .auth-bg__pane--stage { inset: 0 0 auto 0; width: auto; height: 340px; -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent); mask-image: linear-gradient(180deg, #000 78%, transparent); }
  /* escurece o lado do texto para as palavras vermelhas continuarem legíveis */
  .auth-bg__pane--stage::after { background: linear-gradient(90deg, rgba(5,5,7,.94) 0%, rgba(5,5,7,.78) 42%, rgba(5,5,7,0) 72%); }
  .auth-bg__pane--form { display: none; }
  html.is-auth { --demo-h: 28px; }
  html.is-auth .demo-bar { font-size: 10px; }
  .shell-public--auth .field__label { line-height: 1.2; }
  .shell-public--auth .public-form__inner .row--between { min-height: 0; }
  .shell-public--auth .public-form__inner .link.small { font-size: 12.5px; }
}
@media (max-width: 900px) and (min-width: 460px) {
  .shell-public--auth .public-stage__foot span + span { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.2); }
}
@media (max-width: 420px) {
  .shell-public--auth .intent-seg button { padding: 0 8px; font-size: 13px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .seg-pill { transition: none; }
}

.auth-art { max-width: none; }
.auth-bg__art { overflow: hidden; }
