/* Garante que o atributo "hidden" do HTML sempre esconda o elemento, mesmo quando a classe
   dele define "display" (flex/grid/block). Sem esta regra, "display" de uma classe pode
   vencer o escondimento padrão do navegador e o elemento fica visível por engano. */
[hidden] { display: none !important; }

/* ---------- Página de uma ferramenta ---------- */
.ft-container { max-width: 760px; margin: 40px auto; padding: 40px 30px; background: #ffffff; border: 1px solid #eaeaea; border-radius: 4px; }
.ft-container h1 { font-size: 30px; font-weight: 900; color: #111; margin-bottom: 12px; border-bottom: 3px solid #cc0000; padding-bottom: 10px; }
.ft-intro { font-size: 16px; line-height: 26px; color: #444; margin-bottom: 28px; }
.ft-container h2 { font-size: 19px; font-weight: 700; color: #222; margin: 32px 0 12px; }
.ft-container p { font-size: 15px; line-height: 25px; color: #444; margin-bottom: 14px; }
.ft-container ol, .ft-container ul { margin: 0 0 14px 22px; color: #444; line-height: 25px; }
.ft-faq dt { font-weight: 700; color: #222; margin-top: 14px; }
.ft-faq dd { margin: 4px 0 0; color: #444; line-height: 24px; }
.ft-selo { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #1a7f37; background: #eafaf1; border: 1px solid #c6ebd4; border-radius: 20px; padding: 5px 12px; margin-bottom: 22px; }

/* ---------- Caixa de arrastar/escolher arquivo ---------- */
.ft-zona { border: 2px dashed #c9ced6; border-radius: 8px; padding: 40px 20px; text-align: center; background: #fafbfc; transition: background .15s, border-color .15s; }
.ft-zona-ativa { background: #fdecea; border-color: #cc0000; }
.ft-zona p { margin: 0 0 16px; color: #666; font-size: 14.5px; }
.ft-btn { display: inline-block; background: #cc0000; color: #fff; border: none; padding: 12px 24px; border-radius: 4px; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; }
.ft-btn:hover { background: #a30000; }
.ft-btn-secundario { background: #fff; color: #333; border: 1px solid #bbb; }
.ft-btn-secundario:hover { background: #eef1f5; }

/* ---------- Erro ---------- */
.ft-erro { margin-top: 16px; padding: 12px 14px; background: #fdecea; border: 1px solid #f3b7ae; border-radius: 4px; color: #b00020; font-size: 14px; }

/* ---------- Resultado da conversão ---------- */
.ft-resultado { text-align: center; padding: 10px 0; }
.ft-preview { max-width: 100%; max-height: 320px; border-radius: 6px; border: 1px solid #eaeaea; margin-bottom: 16px; }
.ft-info { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; font-size: 13.5px; color: #666; margin-bottom: 20px; }
.ft-info strong { color: #222; }
.ft-acoes { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Compressor: controle de qualidade ---------- */
.ft-campo-qualidade { margin: 18px 0; text-align: center; }
.ft-campo-qualidade label { display: block; font-weight: 700; color: #333; font-size: 14px; margin-bottom: 10px; }
.ft-campo-qualidade input[type="range"] { width: 100%; max-width: 360px; }
.ft-campo-qualidade .ft-qualidade-valor { font-weight: 800; color: #cc0000; }

/* ---------- Contador de palavras ---------- */
.ft-contador textarea { width: 100%; min-height: 220px; padding: 16px; border: 1px solid #c9ced6; border-radius: 6px; font-size: 15px; line-height: 1.6; font-family: inherit; box-sizing: border-box; resize: vertical; }
.ft-contador-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-top: 18px; }
.ft-contador-card { background: #f5f6f8; border: 1px solid #e0e3e8; border-radius: 6px; padding: 14px 10px; text-align: center; }
.ft-contador-card strong { display: block; font-size: 24px; color: #cc0000; font-weight: 900; }
.ft-contador-card span { font-size: 12.5px; color: #666; }
.ft-contador-rodape { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ---------- Gerador de senha ---------- */
.ft-senha-saida-caixa { display: flex; align-items: center; gap: 12px; background: #1f2937; border-radius: 6px; padding: 18px 20px; margin-bottom: 18px; }
.ft-senha-saida { flex: 1; color: #fff; font: 700 20px/1.4 ui-monospace, Consolas, monospace; word-break: break-all; }
.ft-senha-controles { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.ft-senha-controles > label { font-weight: 700; color: #333; font-size: 14px; display: flex; justify-content: space-between; }
.ft-senha-opcoes { display: flex; flex-wrap: wrap; gap: 14px; }
.ft-senha-opcoes label { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: #444; font-size: 14.5px; }
.ft-senha-forca-medidor { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.ft-senha-forca-barra { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.ft-senha-forca-texto { font-size: 13px; color: #666; margin-bottom: 18px; }
.ft-senha-acoes { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Gerador de QR Code ---------- */
.ft-qrcode input[type="text"] { width: 100%; padding: 13px 15px; border: 1px solid #c9ced6; border-radius: 4px; font-size: 15px; box-sizing: border-box; margin-bottom: 22px; }
.ft-qrcode-area { text-align: center; padding: 20px; background: #fafbfc; border: 1px dashed #c9ced6; border-radius: 8px; }
.ft-qrcode-canvas { max-width: 100%; height: auto; border-radius: 4px; }
.ft-qrcode-vazio { color: #888; font-size: 14.5px; padding: 60px 10px; }
.ft-qrcode-baixar { margin-top: 18px; }

/* ---------- Gerador de etiquetas ZPL ---------- */
.ft-zpl-aviso { background: #fff8e6; border: 1px solid #f0dca3; color: #7a5b00; border-radius: 6px; padding: 12px 15px; font-size: 13.5px; line-height: 1.5; margin-bottom: 22px; }
.ft-zpl-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.ft-zpl-preset { background: #fff; border: 2px solid #c9ced6; color: #333; padding: 11px 16px; border-radius: 6px; font-size: 14px; font-weight: 700; cursor: pointer; text-align: left; line-height: 1.3; }
.ft-zpl-preset small { display: block; font-weight: 500; color: #777; font-size: 12px; margin-top: 2px; }
.ft-zpl-preset:hover { border-color: #cc0000; }
.ft-zpl-preset.ativo { border-color: #cc0000; background: #fdecea; color: #a30000; }
.ft-zpl-campos { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 20px; }
.ft-zpl-campo { display: flex; flex-direction: column; gap: 6px; }
.ft-zpl-campo label { font-size: 13px; font-weight: 700; color: #333; }
.ft-zpl-campo input, .ft-zpl-campo select { padding: 9px 11px; border: 1px solid #c9ced6; border-radius: 4px; font-size: 14.5px; width: 110px; }
.ft-zpl-campo select { width: auto; }
.ft-zpl-polegadas { font-size: 12.5px; color: #888; align-self: center; margin-bottom: 9px; }
.ft-zpl-entrada { width: 100%; min-height: 220px; padding: 14px; border: 1px solid #c9ced6; border-radius: 6px; font: 13.5px/1.5 ui-monospace, Consolas, monospace; box-sizing: border-box; resize: vertical; margin-bottom: 16px; }
.ft-zpl-acoes-topo { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.ft-zpl-area { text-align: center; padding: 24px; background: #fafbfc; border: 1px dashed #c9ced6; border-radius: 8px; min-height: 180px; display: flex; align-items: center; justify-content: center; }
.ft-zpl-preview { max-width: 100%; max-height: 520px; border-radius: 2px; box-shadow: 0 1px 6px rgba(0,0,0,.15); background: #fff; }
.ft-zpl-vazio, .ft-zpl-carregando { color: #888; font-size: 14.5px; }
.ft-zpl-downloads { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 640px) { .ft-zpl-campo input, .ft-zpl-campo select { width: 100%; } }

/* ---------- Conversor de Word para PDF ---------- */
.ft-word-aviso-conversao { background: #eef6ff; border: 1px solid #bcdcff; color: #0a4a8f; border-radius: 6px; padding: 12px 15px; font-size: 13.5px; line-height: 1.5; margin-bottom: 18px; }
.ft-word-carregando { text-align: center; padding: 50px 10px; color: #888; font-size: 14.5px; }
.ft-word-pagina-wrap { background: #e9ebee; border-radius: 8px; padding: 30px 20px; margin-bottom: 20px; max-height: 640px; overflow: auto; }
.ft-word-pagina { background: #fff; max-width: 21cm; margin: 0 auto; padding: 2cm 2cm; box-shadow: 0 2px 10px rgba(0,0,0,.15); font-family: Georgia, 'Times New Roman', serif; font-size: 14.5px; line-height: 1.6; color: #111; }
.ft-word-pagina h1, .ft-word-pagina h2, .ft-word-pagina h3 { font-family: Georgia, 'Times New Roman', serif; margin: 0.6em 0 0.4em; }
.ft-word-pagina p { margin: 0 0 0.9em; }
.ft-word-pagina table { border-collapse: collapse; width: 100%; margin-bottom: 1em; }
.ft-word-pagina table td, .ft-word-pagina table th { border: 1px solid #999; padding: 6px 10px; }
.ft-word-pagina img { max-width: 100%; height: auto; }

/* Ao imprimir (ou "Salvar como PDF"), mostra só a folha do documento, sem menu/rodapé/etc. */
@media print {
    @page { margin: 0; }
    body * { visibility: hidden; }
    .ft-word-pagina, .ft-word-pagina * { visibility: visible; }
    .ft-word-pagina-wrap { position: absolute; left: 0; top: 0; width: 100%; max-height: none; overflow: visible; background: none; padding: 0; margin: 0; }
    .ft-word-pagina { box-shadow: none; max-width: none; margin: 0; }
}

/* ---------- Sorteador online ---------- */
.ft-sorteio { position: relative; }
.ft-sorteio-modos { display: flex; gap: 10px; margin-bottom: 22px; }
.ft-sorteio-modo { flex: 1; background: #fff; border: 2px solid #c9ced6; color: #444; padding: 14px; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; }
.ft-sorteio-modo:hover { border-color: #cc0000; }
.ft-sorteio-modo.ativo { border-color: #cc0000; background: #fdecea; color: #a30000; }
.ft-sorteio-nomes { width: 100%; min-height: 180px; padding: 14px; border: 1px solid #c9ced6; border-radius: 6px; font-size: 15px; line-height: 1.6; font-family: inherit; box-sizing: border-box; resize: vertical; }
.ft-sorteio-rodape-lista { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 14px; font-size: 13.5px; color: #666; }
.ft-sorteio-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #444; font-weight: 600; margin-bottom: 22px; }
.ft-sorteio-campo-numero { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.ft-sorteio-campo-numero label { font-weight: 700; color: #333; font-size: 14.5px; }
.ft-sorteio-campo-numero input { width: 120px; padding: 10px 12px; border: 1px solid #c9ced6; border-radius: 4px; font-size: 15px; }
.ft-sorteio-config { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.ft-sorteio-config > label { font-weight: 700; color: #333; font-size: 14.5px; display: flex; align-items: center; gap: 12px; }
.ft-sorteio-stepper { display: inline-flex; align-items: center; border: 1px solid #c9ced6; border-radius: 6px; overflow: hidden; }
.ft-sorteio-stepper button { width: 36px; height: 38px; border: none; background: #f5f6f8; font-size: 18px; font-weight: 800; color: #444; cursor: pointer; }
.ft-sorteio-stepper button:hover { background: #eaecef; }
.ft-sorteio-stepper input { width: 52px; border: none; border-left: 1px solid #c9ced6; border-right: 1px solid #c9ced6; text-align: center; font-size: 15px; font-weight: 700; height: 38px; }
.ft-sorteio-som { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #555; font-weight: 600; }
.ft-sorteio-sortear { display: block; width: 100%; font-size: 17px; padding: 15px; }

.ft-sorteio-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.72); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.ft-sorteio-anel { width: 180px; height: 180px; transform: rotate(-90deg); }
.ft-sorteio-anel circle { fill: none; stroke-width: 8; }
.ft-sorteio-anel circle:first-child { stroke: rgba(255,255,255,.25); }
.ft-sorteio-anel-progresso { stroke: #ff8a00; stroke-linecap: round; }
.ft-sorteio-contagem-overlay { flex-direction: column; }
.ft-sorteio-numero-contagem { position: absolute; font-size: 56px; font-weight: 900; color: #fff; }

.ft-sorteio-confete { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ft-sorteio-card { position: relative; background: #fff; border-radius: 12px; max-width: 420px; width: 100%; text-align: center; padding: 34px 28px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.ft-sorteio-fechar { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 24px; line-height: 1; color: #999; cursor: pointer; }
.ft-sorteio-trofeu { font-size: 44px; display: block; margin-bottom: 6px; }
.ft-sorteio-card h3 { font-size: 26px; font-weight: 900; color: #cc0000; margin: 0 0 4px; }
.ft-sorteio-id { display: block; font-size: 12.5px; color: #999; font-family: ui-monospace, Consolas, monospace; margin-bottom: 20px; }
.ft-sorteio-vencedores { text-align: left; margin-bottom: 22px; max-height: 240px; overflow-y: auto; }
.ft-sorteio-vencedor-linha { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.ft-sorteio-vencedor-linha:last-child { border-bottom: none; }
.ft-sorteio-posicao { background: #ff8a00; color: #fff; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.ft-sorteio-nome-vencedor { font-size: 17px; font-weight: 700; color: #222; word-break: break-word; }
.ft-sorteio-acoes-resultado { display: flex; gap: 10px; }
.ft-sorteio-acoes-resultado .ft-btn { flex: 1; }
@media (max-width: 480px) { .ft-sorteio-modos { flex-direction: column; } }

/* ---------- Gravador de áudio ---------- */
.ft-gravador { text-align: center; background: #fafbfc; border: 1px solid #eaeaea; border-radius: 10px; padding: 40px 24px; }
.ft-gravador-botao-grande { width: 92px; height: 92px; border-radius: 50%; border: none; background: #cc0000; color: #fff; font-size: 34px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(204,0,0,.35); }
.ft-gravador-botao-grande:hover { background: #a30000; }
.ft-gravador-dica { margin-top: 16px; color: #777; font-size: 14px; }
.ft-gravador-pulso { width: 92px; height: 92px; border-radius: 50%; background: #cc0000; display: flex; align-items: center; justify-content: center; margin: 0 auto; position: relative; }
.ft-gravador-pulso::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid #cc0000; animation: ft-pulso 1.4s ease-out infinite; }
@keyframes ft-pulso { 0% { transform: scale(0.9); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
.ft-gravador-tempo { display: block; font-size: 34px; font-weight: 900; color: #222; margin: 18px 0 14px; font-variant-numeric: tabular-nums; }
.ft-gravador-nivel { width: 100%; max-width: 320px; height: 10px; background: #e5e7eb; border-radius: 6px; overflow: hidden; margin: 0 auto 22px; }
.ft-gravador-nivel-barra { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #1a7f37, #f2a900 70%, #cc0000); transition: width .08s linear; }
.ft-gravador-parar { background: #222; color: #fff; border: none; padding: 12px 28px; border-radius: 6px; font-size: 15px; font-weight: 700; cursor: pointer; }
.ft-gravador-parar:hover { background: #000; }
.ft-gravador-player { width: 100%; max-width: 420px; margin: 0 auto 16px; display: block; }
.ft-gravador-info { color: #777; font-size: 13.5px; margin-bottom: 22px; }
.ft-gravador-acoes { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Conversor de áudio ---------- */
.ft-audio-progresso { text-align: center; padding: 30px 20px; }
.ft-audio-progresso-trilha { height: 10px; background: #e5e7eb; border-radius: 6px; overflow: hidden; max-width: 320px; margin: 0 auto 12px; }
.ft-audio-progresso-barra { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #cc0000, #f2a900); transition: width .15s linear; }
.ft-audio-progresso-texto { color: #666; font-size: 14px; }
.ft-audio-player { width: 100%; max-width: 420px; display: block; margin: 0 auto 14px; }

/* ---------- Conversor de vídeo ---------- */
.ft-video-aviso-tamanho { background: #fff8e6; border: 1px solid #f0dca3; color: #7a5b00; border-radius: 6px; padding: 12px 15px; font-size: 13.5px; line-height: 1.5; margin-bottom: 18px; }
.ft-video-carregando-motor, .ft-video-convertendo { text-align: center; padding: 34px 20px; }
.ft-video-progresso-trilha { height: 10px; background: #e5e7eb; border-radius: 6px; overflow: hidden; max-width: 340px; margin: 0 auto 12px; }
.ft-video-progresso-barra { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #cc0000, #f2a900); transition: width .15s linear; }
.ft-video-player { width: 100%; max-width: 480px; display: block; margin: 0 auto 14px; border-radius: 6px; background: #000; }

/* ---------- Gerador de slug ---------- */
.ft-slug label { display: block; font-weight: 700; color: #333; margin-bottom: 8px; font-size: 14.5px; }
.ft-slug input.ft-slug-entrada { width: 100%; padding: 12px 14px; border: 1px solid #c9ced6; border-radius: 4px; font-size: 15px; box-sizing: border-box; }
.ft-slug-caixa { display: flex; align-items: center; gap: 0; margin-top: 18px; background: #f5f6f8; border: 1px solid #e0e3e8; border-radius: 4px; padding: 14px 16px; flex-wrap: wrap; }
.ft-slug-prefixo { color: #888; font-size: 15px; white-space: nowrap; }
.ft-slug-saida { color: #111; font-weight: 700; font-size: 15px; word-break: break-all; flex: 1; }
.ft-slug-rodape { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.ft-slug-contagem { font-size: 13px; color: #888; }

/* ---------- Listagem /ferramentas ---------- */
.ft-lista-intro { max-width: 760px; margin: 40px auto 10px; padding: 0 30px; }
.ft-lista-intro h1 { font-size: 32px; font-weight: 900; color: #111; margin-bottom: 10px; }
.ft-lista-intro p { font-size: 16px; line-height: 26px; color: #555; }
.ft-grade { max-width: 1180px; margin: 20px auto 60px; padding: 0 30px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.ft-card { display: block; background: #fff; border: 1px solid #eaeaea; border-radius: 6px; padding: 22px; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.ft-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); }
.ft-card-icone { font-size: 30px; margin-bottom: 10px; display: block; }
.ft-card-categoria { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #cc0000; }
.ft-card h3 { font-size: 17px; color: #111; margin: 6px 0 8px; }
.ft-card p { font-size: 13.5px; color: #666; line-height: 20px; margin: 0; }

@media (max-width: 640px) {
  .ft-container { margin: 20px auto; padding: 26px 18px; }
  .ft-zona { padding: 28px 14px; }
}
