/* Butina — estilo do app (beta) */
:root {
  --verde: #01432F;
  --verde-2: #0B5A40;
  --verde-claro: #E4F0E6;
  --grama: #6FA74A;
  --couro: #D28E51;
  --couro-esc: #B06B2E;
  --marrom: #4B3527;
  --creme: #FBF7F0;
  --branco: #FFFFFF;
  --texto: #1E2A23;
  --texto-2: #5B675F;
  --linha: #E7E0D3;
  --alerta: #B3261E;
  --alerta-bg: #FDECEA;
  --atencao: #8A5300;
  --atencao-bg: #FFF4DF;
  --raio: 18px;
  --sombra: 0 2px 10px rgba(30, 42, 35, .07);
  --abas-h: 66px;
  --topo-seg: env(safe-area-inset-top, 0px);
  --baixo-seg: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--creme);
  color: var(--texto);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--verde-2); }
[hidden] { display: none !important; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--abas-h) + var(--baixo-seg) + 24px); }
#app.sem-abas { padding-bottom: 24px; }

.carregando { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--texto-2); font-weight: 700; }
.carregando img { border-radius: 18px; animation: pulsar 1.2s ease-in-out infinite; }
@keyframes pulsar { 50% { transform: scale(.94); opacity: .7; } }

/* ---------- topo ---------- */
.topo {
  background: var(--verde);
  color: #fff;
  padding: calc(14px + var(--topo-seg)) 16px 16px;
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
}
.topo h1 { font-size: 19px; font-weight: 800; margin: 0; flex: 1; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo .logo { height: 30px; width: auto; }
.topo-btn { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.topo-btn svg { width: 22px; height: 22px; }
.topo-espaco { flex: 1; }

.conteudo { padding: 16px; }
.titulo-secao { font-size: 13px; font-weight: 800; color: var(--texto-2); text-transform: uppercase; letter-spacing: .6px; margin: 22px 2px 10px; }
.titulo-secao:first-child { margin-top: 4px; }

/* ---------- cartões ---------- */
.cartao { background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); padding: 16px; margin-bottom: 12px; border: 1px solid rgba(0,0,0,.03); }
.cartao h2 { font-size: 18px; margin: 0 0 6px; font-weight: 800; }
.cartao h3 { font-size: 16px; margin: 0 0 4px; font-weight: 800; }
.cartao p { margin: 0 0 8px; color: var(--texto-2); }
.cartao p:last-child { margin-bottom: 0; }

.boas-vindas { background: linear-gradient(135deg, var(--verde) 0%, var(--verde-2) 100%); color: #fff; border-radius: 22px; padding: 18px 16px 0; display: flex; gap: 6px; overflow: hidden; margin-bottom: 14px; }
.boas-vindas .bv-texto { flex: 1; padding-bottom: 18px; }
.boas-vindas h2 { font-size: 22px; margin: 0 0 4px; font-weight: 900; line-height: 1.15; }
.boas-vindas p { margin: 0; color: rgba(255,255,255,.85); font-size: 15px; }
.boas-vindas img { width: 118px; height: auto; align-self: flex-end; margin-right: -6px; }
.masc-fundo { background: #fff; border-radius: 16px 16px 0 0; padding: 6px 6px 0; align-self: flex-end; }

.grade-atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.atalho { background: var(--branco); border: 1px solid rgba(0,0,0,.03); border-radius: var(--raio); box-shadow: var(--sombra); padding: 16px 14px; text-align: left; display: flex; flex-direction: column; gap: 10px; min-height: 118px; text-decoration: none; color: var(--texto); }
.atalho .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.atalho .ic svg { width: 24px; height: 24px; }
.atalho strong { font-size: 16px; font-weight: 800; line-height: 1.2; }
.atalho span { font-size: 13px; color: var(--texto-2); line-height: 1.3; }
.ic-verde { background: var(--verde-claro); color: var(--verde); }
.ic-couro { background: #F8E7D7; color: var(--couro-esc); }
.ic-grama { background: #E7F3DD; color: #3F7A22; }
.ic-marrom { background: #EFE6DF; color: var(--marrom); }

.lista { background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; margin-bottom: 12px; border: 1px solid rgba(0,0,0,.03); }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--linha); text-decoration: none; color: var(--texto); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.item:last-child { border-bottom: 0; }
.item .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.item .ic svg { width: 22px; height: 22px; }
.item .txt { flex: 1; min-width: 0; }
.item .txt strong { display: block; font-weight: 800; font-size: 15.5px; line-height: 1.25; }
.item .txt span { display: block; font-size: 13.5px; color: var(--texto-2); margin-top: 2px; }
.item .seta { color: #B7B0A3; flex: none; }
.item .seta svg { width: 20px; height: 20px; }
.item .mini { width: 52px; height: 68px; border-radius: 8px; object-fit: cover; background: #EEE7DA; flex: none; }
.item .num { font-size: 12px; font-weight: 800; color: var(--couro-esc); }
.item.feito .txt strong { color: var(--texto-2); }
.selo-feito { font-size: 12px; font-weight: 800; color: #3F7A22; background: #E7F3DD; border-radius: 99px; padding: 2px 8px; flex: none; }

/* ---------- formulários ---------- */
.campo { margin-bottom: 14px; }
.campo label { display: block; font-weight: 800; font-size: 14.5px; margin-bottom: 6px; }
.campo .ajuda { font-size: 13px; color: var(--texto-2); margin-top: 5px; }
.entrada { position: relative; display: flex; align-items: stretch; }
.entrada input, .entrada select, .campo > input, .campo > select, .campo > textarea {
  width: 100%; border: 1.5px solid var(--linha); background: #fff; border-radius: 14px; padding: 13px 14px; font-size: 17px; font-weight: 700; outline: none; min-height: 52px; appearance: none; -webkit-appearance: none;
}
.campo > select, .entrada select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235B675F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.entrada input:focus, .entrada select:focus, .campo > input:focus, .campo > select:focus { border-color: var(--grama); box-shadow: 0 0 0 3px rgba(111,167,74,.18); }
.entrada .un { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-2); font-weight: 800; font-size: 14px; pointer-events: none; }
.entrada.com-un input { padding-right: 76px; }
.linha-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.alternar { display: flex; background: #EEE7DA; border-radius: 14px; padding: 4px; margin-bottom: 16px; gap: 4px; }
.alternar button { flex: 1; border: 0; background: none; border-radius: 11px; padding: 10px 6px; font-weight: 800; font-size: 14px; color: var(--texto-2); line-height: 1.2; }
.alternar button.ativo { background: #fff; color: var(--verde); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 16px; padding: 15px 18px; font-weight: 900; font-size: 17px; background: var(--couro); color: #fff; box-shadow: 0 3px 0 var(--couro-esc); text-decoration: none; min-height: 54px; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--couro-esc); }
.btn svg { width: 20px; height: 20px; }
.btn-verde { background: var(--verde); box-shadow: 0 3px 0 #002519; }
.btn-claro { background: #fff; color: var(--verde); border: 1.5px solid var(--linha); box-shadow: none; }
.btn-texto { background: none; box-shadow: none; color: var(--verde-2); font-weight: 800; min-height: 44px; padding: 8px; }
.btn-perigo { background: #fff; color: var(--alerta); border: 1.5px solid #F2C4C0; box-shadow: none; }
.btn + .btn { margin-top: 10px; }
.btn[disabled] { opacity: .5; }

/* ---------- resultado das calculadoras ---------- */
.resultado { background: var(--verde); color: #fff; border-radius: 20px; padding: 18px 16px; margin: 16px 0 12px; }
.resultado .rotulo { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.75); }
.resultado .valor { font-size: 40px; font-weight: 900; line-height: 1.1; margin: 4px 0 2px; letter-spacing: -.5px; }
.resultado .valor small { font-size: 20px; font-weight: 800; margin-left: 4px; }
.resultado .sub { color: rgba(255,255,255,.85); font-size: 14.5px; }
.resultado .dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.resultado .dupla div { background: rgba(255,255,255,.1); border-radius: 14px; padding: 10px 12px; }
.resultado .dupla b { display: block; font-size: 22px; font-weight: 900; }
.resultado .dupla span { font-size: 12.5px; color: rgba(255,255,255,.8); }
.passos { background: #fff; border: 1.5px dashed var(--linha); border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.passos h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--texto-2); }
.passos ol { margin: 0; padding-left: 20px; }
.passos li { margin: 4px 0; font-size: 15px; }
.passos li b { font-weight: 900; }

.alerta, .atencao, .info { border-radius: 14px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; }
.alerta svg, .atencao svg, .info svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alerta { background: var(--alerta-bg); color: var(--alerta); font-weight: 700; }
.atencao { background: var(--atencao-bg); color: var(--atencao); font-weight: 700; }
.info { background: var(--verde-claro); color: var(--verde); font-weight: 600; }
.aviso-legal { font-size: 12.5px; color: var(--texto-2); text-align: center; margin: 18px 6px 4px; line-height: 1.4; }

/* ---------- agenda ---------- */
.lote-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.linha-tempo { position: relative; margin: 6px 0 4px; }
.etapa { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.etapa:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--linha); }
.etapa .bola { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid var(--linha); display: grid; place-items: center; font-weight: 900; font-size: 13px; color: var(--texto-2); flex: none; z-index: 1; }
.etapa.hoje .bola { background: var(--couro); border-color: var(--couro); color: #fff; }
.etapa.feita .bola { background: var(--grama); border-color: var(--grama); color: #fff; }
.etapa.feita .bola svg { width: 20px; height: 20px; }
.etapa .corpo { flex: 1; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: var(--sombra); border: 1px solid rgba(0,0,0,.03); }
.etapa.hoje .corpo { border: 2px solid var(--couro); }
.etapa .corpo strong { display: block; font-weight: 800; font-size: 15px; line-height: 1.25; }
.etapa .corpo .quando { font-size: 13.5px; color: var(--texto-2); margin-top: 2px; }
.etapa .corpo .acoes { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--linha); background: #fff; border-radius: 99px; padding: 5px 11px; font-size: 13px; font-weight: 800; color: var(--verde-2); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.chip svg { width: 15px; height: 15px; }
.chip.ativo { background: var(--grama); border-color: var(--grama); color: #fff; }
.falta { font-size: 12px; font-weight: 900; color: var(--couro-esc); background: #F8E7D7; border-radius: 99px; padding: 2px 8px; display: inline-block; margin-top: 4px; }
.etapa-edit { display: grid; grid-template-columns: 84px 1fr 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.etapa-edit input { border: 1.5px solid var(--linha); border-radius: 12px; padding: 10px; font-weight: 700; font-size: 15px; width: 100%; min-height: 46px; }
.etapa-edit .dnum { display: flex; align-items: center; border: 1.5px solid var(--linha); border-radius: 12px; background: #fff; padding-left: 10px; }
.etapa-edit .dnum span { font-weight: 900; color: var(--texto-2); }
.etapa-edit .dnum input { border: 0; padding-left: 2px; }
.btn-x { border: 0; background: #F3EEE6; border-radius: 12px; height: 46px; display: grid; place-items: center; color: var(--texto-2); }
.btn-x svg { width: 18px; height: 18px; }

/* ---------- biblioteca ---------- */
.busca { position: relative; margin-bottom: 14px; }
.busca input { width: 100%; border: 1.5px solid var(--linha); background: #fff; border-radius: 16px; padding: 14px 14px 14px 46px; font-size: 16px; font-weight: 700; min-height: 52px; outline: none; }
.busca input:focus { border-color: var(--grama); }
.busca svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--texto-2); }
.produtos { display: grid; gap: 12px; }
.produto { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); padding: 12px; text-decoration: none; color: var(--texto); border: 1px solid rgba(0,0,0,.03); }
.produto img { width: 74px; height: 98px; object-fit: cover; border-radius: 10px; background: #EEE7DA; flex: none; }
.produto strong { display: block; font-weight: 900; font-size: 17px; line-height: 1.2; }
.produto span { font-size: 13.5px; color: var(--texto-2); }
.barra { height: 6px; background: #EEE7DA; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.barra i { display: block; height: 100%; background: var(--grama); border-radius: 99px; }
details.modulo { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); margin-bottom: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,.03); }
details.modulo summary { list-style: none; padding: 14px 16px; display: flex; gap: 12px; align-items: center; cursor: pointer; }
details.modulo summary::-webkit-details-marker { display: none; }
details.modulo summary .n { width: 36px; height: 36px; border-radius: 11px; background: var(--verde-claro); color: var(--verde); display: grid; place-items: center; font-weight: 900; flex: none; }
details.modulo summary strong { flex: 1; font-weight: 800; line-height: 1.25; }
details.modulo summary small { display: block; font-weight: 700; color: var(--texto-2); font-size: 12.5px; }
details.modulo[open] summary { border-bottom: 1px solid var(--linha); }
details.modulo .lista { box-shadow: none; border-radius: 0; margin: 0; border: 0; }

.visor { position: fixed; inset: 0; background: #12160F; z-index: 60; display: flex; flex-direction: column; }
.visor-topo { display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--topo-seg)) 10px 10px; color: #fff; }
.visor-topo .tt { flex: 1; min-width: 0; }
.visor-topo .tt strong { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visor-topo .tt span { font-size: 12.5px; color: rgba(255,255,255,.65); }
.visor-img { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; align-items: flex-start; justify-content: center; touch-action: pan-x pan-y pinch-zoom; }
.visor-img img { width: 100%; max-width: 900px; height: auto; background: #fff; }
.visor-baixo { display: grid; grid-template-columns: 52px 1fr 52px; gap: 10px; padding: 10px 12px calc(10px + var(--baixo-seg)); background: #12160F; }
.visor-baixo .btn { min-height: 48px; font-size: 15px; padding: 10px; }
.visor-baixo .nav { background: rgba(255,255,255,.1); border: 0; border-radius: 14px; color: #fff; display: grid; place-items: center; }
.visor-baixo .nav svg { width: 22px; height: 22px; }
.visor-baixo .nav[disabled] { opacity: .3; }
.estrela.ativa { color: #F2C14E; }

/* ---------- checklist ---------- */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-bottom: 1px solid var(--linha); cursor: pointer; user-select: none; }
.check:last-child { border-bottom: 0; }
.check .caixa { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #C9C0B0; flex: none; display: grid; place-items: center; margin-top: 1px; background: #fff; }
.check .caixa svg { width: 18px; height: 18px; color: #fff; opacity: 0; }
.check.ok .caixa { background: var(--grama); border-color: var(--grama); }
.check.ok .caixa svg { opacity: 1; }
.check.ok span { color: var(--texto-2); text-decoration: line-through; }
.check span { font-weight: 700; font-size: 15.5px; }
.progresso-chk { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--texto-2); font-size: 14px; margin-bottom: 12px; }
.progresso-chk .barra { flex: 1; margin: 0; height: 8px; }

/* ---------- abas ---------- */
.abas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--linha); display: flex; justify-content: center; padding-bottom: var(--baixo-seg); box-shadow: 0 -2px 12px rgba(0,0,0,.05); }
.abas-dentro { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; max-width: 560px; }
.aba { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--abas-h); text-decoration: none; color: #8C877C; font-size: 11.5px; font-weight: 800; }
.aba svg { width: 25px; height: 25px; }
.aba.ativa { color: var(--verde); }
.aba.ativa .bolha { background: var(--verde-claro); }
.aba .bolha { border-radius: 99px; padding: 3px 14px; display: grid; place-items: center; }

/* ---------- entrada (login) ---------- */
.entrar { min-height: 100vh; background: var(--verde); color: #fff; display: flex; flex-direction: column; padding: calc(28px + var(--topo-seg)) 22px calc(28px + var(--baixo-seg)); }
.entrar .logo-grande { width: 210px; margin: 8px auto 4px; }
.entrar .lema { text-align: center; font-weight: 800; color: rgba(255,255,255,.85); margin: 0 0 18px; font-size: 16px; }
.entrar .masc { width: 190px; margin: 0 auto -8px; position: relative; z-index: 1; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
.entrar .masc-caixa { background: #fff; border-radius: 26px 26px 0 0; width: 210px; margin: 0 auto; padding: 10px 10px 0; }
.entrar .painel { background: #fff; color: var(--texto); border-radius: 24px; padding: 22px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.entrar .painel h1 { font-size: 22px; margin: 0 0 4px; font-weight: 900; }
.entrar .painel p { margin: 0 0 16px; color: var(--texto-2); font-size: 15px; }
.entrar .rodape { text-align: center; margin-top: 18px; font-size: 13px; color: rgba(255,255,255,.7); }
.erro-form { background: var(--alerta-bg); color: var(--alerta); border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 14px; margin-bottom: 12px; }

/* ---------- modal e aviso ---------- */
.modal { position: fixed; inset: 0; background: rgba(13, 22, 17, .55); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.modal-caixa { background: var(--creme); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 26px 26px 0 0; padding: 22px 18px calc(18px + var(--baixo-seg)); }
.modal-caixa h2 { margin: 0 0 6px; font-size: 21px; font-weight: 900; }
.modal-caixa ul { padding-left: 20px; margin: 10px 0 16px; }
.modal-caixa li { margin-bottom: 8px; font-size: 15px; }
.marcar { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-weight: 800; font-size: 15px; cursor: pointer; border: 1.5px solid var(--linha); }
.marcar input { width: 22px; height: 22px; accent-color: var(--verde); flex: none; margin: 1px 0 0; }
.aviso-flutuante { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--abas-h) + var(--baixo-seg) + 14px); background: var(--texto); color: #fff; border-radius: 14px; padding: 12px 16px; font-weight: 800; font-size: 14.5px; z-index: 90; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.25); text-align: center; }

.vazio { text-align: center; padding: 26px 14px; color: var(--texto-2); }
.vazio img { width: 120px; margin: 0 auto 10px; }
.vazio strong { display: block; color: var(--texto); font-size: 17px; font-weight: 900; margin-bottom: 4px; }
.etiqueta-beta { font-size: 11px; font-weight: 900; background: var(--couro); color: #fff; border-radius: 99px; padding: 2px 8px; letter-spacing: .4px; vertical-align: middle; }
.passo-instalar { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.passo-instalar b { width: 28px; height: 28px; border-radius: 50%; background: var(--verde); color: #fff; display: grid; place-items: center; flex: none; font-size: 14px; }

@media (min-width: 600px) {
  .modal { align-items: center; }
  .modal-caixa { border-radius: 26px; }
}
