:root {
  --cor: #0e7c66; --cor-esc: #0a5f4e; --tinta: #13222e; --texto: #2b3036; --mut: #6b7280;
  --linha: #e5e7eb; --fundo: #f3f4f6; --card: #fff; --verde: #1fa855; --raio: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fundo); color: var(--texto); font-size: 15px; line-height: 1.4; }
body.travado { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.wrap { max-width: 560px; margin: 0 auto; padding: 12px 16px 60px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.mut { color: var(--mut); margin: 0; }
.mini { color: var(--mut); font-size: 12px; margin: 0; }
h2 { font-size: 17px; margin: 6px 0 0; display: flex; align-items: center; gap: 8px; }
h2 .cont { background: var(--cor); color: #fff; font-size: 12px; border-radius: 999px; padding: 1px 8px; }

/* cabeçalho */
.cab { position: sticky; top: 0; z-index: 20; background: var(--tinta); color: #fff; }
.topo { max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 6px; }
.marca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.marca strong { display: block; font-size: 16px; }
.marca small { display: block; color: #b4bac2; font-size: 12px; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--cor); display: grid; place-items: center; font-weight: 800; flex: none; }
.btn-topo { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.abas { max-width: 560px; margin: 0 auto; display: flex; gap: 6px; padding: 4px 16px 10px; }
.abas button { flex: 1; border: 0; border-radius: 10px; padding: 9px 4px; background: rgba(255,255,255,.08); color: #cfd4da; font-weight: 700; font-size: 14px; }
.abas button.on { background: #fff; color: var(--tinta); }
.abas button i { font-style: normal; background: var(--cor); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; margin-left: 3px; }

/* blocos */
.caixa { background: var(--card); border-radius: var(--raio); padding: 14px; display: grid; gap: 10px; }
.meta-dia { display: grid; gap: 6px; }
.meta-dia .barra { height: 10px; border-radius: 999px; background: var(--linha); overflow: hidden; }
.meta-dia .barra em { display: block; height: 100%; background: var(--cor); border-radius: 999px; }
.dica { background: #e6f4f0; color: #0a4a3d; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.alerta { background: #fff4e6; color: #8a4b12; border-radius: 12px; padding: 10px 12px; font-size: 13px; }

/* cards de pessoa */
.pessoa { background: var(--card); border-radius: var(--raio); padding: 12px 14px; display: grid; gap: 6px; border-left: 4px solid transparent; }
.pessoa.novo { border-left-color: #f0a33a; }
.pessoa.atraso { border-left-color: #d64545; }
.pessoa b small { font-weight: 500; color: var(--mut); font-size: 12px; }
.pessoa .linha { font-size: 13px; color: var(--mut); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11.5px; background: #eceef1; color: #4b5563; border-radius: 999px; padding: 2px 8px; }
.tag.verde { background: #e3f6ea; color: #157a3e; }
.tag.laranja { background: #fdeadb; color: #b14f0e; }
.tag.vermelho { background: #fdecea; color: #b42318; }
.acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.acoes button, .acoes a { border: 1px solid var(--linha); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--tinta); }
.acoes .forte { background: var(--verde); border-color: var(--verde); color: #fff; }
.acoes .perigo { color: #b42318; }

/* formulários */
.form { display: grid; gap: 10px; }
.form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--tinta); }
.form label small { font-weight: 400; color: var(--mut); }
.form input, .form select, .form textarea { width: 100%; border: 1.5px solid var(--linha); border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 15px; font-weight: 400; }
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--cor); }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.achou { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.achou span { background: #e3f6ea; color: #157a3e; border-radius: 999px; padding: 2px 8px; }
.achou span.nao { background: #eceef1; color: #6b7280; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 12px; padding: 12px; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn.cor { background: var(--cor); color: #fff; }
.btn.zap { background: var(--verde); color: #fff; }
.btn.sec { background: var(--fundo); color: var(--tinta); }
.btn.linha { background: #fff; color: var(--tinta); border: 1.5px solid var(--linha); }
.linha-btns { display: flex; gap: 8px; }
.linha-btns > * { flex: 1; }

/* lista */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--linha); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.chip.on { background: var(--tinta); color: #fff; border-color: var(--tinta); }

/* números */
.funil { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.funil div { background: #fff; border-radius: 10px; padding: 8px 4px; text-align: center; }
.funil b { display: block; font-size: 20px; color: var(--tinta); }
.funil span { display: block; font-size: 11px; color: var(--mut); line-height: 1.15; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th, .tabela td { padding: 6px 4px; border-bottom: 1px solid var(--linha); text-align: left; }
.tabela .n { text-align: right; white-space: nowrap; }

/* folha (sheet) */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(15,20,25,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet-corpo { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 16px 28px; display: grid; gap: 12px; }
.sheet-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet-topo h3 { margin: 0; font-size: 18px; }
.x { border: 0; background: var(--fundo); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; }
.texto { white-space: pre-wrap; background: var(--fundo); border-radius: 10px; padding: 10px; font-size: 13px; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px); opacity: 0; background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; transition: .25s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.caixa { min-width: 0; overflow-x: auto; }
.tabela th { font-size: 11.5px; color: var(--mut); font-weight: 600; }
