/* Criador Contratado Kwai — UI fiel ao app Kwai (tema claro, laranja #ff421c).
   Estudo de copy. Mobile-first, container 460px. */
:root {
  --kwai: #ff421c;
  --kwai-2: #ff4906;
  --kwai-3: #ffa930;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --ok-line: #bbf7d0;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --line: #ededf0;
  --txt: #1a1a1a;
  --muted: #9a9aa5;
  --muted-2: #c4c4cc;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: Roboto, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  background: var(--bg-soft);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }

#app {
  max-width: 460px; margin: 0 auto; min-height: 100dvh; background: var(--bg);
  position: relative; overflow-x: hidden;
}
.screen { display: none; min-height: 100dvh; animation: fade .3s ease; }
.screen.active { display: flex; flex-direction: column; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- header de marca ---------- */
.brandbar {
  height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.brandbar img { height: 24px; width: auto; }
.brandbar .pgtag { position: absolute; right: 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.brandbar .back { position: absolute; left: 10px; font-size: 22px; background: 0; border: 0; color: var(--txt); cursor: pointer; line-height: 1; }

/* progress de etapa (barra fininha sob o header) */
.stepbar { height: 4px; background: var(--bg-soft); }
.stepbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--kwai), var(--kwai-3)); transition: width .4s ease; }

.wrap { flex: 1; padding: 22px 20px calc(26px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.wrap.center { justify-content: center; align-items: center; text-align: center; }

h1 { font-size: 23px; font-weight: 800; line-height: 1.22; letter-spacing: -.3px; }
h2 { font-size: 19px; font-weight: 800; line-height: 1.25; }
.sub { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-top: 8px; }
.tiny { font-size: 12.5px; color: var(--muted); }

/* ---------- botões ---------- */
.btn {
  width: 100%; height: 52px; border: 0; border-radius: 999px; cursor: pointer;
  font-size: 16px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--kwai), var(--kwai-2));
  box-shadow: 0 10px 24px rgba(255,66,28,.28); transition: transform .1s ease, opacity .2s;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .5; box-shadow: none; cursor: not-allowed; }
.btn.soft { background: #fff; color: var(--kwai); border: 1.5px solid var(--line); box-shadow: none; }
.btn.ghost { background: var(--bg-soft); color: var(--txt); box-shadow: none; font-weight: 700; }
.btn.sm { height: 44px; font-size: 14.5px; }
.btn-row { margin-top: auto; padding-top: 18px; }

/* ---------- banner de ganhos ---------- */
.earn-banner {
  margin: 16px 0; padding: 16px 18px; border-radius: 16px; color: #fff; text-align: center;
  background: linear-gradient(135deg, var(--kwai), var(--kwai-3));
  box-shadow: 0 12px 28px rgba(255,66,28,.25);
}
.earn-banner .lbl { font-size: 13px; opacity: .92; }
.earn-banner .val { font-size: 30px; font-weight: 900; line-height: 1.1; margin-top: 2px; }
.earn-banner .val small { font-size: 15px; font-weight: 700; opacity: .9; }

/* ---------- lista de requisitos ---------- */
.req-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.req {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--bg);
}
.req .ric { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 auto; }
.req .rtx { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.3; }
.pill { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.pill.pend { background: #fff4e6; color: #c2410c; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- input @ ---------- */
.field { margin-top: 16px; }
.field label { font-size: 13px; font-weight: 700; color: var(--txt); display: block; margin-bottom: 7px; }
.input {
  width: 100%; height: 52px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg-soft);
  padding: 0 16px; font-size: 16px; color: var(--txt); outline: 0; transition: border-color .2s;
}
.input:focus { border-color: var(--kwai); background: #fff; }
.input::placeholder { color: var(--muted-2); }
.help { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.hint { font-size: 13px; color: #c2410c; background: #fff4e6; border-radius: 10px; padding: 9px 12px; margin-top: 10px; }

/* accordion */
.acc { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acc summary { list-style: none; cursor: pointer; padding: 13px 14px; font-size: 13.5px; font-weight: 700; color: var(--kwai); display: flex; align-items: center; gap: 6px; }
.acc summary::-webkit-details-marker { display: none; }
.acc .acc-body { padding: 0 14px 14px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.acc ol { margin: 6px 0 12px 18px; }

/* ---------- loader overlay (análise) ---------- */
.loader {
  position: absolute; inset: 0; background: rgba(255,255,255,.97); z-index: 30;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 30px; text-align: center;
}
.loader.active { display: flex; }
.spin { width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--bg-soft); border-top-color: var(--kwai); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader .lmsg { font-size: 16px; font-weight: 700; min-height: 24px; }

/* ---------- chip de perfil ---------- */
.profile-chip { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.pc-ava { position: relative; flex: 0 0 auto; }
.pc-ava img.av { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.pc-ava .seal { position: absolute; bottom: -2px; right: -2px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; }
.pc-info { flex: 1; min-width: 0; }
.pc-info .nm { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.pc-info .hd { font-size: 13px; color: var(--muted); }
.pc-info .st { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.pc-stats { display: flex; gap: 16px; margin-top: 5px; }
.pc-stats b { font-size: 14px; }
.pc-stats span { font-size: 11px; color: var(--muted); display: block; }
.badge-status { font-size: 12px; font-weight: 800; padding: 6px 11px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.badge-status.analise { background: #fff4e6; color: #c2410c; }
.badge-status.aprov { background: var(--ok-soft); color: var(--ok); }

/* perfil verificado (card de confirmação) */
.verified-card { margin-top: 16px; border: 1.5px solid var(--ok-line); background: #f3fdf6; border-radius: 16px; padding: 14px; }
.verified-card .vc-top { font-size: 13.5px; font-weight: 800; color: var(--ok); margin-bottom: 10px; }

/* ---------- métricas animadas ---------- */
.metrics { width: 100%; max-width: 320px; margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.metric .ml { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.metric .ml b { color: var(--kwai); }
.bar { height: 9px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--kwai), var(--kwai-3)); transition: width 1.1s cubic-bezier(.2,.7,.3,1); }

.dots-msg { font-size: 15px; color: var(--muted); min-height: 22px; margin-top: 6px; }

/* ---------- quiz ---------- */
.q-opts { display: flex; flex-direction: column; gap: 11px; margin-top: 22px; }
.q-opt {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--bg); cursor: pointer; font-size: 15px; font-weight: 600; text-align: left; transition: all .15s; width: 100%;
}
.q-opt .qmark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted-2); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.q-opt.sel { border-color: var(--kwai); background: #fff6f3; }
.q-opt.sel .qmark { border-color: var(--kwai); background: var(--kwai); color: #fff; }
.q-opt.sel .qmark::after { content: "✓"; font-size: 13px; }
.q-other { margin-top: 11px; }

/* ---------- gráfico de ganhos ---------- */
.earn-chart { margin: 18px 0; border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px 10px; background: var(--bg); position: relative; }
.earn-chart .ec-tag { position: absolute; top: 12px; right: 14px; font-size: 13px; font-weight: 900; color: var(--ok); }
.earn-chart svg { width: 100%; height: 130px; display: block; }
.earn-chart .ec-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; padding: 0 4px; }
.salary-box { display: flex; gap: 10px; margin: 4px 0 6px; }
.salary-box .sb { flex: 1; border: 1px solid var(--line); border-radius: 13px; padding: 12px; }
.salary-box .sb .k { font-size: 11.5px; color: var(--muted); }
.salary-box .sb .v { font-size: 16px; font-weight: 800; margin-top: 2px; }
.salary-box .sb .v.green { color: var(--ok); }
.bodycopy p { font-size: 14px; line-height: 1.6; color: #333; margin-bottom: 10px; }

/* check grande (aprovado) */
.big-check { width: 86px; height: 86px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; font-size: 44px; margin: 4px auto 14px; animation: pop .4s ease; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* botão selo (aprovação) */
.seal-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px solid var(--kwai); border-radius: 14px; background: var(--bg-soft); cursor: pointer; text-align: left; margin-top: 8px; }
.seal-btn img { width: 38px; height: 38px; }
.seal-btn .sbt { flex: 1; }
.seal-btn .sbt b { font-size: 14.5px; display: block; }
.seal-btn .sbt span { font-size: 12.5px; color: var(--muted); }
.seal-btn .chev { color: var(--kwai); font-size: 20px; }

/* ---------- planos ---------- */
.plans { display: flex; flex-direction: column; gap: 13px; margin-top: 16px; }
.plan { position: relative; border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; background: var(--bg); overflow: hidden; }
.plan.best { border-color: var(--kwai); box-shadow: 0 12px 28px rgba(255,66,28,.15); }
.plan .pemoji { font-size: 22px; }
.plan .pname { font-size: 16px; font-weight: 800; margin-top: 2px; }
.plan .pprice { font-size: 30px; font-weight: 900; color: var(--kwai); margin: 4px 0 2px; }
.plan .pprice small { font-size: 13px; font-weight: 700; color: var(--muted); }
.plan .pfee { font-size: 12px; color: var(--muted); }
.plan .pfeat { margin: 12px 0; display: flex; flex-direction: column; gap: 7px; }
.plan .pfeat li { list-style: none; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.plan .pfeat li::before { content: "✓"; color: var(--ok); font-weight: 900; flex: 0 0 auto; }
.plan .best-tag { position: absolute; top: 13px; right: -34px; transform: rotate(45deg); background: var(--kwai); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 40px; }

/* ---------- checkout ---------- */
.co-total { text-align: center; margin: 8px 0 16px; }
.co-total .k { font-size: 13px; color: var(--muted); letter-spacing: .5px; }
.co-total .v { font-size: 38px; font-weight: 900; color: var(--txt); }
.co-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.co-qr .qbox { width: 196px; height: 196px; border: 1px solid var(--line); border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 10px; }
.co-qr .qbox img { width: 100%; height: 100%; object-fit: contain; }
.co-code { width: 100%; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: #444; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; word-break: break-all; max-height: 84px; overflow: auto; }
.countdown { text-align: center; font-size: 14px; font-weight: 700; color: #c2410c; background: #fff4e6; border-radius: 999px; padding: 9px; margin: 14px 0; }
.countdown b { font-variant-numeric: tabular-nums; }
.scarcity { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 12px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: #1a1a1a; color: #fff; font-size: 13.5px; font-weight: 600; padding: 12px 18px; border-radius: 12px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 99; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* success */
.success-emoji { font-size: 60px; margin-bottom: 10px; }

/* ---------- header de perfil estilo Kwai (logada) ---------- */
.kwai-head { text-align: center; padding: 10px 0 2px; }
.kh-ava { position: relative; width: 88px; height: 88px; margin: 0 auto 10px; }
.kh-ava .av { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.kh-ava .seal { position: absolute; right: 0; bottom: 2px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; }
.kh-name { font-size: 20px; font-weight: 800; color: rgba(0,0,0,.88); display: flex; gap: 6px; justify-content: center; align-items: center; line-height: 1.2; }
.kh-name .kh-seal { width: 18px; height: 18px; }
.kh-handle { font-size: 14px; color: rgba(0,0,0,.64); margin-top: 2px; }
.kh-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 11px; font-size: 13px; font-weight: 800; padding: 7px 15px; border-radius: 999px; }
.kh-status.pend, .kh-status.analise { background: #fff4e6; color: #c2410c; }
.kh-status.aprov { background: var(--ok-soft); color: var(--ok); }
.kh-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.3s ease infinite; }
@keyframes blink { 50% { opacity: .3; } }
.kh-stats { display: flex; justify-content: center; gap: 34px; margin-top: 16px; }
.kh-stats b { display: block; font-size: 20px; font-weight: 800; color: rgba(0,0,0,.88); }
.kh-stats span { font-size: 13px; color: rgba(0,0,0,.64); }
.kh-sep { height: 1px; background: var(--line); margin: 16px 0 4px; }

/* ---------- seção de benefícios ---------- */
.benefits { margin: 4px 0 2px; }
.benefits h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.benefit { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.benefit:last-child { border-bottom: 0; }
.benefit .bic { width: 36px; height: 36px; border-radius: 10px; background: #fff4e6; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 auto; }
.benefit .btx b { font-size: 14px; display: block; line-height: 1.3; }
.benefit .btx span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* disclaimer rodapé */
.legal { font-size: 10.5px; color: var(--muted-2); text-align: center; line-height: 1.5; margin-top: 18px; }
