/* =========================================================
   LEITOR ANALÍTICO DE XML
========================================================= */

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

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

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

.af-xml-hero p{
  max-width:760px;
  margin:0 auto;
  font-size:18px;
  line-height:1.7;
  color:#475569;
}

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

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

/* =========================================================
   DROPZONE
========================================================= */

.af-xml-dropzone{
  max-width:720px;
  margin:36px auto 16px;
  padding:36px;
  text-align:center;
  background:rgba(255,255,255,.86);
  border:2px dashed #93c5fd;
  border-radius:24px;
  cursor:pointer;
  transition:.2s ease;
  box-shadow:0 24px 70px rgba(15,23,42,.08);
}

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

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

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

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

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

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

/* =========================================================
   CARDS
========================================================= */

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

.af-xml-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:26px;
  padding:26px;
  box-shadow:0 18px 50px rgba(15,23,42,.05);
}

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

.af-xml-card strong{
  display:block;
  font-size:34px;
  color:#0f172a;
}

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

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

/* =========================================================
   TOOLBAR
========================================================= */

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

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

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

.af-xml-btn,
.af-xml-btn-dark,
.af-btn-primary{
  border:0;
  cursor:pointer;
  font-weight:800;
  border-radius:999px;
  padding:15px 24px;
  transition:.2s ease;
}

.af-btn-primary{
  color:#fff;
  background:#0066d9;
  box-shadow:0 12px 30px rgba(0,102,217,.28);
}

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

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

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

/* =========================================================
   PAINEL DE COLUNAS
========================================================= */

.af-xml-columns-panel{
  display:none;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:24px;
  padding:24px;
  margin-bottom:22px;
  box-shadow:0 18px 45px rgba(15,23,42,.05);
}

.af-xml-columns-panel.active{
  display:block;
}

.af-xml-columns-panel h3{
  margin:0 0 10px;
  font-size:20px;
  color:#0f172a;
}

.af-xml-columns-panel p{
  margin:0 0 18px;
  color:#64748b;
}

.af-xml-columns-list{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}

.af-xml-columns-list label{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:14px;
  color:#334155;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:10px 12px;
}

/* =========================================================
   GRID
========================================================= */

.af-xml-table-wrap{
  width:100%;
  overflow:hidden;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:20px;
  padding:0;
  box-shadow:0 24px 70px rgba(15,23,42,.08);
}

#gridXML{
  min-height:600px;
}

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

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

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

.tabulator-col-title{
  font-weight:700 !important;
  color:#0f172a !important;
  font-size:14px;
  padding-left:6px;
  padding-right:6px;
}

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

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

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

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

.tabulator-cell{
  padding:16px 18px !important;
  line-height:1.5;
  color:#334155;
  font-size:14px;
}

.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;
}

.tabulator-row.tabulator-selected{
  background:#dbeafe !important;
}

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

.link-nota:hover{
  text-decoration:underline;
}

/* =========================================================
   SCROLLBAR
========================================================= */

.af-xml-table-wrap::-webkit-scrollbar,
.tabulator-tableholder::-webkit-scrollbar{
  height:12px;
  width:12px;
}

.af-xml-table-wrap::-webkit-scrollbar-thumb,
.tabulator-tableholder::-webkit-scrollbar-thumb{
  background:#cbd5e1;
  border-radius:999px;
}

.af-xml-table-wrap::-webkit-scrollbar-track,
.tabulator-tableholder::-webkit-scrollbar-track{
  background:#f1f5f9;
}

/* =========================================================
   RESPONSIVO
========================================================= */

@media(max-width:900px){

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

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

  .af-xml-columns-list{
    grid-template-columns:1fr 1fr;
  }

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

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

}

@media(max-width:560px){

  .af-xml-summary-cards,
  .af-xml-columns-list{
    grid-template-columns:1fr;
  }

  .af-xml-dropzone{
    padding:28px 20px;
  }

}