/* Coopera+ · Protótipo de admissão digital (fictício)
   Mobile-first, sem dependências. Motion apenas em transform/opacity. */

:root {
  --primary: #0F5E63;
  --primary-700: #0A4549;
  --primary-600: #0C5054;
  --primary-100: #D3E8E7;
  --primary-50: #ECF5F4;
  --accent: #F2A541;
  --accent-50: #FDF3E3;
  --ink: #12211F;
  --ink-2: #44524F;
  --ink-3: #6E7C79;
  --line: #D9E2E0;
  --line-2: #EBF0EF;
  --bg: #FFFFFF;
  --surface: #F4F7F6;
  --danger: #B93A26;
  --success: #1E8455;
  --success-50: #E5F4EC;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
  --d-fast: 150ms;
  --d-base: 240ms;
  --d-slow: 420ms;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: #E4ECEA;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
/* No celular, a área que fica atrás da barra de endereço/acessórios do navegador
   (visível com o teclado aberto) usa a mesma cor do app, sem faixa cinza. */
@media (max-width: 479px) {
  html, body { background: var(--bg); }
  html.dark-page, html.dark-page body { background: #0E1413; }
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, input, label, [data-href], [data-open] { touch-action: manipulation; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------- Estrutura da tela ----------------
   .app é fixo e tem a altura da área VISÍVEL (o JS usa visualViewport),
   então o rodapé com os botões fica sempre acima do teclado. */
.app {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  height: var(--app-h, 100vh);
  background: var(--bg);
  display: -webkit-box;
  display: flex;
  -webkit-box-orient: vertical;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;
  -webkit-transform: translate3d(0, var(--app-top, 0px), 0);
  transform: translate3d(0, var(--app-top, 0px), 0);
}
@supports (height: 100dvh) {
  .app { height: var(--app-h, 100dvh); }
}
@media (min-width: 480px) {
  .app { box-shadow: 0 0 0 1px rgba(16, 32, 30, .06), 0 20px 60px rgba(16, 32, 30, .12); }
}

.header {
  flex: 0 0 auto;
  padding: 8px 8px 0;
  padding-top: max(8px, env(safe-area-inset-top));
  background: var(--bg);
  position: relative;
  z-index: 2;
}
.header-row {
  display: flex;
  align-items: center;
  min-height: 48px;
}
.header-title {
  flex: 1 1 auto;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}
.icon-btn {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border: 0; background: transparent;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
  transition: background-color var(--d-fast) var(--ease-out), -webkit-transform var(--d-fast) var(--ease-out);
  transition: background-color var(--d-fast) var(--ease-out), transform var(--d-fast) var(--ease-out);
}
.icon-btn:active { background: var(--surface); -webkit-transform: scale(.94); transform: scale(.94); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-spacer { width: 48px; height: 48px; flex: 0 0 auto; }

.progress {
  height: 4px;
  margin: 4px 12px 0;
  background: var(--line-2);
  border-radius: 4px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--primary);
  border-radius: 4px;
  -webkit-transform-origin: left center;
  transform-origin: left center;
  -webkit-transform: scaleX(var(--p-from, 0));
  transform: scaleX(var(--p-from, 0));
  transition: -webkit-transform 700ms var(--ease-out);
  transition: transform 700ms var(--ease-out);
}
.progress.go > span { -webkit-transform: scaleX(var(--p, 0)); transform: scaleX(var(--p, 0)); }

.main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 20px 28px;
  position: relative;
}
.main.center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.main.center .illus { margin-left: auto; margin-right: auto; }

.footer {
  flex: 0 0 auto;
  padding: 12px 20px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: var(--bg);
  position: relative;
  z-index: 2;
  transition: box-shadow var(--d-base) var(--ease-out);
}
.footer.raised { box-shadow: 0 -1px 0 var(--line-2), 0 -8px 24px rgba(16, 32, 30, .06); }
.kb-open .footer { padding-bottom: 12px; }
.footer > * + * { margin-top: 8px; }
.footer-note { font-size: 13px; color: var(--ink-3); text-align: center; }
.footer-note a, .link { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; }

/* ---------------- Tipografia ---------------- */
.eyebrow { font-size: 13px; font-weight: 600; color: var(--primary); letter-spacing: .02em; margin-bottom: 6px; }
.title { font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.title.sm { font-size: 20px; }
.lead { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.small { font-size: 14px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 10px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }

.illus { width: 100%; max-width: 240px; height: auto; margin: 8px auto 24px; }
.illus.lg { max-width: 280px; }

/* ---------------- Botões ---------------- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  font-size: 16px; font-weight: 600; line-height: 1.2;
  text-align: center; text-decoration: none;
  background: var(--primary);
  color: #fff;
  transition: background-color var(--d-base) var(--ease-in-out), color var(--d-base) var(--ease-in-out), border-color var(--d-base) var(--ease-in-out), -webkit-transform 100ms var(--ease-out);
  transition: background-color var(--d-base) var(--ease-in-out), color var(--d-base) var(--ease-in-out), border-color var(--d-base) var(--ease-in-out), transform 100ms var(--ease-out);
}
.btn:active { -webkit-transform: scale(.98); transform: scale(.98); background: var(--primary-700); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--line-2); color: #9AA7A4; cursor: default; }
.btn[disabled]:active, .btn[aria-disabled="true"]:active { -webkit-transform: none; transform: none; }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:active { background: var(--primary-50); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:active { background: var(--primary-50); }
.btn-ghost[disabled] { background: transparent; color: #9AA7A4; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:active { background: var(--primary-50); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline-light:active { background: rgba(255,255,255,.12); }
.btn svg { width: 20px; height: 20px; margin-right: 8px; flex: 0 0 auto; }
.btn-inline { display: inline-flex; width: auto; min-height: 40px; padding: 8px 4px; font-size: 15px; }

/* ---------------- Campos ---------------- */
.field { display: block; }
.field + .field, .field + .row, .row + .field, .row + .row { margin-top: 16px; }
.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field-label .optional { font-weight: 400; color: var(--ink-3); }
.row > .field, .row > * > .field { margin-top: 0; }
.input, .select {
  -webkit-appearance: none;
  appearance: none;
  display: flex; align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 17px; /* >=16px evita zoom no iOS */
  color: var(--ink);
  outline: none;
  transition: border-color var(--d-base) var(--ease-out), box-shadow var(--d-base) var(--ease-out), background-color var(--d-base) var(--ease-out);
}
.input::-webkit-input-placeholder { color: #A3AFAC; }
.input::placeholder { color: #A3AFAC; }
.input:focus, .select:focus, .select.focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 94, 99, .12); }
.input[readonly] { background: var(--surface); color: var(--ink-2); }
.input:disabled { background: var(--surface); color: var(--ink-3); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(185, 58, 38, .1); }
.field-hint { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.field-error { margin-top: 6px; font-size: 13px; color: var(--danger); display: none; }
.field.has-error .field-error { display: block; -webkit-animation: fadeIn var(--d-base) var(--ease-out); animation: fadeIn var(--d-base) var(--ease-out); }
.select { justify-content: space-between; text-align: left; cursor: pointer; }
.select .val { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select .ph { color: #A3AFAC; }
.select svg { width: 20px; height: 20px; color: var(--ink-3); flex: 0 0 auto; margin-left: 8px; }
.select:disabled { background: var(--surface); cursor: default; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .icon-btn { position: absolute; right: 2px; top: 50%; margin-top: -24px; color: var(--ink-3); }
.row { display: flex; }
.row > * { flex: 1 1 0; min-width: 0; }
.row > * + * { margin-left: 12px; }
.row > .w-40 { flex: 0 0 40%; }

/* Checkbox / radio com traço desenhado */
.check {
  position: relative;
  display: flex; align-items: flex-start;
  padding: 10px 0;
  cursor: pointer;
  font-size: 15px; color: var(--ink-2);
  line-height: 1.45;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  margin-right: 12px; margin-top: -1px;
  border: 2px solid #A9B6B3;
  border-radius: 7px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background-color var(--d-base) var(--ease-out), border-color var(--d-base) var(--ease-out), -webkit-transform var(--d-fast) var(--ease-out);
  transition: background-color var(--d-base) var(--ease-out), border-color var(--d-base) var(--ease-out), transform var(--d-fast) var(--ease-out);
}
.check .box svg { width: 16px; height: 16px; color: #fff; }
.check .box path { stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset 280ms var(--ease-out) 60ms; }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .box path { stroke-dashoffset: 0; }
.check:active .box { -webkit-transform: scale(.92); transform: scale(.92); }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(15, 94, 99, .18); }
.check.radio .box { border-radius: 50%; }
.check.radio .box::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff;
  -webkit-transform: scale(0); transform: scale(0);
  transition: -webkit-transform var(--d-base) var(--ease-out);
  transition: transform var(--d-base) var(--ease-out);
}
.check.radio input:checked + .box::after { -webkit-transform: scale(1); transform: scale(1); }

/* Listas de escolha (cards) */
.choices > * + * { margin-top: 10px; }
.choice {
  position: relative;
  display: flex; align-items: center;
  width: 100%;
  padding: 16px;
  min-height: 64px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  text-align: left;
  transition: border-color var(--d-base) var(--ease-out), background-color var(--d-base) var(--ease-out), -webkit-transform 100ms var(--ease-out);
  transition: border-color var(--d-base) var(--ease-out), background-color var(--d-base) var(--ease-out), transform 100ms var(--ease-out);
}
.choice:active { -webkit-transform: scale(.985); transform: scale(.985); background: var(--surface); }
.choice.selected { border-color: var(--primary); background: var(--primary-50); }
.choice .ico {
  flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-right: 14px;
}
.choice .ico svg { width: 22px; height: 22px; }
.choice .txt { flex: 1 1 auto; min-width: 0; }
.choice .t { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.choice .d { display: block; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.choice .chev { flex: 0 0 auto; width: 20px; height: 20px; color: var(--ink-3); margin-left: 8px; }
.choice .tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; background: var(--accent-50); color: #8A5A12; margin-top: 6px;
}
.choice.radio-choice .check { padding: 0; }
.choice.radio-choice .check .box { margin: 0 0 0 8px; }

.group-label { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin: 24px 0 10px; }

/* Lista de dicas */
.tips { list-style: none; padding: 0; margin: 0; text-align: left; }
.tips li { display: flex; align-items: center; padding: 12px 0; font-size: 16px; color: var(--ink-2); }
.tips li + li { border-top: 1px solid var(--line-2); }
.tips .ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-right: 14px;
}
.tips .ico svg { width: 20px; height: 20px; }

/* Callouts */
.callout {
  display: flex; padding: 14px; border-radius: var(--r-md);
  background: var(--surface); color: var(--ink-2); font-size: 14px; text-align: left;
}
.callout svg { flex: 0 0 auto; width: 20px; height: 20px; margin-right: 10px; color: var(--primary); margin-top: 1px; }
.callout.warn { background: var(--accent-50); }
.callout.warn svg { color: #B4760F; }
.callout strong { color: var(--ink); display: block; margin-bottom: 2px; }

.card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; background: #fff;
}
.value-card { background: var(--primary); color: #fff; border: 0; }
.value-card .lbl { font-size: 14px; opacity: .85; }
.value-card .v { font-size: 32px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.value-card .v small { font-size: 16px; font-weight: 600; opacity: .85; }

/* OTP */
.otp { display: flex; justify-content: center; margin-top: 28px; }
.otp input {
  width: 52px; height: 60px;
  margin: 0 5px;
  border: 1.5px solid var(--line); border-radius: 12px;
  text-align: center; font-size: 24px; font-weight: 600;
  outline: none; background: #fff;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--d-base) var(--ease-out), box-shadow var(--d-base) var(--ease-out), -webkit-transform var(--d-base) var(--ease-out);
  transition: border-color var(--d-base) var(--ease-out), box-shadow var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out);
}
.otp.six input { width: 44px; height: 56px; margin: 0 4px; font-size: 22px; }
.otp input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 94, 99, .12); -webkit-transform: translateY(-2px); transform: translateY(-2px); }
.otp input.filled { border-color: var(--primary); }
.otp.error input { border-color: var(--danger); -webkit-animation: shake 360ms var(--ease-in-out); animation: shake 360ms var(--ease-in-out); }
@media (max-width: 350px) {
  .otp input { width: 46px; height: 56px; margin: 0 4px; }
  .otp.six input { width: 38px; height: 52px; margin: 0 3px; font-size: 20px; }
}
.otp-meta { text-align: center; margin-top: 20px; font-size: 14px; color: var(--ink-3); }
.otp-meta .timer { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.otp-actions { display: flex; flex-direction: column; align-items: center; margin-top: 8px; }

/* Notificação simulada (código) */
.notif {
  position: absolute; left: 10px; right: 10px; top: 10px; top: max(10px, env(safe-area-inset-top));
  z-index: 40;
  display: flex; align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(30, 38, 37, .94);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  -webkit-transform: translate3d(0, -140%, 0); transform: translate3d(0, -140%, 0);
  opacity: 0;
  transition: opacity var(--d-base) var(--ease-in), -webkit-transform 320ms var(--ease-in);
  transition: opacity var(--d-base) var(--ease-in), transform 320ms var(--ease-in);
  cursor: pointer;
}
.notif.show { -webkit-transform: none; transform: none; opacity: 1; transition: opacity var(--d-base) var(--ease-out), -webkit-transform 480ms var(--ease-out); transition: opacity var(--d-base) var(--ease-out), transform 480ms var(--ease-out); }
.notif .app-ico { width: 36px; height: 36px; border-radius: 9px; background: var(--primary); display: flex; align-items: center; justify-content: center; margin-right: 12px; flex: 0 0 auto; }
.notif .app-ico svg { width: 20px; height: 20px; color: #fff; }
.notif .n-t { font-size: 13px; opacity: .7; }
.notif .n-b { font-size: 15px; }
.notif .n-b b { letter-spacing: .12em; }

/* ---------------- Sheets e diálogos ---------------- */
.backdrop {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(12, 22, 21, .48);
  opacity: 0; visibility: hidden;
  transition: opacity 200ms var(--ease-in), visibility 0s linear 200ms;
}
.backdrop.open { opacity: 1; visibility: visible; transition: opacity 280ms var(--ease-out), visibility 0s; }

.sheet, .dialog, .toast, .loader-screen { color: var(--ink); text-align: left; }
.dialog { text-align: center; }
.toast { color: #fff; text-align: center; }
.loader-screen { text-align: center; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 31;
  max-height: 88%;
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: 22px 22px 0 0;
  -webkit-transform: translate3d(0, 104%, 0); transform: translate3d(0, 104%, 0);
  visibility: hidden;
  transition: -webkit-transform 220ms var(--ease-in), visibility 0s linear 220ms;
  transition: transform 220ms var(--ease-in), visibility 0s linear 220ms;
}
.sheet.open { -webkit-transform: none; transform: none; visibility: visible; transition: -webkit-transform 380ms var(--ease-out), visibility 0s; transition: transform 380ms var(--ease-out), visibility 0s; }
.sheet.full { height: 88%; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 10px auto 0; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: center; padding: 8px 8px 4px 20px; flex: 0 0 auto; }
.sheet-head h2 { flex: 1 1 auto; font-size: 18px; font-weight: 700; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 20px 20px; color: var(--ink-2); font-size: 15px; }
.sheet-body p + p { margin-top: 12px; }
.sheet-foot { flex: 0 0 auto; padding: 12px 20px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.kb-open .sheet-foot { padding-bottom: 12px; }
.sheet-foot > * + * { margin-top: 8px; }
.sheet .search { padding: 4px 20px 8px; flex: 0 0 auto; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 14px; top: 50%; margin-top: -10px; width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.search-box .input { padding-left: 44px; min-height: 48px; background: var(--surface); border-color: transparent; }
.search-box .input:focus { background: #fff; }
.opts { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-height: 0; }
.opt {
  display: flex; align-items: center; width: 100%;
  min-height: 52px; padding: 12px 12px;
  border: 0; border-radius: 12px; background: transparent;
  text-align: left; font-size: 16px; color: var(--ink);
  transition: background-color var(--d-fast) var(--ease-out);
}
.opt:active { background: var(--surface); }
.opt span { flex: 1 1 auto; }
.opt svg { width: 20px; height: 20px; color: var(--primary); opacity: 0; -webkit-transform: scale(.6); transform: scale(.6); transition: opacity var(--d-base) var(--ease-out), -webkit-transform var(--d-base) var(--ease-out); transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out); }
.opt.sel { font-weight: 600; color: var(--primary); }
.opt.sel svg { opacity: 1; -webkit-transform: none; transform: none; }
.opts .empty { padding: 24px 12px; text-align: center; color: var(--ink-3); font-size: 15px; }
.opt[hidden] { display: none; }

.dialog {
  position: absolute; left: 20px; right: 20px; top: 50%; z-index: 31;
  max-height: 86%;
  overflow-y: auto;
  background: #fff; border-radius: 22px;
  padding: 24px 20px 16px;
  text-align: center;
  opacity: 0; visibility: hidden;
  -webkit-transform: translate3d(0, -50%, 0) scale(.96); transform: translate3d(0, -50%, 0) scale(.96);
  transition: opacity 160ms var(--ease-in), -webkit-transform 160ms var(--ease-in), visibility 0s linear 160ms;
  transition: opacity 160ms var(--ease-in), transform 160ms var(--ease-in), visibility 0s linear 160ms;
}
.dialog.open { opacity: 1; visibility: visible; -webkit-transform: translate3d(0, -50%, 0); transform: translate3d(0, -50%, 0); transition: opacity 260ms var(--ease-out), -webkit-transform 320ms var(--ease-out), visibility 0s; transition: opacity 260ms var(--ease-out), transform 320ms var(--ease-out), visibility 0s; }
.dialog h2 { font-size: 19px; font-weight: 700; margin-top: 8px; }
.dialog p { font-size: 15px; color: var(--ink-2); margin-top: 8px; }
.dialog .btn { margin-top: 20px; }
.dialog img { max-width: 200px; margin: 0 auto; }

/* Toast */
.toast {
  position: absolute; left: 20px; right: 20px; bottom: 96px; z-index: 50;
  padding: 14px 16px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 15px; text-align: center;
  opacity: 0; -webkit-transform: translate3d(0, 12px, 0); transform: translate3d(0, 12px, 0);
  pointer-events: none;
  transition: opacity 200ms var(--ease-in), -webkit-transform 200ms var(--ease-in);
  transition: opacity 200ms var(--ease-in), transform 200ms var(--ease-in);
}
.toast.show { opacity: 1; -webkit-transform: none; transform: none; transition: opacity 280ms var(--ease-out), -webkit-transform 360ms var(--ease-out); transition: opacity 280ms var(--ease-out), transform 360ms var(--ease-out); }

/* Loader */
.loader-screen {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255, 255, 255, .97);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 200ms var(--ease-in), visibility 0s linear 200ms;
  padding: 24px; text-align: center;
}
.loader-screen.show { opacity: 1; visibility: visible; transition: opacity 240ms var(--ease-out), visibility 0s; }
.spinner { width: 56px; height: 56px; -webkit-animation: spin 1s linear infinite; animation: spin 1s linear infinite; }
.spinner circle { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 90 150; }
.spinner .track { stroke: var(--primary-100); stroke-dasharray: none; }
.loader-screen p { margin-top: 20px; font-size: 16px; font-weight: 600; color: var(--ink); }
.loader-screen .sub { margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--ink-3); }

/* ---------------- Telas especiais ---------------- */
/* Início */
.home {
  background: #2A2620; /* cor de espera enquanto a foto carrega */
  color: #fff;
}
.home .home-art { position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; }
.home .home-art picture { display: block; width: 100%; height: 100%; }
.home .home-art img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 30%; }
/* Scrims: topo (logo) e base (título + botões). Gradiente com várias paradas
   (curva suave) para não formar faixa visível, legível com qualquer foto. */
.home .home-art::before,
.home .home-art::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }
.home .home-art::before {
  top: 0; height: 160px;
  background: linear-gradient(180deg, rgba(8, 18, 18, .45) 0%, rgba(8, 18, 18, .28) 40%, rgba(8, 18, 18, .1) 75%, rgba(8, 18, 18, 0) 100%);
}
.home .home-art::after {
  bottom: 0; height: 80%;
  background: linear-gradient(180deg,
    rgba(8, 20, 20, 0) 0%,
    rgba(8, 20, 20, .12) 12%,
    rgba(8, 20, 20, .32) 24%,
    rgba(8, 20, 20, .56) 36%,
    rgba(8, 20, 20, .72) 48%,
    rgba(8, 20, 20, .8) 62%,
    rgba(8, 20, 20, .86) 100%);
}
.home .title { text-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 18px rgba(0, 0, 0, .45); }
.home .lead { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 12px rgba(0, 0, 0, .4); }
.home .main { display: flex; flex-direction: column; justify-content: flex-end; z-index: 1; padding-bottom: 8px; }
.home .footer { background: transparent; z-index: 1; }
.brand { display: flex; align-items: center; font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand-mark { width: 36px; height: 36px; margin-right: 10px; }
.home .home-top { position: absolute; top: 0; left: 0; right: 0; padding: 20px; padding-top: max(20px, env(safe-area-inset-top)); z-index: 1; }
.home .title { color: #fff; font-size: 30px; }
.home .lead { color: rgba(255, 255, 255, .82); }

/* Câmera simulada */
.camera { background: #0E1413; color: #fff; }
.camera .header { background: transparent; }
.camera .header-title, .camera .icon-btn { color: #fff; }
.camera .icon-btn:active { background: rgba(255,255,255,.1); }
.camera .progress { background: rgba(255,255,255,.14); }
.camera .progress > span { background: #fff; }
.cam-bg { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: radial-gradient(120% 80% at 50% 35%, #3B4644 0%, #1C2524 55%, #0E1413 100%); }
.cam-bg.desk { background: radial-gradient(110% 70% at 50% 45%, #6B5A48 0%, #4A3E33 50%, #231D18 100%); }
.cam-bg::after { content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 2px, transparent 2px 4px); }
.camera .main { display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; text-align: center; }
.camera .footer { background: transparent; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.cam-hint { font-size: 16px; font-weight: 600; margin-top: 24px; padding: 8px 16px; border-radius: 999px; background: rgba(0, 0, 0, .35); }
.face-frame {
  position: relative; width: 230px; height: 300px; border-radius: 50%;
  box-shadow: 0 0 0 2000px rgba(8, 12, 12, .55);
  overflow: hidden;
}
.face-frame img { width: 100%; height: 100%; object-fit: cover; }
.face-frame .ring { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.face-frame .ring ellipse { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 3; }
.face-frame .ring .prog { stroke: #6FE3B5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2400ms var(--ease-in-out); }
.face-frame.capturing .ring .prog { stroke-dashoffset: 0; }
.scan {
  position: absolute; left: 6%; right: 6%; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(111, 227, 181, .95), transparent);
  -webkit-animation: scan 2.2s var(--ease-in-out) infinite alternate; animation: scan 2.2s var(--ease-in-out) infinite alternate;
  opacity: .9;
}
.face-frame .scan { top: 0; }
.doc-frame { position: relative; width: 86%; max-width: 330px; }
.doc-frame img { width: 100%; height: auto; border-radius: 12px; opacity: .92; }
.doc-frame .corner { position: absolute; width: 28px; height: 28px; border: 3px solid #fff; }
.doc-frame .c1 { left: -10px; top: -10px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.doc-frame .c2 { right: -10px; top: -10px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.doc-frame .c3 { left: -10px; bottom: -10px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.doc-frame .c4 { right: -10px; bottom: -10px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.doc-frame .scan { -webkit-animation-name: scanDoc; animation-name: scanDoc; }
.shutter {
  width: 76px; height: 76px; border-radius: 50%;
  border: 4px solid #fff; background: transparent; padding: 5px;
  transition: -webkit-transform 120ms var(--ease-out); transition: transform 120ms var(--ease-out);
}
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: -webkit-transform 120ms var(--ease-out); transition: transform 120ms var(--ease-out); }
.shutter:active span { -webkit-transform: scale(.86); transform: scale(.86); }
.flash { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 20; }
.flash.go { -webkit-animation: flash 420ms var(--ease-out); animation: flash 420ms var(--ease-out); }
.review-img { width: 100%; max-width: 280px; margin: 8px auto 0; border-radius: 12px; }

/* Senha */
.reqs { list-style: none; padding: 0; margin: 12px 0 0; }
.reqs li { display: flex; align-items: center; font-size: 14px; color: var(--ink-3); padding: 4px 0; transition: color var(--d-base) var(--ease-out); }
.reqs li .dot { width: 20px; height: 20px; margin-right: 10px; border-radius: 50%; border: 1.5px solid #B9C4C1; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: background-color var(--d-base) var(--ease-out), border-color var(--d-base) var(--ease-out); }
.reqs li .dot svg { width: 12px; height: 12px; color: #fff; opacity: 0; -webkit-transform: scale(.5); transform: scale(.5); transition: opacity var(--d-base) var(--ease-out), -webkit-transform var(--d-base) var(--ease-out); transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out); }
.reqs li.ok { color: var(--success); }
.reqs li.ok .dot { background: var(--success); border-color: var(--success); }
.reqs li.ok .dot svg { opacity: 1; -webkit-transform: none; transform: none; }

/* Status / acompanhar */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 22px 36px; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--line-2); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; }
.timeline .dot svg { width: 14px; height: 14px; color: #fff; }
.timeline li.done .dot { background: var(--success); border-color: var(--success); }
.timeline li.done::before { background: var(--success); }
.timeline li.current .dot { background: #fff; border-color: var(--accent); }
.timeline li.current .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); -webkit-animation: pulse 1.6s var(--ease-in-out) infinite; animation: pulse 1.6s var(--ease-in-out) infinite; }
.timeline .t { font-weight: 600; color: var(--ink); font-size: 15px; }
.timeline .d { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.badge { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-50); color: #8A5A12; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; }

/* Contatos */
.contact { display: flex; align-items: center; padding: 14px 0; }
.contact + .contact { border-top: 1px solid var(--line-2); }
.contact .ico { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-right: 14px; flex: 0 0 auto; }
.contact .ico svg { width: 20px; height: 20px; }
.contact .k { font-size: 14px; color: var(--ink-3); }
.contact .v { font-size: 17px; font-weight: 600; color: var(--ink); }

/* Termo / documento */
.doc-link { display: flex; align-items: center; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; width: 100%; text-align: left; transition: -webkit-transform 100ms var(--ease-out), background-color var(--d-fast); transition: transform 100ms var(--ease-out), background-color var(--d-fast); }
.doc-link:active { -webkit-transform: scale(.985); transform: scale(.985); background: var(--surface); }
.doc-link .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-right: 12px; flex: 0 0 auto; }
.doc-link .ico svg { width: 20px; height: 20px; }
.doc-link .t { flex: 1 1 auto; font-weight: 600; font-size: 15px; }
.doc-link .chev { width: 20px; height: 20px; color: var(--ink-3); }
.prose { font-size: 15px; color: var(--ink-2); }
.prose p + p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 20px; margin-bottom: 0; }
.prose li + li { margin-top: 6px; }

/* Lista inline com busca (profissão) */
.sticky-search { position: -webkit-sticky; position: sticky; top: -20px; z-index: 1; background: var(--bg); padding: 16px 0 8px; margin-top: 8px; }
.opts.inline { overflow: visible; padding: 0; margin: 0 -8px; }
.opts.inline .opt { border-bottom: 1px solid var(--line-2); border-radius: 0; padding-left: 8px; padding-right: 8px; }

/* Serviços */
.svc { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.svc .check { flex: 1 1 auto; padding: 0; font-size: 16px; color: var(--ink); }
.svc .check .sub { display: block; font-size: 13px; color: var(--ink-3); }

/* Sucesso: check desenhado */
.success-mark { width: 96px; height: 96px; margin: 0 auto 24px; }
.success-mark circle { fill: var(--success-50); }
.success-mark .ring { fill: none; stroke: var(--success); stroke-width: 3; stroke-dasharray: 280; stroke-dashoffset: 280; }
.success-mark path { fill: none; stroke: var(--success); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
.anim .success-mark .ring { -webkit-animation: draw 700ms var(--ease-out) 200ms forwards; animation: draw 700ms var(--ease-out) 200ms forwards; }
.anim .success-mark path { -webkit-animation: draw 420ms var(--ease-out) 650ms forwards; animation: draw 420ms var(--ease-out) 650ms forwards; }
.no-anim .success-mark .ring, .no-anim .success-mark path { stroke-dashoffset: 0; }

/* Saltos de conteúdo condicional */
.reveal { overflow: hidden; }
.reveal[hidden] { display: none; }
.reveal.in { -webkit-animation: rise var(--d-slow) var(--ease-out) both; animation: rise var(--d-slow) var(--ease-out) both; }

/* ---------------- Motion de página ---------------- */
.anim .main > * {
  -webkit-animation: rise var(--d-slow) var(--ease-out) both;
  animation: rise var(--d-slow) var(--ease-out) both;
}
.anim .main > *:nth-child(2) { -webkit-animation-delay: 40ms; animation-delay: 40ms; }
.anim .main > *:nth-child(3) { -webkit-animation-delay: 80ms; animation-delay: 80ms; }
.anim .main > *:nth-child(4) { -webkit-animation-delay: 120ms; animation-delay: 120ms; }
.anim .main > *:nth-child(5) { -webkit-animation-delay: 160ms; animation-delay: 160ms; }
.anim .main > *:nth-child(6) { -webkit-animation-delay: 200ms; animation-delay: 200ms; }
.anim .main > *:nth-child(n+7) { -webkit-animation-delay: 240ms; animation-delay: 240ms; }
.anim .main.pop > .illus, .anim .main.pop > .success-mark { -webkit-animation-name: pop; animation-name: pop; -webkit-animation-duration: 600ms; animation-duration: 600ms; }
.anim .footer { -webkit-animation: fadeIn 300ms var(--ease-out) 120ms both; animation: fadeIn 300ms var(--ease-out) 120ms both; }

.leaving .main, .leaving .footer { opacity: 0; -webkit-transform: translate3d(-10px, 0, 0); transform: translate3d(-10px, 0, 0); transition: opacity var(--d-fast) var(--ease-in), -webkit-transform var(--d-fast) var(--ease-in); transition: opacity var(--d-fast) var(--ease-in), transform var(--d-fast) var(--ease-in); }
.leaving.back .main, .leaving.back .footer { -webkit-transform: translate3d(10px, 0, 0); transform: translate3d(10px, 0, 0); }
.leaving .main > *, .leaving .footer { -webkit-animation: none; animation: none; }

@-webkit-keyframes rise { from { opacity: 0; -webkit-transform: translate3d(0, 12px, 0); } to { opacity: 1; -webkit-transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
@-webkit-keyframes pop { from { opacity: 0; -webkit-transform: scale(.9); } to { opacity: 1; -webkit-transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@-webkit-keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@-webkit-keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@-webkit-keyframes scan { from { -webkit-transform: translate3d(0, 20px, 0); } to { -webkit-transform: translate3d(0, 278px, 0); } }
@keyframes scan { from { transform: translate3d(0, 20px, 0); } to { transform: translate3d(0, 278px, 0); } }
@-webkit-keyframes scanDoc { from { -webkit-transform: translate3d(0, 6px, 0); } to { -webkit-transform: translate3d(0, 190px, 0); } }
@keyframes scanDoc { from { transform: translate3d(0, 6px, 0); } to { transform: translate3d(0, 190px, 0); } }
@-webkit-keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
@-webkit-keyframes pulse { 0%, 100% { -webkit-transform: scale(.7); opacity: .6; } 50% { -webkit-transform: scale(1); opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(.7); opacity: .6; } 50% { transform: scale(1); opacity: 1; } }
@-webkit-keyframes shake { 0%, 100% { -webkit-transform: none; } 25% { -webkit-transform: translateX(-4px); } 75% { -webkit-transform: translateX(4px); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Acessibilidade: menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    -webkit-animation-duration: 1ms !important; animation-duration: 1ms !important;
    -webkit-animation-delay: 0ms !important; animation-delay: 0ms !important;
    -webkit-animation-iteration-count: 1 !important; animation-iteration-count: 1 !important;
    transition-duration: 120ms !important; transition-delay: 0ms !important;
  }
  .leaving .main, .leaving .footer { -webkit-transform: none !important; transform: none !important; }
  .scan { display: none; }
}

@media (max-width: 350px) {
  .main { padding-left: 16px; padding-right: 16px; }
  .footer { padding-left: 16px; padding-right: 16px; }
  .title { font-size: 22px; }
  .illus { max-width: 200px; }
}
@media (max-height: 620px) {
  .illus { max-width: 180px; margin-bottom: 16px; }
  .main { padding-top: 12px; }
}
