/* ============================================
   FERRAMENTAS — estilo compartilhado
   Segue a paleta do site: fundo #0b1020,
   azul #002DD2, verde de destaque #00E637
   ============================================ */

.tools-hero {
  padding: 70px 0 50px;
  background: linear-gradient(120deg, #061229, #0b2a94, #001a4d);
}

.tools-hero .kicker {
  opacity: .8;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 14px;
}

.tools-hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin: 10px 0 12px;
  line-height: 1.2;
}

.tools-hero .sub {
  color: rgba(255,255,255,0.70);
  max-width: 680px;
  font-size: 17px;
  line-height: 1.6;
}

.tools-breadcrumb {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 18px;
}

.tools-breadcrumb a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.tools-breadcrumb a:hover {
  color: #00E637;
}

/* ===== GRID DE FERRAMENTAS (índice) ===== */

.tools-section {
  padding: 60px 0 90px;
  background: #0b1020;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 10px;
}

.tool-card {
  background: #14192b;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 26px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all .25s ease;
}

.tool-card:hover {
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-3px);
}

.tool-card .icon {
  font-size: 30px;
  margin-bottom: 12px;
  display: block;
}

.tool-card h3 {
  color: #ffffff;
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
}

.tool-card p {
  color: rgba(255,255,255,0.75);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.tool-card .tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #00E637;
}

/* ===== PÁGINA DE FERRAMENTA INDIVIDUAL ===== */

.tool-page {
  padding: 50px 0 90px;
  background: #0b1020;
  min-height: 60vh;
}

.tool-intro {
  max-width: 720px;
  margin-bottom: 30px;
}

.tool-intro h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px;
}

.tool-intro p {
  color: rgba(255,255,255,0.72);
  font-size: 16px;
  line-height: 1.6;
}

.tool-panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 30px;
  max-width: 720px;
  backdrop-filter: blur(12px);
}

.tool-panel label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.85);
}

.tool-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tool-panel input[type="text"] {
  flex: 1;
  min-width: 220px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 13px 14px;
  color: #fff;
  font-size: 15px;
}

.tool-panel input[type="text"]::placeholder {
  color: rgba(255,255,255,0.5);
}

.tool-panel input[type="text"]:focus {
  outline: none;
  border-color: #00E637;
}

.tool-submit {
  background: #00E637;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s ease;
}

.tool-submit:hover {
  opacity: .88;
}

.tool-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.tool-error {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 77, 79, 0.12);
  border: 1px solid rgba(255, 77, 79, 0.4);
  color: #ffb3b4;
  font-size: 14px;
  display: none;
}

.tool-loading {
  margin-top: 18px;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  display: none;
}

/* ===== RESULTADOS ===== */

.tool-results {
  margin-top: 26px;
  display: none;
}

.result-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  margin-bottom: 20px;
  font-size: 15px;
}

.result-summary .badge {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

.result-summary.ok { background: rgba(0, 230, 55, 0.10); border: 1px solid rgba(0, 230, 55, 0.35); }
.result-summary.ok .badge { background: #00E637; color: #000; }

.result-summary.warn { background: rgba(255, 176, 32, 0.10); border: 1px solid rgba(255, 176, 32, 0.35); }
.result-summary.warn .badge { background: #ffb020; color: #000; }

.result-summary.bad { background: rgba(255, 77, 79, 0.10); border: 1px solid rgba(255, 77, 79, 0.35); }
.result-summary.bad .badge { background: #ff4d4f; color: #fff; }

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 22px;
}

.result-table th {
  text-align: left;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
}

.result-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.90);
  word-break: break-all;
}

.result-table tr:last-child td {
  border-bottom: none;
}

.check-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
}

.check-list .mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  margin-top: 1px;
}

.check-list li.pass .mark { background: #00E637; color: #000; }
.check-list li.fail .mark { background: #ff4d4f; color: #fff; }

.check-list .check-body strong {
  display: block;
  margin-bottom: 2px;
  color: #fff;
}

.check-list .check-body span {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
}

.tool-cta {
  margin-top: 26px;
  padding: 20px 22px;
  border-radius: 14px;
  background: rgba(0, 45, 210, 0.15);
  border: 1px solid rgba(0, 45, 210, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tool-cta p {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  max-width: 440px;
}

.tool-cta a {
  background: #00E637;
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 10px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .tools-hero h1 { font-size: 32px; }
  .tool-panel { padding: 22px; }
  .result-table { font-size: 13px; }
  .tool-cta { flex-direction: column; align-items: flex-start; }
}

/* ===== COMPONENTES EXTRA (gerador de senha, checkboxes, saída bruta) ===== */

.tool-field {
  margin-bottom: 18px;
}

.tool-field:last-child {
  margin-bottom: 0;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.slider-row input[type="range"] {
  flex: 1;
  accent-color: #00E637;
}

.slider-value {
  min-width: 34px;
  text-align: right;
  font-weight: 700;
  color: #fff;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
  accent-color: #00E637;
  width: 16px;
  height: 16px;
}

.output-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.output-box input[type="text"] {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  letter-spacing: .02em;
}

.copy-btn {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.18);
}

.strength-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
  margin-top: 14px;
}

.strength-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .2s ease, background .2s ease;
}

.strength-label {
  font-size: 13px;
  margin-top: 6px;
  color: rgba(255,255,255,0.65);
}

.raw-output {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 20px;
}

/* ===== CATEGORIAS NA PÁGINA ÍNDICE ===== */

.tool-category {
  margin-bottom: 50px;
}

.tool-category:last-child {
  margin-bottom: 0;
}

.tool-category h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.tool-category .cat-desc {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  margin: 0 0 20px;
}

/* ===== COMPRESSOR DE IMAGEM ===== */

.drop-zone {
  border: 2px dashed rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #00E637;
  background: rgba(0,230,55,0.05);
}

.drop-zone p {
  margin: 0;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
}

.drop-zone .drop-icon {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.compare-item {
  text-align: center;
}

.compare-item img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
}

.compare-item .compare-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin: 8px 0 2px;
}

.compare-item .compare-size {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.download-link {
  display: inline-block;
  margin-top: 20px;
  background: #00E637;
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 10px;
}

/* ===== QR CODE ===== */

.qr-output {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 24px;
  background: #fff;
  border-radius: 14px;
}

@media (max-width: 640px) {
  .compare-grid { grid-template-columns: 1fr; }
}

.tool-privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.68);
  max-width: 720px;
  margin-top: 70px;
}

.tool-privacy-note .icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ===== AJUSTES MOBILE ADICIONAIS ===== */

.unit-select {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 13px 14px;
  color: #fff;
  font-size: 15px;
}

@media (max-width: 480px) {
  /* Formulários com input + botão lado a lado — empilha em telas bem pequenas */
  .tool-form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-form-row input[type="text"],
  .tool-form-row select {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .tool-form-row .tool-submit {
    width: 100%;
  }

  /* Toggle Codificar/Decodificar, Texto/Arquivo — ocupa a largura toda */
  .mode-toggle {
    width: 100%;
  }

  .mode-toggle button {
    flex: 1;
    text-align: center;
    padding: 9px 8px;
  }

  /* Linhas de hash — empilha rótulo, valor e botão em vez de espremer numa linha */
  .hash-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .hash-row .algo {
    width: auto;
  }

  .hash-row button {
    align-self: flex-start;
  }

  /* QR Code — nunca estoura a largura da tela */
  .qr-output {
    padding: 16px;
  }

  .qr-output canvas,
  .qr-output img {
    max-width: 100%;
    height: auto;
  }

  /* Áreas de código (JSON/XML) — fonte um pouco menor pra caber mais linha */
  .code-area {
    font-size: 12px;
    min-height: 180px;
  }
}
