/* ============================================================
   PDF Fácil — estilos do site
   ============================================================ */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #1f2430;
  --text-soft: #5b6473;
  --text-faint: #97a0ad;
  --accent: #c0392b;     /* vermelho PDF */
  --accent-dark: #9d2d22;
  --accent-bg: #fdecea;
  --ok: #1d9e75;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 860px; margin: 0 auto; padding: 28px 20px 80px; }

/* Cabeçalho */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px; background: rgba(247, 248, 250, .92);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--border);
}
.site-header .brand { font-weight: 700; font-size: 18px; color: var(--text); }
.site-header .brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--text-soft); font-size: 14px; }
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero { text-align: center; padding: 30px 0 10px; }
.hero h1 { font-size: 30px; font-weight: 700; margin: 0 0 8px; }
.hero p { margin: 0 0 6px; color: var(--text-soft); font-size: 17px; }
.privacy-badge {
  display: inline-block; margin-top: 14px !important;
  background: #e6f6f0; color: #0f6e56; font-size: 14px;
  padding: 8px 16px; border-radius: 999px;
}

/* Grade de ferramentas */
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin: 8px 0 30px;
}
.tool-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; cursor: pointer; font: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; transition: border-color .15s, transform .1s;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card .tc-ico { font-size: 26px; line-height: 1; }
.tool-card strong { font-size: 16px; }
.tool-card span:last-child { color: var(--text-faint); font-size: 13px; }

/* Painel de ferramenta */
.tool-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
}
.tool-panel h2 { margin: 6px 0 6px; font-size: 22px; }
.panel-desc { color: var(--text-soft); font-size: 14.5px; margin: 0 0 18px; }
.panel-desc code, .aviso code { background: #eef0f3; padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.voltar {
  font: inherit; font-size: 14px; cursor: pointer; color: var(--text-soft);
  background: none; border: none; padding: 0; margin-bottom: 6px;
}
.voltar:hover { color: var(--accent); }

input[type="file"], input[type="text"], select {
  font: inherit; font-size: 15px; width: 100%; max-width: 420px; display: block;
  margin-bottom: 14px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text);
}
.opts { display: flex; gap: 16px; flex-wrap: wrap; }
.opts label { font-size: 14px; color: var(--text-soft); }
.opts select { width: auto; min-width: 120px; }
.range-label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-soft); margin-bottom: 16px; flex-wrap: wrap; }
.range-label input { flex: 1; min-width: 160px; accent-color: var(--accent); }

button.primary {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 11px 22px;
}
button.primary:hover { background: var(--accent-dark); }
.mini-btn {
  font: inherit; font-size: 12px; cursor: pointer; margin-top: 6px;
  background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px;
}
.mini-btn:hover { border-color: var(--accent); }

.status { margin-top: 14px; font-size: 14px; min-height: 20px; color: var(--text-soft); }
.status.ok { color: var(--ok); font-weight: 600; }
.status.erro { color: var(--accent); font-weight: 600; }
.aviso {
  background: #fff7e6; color: #8a5b00; border-radius: 8px;
  padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px;
}

.img-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; margin-top: 16px; }
.img-cell { display: flex; flex-direction: column; align-items: center; }
.img-cell img { width: 100%; border: 1px solid var(--border); border-radius: 6px; }

/* Editor visual (assinar / adicionar) */
.sign-pad-wrap { margin: 4px 0 16px; }
.mini-label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
#signPad { border: 1px dashed var(--border); border-radius: 8px; background: #fff; touch-action: none; max-width: 100%; }
.pad-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pdf-nav { display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; font-size: 14px; color: var(--text-soft); }
.pdf-preview {
  position: relative; max-width: 100%; overflow: auto; margin: 6px 0 16px;
  border: 1px solid var(--border); border-radius: 8px; touch-action: none;
}
.pdf-preview canvas { display: block; }
.ov-img, .ov-text { position: absolute; touch-action: none; }
.ov-img { outline: 1px dashed var(--accent); }
.ov-text { white-space: nowrap; font-weight: 600; line-height: 1; padding: 2px; outline: 1px dashed var(--accent); }
.rsz {
  position: absolute; right: -7px; bottom: -7px; width: 15px; height: 15px;
  background: var(--accent); border: 2px solid #fff; border-radius: 50%; cursor: nwse-resize;
}

/* Em breve */
.soon { margin-top: 10px; }
.soon h2 { font-size: 18px; margin: 0 0 6px; }
.soon p { color: var(--text-soft); font-size: 14px; margin: 0 0 12px; }
.soon-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.soon-tags span {
  background: #eef0f3; color: var(--text-faint); font-size: 13px;
  padding: 6px 12px; border-radius: 999px;
}

.article h1 { font-size: 28px; font-weight: 700; margin: 0 0 6px; }
.article .lead { color: var(--text-soft); font-size: 17px; margin: 0 0 24px; }
.article h2 { font-size: 20px; font-weight: 600; margin: 28px 0 8px; }
.article h3 { font-size: 17px; font-weight: 600; margin: 20px 0 6px; }
.article p, .article li { font-size: 16px; color: var(--text); }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 6px 0; }
.article code { background: #eef0f3; padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.article .cta { display: inline-block; margin: 16px 0 4px; padding: 11px 22px; background: var(--accent); color: #fff; border-radius: 8px; font-weight: 600; }
.article .cta:hover { background: var(--accent-dark); text-decoration: none; }
.note-box { background: #e6f6f0; color: #0f6e56; border-radius: 8px; padding: 14px 18px; margin: 20px 0; font-size: 15px; }
.veja-tambem { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); }
.veja-tambem h2 { font-size: 17px; margin: 0 0 8px; }
.veja-tambem a { display: block; padding: 4px 0; }

.ad-slot {
  display: flex; align-items: center; justify-content: center; min-height: 90px; margin: 22px 0;
  border: 1px dashed var(--border); border-radius: var(--radius); background: #eef0f3;
}
.ad-slot span { color: var(--text-faint); font-size: 12px; }

.site-footer { border-top: 1px solid var(--border); padding: 28px 20px; text-align: center; color: var(--text-faint); font-size: 13px; }
.site-footer nav { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer nav a { color: var(--text-soft); }

/* Cookies */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.cookie-banner p { margin: 0; font-size: 13.5px; color: var(--text-soft); flex: 1 1 320px; }
.cookie-banner button {
  font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap;
  background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 9px 20px; font-weight: 600;
}
.cookie-banner button:hover { background: var(--accent-dark); }
.cookie-banner[hidden] { display: none; }

/* Doação Pix */
.donate-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: #e6f6f0; color: #0f6e56; border: 1px solid #bfe6d8; border-radius: 999px; padding: 8px 18px;
}
.donate-btn:hover { filter: brightness(.97); }
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  position: relative; width: 100%; max-width: 360px; text-align: center;
  background: var(--surface); border-radius: var(--radius); padding: 26px 24px;
}
.modal-card h3 { margin: 0 0 6px; font-size: 19px; }
.modal-card p.sub { margin: 0 0 18px; color: var(--text-soft); font-size: 14px; }
.modal-close { position: absolute; top: 10px; right: 14px; font-size: 24px; line-height: 1; background: none; border: none; cursor: pointer; color: var(--text-faint); }
#pixQr { display: flex; justify-content: center; margin-bottom: 16px; }
#pixQr img, #pixQr canvas { border-radius: 8px; }
.pix-code { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 11px; word-break: break-all; resize: none; color: var(--text-soft); background: #eef0f3; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.copy-btn { width: 100%; margin-top: 10px; font: inherit; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 11px; }
.copy-btn:hover { background: var(--accent-dark); }
.pix-config { background: #fdecea; color: #9d2d22; border-radius: 8px; padding: 14px 16px; font-size: 13.5px; text-align: left; line-height: 1.55; }
.pix-config code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
