/* assets/estilos.css - tema claro, verde e profissional (com estados de erro e tooltip) */
:root{
  --bg:#f6fbf7;
  --panel:#ffffff;
  --border:#e6efe9;
  --accent:#25a66b;     /* verde principal */
  --accent-2:#1c8e5b;   /* verde escuro */
  --text:#102a1b;       /* texto principal */
  --muted:#5e7a6a;      /* texto auxiliar */
  --danger:#d23d3d;
  --warning:#c46a00;
  --radius:16px;
  --shadow:0 12px 30px rgba(16,42,27,.08);
  --tooltip-w: 420px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, #eaf6ef 0, transparent 60%),
    radial-gradient(1200px 600px at 90% 110%, #e9f5ee 0, transparent 60%),
    var(--bg);
  line-height:1.55;
}

.container{ max-width:1024px; margin:40px auto; padding:0 20px; }

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.header{
  display:flex; align-items:center; gap:16px; padding:24px;
  background:linear-gradient(120deg, rgba(37,166,107,.08), rgba(28,142,91,.04));
  border-bottom:1px solid var(--border);
}
.header img.logo{ width:100px;height:56px;border-radius:12px;object-fit:contain;background:#fff;border:1px solid #eef4f0; }
.header .titles{display:flex;flex-direction:column}
.header .titles h1{margin:0;font-size:1.35rem;letter-spacing:.2px}
.header .titles p{margin:4px 0 0;color:var(--muted);font-size:.95rem}
.badge{
  margin-left:auto; display:inline-block; padding:6px 10px; border-radius:999px;
  background:#edf7f1; border:1px solid #d6eee1; color:var(--accent); font-size:.8rem;
}

.content{padding:24px}

.section{
  padding:16px; border:1px dashed #e8f2ec; border-radius:12px; background:#fbfdfc; margin-bottom:16px;
}
.section h2{ margin:0 0 12px; font-size:1.08rem; color:#147a4b; }

/* Cabeçalho de seção com ações à direita */
.section-header{
  display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px;
}
.section-header h2{ margin:0; }

/* Grid utilitário 12 colunas */
.grid{ display:grid; gap:16px; grid-template-columns: repeat(12, 1fr); }

label{display:block;margin:.35rem 0 .25rem}
input[type=text], input[type=email], input[type=tel], input[type=url], textarea, select{
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid #dbe9e1; background:#fff; color:var(--text);
  outline:none; transition: box-shadow .15s ease, border-color .15s ease;
}
input:focus, textarea:focus, select:focus{ border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37,166,107,.12); }
textarea{min-height:120px;resize:vertical}

.hint{color:var(--muted);font-size:.9rem;margin-top:6px}
small.required{color:var(--muted)}

.checkbox-group, .radio-group{display:flex;flex-wrap:wrap;gap:12px}
.checkbox{
  display:flex;align-items:center;gap:8px; padding:8px 12px;border-radius:10px; background:#ffffff;border:1px solid #e6efe9;
}

.notice{ padding:12px 14px;border-radius:12px;margin-top:8px; }
.notice.warning{ background:#fff7e8;border:1px solid #ffe0b3;color:#8a5a00 }
.notice.danger{ background:#ffeceb;border:1px solid #ffd1cf;color:#8a1f1f }

.actions{display:flex;gap:12px;justify-content:flex-end;margin-top:16px}
button{
  padding:12px 18px;border:none;border-radius:12px;
  background:linear-gradient(180deg, var(--accent), var(--accent-2)); color:#ffffff; font-weight:700; cursor:pointer;
  box-shadow:0 8px 16px rgba(37,166,107,.22);
  transition:transform .08s ease, filter .15s ease;
}
button:hover{transform:translateY(-1px)}
button:active{transform:translateY(0); filter:brightness(.98)}
button.secondary{ background:#ffffff;border:1px solid #dbe9e1;color:var(--text); box-shadow:none; }

/* Footer */
.footer{
  padding:16px 24px;color:var(--muted);font-size:.9rem;border-top:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#fcfefc;
}
.footer .brand{display:flex;align-items:center;gap:10px}
.footer img.mini{width:24px;height:24px;background:#fff;border-radius:6px;object-fit:contain;border:1px solid #eef4f0}

/* Alerts */
.success{ padding:14px 16px;border-radius:12px;background:#edf7f1;border:1px solid #cfead9;color:#0e6a41;margin-bottom:16px }
.error{ padding:14px 16px;border-radius:12px;background:#ffeceb;border:1px solid #ffd1cf;color:#8a1f1f;margin-bottom:16px }
.help{color:var(--muted);font-size:.9rem;margin-top:8px}

/* Mensagens por campo + estado inválido */
.input-msg{font-size:.85rem;margin-top:4px;color:var(--muted)}
.input-msg.error{color:#8a1f1f}
input.invalid, textarea.invalid, select.invalid{
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px rgba(210,61,61,.10) !important;
}

/* Tooltip (?) à direita */
.help-wrap{ position:relative; }
.help-icon{
  width:28px;height:28px;border-radius:50%; border:1px solid #cfead9; background:#f2fbf6;
  color:#147a4b; font-weight:800; font-size:.95rem; line-height:28px; text-align:center; cursor:pointer;
}
.tooltip{
  position:absolute; right:0; top:calc(100% + 10px);
  width:min(var(--tooltip-w), 92vw);
  padding:12px 14px; border-radius:12px; background:#ffffff; border:1px solid #dbe9e1; box-shadow:var(--shadow); z-index:10;
}
.tooltip[hidden]{display:none}
.tooltip b{color:#0f6b41}

@media (max-width: 860px){
  .header{flex-direction:column; align-items:flex-start}
  .tooltip{ right:auto; left:0; }
}

input[type=file]{ background:#ffffff;border:1px solid #dbe9e1;padding:10px;border-radius:12px }
/* Ícone de ajuda inline no título */
.help-inline{
  display:inline-block;
  position:relative;
  margin-left:8px;
  vertical-align:middle;
}
.help-inline .help-icon{
  width:22px; height:22px; line-height:22px;
  font-size:.85rem; font-weight:800; text-align:center;
  border-radius:50%; border:1px solid #cfead9; background:#f2fbf6; color:#147a4b;
  cursor:pointer;
}
.help-inline .tooltip{
  position:absolute;
  left:0; top:calc(100% + 8px);
  width:min(420px, 92vw);
  padding:12px 14px; border-radius:12px; background:#fff;
  border:1px solid #dbe9e1; box-shadow:var(--shadow); z-index:10;
}
.help-inline .tooltip[hidden]{ display:none; }
.help-inline .tooltip b{ color:#0f6b41; }

/* ==== FIX: centralizar e “resetar” o botão de ajuda ==== */
button.help-icon{
  /* reseta coisas herdadas do estilo global de button */
  appearance: none;
  -webkit-appearance: none;
  padding: 0 !important;
  margin: 0;
  background: #f2fbf6 !important;
  box-shadow: none !important;
  border: 1px solid #cfead9 !important;

  /* círculo e centragem perfeita */
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* tipografia do “?” */
  font-weight: 700;
  font-size: 14px;
  line-height: 1; /* evita deslocamento vertical */
  color: #147a4b;
  vertical-align: middle;
}

button.help-icon:hover,
button.help-icon:focus{
  box-shadow: 0 0 0 4px rgba(37,166,107,.12) !important;
  outline: none;
}
/* Linkzinho para abrir o documento (ao lado do checkbox) */
.doc-link{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px; border:1px solid #dbe9e1;
  background:#ffffff; color:#147a4b; font-weight:600; font-size:.88rem;
  text-decoration:none; cursor:pointer;
}
.doc-link:hover{ box-shadow:0 0 0 4px rgba(37,166,107,.10); }

/* Modal genérico para exibir o documento */
.modal{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.35); z-index:1000; }
.modal.open{ display:flex; }
.modal-card{
  width:min(1000px, 92vw); height:min(80vh, 900px);
  background:#fff; border-radius:14px; box-shadow:0 20px 50px rgba(0,0,0,.25);
  overflow:hidden; display:flex; flex-direction:column; border:1px solid #e6efe9;
}
.modal-head{ display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid #eef4f0; background:#fbfdfc; }
.modal-head b{ color:#0f6b41; }
.modal-body{ flex:1; }
.modal-body iframe{ width:100%; height:100%; border:0; }
.modal-close{
  border:none; background:#F00; border:1px solid #dbe9e1; border-radius:10px; padding:6px 10px; cursor:pointer;
}
.modal-close:hover{ box-shadow:0 0 0 4px rgba(37,166,107,.10); }



