/* WebBula — telas de acesso (entrar, recuperar senha e cadastros).
   Mesmos tokens do site de pacientes e profissionais. */
:root {
  --ink: #0b1550; --ink-2: #1a2563; --text: #4f5b80; --muted: #5B6784;
  --blue: #3874ad; --blue-600: #2f6292; --blue-700: #28537b; --blue-300: #9fc0df;
  --sky: #e7f3ff; --sky-2: #f3f9ff; --bg: #f6fafe; --line: #e2ecf6; --line-2: #c9d8e8;
  --green: #0f7a46; --green-bg: #e2f6ea; --red: #c4320a; --red-bg: #fff1ee;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 12px; --r: 18px; --r-lg: 26px;
  --shadow: 0 12px 40px -12px rgba(18, 52, 130, .16);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; }
h1, h2, h3, p, ul, ol, fieldset, legend { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: var(--blue-700); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.skip { position: absolute; left: 1rem; top: -4rem; padding: .7rem 1rem; background: #fff; border-radius: var(--r-sm); z-index: 10; font-weight: 600; }
.skip:focus { top: 1rem; }

/* ---------- Barra do topo ---------- */
.preview-bar { background: var(--ink); color: #fff; font-size: 14px; text-align: center; padding: .45rem 1rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, .5rem + 2.5vw, 3rem); background: #fff; border-bottom: 1px solid var(--line); }
.top .logo img { width: clamp(120px, 100px + 4vw, 160px); height: auto; }
.top__aside { display: flex; align-items: center; gap: .4rem 1rem; flex-wrap: wrap; justify-content: flex-end; font-size: 15px; }
.top__aside span { color: var(--muted); }
.top__aside a { font-weight: 600; }

/* ---------- Layout ---------- */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.auth__side { position: relative; padding: clamp(2rem, 1rem + 4vw, 5rem) clamp(1.25rem, .5rem + 4vw, 5rem); background: linear-gradient(160deg, #e9f4ff 0%, #f6fbff 60%, #eef6ff 100%); border-right: 1px solid var(--line); }
.auth__side-inner { position: sticky; top: 2rem; max-width: 30rem; margin-left: auto; display: grid; gap: 1.5rem; }
.auth__main { padding: clamp(2rem, 1rem + 3vw, 4.5rem) clamp(1rem, .5rem + 4vw, 5rem) clamp(3rem, 2rem + 3vw, 5rem); }
.auth__card { max-width: 34rem; }
@media (min-width: 1024px) { .auth__side { grid-column: 1; grid-row: 1; } .auth__main { grid-column: 2; grid-row: 1; } }
@media (max-width: 1023px) {
  .auth { grid-template-columns: 1fr; }
  .auth__main { order: 1; padding-inline: max(16px, 4vw); }
  .auth__side { order: 2; border-right: 0; border-top: 1px solid var(--line); padding-inline: max(16px, 4vw); }
  .auth__side-inner { margin: 0 auto; position: static; max-width: 34rem; }
  .auth__card { margin: 0 auto; }
}

/* Lado de contexto */
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-700); }
.side__title { font-size: clamp(1.6rem, 1.1rem + 1.3vw, 2.4rem); line-height: 1.15; letter-spacing: -.025em; font-weight: 800; color: var(--ink); text-wrap: balance; }
.side__title .hl { color: var(--blue); }
.side__list { display: grid; gap: .9rem; }
.side__list li { display: flex; gap: .8rem; align-items: flex-start; color: var(--ink-2); font-size: 16px; }
.side__list .bubble { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #fff; color: var(--blue); box-shadow: 0 2px 8px -3px rgba(18, 52, 130, .2); flex: none; }
.side__list .bubble .icon { width: 1.15rem; height: 1.15rem; }
.side__list strong { display: block; color: var(--ink); font-weight: 700; }
.side__note { display: flex; gap: .6rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r-sm); background: rgba(255, 255, 255, .75); border: 1px solid var(--line); font-size: 15px; }
.side__note .icon { color: var(--green); width: 1.25rem; height: 1.25rem; margin-top: .1rem; }

/* Resumo do plano (profissional) */
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem 1.35rem; box-shadow: var(--shadow); display: grid; gap: .85rem; }
.summary__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.summary__plan { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.summary__tag { font-size: 14px; color: var(--muted); }
.summary__rows { display: grid; gap: .5rem; border-top: 1px solid var(--line); padding-top: .85rem; font-size: 15px; }
.summary__rows div { display: flex; justify-content: space-between; gap: 1rem; }
.summary__rows dt { color: var(--text); }
.summary__rows dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }
.summary__today dd { color: var(--green); }
.summary__fine { font-size: 14px; color: var(--muted); }

/* ---------- Formulário ---------- */
.auth__title { font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); line-height: 1.12; letter-spacing: -.025em; font-weight: 800; color: var(--ink); text-wrap: balance; }
.auth__lead { margin-top: .6rem; font-size: 17px; color: var(--text); }
.req-note { margin-top: 1.25rem; font-size: 14px; color: var(--muted); }
.form { margin-top: 1.5rem; display: grid; gap: 1.25rem; }
.group { display: grid; gap: 1.1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.group:first-of-type { padding-top: 0; border-top: 0; }
.group > legend { float: left; width: 100%; margin-bottom: .25rem; font-size: 18px; font-weight: 700; color: var(--ink); }
.group > legend + * { clear: both; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.row--uf { grid-template-columns: minmax(0, 1fr) 7.5rem; }
@media (max-width: 479px) { .row { grid-template-columns: 1fr; } .row--uf { grid-template-columns: minmax(0, 1fr) 6.5rem; } }

.field { display: grid; gap: .4rem; min-width: 0; }
.field > label, .field__label, .inline-between > label { font-size: 15px; font-weight: 600; color: var(--ink); }
.opt { font-weight: 400; color: var(--muted); }
.hint { font-size: 14px; color: var(--muted); }
.input, .select {
  width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.select { appearance: none; padding-right: 2.4rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328537b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 1.1rem; }
.input:hover, .select:hover { border-color: var(--blue-300); }
.input:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(56, 116, 173, .22); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--red); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(196, 50, 10, .18); }
.err { display: flex; gap: .4rem; align-items: flex-start; font-size: 14px; font-weight: 600; color: var(--red); }
.err[hidden] { display: none; }
.err .icon { margin-top: .2rem; }

.pass { position: relative; }
.pass .input { padding-right: 6.5rem; }
.pass__toggle { position: absolute; right: .35rem; top: 50%; translate: 0 -50%; min-height: 40px; padding: 0 .75rem; border: 0; border-radius: 8px; background: transparent; color: var(--blue-700); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pass__toggle:hover { background: var(--sky); }

.check { display: flex; gap: .7rem; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin: .05rem 0 0; flex: none; accent-color: var(--blue); }
.check-wrap { display: grid; gap: .35rem; }

/* Cartões de escolha (plano e conselho) */
.choices { display: grid; gap: .75rem; }
.choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 479px) { .choices--2 { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice__box { display: flex; gap: .9rem; align-items: center; min-height: 64px; padding: .9rem 1rem; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: #fff; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.choice:hover .choice__box { border-color: var(--blue-300); }
.choice input:checked + .choice__box { border-color: var(--blue); border-width: 2px; padding: calc(.9rem - .5px) calc(1rem - .5px); background: var(--sky-2); }
.choice input:focus-visible + .choice__box { box-shadow: 0 0 0 3px rgba(56, 116, 173, .3); }
.choice__radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; background: #fff; }
.choice input:checked + .choice__box .choice__radio { border-color: var(--blue); }
.choice input:checked + .choice__box .choice__radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.choice__body { flex: 1; min-width: 0; }
.choice__title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-weight: 700; color: var(--ink); }
.choice__text { display: block; font-size: 14px; color: var(--muted); }
.choice__price { text-align: right; font-weight: 800; color: var(--ink); white-space: nowrap; }
.choice__price small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.choice__code { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 10px; background: var(--sky); color: var(--blue-700); font-size: 14px; font-weight: 800; flex: none; }
[data-invalid="true"] .choice__box { border-color: var(--red); }

/* Etapas */
.steps { display: flex; gap: .5rem; margin-top: 1.5rem; counter-reset: step; }
.steps li { flex: 1; display: grid; gap: .45rem; font-size: 14px; font-weight: 600; color: var(--muted); }
.steps li::before { content: ""; height: 6px; border-radius: 99px; background: var(--line); }
.steps li[data-state="done"]::before, .steps li[aria-current="step"]::before { background: var(--blue); }
.steps li[aria-current="step"] { color: var(--ink); }
.step-count { margin-top: 1.75rem; font-size: 14px; font-weight: 700; color: var(--blue-700); }
.step-title { margin-top: .25rem; font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.015em; }
.step-title:focus { outline: none; }
.step-lead { margin-top: .35rem; font-size: 15px; }
.step[hidden] { display: none; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 52px; padding: .8em 1.8em; border-radius: 999px; border: 2px solid var(--blue); background: var(--blue); color: #fff; font: inherit; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s; }
.btn:hover { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--blue-700); border-color: transparent; padding-inline: 1rem; }
.btn--ghost:hover { background: var(--sky); color: var(--ink); border-color: transparent; }
.btn--outline { background: #fff; color: var(--blue); }
.btn--outline:hover { background: var(--sky); color: var(--blue-700); }
.btn .icon { width: 1.1em; height: 1.1em; }
.actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap-reverse; justify-content: space-between; margin-top: .25rem; }
.actions .btn:last-child { flex: 1 1 14rem; }
.actions > span:empty { display: none; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--blue-700); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.form-foot { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 15px; }
.inline-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Quem é você (entrar) */
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .9rem; }
.who a { display: flex; gap: .6rem; align-items: center; min-height: 52px; padding: .7rem .85rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.who a:hover { border-color: var(--blue); background: var(--sky-2); }
.who .icon { color: var(--blue); width: 1.2rem; height: 1.2rem; }
@media (max-width: 399px) { .who { grid-template-columns: 1fr; } }

/* Sumário de erros e mensagens */
.alert { display: grid; gap: .5rem; padding: 1rem 1.1rem; border-radius: var(--r-sm); border: 1.5px solid var(--red); background: var(--red-bg); color: var(--ink); font-size: 15px; }
.alert:focus { outline: none; box-shadow: 0 0 0 3px rgba(196, 50, 10, .18); }
.alert[hidden] { display: none; }
.alert strong { display: flex; gap: .5rem; align-items: center; color: var(--red); }
.alert ul { list-style: disc; padding-left: 1.4rem; display: grid; gap: .2rem; }
.alert a { color: var(--ink); font-weight: 600; }

/* Tela de sucesso */
.done { display: grid; gap: 1rem; justify-items: start; }
.done[hidden] { display: none; }
.done__icon { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--green-bg); color: var(--green); }
.done__icon .icon { width: 2rem; height: 2rem; stroke-width: 2.2; }
.done__title:focus { outline: none; }
.done__box { width: 100%; display: grid; gap: .6rem; padding: 1.1rem 1.2rem; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); font-size: 15px; }
.done__box li { display: flex; gap: .6rem; align-items: flex-start; }
.done__box .icon { color: var(--blue); margin-top: .2rem; }
.done__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.preview-tip { font-size: 14px; color: var(--muted); padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--sky-2); border: 1px dashed var(--blue-300); }

.foot { padding: 1.25rem clamp(1rem, .5rem + 2.5vw, 3rem); border-top: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--muted); display: flex; gap: .5rem 1.5rem; flex-wrap: wrap; justify-content: space-between; }
.foot ul { display: flex; gap: 1.25rem; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Escolha do ambiente (entrar) */
.envs { display: grid; gap: .75rem; margin-top: 1.5rem; }
.env { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; min-height: 76px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, background-color .15s; }
.env:hover { border-color: var(--blue); background: var(--sky-2); color: var(--ink); }
.env__icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--sky); color: var(--blue-700); flex: none; }
.env__icon .icon { width: 1.3rem; height: 1.3rem; }
.env__body { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.env__body strong { font-size: 17px; }
.env__body span { font-size: 14px; color: var(--muted); }
.env > .icon { color: var(--blue); }
.back-link { display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; }
.env-pick { display: grid; gap: .6rem; }
.env-pick strong { color: var(--ink); margin-right: .25rem; }
