/* App do cliente e do consultor (mobile-first) */
body.app { background: #E9EAE7; }
.shell { max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--bg); display: flex; flex-direction: column; position: relative; }
@media (min-width: 520px) { .shell { box-shadow: 0 0 0 1px var(--line); } }
.content { flex: 1; padding: 8px 20px 28px; display: flex; flex-direction: column; gap: 18px; }
.shell:has(.tabbar) .content { padding-bottom: 96px; }

.brandbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 6px; gap: 10px; }
.brandbar .brand img { display: block; width: 168px; height: auto; }
.brandbar.dark { background: #121316; padding: 14px 16px 14px 20px; }
.brandbar.dark .brand img { width: 150px; }
.staff-menu { display: flex; gap: 2px; }
.pill-pts { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-size: 13px; font-weight: 800; }
.pill-pts svg { color: var(--brand-2); }
.pill-pts:hover { color: #fff; }

.topbar { display: flex; align-items: center; gap: 6px; padding: 10px 12px 4px; }
.topbar-title { display: flex; flex-direction: column; }
.topbar-title strong { font-family: var(--display); font-size: 18px; }
.topbar-title span { font-size: 12px; color: var(--muted); font-weight: 600; }

.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); z-index: 20; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { color: var(--brand-deep); }

.footer-cta { position: sticky; bottom: 0; margin: auto -20px -28px; padding: 12px 20px calc(18px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.shell:has(.tabbar) .footer-cta { bottom: 72px; }

/* Hero */
.eyebrow { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 800; }
.hero h1 { font-size: 31px; line-height: 1.08; }
.hero p { font-size: 15px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; align-items: center; gap: 8px; }
.step svg { color: var(--brand-deep); }
.step b { font-size: 13px; display: block; }
.step span { font-size: 11px; color: var(--muted); }

/* Modelos */
.models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.model { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; }
.model input { position: absolute; opacity: 0; }
.model .ph { height: 92px; background: #EDEEEB; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.model .ph img { width: 100%; height: 100%; object-fit: cover; }
.model .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.model .name { font-family: var(--display); font-size: 16px; font-weight: 700; }
.model .desc { font-size: 12px; color: var(--muted); line-height: 1.35; }
.model:has(input:checked) { border-color: var(--brand); }
.model:has(input:checked) .ph { background: var(--brand-soft); color: var(--brand-ink); }
.model:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.model .tick { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 12px; background: var(--ink); color: var(--brand-2); display: none; align-items: center; justify-content: center; }
.model:has(input:checked) .tick { display: flex; }
.model.done { opacity: .6; }
.pts-chip { align-self: flex-start; margin-top: 4px; padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 11px; font-weight: 800; }

/* Seletores de dia/hora */
.pick-grid { display: grid; gap: 8px; }
.pick-days { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pick-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; }
.pick span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 15px; cursor: pointer; }
.pick-days .pick span { min-height: 62px; }
.pick span small { font-size: 12px; font-weight: 600; color: var(--muted); }
.pick span b { font-size: 18px; }
.pick input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pick input:checked + span small { color: #C9CFD5; }
.pick input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.pick input:disabled + span { border-style: dashed; background: transparent; color: #8A9199; text-decoration: line-through; cursor: not-allowed; }
.days-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; }
.days-scroll .pick-days { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 64px; }

/* Ingresso */
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.ticket .info { padding: 16px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ticket .val { font-size: 15px; font-weight: 800; }
.ticket .cut { border-top: 2px dashed var(--line); margin: 0 14px; }
.ticket .qr { padding: 16px 18px 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-box { width: 172px; height: 172px; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.qr-box img, .qr-box canvas { width: 100% !important; height: 100% !important; }
.code-big { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: 0.14em; }
.success-head { display: flex; align-items: center; gap: 12px; }
.success-dot { width: 48px; height: 48px; border-radius: 24px; background: var(--grad); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; }
.checklist svg { color: var(--brand-deep); margin-top: 2px; }

/* Selfie */
.cam { position: relative; height: 330px; border-radius: 22px; background: var(--ink); overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; }
.cam video, .cam img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam img.preview { transform: none; }
.cam .oval { position: absolute; width: 62%; height: 78%; border: 3px dashed var(--brand-2); border-radius: 50%; pointer-events: none; }
.cam .cam-msg { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 14px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* Estrelas e opções */
.stars { display: flex; gap: 8px; }
.stars label { cursor: pointer; }
.stars input { position: absolute; opacity: 0; }
.stars span { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; color: #8A929B; }
.stars input:focus-visible + span { outline: 3px solid var(--brand); }
.stars .on span { background: #FFF4D6; border-color: #F5CF7A; color: #B26B00; }
.stars .on svg { fill: #FFB300; }
.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* Prêmio liberado */
.prize { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding-top: 24px; }
.prize .ring { width: 96px; height: 96px; border-radius: 48px; background: var(--grad); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.prize .big { font-family: var(--display); font-size: 52px; font-weight: 700; line-height: 1; }

/* Saldo e listas */
.balance { display: flex; flex-direction: column; gap: 12px; }
.balance .num { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1; }
.balance .lbl { font-size: 12px; font-weight: 700; color: #B9C0C7; }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: #E6E8E4; }
.tabs a { min-height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 9px; color: #3A424B; text-decoration: none; font-size: 13px; font-weight: 700; }
.tabs a.on { background: var(--surface); color: var(--ink); font-weight: 800; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.chip-link { flex-shrink: 0; min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; }
.chip-link.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.item .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.item .ico img { width: 100%; height: 100%; object-fit: cover; }
.item .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .title { font-size: 14px; font-weight: 800; }
.item .sub { font-size: 12px; color: var(--muted); }
.item .ptsv { font-size: 12px; font-weight: 800; color: var(--brand-ink); }
.item .side { flex-shrink: 0; text-align: right; }
.rank-pos { width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.rank-pos.top { background: var(--brand-soft); color: var(--brand-ink); }
.meta-card .num { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; }
.trophy-box { width: 56px; height: 56px; border-radius: 16px; background: #2C2416; color: var(--brand-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tier { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.tier.done { border-color: #F5CF7A; background: #FFF8E8; }
.copy-box { display: flex; gap: 8px; }
.copy-box input { flex: 1; min-width: 0; }

/* Consultor */
body.staff { background: #1B1D21; }
.staff .content { background: var(--bg); }
.scan-cta { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--ink); color: #fff; text-decoration: none; }
.scan-cta:hover { color: #fff; }
.scan-cta .sq { width: 52px; height: 52px; border-radius: 14px; background: var(--grad); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.kpi span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.kpi b { font-family: var(--display); font-size: 24px; }
.time { font-family: var(--display); font-size: 15px; font-weight: 700; width: 48px; flex-shrink: 0; }
.timer { font-family: var(--display); font-size: 48px; font-weight: 700; letter-spacing: 0.02em; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stepper li { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.stepper li::before { content: ''; height: 4px; border-radius: 2px; background: var(--line); }
.stepper li.on { color: var(--brand-ink); font-weight: 800; }
.stepper li.on::before { background: var(--grad); }
.selfie-thumb { width: 56px; height: 56px; border-radius: 28px; object-fit: cover; background: var(--info-bg); flex-shrink: 0; }
.avatar { width: 48px; height: 48px; border-radius: 24px; background: var(--info-bg); color: var(--info); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
#reader { width: 100%; border-radius: 16px; overflow: hidden; background: #000; min-height: 260px; }
#reader video { border-radius: 16px; }

/* ---------------------------------------------------------------------------
   Computador (900px+): menu no topo, conteúdo largo, colunas
   --------------------------------------------------------------------------- */
.desk-only, .topnav { display: none; }
.landing, .landing-main, .landing-side, .dash, .dash-main, .dash-side, .two-col, .col-a, .col-b, .agenda-right { display: contents; }
/* No celular, a ordem da página inicial segue o fluxo: chamada, passos, modelos, prêmio, botão */
.landing .hero { order: 1; } .landing .steps { order: 2; } .landing .models-block { order: 3; } .landing .prize-card { order: 4; } .landing .footer-cta { order: 5; }

@media (min-width: 900px) {
  body.app:not(.staff) { background: var(--bg); }
  body.app:not(.staff) .shell { max-width: none; box-shadow: none; }
  body.app:not(.staff) .desk-only { display: flex; }
  body.app:not(.staff) .brandbar {
    position: sticky; top: 0; z-index: 30; gap: 24px;
    padding: 14px max(32px, calc((100% - 1160px) / 2));
    background: rgba(246, 246, 244, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  body.app:not(.staff) .brandbar .brand img { width: 184px; }
  body.app:not(.staff) .topnav { display: flex; gap: 4px; margin-left: auto; }
  .topnav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 700; }
  .topnav a:hover { background: #ECEDEA; color: var(--ink); }
  .topnav a.on { background: var(--ink); color: #fff; }
  .topnav a.on svg { color: var(--brand-2); }
  body.app:not(.staff) .tabbar { display: none; }
  body.app:not(.staff) .content,
  body.app:not(.staff) .shell:has(.tabbar) .content { padding: 28px max(32px, calc((100% - 1160px) / 2)) 72px; gap: 24px; }
  body.app:not(.staff) .topbar { padding: 24px max(32px, calc((100% - 1160px) / 2)) 0; }
  body.app:not(.staff) .content.narrow { width: 100%; max-width: 640px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
  body.app:not(.staff) .topbar.narrow { width: 100%; max-width: 640px; margin: 0 auto; padding-left: 20px; padding-right: 32px; }
  body.app:not(.staff) .topbar-title strong { font-size: 24px; }

  /* Botão de ação deixa de ser fixo no rodapé */
  body.app:not(.staff) .footer-cta, body.app:not(.staff) .shell:has(.tabbar) .footer-cta {
    position: static; margin: 4px 0 0; padding: 0; background: none; border: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px;
  }
  body.app:not(.staff) .footer-cta .btn-block { width: auto; min-width: 280px; }
  body.app:not(.staff) .content.narrow .footer-cta .btn-block { width: 100%; }
  body.app:not(.staff) .footer-cta > .row-between { width: 100%; }

  /* Página inicial (visitante) */
  .landing { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: start; padding-top: 24px; }
  .landing-main, .landing-side { display: flex; flex-direction: column; gap: 28px; }
  .landing .hero h1 { font-size: 56px; line-height: 1.03; max-width: 13ch; }
  .landing .hero p { font-size: 18px; max-width: 44ch; }
  .landing .steps { max-width: 560px; }
  .landing .prize-card { padding: 24px; border-radius: 24px; }

  /* Painel do participante */
  .dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .dash-main, .dash-side { display: flex; flex-direction: column; gap: 18px; }
  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .two-col.wide-b { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .col-a, .col-b { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

  .models { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .model .ph { height: 150px; }
  .model .name { font-size: 18px; }
  .list.grid-desk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .chips-scroll { margin: 0; padding: 0; flex-wrap: wrap; }
  .tabs { max-width: 420px; }

  /* Agendamento em duas colunas */
  .agenda-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .agenda-right { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 96px; }
  .days-scroll { margin: 0; padding: 0; overflow: visible; }
  .days-scroll .pick-days { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .agenda-form .footer-cta { flex-direction: column; align-items: stretch; }
  .agenda-form .footer-cta .btn-block { width: 100%; }

  .cam { height: 420px; }
  .ticket .qr-box { width: 200px; height: 200px; }
}

@media (min-width: 900px) and (max-width: 1100px) {
  body.app:not(.staff) .topnav a span { display: none; }
}
@media (min-width: 900px) {
  .landing-side .prize-card { order: -1; }
}
@media (min-width: 900px) {
  .two-col.rows-fit { grid-template-rows: auto 1fr; }
  .landing .hero h1 { max-width: 15ch; }
  .landing-side .models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-side .model .ph { height: 120px; }
}

/* Convite para instalar o app */
.install-card[hidden] { display: none; }
.install-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
