/*
 * Pierre web — tema esqueumórfico: creme quente, couro, coral.
 * Relevo = luz vindo de cima à esquerda (sombra clara em cima/esquerda, escura embaixo/direita).
 * Sem dependência externa: a CSP só permite arquivos do próprio site, e nada de style="".
 */

:root {
  --creme: #ece4d6;
  --creme-fundo: #e7dece;
  --papel: #f7f2e9;
  --papel-2: #efe7da;
  --tinta: #2d2219;
  --suave: #75644f;
  --linha: #ddd1bf;
  --couro: #3b2a1f;
  --couro-2: #4e382a;
  --couro-luz: #6b4d39;
  --costura: rgb(236 214 182 / 38%);
  --coral: #df6447;
  --coral-2: #c24d33;
  --coral-sombra: #9f3c26;
  --salvia: #6d8b6f;
  --salvia-2: #4f6c52;
  --perigo: #b33a2a;
  --alerta: #8d5b12;

  --relevo: 7px 7px 16px rgb(110 84 58 / 22%), -6px -6px 14px rgb(255 252 246 / 85%);
  --relevo-baixo: 3px 3px 7px rgb(110 84 58 / 20%), -3px -3px 7px rgb(255 252 246 / 80%);
  --fundo-cavado: inset 3px 3px 7px rgb(110 84 58 / 22%), inset -3px -3px 7px rgb(255 252 246 / 85%);
  --brilho-topo: inset 0 1px 0 rgb(255 255 255 / 70%);
  --raio: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
.defs { position: absolute; }

html { background: var(--creme-fundo); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--tinta);
  font: 15.5px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgb(255 250 240 / 70%), transparent 55%),
    linear-gradient(180deg, var(--creme), var(--creme-fundo));
  background-attachment: fixed;
}

a { color: var(--coral-2); }
h1 { font-size: 1.65rem; line-height: 1.2; margin: 0 0 .35rem; letter-spacing: -.015em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; letter-spacing: -.005em; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.sub { color: var(--suave); margin: 0 0 1.5rem; }
.nota { color: var(--suave); font-size: .88rem; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.positivo { color: var(--salvia-2); }
.negativo { color: var(--tinta); }

/* ------------------------------------------------ couro (barra lateral) */

.couro {
  color: #f1e4d2;
  background:
    radial-gradient(circle at 30% 20%, rgb(255 255 255 / 6%) 0 1px, transparent 1.5px) 0 0 / 7px 7px,
    radial-gradient(circle at 70% 60%, rgb(0 0 0 / 12%) 0 1px, transparent 1.5px) 3px 3px / 9px 9px,
    linear-gradient(160deg, var(--couro-luz) 0%, var(--couro-2) 35%, var(--couro) 100%);
  box-shadow: 0 10px 24px rgb(59 42 31 / 35%), inset 0 1px 0 rgb(255 255 255 / 12%), inset 0 -2px 6px rgb(0 0 0 / 30%);
  position: relative;
}
.couro::after {  /* costura */
  content: "";
  position: absolute;
  inset: 7px;
  border: 1.5px dashed var(--costura);
  border-radius: inherit;
  pointer-events: none;
}

/* ------------------------------------------------ estrutura do app */

.app {
  flex: 1;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 1.75rem;
  padding: 1.25rem;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.lateral {
  position: sticky;
  top: 1.25rem;
  align-self: start;
  height: calc(100vh - 2.5rem);
  min-height: 460px;
  border-radius: 28px;
  padding: 1.6rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.marca { font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: inherit; text-decoration: none; padding: 0 .75rem; position: relative; z-index: 1; }
.lateral .marca span { color: #f3a184; }
.menu { display: grid; gap: .3rem; position: relative; z-index: 1; }
.menu a {
  display: flex; align-items: center; gap: .7rem;
  padding: .62rem .85rem; border-radius: 999px;
  color: #dccab4; text-decoration: none; font-weight: 500;
  transition: background .15s, color .15s, box-shadow .15s;
}
.menu a::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #8a6a52; box-shadow: inset 0 1px 1px rgb(0 0 0 / 40%);
}
.menu a:hover { color: #fff3e3; background: rgb(255 255 255 / 6%); }
.menu a:focus-visible { outline: 2px solid #f3a184; outline-offset: 2px; }
.menu a.ativo {
  color: var(--tinta);
  background: linear-gradient(180deg, #fbf6ee, #ebe0cf);
  box-shadow: 0 3px 8px rgb(0 0 0 / 35%), var(--brilho-topo);
}
.menu a.ativo::before { background: var(--coral); box-shadow: 0 0 0 3px rgb(223 100 71 / 25%); }
.menu .separador { height: 1px; margin: .6rem .8rem; background: rgb(236 214 182 / 18%); }

.lateral-pe { margin-top: auto; display: flex; align-items: center; gap: .65rem; padding: .5rem .4rem 0; position: relative; z-index: 1; }
.lateral-pe .quem-nome { flex: 1; min-width: 0; font-size: .9rem; line-height: 1.25; }
.lateral-pe .quem-nome small { display: block; }
.lateral-pe form { margin: 0; }
.link-claro { background: none; border: 0; padding: 0; font: inherit; font-size: .82rem; color: #e8b49e; cursor: pointer; text-decoration: underline; }

.area { min-width: 0; display: flex; flex-direction: column; }
.conteudo { width: 100%; padding: .5rem 0 2.5rem; flex: 1; }
.texto-longo { max-width: 760px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.texto-longo h2 { margin-top: 1.75rem; }
.rodape { text-align: center; padding: 1.25rem 1rem; font-size: .82rem; color: var(--suave); }
.rodape a { color: inherit; }

.cabecalho { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.cabecalho h1 { margin: 0; }
.cabecalho .sub { margin: .2rem 0 0; }

/* ------------------------------------------------ superfícies em relevo */

.cartao, .conexao, .vazio, .tabela-caixa {
  background: linear-gradient(145deg, #faf6ef, var(--papel-2));
  border-radius: var(--raio);
  box-shadow: var(--relevo), var(--brilho-topo);
  padding: 1.35rem;
}
.cartao h2 { margin-top: 0; }
.cartao > p { color: var(--suave); margin: 0; }
.cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; margin: 1rem 0 1.75rem; }
.cartao-link { text-decoration: none; color: inherit; transition: transform .15s; display: block; }
.cartao-link:hover { transform: translateY(-2px); }
.cartao-link:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.cavado { box-shadow: var(--fundo-cavado); border-radius: 14px; background: var(--papel-2); }
.cartao-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .9rem; }
.cartao-topo h2 { margin: 0; }
.cartao-topo a { font-size: .85rem; }

.grade { display: grid; gap: 1.4rem; margin-bottom: 1.4rem; }
.grade-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grade-meio { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; margin-bottom: 1.4rem; }
.kpi .rotulo { font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); display: flex; align-items: center; gap: .5rem; }
.kpi .valor { font-size: 1.7rem; font-weight: 750; letter-spacing: -.02em; margin-top: .5rem; font-variant-numeric: tabular-nums; }
.kpi .detalhe { font-size: .82rem; color: var(--suave); margin-top: .15rem; }
.ponto { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 1px 1px rgb(255 255 255 / 50%), 0 1px 2px rgb(0 0 0 / 25%); }
.ponto-salvia { background: var(--salvia); }
.ponto-coral { background: var(--coral); }
.ponto-couro { background: var(--couro-luz); }
.ponto-creme { background: #c9b79e; }

/* ------------------------------------------------ seletor de mês (pílula) */

.seletor-mes { display: inline-flex; align-items: center; gap: .25rem; padding: .3rem; border-radius: 999px; background: var(--papel-2); box-shadow: var(--fundo-cavado); }
.seletor-mes a, .seletor-mes span { padding: .4rem .8rem; border-radius: 999px; text-decoration: none; color: var(--tinta); font-weight: 600; font-size: .92rem; }
.seletor-mes a { color: var(--suave); }
.seletor-mes a:hover { color: var(--tinta); background: rgb(255 255 255 / 60%); }
.seletor-mes span { background: linear-gradient(180deg, #fffdf8, #f0e7d8); box-shadow: var(--relevo-baixo), var(--brilho-topo); min-width: 10.5rem; text-align: center; }

/* ------------------------------------------------ gráficos */

.grafico { width: 100%; height: auto; display: block; overflow: visible; }
.grafico .barra-entrada { fill: url(#gradSalvia); }
.grafico .barra-saida { fill: url(#gradCoral); }
.grafico .eixo { stroke: var(--linha); stroke-width: 1; }
.grafico text { fill: var(--suave); font-size: 11px; font-family: inherit; }
.grafico .destaque text { fill: var(--tinta); font-weight: 700; }
.legenda { display: flex; gap: 1.1rem; font-size: .82rem; color: var(--suave); margin-top: .5rem; }
.legenda span { display: inline-flex; align-items: center; gap: .4rem; }

.mostrador { display: grid; justify-items: center; text-align: center; }
.mostrador svg { width: 100%; max-width: 230px; height: auto; }
.mostrador .trilho { stroke: #dccfbc; stroke-width: 11; fill: none; stroke-linecap: round; }
.mostrador .arco { stroke: var(--salvia); stroke-width: 11; fill: none; stroke-linecap: round; }
.mostrador .arco.estourou { stroke: var(--coral); }
.mostrador .marca-escala { stroke: #b9a68c; stroke-width: 2; stroke-linecap: round; }
.mostrador .botao-gira { fill: url(#gradBotao); }
.mostrador .sombra-gira { fill: rgb(110 84 58 / 22%); }
.mostrador .aro { fill: none; stroke: rgb(255 255 255 / 80%); stroke-width: 1.5; }
.mostrador .indicador { stroke: var(--coral); stroke-width: 4; stroke-linecap: round; }
.mostrador .pct { fill: var(--tinta); font-size: 19px; font-weight: 750; font-family: inherit; }
.mostrador .pct-sub { fill: var(--suave); font-size: 8.5px; font-family: inherit; letter-spacing: .06em; }
.mostrador p { margin: .25rem 0 0; color: var(--suave); font-size: .9rem; }

.lista-barras { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.lista-barras li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .75rem; align-items: baseline; }
.lista-barras .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-barras .nome small { color: var(--suave); }
.lista-barras svg { grid-column: 1 / -1; width: 100%; height: 9px; display: block; }
.lista-barras .trilho-barra { fill: #e3d8c7; }
.lista-barras .cheio { fill: url(#gradCoral); }
.lista-barras .cheio-salvia { fill: url(#gradSalvia); }

/* ------------------------------------------------ formulários e botões táteis */

.form { display: grid; gap: 1rem; }
.form.estreito { max-width: 400px; }
.campo { display: grid; gap: .35rem; }
.campo label { font-weight: 600; font-size: .88rem; }
.campo input[type=text], .campo input[type=email], .campo input[type=password], .campo input[type=number],
.campo select, .filtros input, .filtros select, select.discreto {
  width: 100%; padding: .65rem .85rem; font: inherit; color: var(--tinta);
  border: 0; border-radius: 12px; background: var(--papel-2); box-shadow: var(--fundo-cavado);
}
.campo input:focus-visible, .filtros input:focus-visible, .filtros select:focus-visible, select.discreto:focus-visible {
  outline: 2px solid var(--coral); outline-offset: 2px;
}
.campo small { color: var(--suave); }
.campo small.erro, .erro-form { color: var(--perigo); }
.campo ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.campo ul label { font-weight: 400; display: flex; gap: .35rem; align-items: center; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400 !important; }

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.25rem; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 650; text-decoration: none; color: #fff;
  background: linear-gradient(180deg, #ec7a5e, var(--coral) 55%, var(--coral-2));
  box-shadow: 0 4px 0 var(--coral-sombra), 0 8px 16px rgb(159 60 38 / 30%), inset 0 1px 0 rgb(255 255 255 / 35%);
  transition: transform .08s, box-shadow .08s;
}
.botao:hover { filter: brightness(1.04); }
.botao:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--coral-sombra), 0 3px 6px rgb(159 60 38 / 25%), inset 0 1px 0 rgb(255 255 255 / 25%); }
.botao:focus-visible { outline: 2px solid var(--tinta); outline-offset: 3px; }
.botao.secundario {
  color: var(--tinta);
  background: linear-gradient(180deg, #fffdf8, #ebe1d1);
  box-shadow: 0 3px 0 #c9b9a2, 0 6px 12px rgb(110 84 58 / 18%), inset 0 1px 0 #fff;
}
.botao.secundario:active { box-shadow: 0 1px 0 #c9b9a2, 0 2px 4px rgb(110 84 58 / 18%); }
.botao.perigo { background: linear-gradient(180deg, #c9503f, var(--perigo)); box-shadow: 0 4px 0 #7f2519, 0 8px 16px rgb(127 37 25 / 25%); }
.botao.pequeno { padding: .35rem .8rem; font-size: .82rem; box-shadow: 0 2px 0 #c9b9a2, inset 0 1px 0 #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--coral-2); cursor: pointer; text-decoration: underline; }
.perigo-texto { color: var(--perigo); }

/* ------------------------------------------------ avisos */

.avisos { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .5rem; }
.aviso { padding: .75rem 1rem; border-radius: 14px; background: #e9efe6; border: 1px solid #cfdcc9; color: var(--salvia-2); box-shadow: var(--relevo-baixo); }
.aviso-error { background: #f8e4de; border-color: #ecc4b8; color: var(--perigo); }
.aviso-warning { background: #f6ead2; border-color: #e7d2a8; color: var(--alerta); }
.aviso-info { background: var(--papel); border-color: var(--linha); color: var(--tinta); }

/* ------------------------------------------------ tabelas */

.tabela { width: 100%; border-collapse: separate; border-spacing: 0; }
.tabela th, .tabela td { padding: .65rem .7rem; text-align: left; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tabela th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); font-weight: 650; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr:hover td { background: rgb(255 255 255 / 35%); }
.tabela td small { color: var(--suave); }
.tabela-caixa { padding: .5rem .9rem; overflow-x: auto; }
tr.ignorado td { color: var(--suave); }
tr.ignorado .descricao { text-decoration: line-through; text-decoration-color: rgb(117 100 79 / 55%); }
.form-linha { display: flex; gap: .35rem; align-items: center; margin: 0; }
select.discreto { padding: .35rem .6rem; font-size: .86rem; border-radius: 10px; min-width: 9.5rem; }
.js .so-sem-js { display: none; }

.filtros { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1.25rem; }
.filtros label { display: grid; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--suave); }
.filtros input, .filtros select { min-width: 10rem; }
.faixa-totais { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0 0 1rem; color: var(--suave); }
.faixa-totais strong { color: var(--tinta); font-variant-numeric: tabular-nums; }
.paginacao { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1.25rem; color: var(--suave); }

.selo { display: inline-block; font-size: .72rem; font-weight: 650; padding: .15rem .55rem; border-radius: 999px; background: #f6ddd4; color: var(--coral-2); }
.selo-salvia { background: #dfe8dc; color: var(--salvia-2); }

/* ------------------------------------------------ telas avulsas (login, termos) */

.cartao-central {
  width: calc(100% - 2rem); max-width: 440px; margin: 3.5rem auto; padding: 2.2rem;
  background: linear-gradient(145deg, #faf6ef, var(--papel-2));
  border-radius: 26px; box-shadow: var(--relevo), var(--brilho-topo); flex: 0 0 auto;
}
.area .cartao-central { margin-top: 1rem; }
.marca-grande { font-size: 2.3rem; letter-spacing: -.03em; }
.marca-grande span { color: var(--coral); }
.passos { padding-left: 1.2rem; display: grid; gap: .4rem; }
.qr { display: block; margin: 1rem auto; background: #fff; border-radius: 14px; padding: 6px; box-shadow: var(--relevo-baixo); }
.chave { word-break: break-all; }
.codigos { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin: 1rem 0 1.5rem; }
.codigos code { display: block; padding: .55rem; text-align: center; background: var(--papel-2); border-radius: 10px; box-shadow: var(--fundo-cavado); }
.secao { margin-top: 2.25rem; }
.secao.perigo h2 { color: var(--perigo); }

/* ------------------------------------------------ "Quem está usando?" (couro) */

.fundo-couro {
  color: #f1e4d2;
  background:
    radial-gradient(circle at 30% 20%, rgb(255 255 255 / 5%) 0 1px, transparent 1.5px) 0 0 / 7px 7px,
    radial-gradient(ellipse at 50% 30%, var(--couro-luz), var(--couro) 70%);
  background-attachment: fixed;
}
.fundo-couro .rodape { color: #b39b82; }
.tela-perfis { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; padding: 3rem 1rem; text-align: center; }
.tela-perfis h1 { font-size: 2.1rem; font-weight: 600; }
.tela-perfis .avisos { width: 100%; max-width: 420px; }
.grade-perfis { list-style: none; padding: 0; margin: 1rem 0 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.75rem; }
.perfil-card { display: grid; justify-items: center; gap: .65rem; color: #d6c3ad; text-decoration: none; }
.perfil-card:hover, .perfil-card:focus-visible { color: #fff; outline: none; }
.perfil-card:hover .avatar, .perfil-card:focus-visible .avatar { transform: translateY(-3px); box-shadow: 0 0 0 3px #f3dcc0, 0 12px 22px rgb(0 0 0 / 45%); }
.perfil-card .nome { font-size: 1.05rem; }
.claro { color: #d6c3ad; }
.form-pin { width: 100%; max-width: 270px; text-align: left; }
.form-pin label { color: #e8d7c2; }
.form-pin input { text-align: center; letter-spacing: .45em; font-size: 1.35rem !important; }

.avatar {
  display: inline-grid; place-items: center; width: 116px; height: 116px; border-radius: 28px;
  font-size: 2.7rem; font-weight: 750; color: #fff; text-decoration: none;
  box-shadow: 0 8px 18px rgb(0 0 0 / 35%), inset 0 2px 0 rgb(255 255 255 / 28%), inset 0 -4px 10px rgb(0 0 0 / 20%);
  transition: transform .15s, box-shadow .15s; text-shadow: 0 1px 2px rgb(0 0 0 / 30%);
}
.avatar-pequeno { width: 38px; height: 38px; border-radius: 12px; font-size: 1rem; flex: 0 0 auto; box-shadow: 0 3px 6px rgb(0 0 0 / 30%), inset 0 1px 0 rgb(255 255 255 / 28%); }
.avatar-medio { width: 52px; height: 52px; border-radius: 16px; font-size: 1.35rem; flex: 0 0 auto; }
.cor-azul { background: linear-gradient(160deg, #5e8fd8, #2f5fae); }
.cor-verde { background: linear-gradient(160deg, #7fa982, #4f7653); }
.cor-laranja { background: linear-gradient(160deg, #f0955f, #c9622d); }
.cor-roxo { background: linear-gradient(160deg, #9b7ac9, #694a9b); }
.cor-rosa { background: linear-gradient(160deg, #e48aa6, #b5506f); }
.cor-cinza { background: linear-gradient(160deg, #9a8f84, #6b6158); }

/* ------------------------------------------------ bancos, alertas, família */

.conexao { margin-bottom: 1.4rem; }
.conexao-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.conexao-topo h2 { margin: 0; }
.conexao-topo .nota { margin: .2rem 0 0; }
.acoes { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; justify-content: flex-end; }
.acoes form { margin: 0; }
.vazio h2 { margin-top: 0; }

.pessoas { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; margin-bottom: 1.4rem; }
.pessoa-topo { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.pessoa-topo h2 { margin: 0; }
.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .6rem .5rem; padding: .75rem; margin-bottom: .9rem; }
.numeros div { display: grid; gap: .1rem; }
.numeros small { color: var(--suave); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.numeros strong { font-variant-numeric: tabular-nums; font-size: .95rem; white-space: nowrap; }

.alerta-item { display: flex; gap: .9rem; align-items: flex-start; }
.alerta-item + .alerta-item { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--linha); }
.alerta-item p { margin: .15rem 0 0; color: var(--suave); }
.alerta-icone { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(180deg, #ec7a5e, var(--coral-2)); box-shadow: 0 2px 0 var(--coral-sombra), var(--brilho-topo); }
.alerta-icone.salvia { background: linear-gradient(180deg, #84a386, var(--salvia-2)); box-shadow: 0 2px 0 #3e5841; }

/* ------------------------------------------------ telas menores */

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade-2, .grade-meio { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .app { grid-template-columns: minmax(0, 1fr); padding: .9rem .9rem 6.5rem; gap: 1rem; }
  .lateral {
    position: fixed; top: auto; bottom: .75rem; left: .75rem; right: .75rem; z-index: 10;
    height: auto; min-height: 0; flex-direction: row; align-items: center; padding: .55rem; border-radius: 999px; gap: .25rem;
  }
  .lateral::after { inset: 4px; }
  .lateral .marca, .lateral-pe .quem-nome, .menu .separador { display: none; }
  .menu { display: flex; gap: .15rem; overflow-x: auto; flex: 1; scrollbar-width: none; }
  .menu a { padding: .5rem .75rem; font-size: .85rem; white-space: nowrap; }
  .menu a::before { display: none; }
  .lateral-pe { margin: 0; padding: 0 .2rem 0 0; }
  .lateral-pe form { display: none; }
  .kpis { gap: .9rem; }
  .kpi .valor { font-size: 1.3rem; }
  .cartao, .conexao, .vazio { padding: 1.05rem; }
  .avatar { width: 92px; height: 92px; font-size: 2.1rem; }
  .avatar-pequeno { width: 34px; height: 34px; font-size: .95rem; }
  .seletor-mes span { min-width: 8.5rem; }
  .cartao-central { padding: 1.5rem; margin: 1.5rem auto; }
}

.ponto { display: inline-block; flex: 0 0 auto; }
.seletor-mes .desligado { opacity: .35; pointer-events: none; }

/* ------------------------------------------------ meus dados e zona de perigo */

.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zona-perigo { margin-top: .4rem; background: linear-gradient(145deg, #faf1ec, #f1e2da); }
.zona-perigo h2 { color: var(--perigo); }
.zona-perigo > p { margin-bottom: 1rem; }
.form-perigo { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; max-width: 860px; }

@media (max-width: 760px) {
  .kpis-3 { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------ assistente */

.assistente { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.perguntas { display: grid; gap: .65rem; position: sticky; top: 1.25rem; }
.pergunta {
  display: block; padding: .8rem 1rem; border-radius: 16px; text-decoration: none; color: var(--tinta); font-weight: 550;
  background: linear-gradient(180deg, #fffdf8, #ede3d3);
  box-shadow: 0 3px 0 #cdbca4, 0 6px 12px rgb(110 84 58 / 14%), inset 0 1px 0 #fff;
  transition: transform .08s, box-shadow .08s;
}
.pergunta:hover { transform: translateY(-1px); }
.pergunta:active { transform: translateY(2px); box-shadow: 0 1px 0 #cdbca4, inset 0 1px 0 #fff; }
.pergunta:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.pergunta.ativa {
  color: #fff; background: linear-gradient(180deg, #ec7a5e, var(--coral) 55%, var(--coral-2));
  box-shadow: 0 3px 0 var(--coral-sombra), 0 6px 12px rgb(159 60 38 / 25%), inset 0 1px 0 rgb(255 255 255 / 30%);
}
.resposta { display: grid; gap: 1rem; min-width: 0; }
.balao { border-top-left-radius: 6px; }
.balao-topo { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.balao-topo h2 { margin: 0; font-size: 1.2rem; }
.selo-pierre {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; color: #f3dcc0; background: linear-gradient(160deg, var(--couro-luz), var(--couro));
  box-shadow: 0 3px 6px rgb(59 42 31 / 35%), inset 0 1px 0 rgb(255 255 255 / 15%);
}
.frase { font-size: 1.08rem; line-height: 1.55; margin: 0 0 1.1rem; }
.destaques { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.destaque { padding: .75rem .9rem; display: grid; gap: .15rem; }
.destaque small { color: var(--suave); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
.destaque strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.destaque.tom-bom strong { color: var(--salvia-2); }
.destaque.tom-atencao strong { color: var(--coral-2); }
.tabela-rolagem { overflow-x: auto; margin-bottom: .5rem; }
.dicas { margin: 1rem 0 0; padding: .9rem 1rem .9rem 2rem; border-radius: 14px; background: rgb(255 255 255 / 45%); color: var(--suave); display: grid; gap: .4rem; }
.links-resposta { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 0; }
.juntar { padding: .75rem; flex-wrap: wrap; gap: .6rem; }
.juntar label { font-weight: 600; }
.juntar input { flex: 1; min-width: 9rem; padding: .6rem .8rem; border: 0; border-radius: 10px; font: inherit; background: var(--papel); box-shadow: var(--relevo-baixo); }
.juntar input:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

@media (max-width: 900px) {
  .assistente { grid-template-columns: minmax(0, 1fr); }
  .perguntas { position: static; display: flex; overflow-x: auto; padding: .25rem .1rem .6rem; scrollbar-width: none; }
  .pergunta { flex: 0 0 auto; white-space: nowrap; }
}
