/* =========================================================
   Fase 2: entrada, planos, pagamento, abas e telas da conta
   ========================================================= */
.test-strip {
  font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; text-align: center;
  color: var(--accent-soft); background: rgba(242,118,46,.1); border-bottom: 1px solid rgba(242,118,46,.2);
  padding: calc(env(safe-area-inset-top) + 5px) 16px 5px;
}
.calc, .detail, .page, .flow { padding-top: 14px; }
.screen.tabbed { padding-bottom: calc(env(safe-area-inset-bottom) + 96px); }
.page { padding-left: 20px; padding-right: 20px; }

/* Espaçamentos */
.mt-4 { margin-top: 4px; } .mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; } .mt-18 { margin-top: 18px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mb-8 { margin-bottom: 8px; }
.stack-8, .stack-10, .stack-12, .stack-14 { display: flex; flex-direction: column; }
.stack-8 { gap: 8px; } .stack-10 { gap: 10px; } .stack-12 { gap: 12px; } .stack-14 { gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Telas de entrada (botão principal preso embaixo) */
.flow { display: flex; flex-direction: column; min-height: calc(100vh - 30px); min-height: calc(100dvh - 30px); padding-left: 24px; padding-right: 24px; }
.flow-body { flex: 1; display: flex; flex-direction: column; padding-bottom: 20px; }
.flow-body.center { justify-content: center; gap: 18px; }
.flow-foot {
  position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 10px;
  padding: 12px 0 calc(env(safe-area-inset-bottom) + 24px);
  background: linear-gradient(rgba(18,18,18,0), var(--bg) 22%);
}
.welcome-logo { width: 72px; height: 72px; border-radius: 50%; }
.brand-name.big .b-head, .brand-name.big .b-price { font-size: 26px; }
.welcome-title { font: 800 36px/1.08 var(--sans); letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.welcome-title.sm { font-size: 32px; line-height: 1.1; }
.welcome-sub { font-size: 16px; line-height: 1.45; color: var(--muted); margin: 0; text-wrap: pretty; }
.logo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.logo-row img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }

.h1 { font: 800 30px var(--sans); letter-spacing: -.025em; margin: 8px 0 0; }
.sub { font-size: 15px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }
.back-link { border: none; background: transparent; color: var(--text); font: 600 15px var(--sans); padding: 10px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.back-link .chev { font-size: 24px; line-height: 0; margin-top: -3px; }

/* Botões */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px;
  border-radius: 16px; border: none; font: 800 16px var(--sans); cursor: pointer; text-decoration: none; transition: transform .1s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary.dim { background: #6C4A33; }
.btn.primary.locked { background: var(--field); color: var(--accent-soft); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.12); font-weight: 700; }
.btn.ghost.danger { color: #FFB48A; height: 50px; font-size: 15px; border-color: rgba(255,255,255,.1); border-radius: 14px; }
.btn.outline { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.12); height: 48px; border-radius: 14px; font-weight: 700; font-size: 15px; }
.btn.outline.sm { height: 46px; border-radius: 12px; font-size: 14px; }
.btn.outline.card-bg { background: var(--card); height: 50px; }
.btn.dashed { background: transparent; color: var(--text); border: 1px dashed rgba(255,255,255,.18); height: 48px; border-radius: 14px; font-weight: 700; font-size: 15px; }
.btn.primary.sm { height: 48px; width: auto; padding: 0 18px; border-radius: 12px; font-size: 15px; }
.btn.primary.sm-h { height: 50px; border-radius: 14px; font-size: 15px; margin-top: 4px; }
.btn.social { height: 52px; border-radius: 14px; font-size: 15px; font-weight: 700; border: 1px solid rgba(255,255,255,.12); }
.btn.social.google { background: var(--text); color: #121212; }
.btn.social.google .g { font: 800 17px var(--sans); color: #4285F4; }
.btn.social.apple { background: #000; color: #fff; }
.text-btn { border: none; background: transparent; color: var(--muted); font: 600 14px var(--sans); cursor: pointer; padding: 6px; }
.text-btn.underline { text-decoration: underline; width: 100%; font-weight: 700; }

/* Formulários */
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted-2); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.08); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--text-3); }
.tinput {
  height: 50px; width: 100%; background: var(--card); border: 1px solid rgba(255,255,255,.1); border-radius: 12px;
  padding: 0 14px; font: 600 16px var(--sans); color: var(--text);
}
.tinput::placeholder { color: #6C6962; }
.tinput:focus { border-color: var(--accent); }
.tinput:disabled { opacity: .55; }
.pass-wrap { position: relative; }
.pass-wrap .tinput { padding-right: 84px; }
.pass-toggle { position: absolute; right: 6px; top: 7px; height: 36px; border: none; background: transparent; color: var(--accent-soft); font: 700 13px var(--sans); cursor: pointer; padding: 0 10px; }
.terms { display: flex; align-items: flex-start; gap: 10px; border: none; background: transparent; color: var(--text-3); font: 500 13px/1.45 var(--sans); text-align: left; padding: 4px 0; cursor: pointer; }
.terms a { color: var(--accent-soft); }
.terms .check { width: 20px; height: 20px; border-radius: 6px; flex: none; border: 1.5px solid #6C6962; display: flex; align-items: center; justify-content: center; color: var(--accent-ink); font-size: 13px; font-weight: 800; }
.terms.on .check { border-color: var(--accent); background: var(--accent); }
.terms.on .check::after { content: "✓"; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 12px; background: #2A1A12; color: #FFB48A; font-size: 13px; line-height: 1.4; }

/* Segmentado */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--card); border-radius: 14px; padding: 4px; }
.seg.three { grid-template-columns: 1fr 1fr 1fr; }
.seg button { border: none; border-radius: 10px; padding: 10px 0; font: 700 14px var(--sans); cursor: pointer; background: transparent; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.seg-badge { font: 700 10px var(--mono); background: var(--accent); color: var(--accent-ink); padding: 2px 5px; border-radius: 4px; }
.seg button.on .seg-badge { background: var(--accent-ink); color: var(--accent); }

/* Planos */
.plan-card { text-align: left; border: 2px solid rgba(255,255,255,.08); background: var(--card); border-radius: 20px; padding: 18px; cursor: pointer; color: var(--text); font-family: var(--sans); display: flex; flex-direction: column; gap: 12px; width: 100%; }
.plan-card.on { border-color: var(--accent); background: rgba(242,118,46,.07); }
.plan-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.plan-name { font: 800 20px var(--sans); }
.plan-name.lg { font-size: 22px; }
.tag { font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; background: var(--accent); color: var(--accent-ink); padding: 3px 7px; border-radius: 5px; align-self: flex-start; }
.tag.grey { background: var(--field); color: var(--text-3); align-self: center; }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price > span:first-child { font: 800 34px var(--sans); letter-spacing: -.03em; }
.plan-price .per { font-size: 15px; color: var(--muted); }
.plan-note { font-size: 13px; color: var(--accent-soft); margin-top: -8px; min-height: 18px; }
.feats { display: flex; flex-direction: column; gap: 8px; }
.feat { display: flex; gap: 10px; font-size: 14px; color: var(--text-2); }
.feat .ok { color: var(--accent); font-weight: 800; }
.feat .ok.muted { color: var(--muted); }

/* Pagamento */
.summary { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.summary-name { font-weight: 800; font-size: 16px; }
.summary-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.summary-total { font: 800 20px var(--sans); }
.radio-row { display: flex; align-items: center; gap: 12px; text-align: left; border: 1.5px solid rgba(255,255,255,.08); background: var(--card); border-radius: 14px; padding: 14px; cursor: pointer; color: var(--text); font-family: var(--sans); width: 100%; }
.radio-row.on { border-color: var(--accent); background: rgba(242,118,46,.07); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #6C6962; display: flex; align-items: center; justify-content: center; flex: none; }
.radio span { width: 10px; height: 10px; border-radius: 50%; }
.radio-row.on .radio { border-color: var(--accent); }
.radio-row.on .radio span { background: var(--accent); }
.pay-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pay-box.text { display: block; font-size: 14px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.qr { width: 168px; height: 168px; border-radius: 14px; background: var(--text); display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted-2); font: 500 12px/1.5 var(--mono); }
.pay-hint { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.4; margin: 0; }
.renew-note { font-size: 12px; color: var(--muted-2); margin: 16px 0 0; line-height: 1.45; text-align: center; }
.test-note { font-size: 12px; color: var(--accent-soft); line-height: 1.45; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(242,118,46,.08); border: 1px solid rgba(242,118,46,.2); }

/* Confirmação e listas */
.done-check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; }
.flow-body.center .section-label { margin: 6px 0 -6px; }
.list-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.list-row { width: 100%; display: flex; align-items: center; gap: 12px; border: none; border-top: 1px solid var(--line); background: transparent; color: var(--text); padding: 15px 16px; cursor: pointer; text-align: left; font-family: var(--sans); text-decoration: none; }
.list-row:first-child { border-top-color: transparent; }
.list-row.static { cursor: default; padding: 13px 14px; }
.list-row.danger .list-main { color: #FFB48A; }
.list-main { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; display: flex; flex-direction: column; }
.list-sub { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.list-sub.ok { color: var(--accent-soft); }
.chev-r { color: var(--muted-2); font-size: 20px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--field); color: var(--accent-soft); font: 700 13px var(--mono); display: flex; align-items: center; justify-content: center; flex: none; }

/* Calculadora: selo do plano, uso diário, salvar produto */
.plan-badge { margin-left: auto; font: 700 11px var(--mono); padding: 4px 8px; border-radius: 6px; background: var(--field); color: var(--text-3); }
.plan-badge.pro { background: var(--accent); color: var(--accent-ink); }
.upsell { width: 100%; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(242,118,46,.35); background: rgba(242,118,46,.08); border-radius: 14px; padding: 12px 14px; cursor: pointer; color: var(--text); text-align: left; font-family: var(--sans); }
.calc .upsell { margin-bottom: 16px; }
.upsell.big { padding: 14px 16px; border-radius: 16px; }
.upsell-text { flex: 1; font-size: 13px; font-weight: 600; display: flex; flex-direction: column; }
.upsell-text b { font-size: 15px; font-weight: 800; }
.upsell-cta { font-size: 13px; font-weight: 800; color: var(--accent-soft); }
.dots { display: flex; gap: 4px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: #3A3936; }
.dots span.on { background: var(--accent); }
.save-form { display: flex; gap: 8px; margin-top: 10px; }
.save-form .tinput { flex: 1; min-width: 0; height: 48px; }

/* Produtos */
.promo { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.promo-title { font: 800 20px/1.2 var(--sans); }
.promo-text { font-size: 14px; color: var(--muted); line-height: 1.45; margin: 0; }
.prod-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.prod-open { width: 100%; border: none; background: transparent; color: var(--text); text-align: left; font-family: var(--sans); padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.prod-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.prod-name { font-size: 16px; font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.prod-cost { font-size: 13px; color: var(--muted); white-space: nowrap; }
.prod-best { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.prod-best img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.prod-best-name { flex: 1; }
.prod-price { font: 800 17px var(--sans); color: var(--text); font-variant-numeric: tabular-nums; }
.prod-meta { font-size: 12px; color: var(--muted-2); }
.prod-del { border: none; background: transparent; color: var(--muted-2); font: 600 12px var(--sans); padding: 0 16px 12px; cursor: pointer; text-decoration: underline; }

/* Integrações */
.int-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; }
.int-btn { height: 36px; border-radius: 10px; padding: 0 14px; font: 700 13px var(--sans); cursor: pointer; flex: none; }
.int-btn.on { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); }
.int-btn.off { border: 1px solid rgba(255,255,255,.14); background: transparent; color: var(--text-2); }
.int-btn.pro { border: 1px solid var(--accent); background: transparent; color: var(--accent-soft); }

/* Mais, plano, perfil */
.profile-card { width: 100%; display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; cursor: pointer; color: var(--text); text-align: left; font-family: var(--sans); }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--field); color: var(--accent-soft); font: 800 18px var(--sans); display: flex; align-items: center; justify-content: center; flex: none; }
.avatar.xl { width: 76px; height: 76px; font-size: 28px; }
.profile-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.profile-name { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.profile-name.lg { font-size: 22px; }
.profile-mail { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 6px; text-align: center; }
.profile-card .plan-badge { margin-left: 0; }
.version { text-align: center; font: 500 11px var(--mono); color: #5C5952; margin-top: 16px; }
.plan-hero { background: var(--accent); color: var(--accent-ink); border-radius: 24px; padding: 20px; }
.active-tag { font: 700 11px var(--mono); background: var(--accent-ink); color: var(--accent); padding: 3px 8px; border-radius: 6px; }
.plan-hero-price { font: 800 34px var(--sans); letter-spacing: -.03em; margin-top: 10px; }
.plan-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(20,12,6,.18); }
.plan-hero-val { font-size: 15px; font-weight: 800; margin-top: 2px; }
.usage-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 20px; }
.usage-bars { display: flex; gap: 6px; margin-top: 10px; }
.usage-bars span { flex: 1; height: 6px; border-radius: 3px; background: #3A3936; }
.usage-bars span.on { background: var(--accent); }
.history { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.history-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.hint-12 { font-size: 12px; color: var(--muted-2); margin: 8px 0 0; }

/* Ajuda */
.faq { width: 100%; display: flex; flex-direction: column; gap: 8px; border: none; border-top: 1px solid var(--line); background: transparent; color: var(--text); padding: 16px; cursor: pointer; text-align: left; font-family: var(--sans); }
.faq:first-child { border-top-color: transparent; }
.faq-q { display: flex; width: 100%; gap: 10px; font-size: 15px; font-weight: 700; }
.faq-q > span:first-child { flex: 1; }
.faq-sign { color: var(--accent-soft); font-size: 18px; font-weight: 800; }
.faq-a { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* Barra de abas */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 8px calc(env(safe-area-inset-bottom) + 10px);
  background: #161615; border-top: 1px solid var(--line);
}
.tabbar button { border: none; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; cursor: pointer; color: var(--muted-2); font: 700 11px var(--sans); }
.tabbar button.on { color: var(--accent); }
