/* CicloDev · tela de entrada com os padrões do sistema e da landing:
   vidro quase branco só cinza, barra de vidro com "salto", cartão branco elevado (cantos 14), botão vermelho metálico,
   escala tipográfica oficial (12/14/16/20/31; display 48–64), Inter, paleta fechada, movimento iOS. */
:root {
  --tinta: #111111; --fraco: rgb(17 17 17 / .55); --linha: rgb(17 17 17 / .09); --borda: rgb(17 17 17 / .14); --vermelho: #CA0000;
  --barra: 56px; --vidro: rgb(255 255 255 / .72); --vidro-forte: rgb(255 255 255 / .86); --desfoque: blur(28px) saturate(180%);
  --sombra: 0 1px 2px rgb(17 17 17 / .06), 0 6px 14px -6px rgb(17 17 17 / .14), 0 20px 40px -20px rgb(17 17 17 / .24);
  --sombra-alta: 0 2px 4px rgb(17 17 17 / .07), 0 14px 28px -10px rgb(17 17 17 / .22), 0 36px 64px -28px rgb(17 17 17 / .32);
  --ios: cubic-bezier(.32, .72, 0, 1);
}
* { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; color: var(--tinta); font: 400 16px/1.6 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  background: #FFFFFF linear-gradient(180deg, rgb(17 17 17 / .028), rgb(17 17 17 / .012) 40%, rgb(17 17 17 / .03)) fixed; }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: 600; letter-spacing: -.045em; line-height: 1.05; }
a { color: inherit; }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: #FFEB00; color: var(--tinta); }
:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }
.vermelho { color: var(--vermelho); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* barra superior */
.barra { position: fixed; z-index: 50; inset: 0 0 auto; height: var(--barra); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 16px; }
.barra::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--vidro); -webkit-backdrop-filter: var(--desfoque); backdrop-filter: var(--desfoque);
  box-shadow: 0 .5px 0 rgb(17 17 17 / .1), 0 1px 2px rgb(17 17 17 / .06), 0 6px 12px -6px rgb(17 17 17 / .12), 0 16px 28px -18px rgb(17 17 17 / .2); }
.barra-voltar { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border-radius: 10px; font-size: 14px; font-weight: 500; text-decoration: none; }
.barra-voltar:hover { background: rgb(17 17 17 / .05); }
.marca { line-height: 0; }
.marca img { width: 140px; height: auto; }
.barra-dir { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fraco); }
.barra-dir svg { width: 16px; height: 16px; color: #2C7054; }

/* casca: largura total, sem espaço sobrando */
.login-casca { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 560px); gap: 16px; min-height: 100svh; padding: calc(var(--barra) + 16px) 16px 16px; }

/* lado da marca */
.login-marca { position: relative; display: grid; align-content: space-between; gap: 32px; padding: clamp(24px, 4vw, 56px); border-radius: 14px; overflow: hidden; isolation: isolate;
  background: #FFFFFF; border: 1px solid var(--linha); box-shadow: var(--sombra); }
.orbita { position: absolute; z-index: -1; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--linha); pointer-events: none; }
.orbita-1 { width: 78%; right: -14%; bottom: -18%; transform: rotate(-24deg); animation: gira 60s linear infinite; }
.orbita-1::before { content: ""; position: absolute; top: 12%; left: 14%; width: 14px; height: 14px; border-radius: 50%; background: #FFEB00; box-shadow: 0 0 0 6px rgb(255 235 0 / .25); }
.orbita-2 { width: 104%; right: -28%; bottom: -34%; border-style: dashed; border-color: rgb(17 17 17 / .07); animation: gira 90s linear infinite reverse; }
.orbita-2::before { content: ""; position: absolute; top: 20%; left: 6%; width: 10px; height: 10px; border-radius: 50%; background: var(--ciclodev-green-metal); }
@keyframes gira { to { transform: rotate(336deg); } }
.login-simbolo { position: absolute; z-index: -1; right: -6%; bottom: -10%; width: 58%; opacity: .07; transform: rotate(-12deg); }
.login-marca-txt { display: grid; gap: 20px; max-width: 620px; }
.login-marca h2 { font-size: clamp(48px, 5vw, 64px); line-height: 1; letter-spacing: -.065em; }
.login-marca-txt > p:last-child { font-size: 16px; line-height: 1.7; color: var(--fraco); max-width: 460px; }
.rotulo { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fraco); }
.rotulo-vermelho { color: var(--vermelho); }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--ciclodev-red-metal); }
.login-avisos { display: grid; gap: 12px; justify-items: start; }
.flutua { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--vidro-forte); -webkit-backdrop-filter: var(--desfoque); backdrop-filter: var(--desfoque);
  box-shadow: 0 0 0 .5px rgb(17 17 17 / .12), var(--sombra-alta); font-size: 14px; animation: flutua 6s ease-in-out infinite; }
.flutua-2 { margin-left: 48px; animation-delay: -3s; }
.flutua b { display: block; font-weight: 600; }
.flutua small { display: block; font-size: 12px; color: var(--fraco); }
.fl-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgb(17 17 17 / .06); }
.fl-ico.verde { background: #2C7054; color: #FFFFFF; }
.fl-ico svg { width: 16px; height: 16px; stroke-width: 2.5; }
.fl-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #CA0000; color: #FFFFFF; font-style: normal; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
@keyframes flutua { 50% { transform: translateY(-8px); } }
.login-assinatura { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fraco); }

/* lado do formulário */
.login-principal { display: grid; grid-template-rows: 1fr auto; gap: 16px; min-width: 0; }
.login-cartao { align-self: center; padding: clamp(24px, 3vw, 40px); border-radius: 14px; background: #FFFFFF; border: 1px solid var(--linha); box-shadow: var(--sombra-alta); }
.login-rodape { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 0 8px; font-size: 12px; color: var(--fraco); }
.login-rodape span:last-child { display: flex; gap: 16px; }
.login-rodape a { text-decoration: none; }
.login-rodape a:hover { color: var(--tinta); }

/* telas geradas pelo auth.js (mesmas classes) */
.auth-view { display: grid; gap: 16px; animation: entra 420ms var(--ios); }
@keyframes entra { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.auth-view > .eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--vermelho); }
.auth-view > .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ciclodev-red-metal); }
.auth-view h1 { font-size: 31px; letter-spacing: -.045em; outline: none; }
.auth-intro { font-size: 16px; line-height: 1.6; color: var(--fraco); }
.auth-intro strong { color: var(--tinta); font-weight: 600; }
form { display: grid; gap: 14px; }
form[aria-busy="true"] { opacity: .7; }
.auth-fields { display: grid; gap: 14px; margin: 0; padding: 0; border: 0; min-width: 0; }
.auth-step-title { font-size: 20px; letter-spacing: -.03em; }
.auth-field { display: grid; gap: 6px; min-width: 0; }
.auth-field > span:first-child { font-size: 12px; font-weight: 600; color: var(--tinta); }
.auth-field i { font-style: normal; font-weight: 400; color: var(--fraco); }
.auth-field input, .auth-field select { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--borda); border-radius: 10px; background: #FFFFFF; font: 400 16px/1 Inter, system-ui, sans-serif; color: var(--tinta);
  transition: border-color 160ms, box-shadow 160ms; -webkit-appearance: none; appearance: none; }
.auth-field select { background-image: linear-gradient(45deg, transparent 50%, rgb(17 17 17 / .5) 50%), linear-gradient(135deg, rgb(17 17 17 / .5) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.auth-field input::placeholder { color: rgb(17 17 17 / .38); }
.auth-field input:hover, .auth-field select:hover { border-color: rgb(17 17 17 / .3); }
.auth-field input:focus, .auth-field select:focus { outline: none; border-color: var(--tinta); box-shadow: 0 0 0 3px rgb(17 17 17 / .08); }
.auth-field input[aria-invalid="true"] { border-color: var(--vermelho); box-shadow: 0 0 0 3px rgb(202 0 0 / .1); }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-city { grid-template-columns: 1fr 96px; }
.auth-password { position: relative; display: block; }
.auth-password input { padding-right: 88px; }
.auth-show { position: absolute; top: 6px; right: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: rgb(17 17 17 / .05); font: 500 12px/1 Inter, system-ui, sans-serif; color: var(--tinta); cursor: pointer; }
.auth-show:hover { background: rgb(17 17 17 / .09); }
.auth-help { font-size: 12px; color: var(--fraco); margin-top: -6px; }
.auth-forgot { display: flex; justify-content: flex-end; margin-top: -6px; }
.auth-link { padding: 0; border: 0; background: none; font: 600 14px/1.4 Inter, system-ui, sans-serif; color: var(--vermelho); cursor: pointer; }
.auth-link:hover { text-decoration: underline; }
.auth-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding-top: 4px; font-size: 14px; color: var(--fraco); }

/* botões iguais aos do sistema */
.button, .auth-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; padding: 0 20px; border: 0; border-radius: 10px;
  background: var(--ciclodev-red-metal); color: #FFFFFF; font: 600 16px/1 Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgb(132 0 0 / .3), 0 8px 18px -8px rgb(132 0 0 / .55); transition: transform 200ms var(--ios), box-shadow 200ms var(--ios), filter 160ms; }
.auth-submit:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 2px 4px rgb(132 0 0 / .3), 0 14px 24px -10px rgb(132 0 0 / .6); }
.auth-submit:active { transform: scale(.98); filter: brightness(.92); }
.auth-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.auth-submit svg { width: 16px; height: 16px; }
.google-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 48px; border: 1px solid var(--borda); border-radius: 10px; background: #FFFFFF;
  font: 600 16px/1 Inter, system-ui, sans-serif; color: var(--tinta); cursor: pointer; box-shadow: 0 1px 2px rgb(17 17 17 / .06); transition: box-shadow 200ms var(--ios), transform 200ms var(--ios); }
.google-button:hover { box-shadow: var(--sombra); transform: translateY(-1px); }
.google-g { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgb(17 17 17 / .06); font-size: 14px; font-weight: 700; }
.auth-divider { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fraco); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--linha); }

/* mensagem */
.auth-message:empty { display: none; }
.auth-message { padding: 12px 14px; border-radius: 10px; background: rgb(202 0 0 / .07); color: #840000; font-size: 14px; line-height: 1.5; }
.auth-message.success { background: rgb(44 112 84 / .1); color: #0F3926; }

/* critérios da senha */
.auth-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: -4px 0 0; padding: 0; list-style: none; }
.auth-rules li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fraco); }
.auth-rules li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid rgb(17 17 17 / .25); transition: background 200ms, border-color 200ms; }
.auth-rules li.valid { color: #2C7054; }
.auth-rules li.valid::before { border-color: #2C7054; background: #2C7054 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat; }

/* etapas do cadastro: segmento iOS */
.auth-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 3px; list-style: none; border-radius: 12px; background: rgb(17 17 17 / .06); counter-reset: e; }
.auth-steps li { display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; min-height: 36px; border-radius: 9px; font-size: 12px; font-weight: 500; color: var(--fraco); text-align: center; transition: background 300ms var(--ios), box-shadow 300ms var(--ios); }
.auth-steps li span { font-weight: 700; color: var(--vermelho); margin-right: 2px; }
.auth-steps li.current { background: #FFFFFF; color: var(--tinta); font-weight: 600; box-shadow: 0 1px 3px rgb(17 17 17 / .14), 0 0 0 .5px rgb(17 17 17 / .06); }
.auth-steps li.done { color: #2C7054; }
.auth-steps li.done span { color: #2C7054; }
.auth-steps button { width: 100%; height: 100%; min-height: 36px; padding: 0 4px; border: 0; border-radius: 9px; background: none; font: inherit; color: inherit; cursor: pointer; }
.auth-steps button:hover { background: rgb(255 255 255 / .6); }
.auth-step-actions { display: flex; gap: 12px; align-items: center; }
.auth-step-actions .auth-submit { flex: 1; }
.auth-back { height: 48px; padding: 0 18px; border: 1px solid var(--borda); border-radius: 10px; background: #FFFFFF; font: 600 14px/1 Inter, system-ui, sans-serif; color: var(--tinta); cursor: pointer; }
.auth-back:hover { box-shadow: var(--sombra); }

/* uso: escolha em cartões */
.auth-use { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.auth-use label { position: relative; display: grid; place-items: center; min-height: 48px; padding: 8px; border: 1px solid var(--borda); border-radius: 10px; background: #FFFFFF; font-size: 14px; font-weight: 500; text-align: center; cursor: pointer; transition: border-color 160ms, box-shadow 200ms var(--ios), transform 200ms var(--ios); }
.auth-use label:hover { box-shadow: var(--sombra); transform: translateY(-1px); }
.auth-use input { position: absolute; opacity: 0; pointer-events: none; }
.auth-use label:has(input:checked) { border-color: var(--tinta); box-shadow: 0 0 0 1px var(--tinta), var(--sombra); font-weight: 600; }
.auth-use label:has(input:focus-visible) { outline: 2px solid var(--tinta); outline-offset: 2px; }

/* aceite dos termos */
.auth-consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: 10px; background: rgb(17 17 17 / .035); font-size: 12px; line-height: 1.6; color: var(--fraco); cursor: pointer; }
.auth-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #111111; }
.auth-consent a { color: var(--tinta); font-weight: 600; }

/* conta conectada e confirmação */
.auth-success-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #2C7054; color: #FFFFFF; box-shadow: 0 6px 14px -6px rgb(15 57 38 / .6); }
.auth-success-icon svg { width: 24px; height: 24px; stroke-width: 2.25; }
.auth-identity { display: grid; gap: 2px; padding: 14px 16px; border-radius: 10px; background: rgb(17 17 17 / .035); font-size: 16px; font-weight: 600; }
.auth-identity small { font-size: 14px; font-weight: 400; color: var(--fraco); }

/* telas menores */
@media (max-width: 1000px) {
  .login-casca { grid-template-columns: 1fr; }
  .login-marca { order: 2; min-height: 0; }
  .login-avisos { display: none; }
  .login-cartao { max-width: 560px; width: 100%; justify-self: center; }
}
@media (max-width: 760px) {
  :root { --barra: 52px; }
  .barra { padding: 0 8px; }
  .barra-voltar { font-size: 0; gap: 0; padding: 0 8px; }
  .barra-voltar svg { width: 20px; height: 20px; }
  .barra-dir { font-size: 0; }
  .barra-dir svg { width: 18px; height: 18px; }
  .marca img { width: 120px; }
  .login-casca { padding: calc(var(--barra) + 12px) 12px 12px; }
  .login-cartao { padding: 20px; }
  .login-marca h2 { font-size: 48px; }
  .auth-row { grid-template-columns: 1fr; }
  .auth-city { grid-template-columns: 1fr 96px; }
  .auth-use { grid-template-columns: 1fr 1fr; }
  .auth-rules { grid-template-columns: 1fr; }
  .auth-steps li { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
