/* ==========================================================================
   Celular (PWA): navegação inferior, Início, Funil e Ficha do lead.
   Usa só os tokens de app.css; carregado depois dele.
   ========================================================================== */
.bnav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 4px var(--s1) calc(4px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.bnav a,
.bnav button {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  background: none;
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  position: relative;
  cursor: pointer;
}
.bnav a.on {
  color: var(--brand);
}
.bnav svg.i {
  width: 22px;
  height: 22px;
}
.bnav :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.bdot {
  position: absolute;
  top: 8px;
  left: calc(50% + 8px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
}
@media (max-width: 760px) {
  .bnav {
    display: flex;
  }
  .app > .side {
    display: none;
  }
  .app .main {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
  .topbar {
    padding: calc(12px + env(safe-area-inset-top)) var(--s4) 12px;
    gap: var(--s2);
  }
  .content {
    padding: var(--s4);
  }
}

/* Telas feitas para o celular: coluna única, centrada quando abertas no computador */
.mshell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.mshell .bnav {
  display: flex;
  position: sticky;
  left: auto;
  right: auto;
}
.mhead {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: calc(12px + env(safe-area-inset-top)) var(--s4) 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.mhead h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.mhello {
  min-width: 0;
}
.mhello small {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}
.mhello small::first-letter {
  text-transform: uppercase;
}
.mbody {
  flex: 1;
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  min-width: 0;
}
.mshell .btn-ic {
  width: 44px;
  height: 44px;
}
.mkpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mkpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mkpi span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.mkpi b {
  font-family: var(--f-num);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.mkpi small {
  font-size: 11px;
  color: var(--ink-3);
}
.mcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s3) var(--s4);
}
.mcard h2 {
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-bottom: var(--s1);
}
.mcard h2 a.chip {
  text-decoration: none;
}
.mli {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.mli .w {
  flex: 1;
  min-width: 0;
}
.mli .w b {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mli .w a,
.mlead .w a,
.mtask a {
  color: inherit;
  text-decoration: none;
}
.mli .w small,
.mlead .w small,
.mtask small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.mtask {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.mtask > span {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}
.mcheck {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
}
.mcheck::after {
  content: "";
  position: absolute;
  inset: -10px;
}
.mempty {
  font-size: 13px;
  color: var(--ink-3);
  padding: var(--s2) 0;
}
.msearch {
  position: relative;
  padding: 10px var(--s4);
  background: var(--surface);
}
.msearch svg.i {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-3);
}
.msearch .input {
  width: 100%;
  height: 44px;
  padding-left: 40px;
}
.mtabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px var(--s4) 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.mtab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 var(--s3);
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.mtab b {
  font-family: var(--f-num);
  font-size: 12px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  padding: 1px 7px;
}
.mtab.on {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.mtab.on b {
  color: var(--ink);
}
.msub {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  font-size: 12px;
  color: var(--ink-3);
}
.mlead {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mlead .top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mlead .w {
  flex: 1;
  min-width: 0;
}
.mlead .w b {
  display: block;
  font-size: 15px;
}
.mlead .mid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mlead .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-2);
}
.mlead .foot .btn-wa {
  height: 44px;
  flex: none;
}
.mfab {
  position: fixed;
  right: max(16px, calc(50% - 264px));
  bottom: calc(76px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  box-shadow: var(--sh-lift);
  z-index: 20;
}
.mfab svg.i {
  width: 24px;
  height: 24px;
}
.mbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.mbar span {
  font-weight: 700;
  font-size: 14px;
}
.mwho {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
}
.mwho h1 {
  font-size: 20px;
  margin: 0 0 4px;
}
.mwho .chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mmore {
  position: relative;
}
.mmore summary {
  list-style: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.mmore summary::-webkit-details-marker {
  display: none;
}
.mmenu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 10;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  box-shadow: var(--sh-lift);
  padding: 6px;
}
.mmenu a {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.mmenu a:hover {
  background: var(--surface-2);
}
.mwa {
  width: 100%;
  height: 52px;
  font-size: 15px;
  justify-content: center;
}
.macts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.macts .btn {
  height: 48px;
  justify-content: center;
}
.mnext {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s3);
}
.mnext > svg.i {
  color: var(--brand);
  flex: none;
}
.mnext div {
  flex: 1;
  min-width: 0;
}
.mnext b {
  display: block;
  font-size: 14px;
}
.mnext small {
  font-size: 12px;
  color: var(--ink-3);
}
.mdata {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px var(--s4);
  font-size: 13px;
  margin: 0;
}
.mdata dt {
  color: var(--ink-3);
}
.mdata dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}
.mev {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.mev .ic {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}
.mev .ic svg.i {
  width: 15px;
  height: 15px;
}
.mev .ic.wa {
  background: var(--ok-soft);
  color: var(--ok);
}
.mev .ic.buy {
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
}
.mev b {
  display: block;
  font-size: 13px;
}
.mev small {
  font-size: 12px;
  color: var(--ink-3);
}
dialog.sheet {
  margin: auto auto 0;
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding-bottom: calc(var(--s5) + env(safe-area-inset-bottom));
}
@media (min-width: 761px) {
  dialog.sheet {
    margin: auto;
    border-radius: var(--r-card);
    width: min(420px, calc(100vw - 32px));
  }
}
.sheet-list {
  display: flex;
  flex-direction: column;
  margin-top: var(--s2);
}
.sheet-list .grp {
  color: var(--ink-3);
  padding: var(--s3) 0 var(--s1);
}
.sheet-list a {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 48px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.sheet-list .cnt {
  background: var(--surface-2);
  color: var(--ink-2);
}
.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}
.sheet-foot form {
  display: contents;
}
.sheet-hint {
  margin-top: var(--s3);
}
.offline {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: var(--s3);
  padding: var(--s5);
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg);
}
.offline p {
  color: var(--ink-2);
  font-size: 14px;
}

/* Contêineres com rolagem própria prendem os elementos posicionados dentro deles (ex.: .sr-only),
   senão eles escapam para a direita e fazem a página inteira rolar no celular. */
.tbl-wrap,
.board {
  position: relative;
}
