/* =========================================================
   AUDITOR XML PIS/COFINS
   Arquivo: auditor-xml-pis-cofins.css
========================================================= */

.af-auditor-piscofins {
  min-height: calc(100vh - 44px);
  background:
    radial-gradient(circle at top center, rgba(0, 113, 227, 0.10), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
  color: #1d1d1f;
  font-family: inherit;
}

/* HERO */
.af-auditor-piscofins .af-auditor-hero {
  padding: 82px 20px 44px;
  text-align: center;
}

.af-auditor-piscofins .af-container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.af-auditor-piscofins .af-auditor-hero .af-container {
  max-width: 920px;
}

.af-auditor-piscofins .af-auditor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.af-auditor-piscofins .af-auditor-hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  color: #1d1d1f;
}

.af-auditor-piscofins .af-auditor-hero p {
  max-width: 760px;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.65;
  color: #5f6368;
}

/* UPLOAD */
.af-auditor-piscofins .af-auditor-upload {
  padding: 24px 20px;
}

.af-auditor-piscofins .af-auditor-upload-box {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.af-auditor-piscofins .af-auditor-upload-box h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #1d1d1f;
}

.af-auditor-piscofins .af-auditor-upload-box p {
  max-width: 640px;
  margin: 0 auto 24px;
  font-size: 16px;
  line-height: 1.6;
  color: #6e6e73;
}

/* INPUT XML */
.af-auditor-piscofins #xmlInput {
  display: block;
  width: 100%;
  max-width: 540px;
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px dashed rgba(0, 113, 227, 0.45);
  border-radius: 18px;
  background: #f8fbff;
  color: #1d1d1f;
  font-size: 14px;
  cursor: pointer;
}

.af-auditor-piscofins #xmlInput:hover {
  background: #f2f7ff;
  border-color: rgba(0, 113, 227, 0.7);
}

/* BOTÃO */
.af-auditor-piscofins #btnAnalisarXML {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  background: #0071e3;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.24);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.af-auditor-piscofins #btnAnalisarXML:hover {
  transform: translateY(-1px);
  background: #0066cc;
  box-shadow: 0 16px 34px rgba(0, 113, 227, 0.30);
}

.af-auditor-piscofins #btnAnalisarXML:active {
  transform: translateY(0);
}

/* STATUS */
.af-auditor-piscofins #statusAuditoria {
  min-height: 22px;
  margin-top: 18px;
  font-size: 14px;
  color: #5f6368;
}

/* RESULTADOS */
.af-auditor-piscofins .af-auditor-resultados {
  padding: 30px 20px 90px;
}

.af-auditor-piscofins .af-auditor-resultados .af-container {
  max-width: 980px;
}

.af-auditor-piscofins .af-auditor-resultados h2 {
  margin: 0 0 18px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #1d1d1f;
}

.af-auditor-piscofins #resultadoAuditoria {
  padding: 30px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.07);
  color: #5f6368;
}

.af-auditor-piscofins #resultadoAuditoria p {
  margin: 0;
}

/* CARD DE PRODUTO FUTURO */
.af-auditor-piscofins .af-auditor-card-produto {
  padding: 18px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid rgba(0, 113, 227, 0.12);
}

.af-auditor-piscofins .af-auditor-card-produto strong {
  color: #1d1d1f;
}

/* TABELA FUTURA */
.af-auditor-piscofins .af-auditor-tabela {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
}

.af-auditor-piscofins .af-auditor-tabela th,
.af-auditor-piscofins .af-auditor-tabela td {
  padding: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  font-size: 14px;
}

.af-auditor-piscofins .af-auditor-tabela th {
  color: #1d1d1f;
  font-weight: 800;
  background: #f8fbff;
}

/* RESPONSIVO */
@media (max-width: 768px) {
  .af-auditor-piscofins .af-auditor-hero {
    padding: 64px 18px 34px;
  }

  .af-auditor-piscofins .af-container {
    padding: 0 16px;
  }

  .af-auditor-piscofins .af-auditor-hero p {
    font-size: 16px;
  }

  .af-auditor-piscofins .af-auditor-upload-box {
    padding: 24px;
    border-radius: 22px;
  }

  .af-auditor-piscofins .af-auditor-upload-box h2 {
    font-size: 24px;
  }

  .af-auditor-piscofins #resultadoAuditoria {
    padding: 22px;
  }
}
.af-auditor-piscofins .af-auditor-item-card {
  margin-top: 18px;
  padding: 20px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.af-auditor-piscofins .af-auditor-item-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.af-auditor-piscofins .af-auditor-item-topo strong {
  font-size: 16px;
  line-height: 1.45;
  color: #1d1d1f;
}

.af-auditor-piscofins .af-auditor-item-dados {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  color: #5f6368;
  font-size: 14px;
}

.af-auditor-piscofins .af-score-badge {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.af-auditor-piscofins .af-score-baixo {
  background: #e8f7ef;
  color: #137333;
}

.af-auditor-piscofins .af-score-medio {
  background: #fff8e6;
  color: #9a6700;
}

.af-auditor-piscofins .af-score-alto {
  background: #fdeaea;
  color: #b42318;
}

@media (max-width: 768px) {
  .af-auditor-piscofins .af-auditor-item-topo {
    flex-direction: column;
  }

  .af-auditor-piscofins .af-auditor-item-dados {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   SCORE FISCAL
========================================================= */

.af-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.af-score-baixo {
  background: #e8f7ee;
  color: #137333;
}

.af-score-medio {
  background: #fff4d6;
  color: #9a6700;
}

.af-score-alto {
  background: #ffe7e7;
  color: #c5221f;
}

.af-score-critico {
  background: #ffdbdb;
  color: #a50e0e;
}
/* =========================================================
   RESUMO EXECUTIVO
========================================================= */

.af-auditor-resumo {
  margin-bottom: 28px;
}

.af-auditor-resumo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.af-auditor-resumo-card {
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 30px rgba(0,0,0,0.05);
  text-align: center;
}

.af-auditor-resumo-card strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 10px;
  color: #1d1d1f;
}

.af-auditor-resumo-card span {
  font-size: 14px;
  color: #6e6e73;
}

.af-auditor-resumo-card.destaque {
  background:
    linear-gradient(
      135deg,
      rgba(0,113,227,0.10),
      rgba(0,113,227,0.03)
    );

  border:
    1px solid rgba(0,113,227,0.14);
}
.af-auditor-piscofins .af-auditor-sugestoes {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #eef6ff;
  border: 1px solid #cfe5ff;
}

.af-auditor-piscofins .af-auditor-sugestoes strong {
  display: block;
  margin-bottom: 8px;
  color: #0066cc;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.af-auditor-piscofins .af-auditor-sugestoes p {
  margin: 8px 0 0;
  color: #1d1d1f;
  font-size: 14px;
  line-height: 1.6;
}
.af-auditor-piscofins .af-auditor-explicacoes {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.af-auditor-piscofins .af-auditor-explicacoes strong {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.af-auditor-piscofins .af-auditor-explicacoes p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}
.af-base-legal {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(154, 103, 0, .18);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.af-base-legal strong {
  color: #7a5200;
  margin-right: 4px;
}

.af-base-legal a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
}

.af-base-legal a:hover {
  text-decoration: underline;
}
.af-classificacao-ncm {
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
}

.af-classificacao-ncm h4 {
  margin: 0 0 14px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
}

.af-classificacao-item {
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.af-classificacao-item:last-child {
  border-bottom: none;
}

.af-classificacao-item strong {
  display: block;
  color: #0f172a;
  margin-bottom: 4px;
}

.af-classificacao-item p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}
/* =========================================================
   DASHBOARD SCORE FISCAL
========================================================= */

.af-score-dashboard {

  display: flex;
  flex-direction: column;
  gap: 24px;

}

.af-score-executivo {

  padding: 28px;

  border-radius: 24px;

  background: #ffffff;

  border: 1px solid rgba(0,0,0,.06);

  box-shadow:
    0 16px 40px rgba(15,23,42,.06);

}

.af-score-principal {

  text-align: center;

}

.af-score-label {

  display: block;

  margin-bottom: 10px;

  font-size: 12px;

  font-weight: 700;

  letter-spacing: .08em;

  color: #64748b;

}

.af-score-numero {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 10px;

  margin-bottom: 8px;

}

.af-score-numero strong {

  font-size: 58px;

  line-height: 1;

  color: #1d1d1f;

}

.af-score-numero small {

  color: #64748b;

  font-size: 18px;

}

.af-score-principal p {

  margin: 0;

  color: #64748b;

}

/* KPIS */

.af-score-kpis {

  margin-top: 24px;

  display: grid;

  grid-template-columns:
    repeat(auto-fit,minmax(140px,1fr));

  gap: 14px;

}

.af-score-kpi {

  padding: 18px;

  border-radius: 18px;

  background: #f8fafc;

  text-align: center;

}

.af-score-kpi span {

  display: block;

  font-size: 13px;

  color: #64748b;

}

.af-score-kpi strong {

  display: block;

  margin-top: 6px;

  font-size: 28px;

  color: #0f172a;

}

/* FILTROS */

.af-score-filtros {

  display: flex;

  flex-wrap: wrap;

  gap: 10px;

}

.af-score-filtros button {

  border: 0;

  border-radius: 999px;

  padding: 10px 18px;

  background: #eef2ff;

  color: #334155;

  font-weight: 700;

  cursor: pointer;

}

.af-score-filtros button.active {

  background: #0071e3;

  color: #fff;

}

/* TABELA */

.af-score-table {

  background: #ffffff;

  border-radius: 24px;

  border: 1px solid rgba(0,0,0,.06);

  overflow: hidden;

}

.af-score-table-head {

  display: grid;

  grid-template-columns:
    120px
    3fr
    220px
    120px
    40px;

  gap: 16px;

  padding: 18px 24px;

  background: #f8fafc;

  font-weight: 700;

  color: #475569;

}

.af-score-row-summary {

  width: 100%;

  border: 0;

  background: #fff;

  display: grid;

  grid-template-columns:
    120px
    3fr
    220px
    120px
    40px;

  gap: 16px;

  align-items: center;

  padding: 18px 24px;

  text-align: left;

  cursor: pointer;

  border-top: 1px solid #e5e7eb;

}

.af-score-row-summary:hover {

  background: #f8fbff;

}

.af-score-row-detail {

  display: none;

  padding: 24px;

  background: #f8fafc;

}

.af-score-row-detail.active {

  display: block;

}

/* DETALHES */

.af-score-detail-grid {

  display: grid;

  grid-template-columns:
    repeat(auto-fit,minmax(280px,1fr));

  gap: 16px;

}

.af-score-detail-card {

  background: #fff;

  border-radius: 18px;

  padding: 18px;

  border: 1px solid #e5e7eb;

}

.af-score-detail-card h4 {

  margin: 0 0 12px;

}

/* FARÓIS */

.af-farol {

  width: 12px;

  height: 12px;

  border-radius: 50%;

  display: inline-block;

}

.af-farol-verde {

  background: #16a34a;

}

.af-farol-amarelo {

  background: #f59e0b;

}

.af-farol-vermelho {

  background: #dc2626;

}

/* RISCO */

.af-risk-pill {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 6px 10px;

  border-radius: 999px;

  font-size: 12px;

  font-weight: 700;

}

.af-risk-ok {

  background: #dcfce7;

  color: #166534;

}

.af-risk-atencao {

  background: #fef3c7;

  color: #92400e;

}

.af-risk-criticos {

  background: #fee2e2;

  color: #991b1b;

}

/* LATERAL */

.af-score-layout {

  display: grid;

  grid-template-columns:
    minmax(0,1fr)
    320px;

  gap: 24px;

}

.af-score-side {

  display: flex;

  flex-direction: column;

  gap: 16px;

}

.af-score-side-card {

  padding: 20px;

  background: #fff;

  border-radius: 20px;

  border: 1px solid rgba(0,0,0,.06);

}

.af-score-alert-summary {

  list-style: none;

  padding: 0;

  margin: 0;

}

.af-score-alert-summary li {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  padding: 10px 0;

}

/* RESPONSIVO */

@media (max-width: 1100px) {

  .af-score-layout {

    grid-template-columns: 1fr;

  }

}

@media (max-width: 900px) {

  .af-score-table-head {

    display: none;

  }

  .af-score-row-summary {

    grid-template-columns: 1fr;

    gap: 6px;

  }

}

/* =========================================================
   LAYOUT EXECUTIVO V2
========================================================= */

.af-score-produto {

  display: flex;

  flex-direction: column;

  gap: 4px;

  min-width: 0;

}

.af-score-produto strong {

  font-size: 14px;

  color: #0f172a;

  line-height: 1.4;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}

.af-score-produto small {

  color: #64748b;

  font-size: 12px;

}

.af-score-problema {

  display: flex;

  align-items: center;

  gap: 8px;

  font-weight: 700;

  white-space: nowrap;

}

.af-score-problema-ok {

  color: #16a34a;

}

.af-score-problema-atencao {

  color: #d97706;

}

.af-score-problema-critico {

  color: #dc2626;

}

.af-score-score {

  display: flex;

  align-items: baseline;

  gap: 4px;

}

.af-score-score strong {

  font-size: 26px;

  line-height: 1;

  color: #0f172a;

}

.af-score-score small {

  color: #64748b;

}

.af-score-arrow {

  text-align: center;

  color: #64748b;

  font-size: 18px;

}

.af-score-motivo {

  margin-top: 14px;

  color: #475569;

}

.af-score-motivo strong {

  color: #0f172a;

}

.af-score-row-summary.active {

  background: #f1f7ff;

}

.af-score-row-summary:hover {

  background: #f8fbff;

}

.af-score-status {

  display: flex;

  align-items: center;

  gap: 8px;

  font-weight: 700;

  color: #334155;

  white-space: nowrap;

}

.af-score-row {

  overflow: hidden;

}

/* Ajuste fino do layout executivo */
.af-score-table-head-executiva,
.af-score-row-summary-executiva {

  grid-template-columns:
    120px
    minmax(0, 3fr)
    220px
    120px
    40px;

}

@media (max-width: 900px) {

  .af-score-table-head-executiva {

    display: none;

  }

  .af-score-row-summary-executiva {

    grid-template-columns: 1fr;

    gap: 10px;

    align-items: flex-start;

  }

  .af-score-problema {

    white-space: normal;

  }

  .af-score-produto strong {

    white-space: normal;

  }

}
/* =========================================================
   CORREÇÃO FINAL - TABELA EXECUTIVA DO PAINEL SCORE
========================================================= */

.af-auditor-piscofins .af-score-table-head,
.af-auditor-piscofins .af-score-row-summary {
  display: grid !important;
  grid-template-columns: 120px minmax(0, 1fr) 190px 90px 32px !important;
  gap: 18px !important;
  align-items: center !important;
}

.af-auditor-piscofins .af-score-table-head {
  padding: 16px 22px !important;
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.af-auditor-piscofins .af-score-row-summary {
  padding: 18px 22px !important;
  border-top: 1px solid #e5e7eb !important;
  background: #fff !important;
}

.af-auditor-piscofins .af-score-status {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.af-auditor-piscofins .af-score-produto {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.af-auditor-piscofins .af-score-produto strong {
  display: block !important;
  max-width: 100% !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.af-auditor-piscofins .af-score-produto small {
  font-size: 12px !important;
  color: #64748b !important;
  white-space: nowrap !important;
}

.af-auditor-piscofins .af-score-problema {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.af-auditor-piscofins .af-score-problema-atencao {
  color: #d97706 !important;
}

.af-auditor-piscofins .af-score-problema-critico {
  color: #dc2626 !important;
}

.af-auditor-piscofins .af-score-problema-ok {
  color: #16a34a !important;
}

.af-auditor-piscofins .af-score-score {
  display: flex !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 3px !important;
  white-space: nowrap !important;
}

.af-auditor-piscofins .af-score-score strong {
  font-size: 24px !important;
  color: #0f172a !important;
}

.af-auditor-piscofins .af-score-score small {
  font-size: 11px !important;
  color: #64748b !important;
}

.af-auditor-piscofins .af-score-arrow {
  text-align: center !important;
  color: #64748b !important;
}

@media (max-width: 900px) {
  .af-auditor-piscofins .af-score-table-head {
    display: none !important;
  }

  .af-auditor-piscofins .af-score-row-summary {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}
/* =========================================================
   AJUSTE FINAL - TABELA EXECUTIVA MAIS LEGÍVEL
========================================================= */

.af-auditor-piscofins .af-score-table-head,
.af-auditor-piscofins .af-score-row-summary {
  grid-template-columns: 90px minmax(240px, 1.8fr) minmax(190px, 1fr) 90px 28px !important;
  column-gap: 24px !important;
}

.af-auditor-piscofins .af-score-table-head span {
  white-space: nowrap !important;
}

.af-auditor-piscofins .af-score-produto strong {
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.af-auditor-piscofins .af-score-score {
  justify-content: flex-end !important;
}

.af-auditor-piscofins .af-score-problema {
  white-space: nowrap !important;
}

.af-auditor-piscofins .af-score-main {
  min-width: 0 !important;
}

.af-auditor-piscofins .af-score-table {
  min-width: 0 !important;
}