/* =========================================================
   EXTRATOR DE CHAVES DE ACESSO
========================================================= */

.af-keys-tool{
  background:#f5f7fb;
  color:#0f172a;
  min-height:100vh;
}

.af-keys-hero{
  padding:78px 0 48px;
  text-align:center;
  background:linear-gradient(180deg,#f8fafc 0%,#eef4ff 100%);
}

.af-keys-hero h1{
  max-width:900px;
  margin:18px auto;
  font-size:56px;
  line-height:1.05;
  letter-spacing:-.04em;
  color:#071633;
}

.af-keys-hero p{
  max-width:680px;
  margin:0 auto;
  font-size:15px;
  line-height:1.75;
  letter-spacing:-0.01em;
  color:#64748b;
  font-weight:400;
}

/* MODO DE OPERAÇÃO */

.af-keys-mode{
  max-width:720px;
  margin:28px auto 0;
  display:flex;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
}

.af-keys-mode label{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 16px;
  border-radius:999px;
  background:#fff;
  border:1px solid #dbe3ee;
  color:#334155;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}

.af-keys-mode input{
  accent-color:#005bd7;
}

/* DROPZONE */

.af-keys-dropzone{
  max-width:720px;
  margin:22px auto 16px;
  padding:28px;
  text-align:center;
  background:rgba(255,255,255,.86);
  border:2px dashed #93c5fd;
  border-radius:20px;
  cursor:pointer;
  transition:.2s ease;
  box-shadow:0 18px 45px rgba(15,23,42,.06);
}

.af-keys-dropzone:hover,
.af-keys-dropzone.dragover{
  background:#eff6ff;
  border-color:#2563eb;
  transform:translateY(-2px);
}

.af-keys-dropzone input{
  display:none;
}

.af-keys-dropzone strong{
  display:block;
  font-size:21px;
  color:#0f172a;
  margin-bottom:8px;
}

.af-keys-dropzone span{
  display:block;
  font-size:11px;
  color:#64748b;
}

.af-keys-actions{
  text-align:center;
  margin-top:18px;
}

.af-btn-primary{
  border:0;
  cursor:pointer;
  font-weight:800;
  border-radius:999px;
  padding:14px 23px;
  color:#fff;
  background:#0066d9;
  box-shadow:0 12px 30px rgba(0,102,217,.24);
  transition:.2s ease;
}

.af-btn-primary:hover{
  transform:translateY(-1px);
}

.af-keys-progress{
  max-width:720px;
  margin:16px auto 0;
  padding:13px 18px;
  border-radius:15px;
  background:#f8fafc;
  color:#475569;
  font-size:13px;
  border:1px solid #e2e8f0;
}

.af-keys-privacy{
  font-size:14px !important;
  color:#64748b !important;
  margin-top:18px !important;
}

/* RESULTADOS */

.af-keys-results{
  padding:60px 0 90px;
}

.af-keys-summary-cards{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:22px;
  margin-bottom:34px;
}

.af-keys-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:20px;
  padding:22px;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}

.af-keys-card span{
  display:block;
  font-size:14px;
  color:#64748b;
  margin-bottom:10px;
}

.af-keys-card strong{
  display:block;
  font-size:26px;
  color:#0f172a;
  line-height:1;
}

.af-keys-card-alert{
  background:linear-gradient(135deg,#005bd7,#003d99);
}

.af-keys-card-alert span,
.af-keys-card-alert strong{
  color:#fff;
}

/* TOOLBAR */

.af-keys-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:14px;
  margin-bottom:22px;
}

.af-keys-global-search{
  flex:1;
  min-width:320px;
  padding:14px 18px;
  border-radius:999px;
  border:1px solid #dbe3ee;
  background:#fff;
  font-size:14px;
  color:#0f172a;
}

.af-keys-global-search:focus{
  outline:none;
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

.af-keys-btn,
.af-keys-btn-dark{
  border:0;
  cursor:pointer;
  font-weight:800;
  border-radius:999px;
  padding:14px 23px;
  transition:.2s ease;
}

.af-keys-btn{
  background:#eaf2ff;
  color:#005bd7;
}

.af-keys-btn-dark{
  background:#071633;
  color:#fff;
}

.af-keys-btn:hover,
.af-keys-btn-dark:hover{
  transform:translateY(-1px);
}

/* GRIDS */

.af-keys-grid-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:20px;
  padding:20px;
  margin-bottom:24px;
  box-shadow:0 12px 35px rgba(15,23,42,.05);
}

.af-keys-grid-card h2{
  margin:0 0 14px;
  font-size:22px;
  color:#0f172a;
}

.af-keys-grid-card p{
  margin:0 0 18px;
  color:#64748b;
  line-height:1.7;
}

#gridChaves,
#gridSaltos{
  min-height:420px;
}

.tabulator{
  border:none !important;
  background:#fff !important;
  border-radius:14px !important;
  overflow:hidden;
  font-family:inherit;
}

.tabulator-header{
  background:#f8fafc !important;
  border-bottom:1px solid #e2e8f0 !important;
  padding-top:4px;
  padding-bottom:4px;
}

.tabulator-col{
  background:#f8fafc !important;
  border-right:1px solid #eef2f7 !important;
  padding:8px 0 !important;
}

.tabulator-col-title{
  font-weight:600 !important;
  color:#0f172a !important;
  font-size:12px;
  padding-left:4px;
  padding-right:4px;
}

.tabulator-header-filter{
  padding:6px 8px 9px !important;
}

.tabulator-header-filter input{
  height:32px;
  border:1px solid #dbe3ee !important;
  border-radius:10px !important;
  padding:6px 8px !important;
  background:#fff !important;
  font-size:12px !important;
}

.tabulator-cell{
  padding:11px 12px !important;
  line-height:1.35;
  color:#334155;
  font-size:13px;
}

.tabulator-row{
  border-bottom:1px solid #f1f5f9 !important;
}

.tabulator-row:hover{
  background:#f8fafc !important;
}

.tabulator-footer{
  background:#fff !important;
  border-top:1px solid #e2e8f0 !important;
  padding:12px;
}

.tabulator-page{
  border:none !important;
  background:#eef4ff !important;
  color:#005bd7 !important;
  border-radius:999px !important;
  padding:8px 14px !important;
  font-weight:700;
}

.tabulator-page.active{
  background:#005bd7 !important;
  color:#fff !important;
}

.af-chave-link{
  color:#005bd7;
  font-weight:700;
  text-decoration:none;
}

.af-chave-link:hover{
  text-decoration:underline;
}

.af-status-ok{
  display:inline-flex;
  padding:4px 10px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  font-weight:800;
  font-size:12px;
}

.af-status-alerta{
  display:inline-flex;
  padding:4px 10px;
  border-radius:999px;
  background:#fee2e2;
  color:#991b1b;
  font-weight:800;
  font-size:12px;
}

/* =========================================================
   BANNER FLUTUANTE WHATSAPP
========================================================= */

.af-keys-floating-whats{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9998;
  width:300px;
  padding:18px;
  background:#ffffff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:20px;
  box-shadow:0 22px 60px rgba(15,23,42,.14);
  animation:afFloatIn .35s ease;
}

.af-keys-floating-close{
  position:absolute;
  top:12px;
  right:12px;
  width:26px;
  height:26px;
  border:0;
  border-radius:999px;
  background:#f1f5f9;
  color:#64748b;
  cursor:pointer;
  font-size:17px;
  line-height:1;
}

.af-keys-floating-close:hover{
  background:#e2e8f0;
  color:#0f172a;
}

.af-keys-floating-badge{
  display:inline-flex;
  margin-bottom:11px;
  padding:6px 10px;
  border-radius:999px;
  background:#eaf2ff;
  color:#005bd7;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.af-keys-floating-whats strong{
  display:block;
  font-size:18px;
  line-height:1.2;
  color:#0f172a;
  margin-bottom:9px;
}

.af-keys-floating-whats p{
  margin:0 0 15px;
  color:#475569;
  font-size:13px;
  line-height:1.6;
}

.af-keys-whats-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  padding:12px 14px;
  border-radius:999px;
  background:#25D366;
  color:#fff;
  font-size:13px;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 12px 28px rgba(37,211,102,.26);
  transition:.2s ease;
}

.af-keys-whats-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 34px rgba(37,211,102,.34);
}

@keyframes afFloatIn{
  from{
    opacity:0;
    transform:translateY(14px) scale(.96);
  }

  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

/* RESPONSIVO */

@media(max-width:900px){

  .af-keys-hero{
    padding:72px 0 44px;
  }

  .af-keys-hero h1{
    font-size:38px;
  }

  .af-keys-summary-cards{
    grid-template-columns:1fr 1fr;
  }

  .af-keys-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .af-keys-global-search{
    min-width:100%;
  }

}

@media(max-width:768px){

  .af-keys-floating-whats{
    left:16px;
    right:16px;
    bottom:16px;
    width:auto;
  }

}

@media(max-width:560px){

  .af-keys-summary-cards{
    grid-template-columns:1fr;
  }

  .af-keys-dropzone{
    padding:24px 18px;
  }

}