.brand-logo {
  height: 60px;
  width: auto;
}

.doc-logo {
  height: 90px;
  width: auto;
}
.doc-logo {
  height: 52px;
  width: auto;
}
.kpi {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}
.kpi-label {
  font-size: 0.78rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi-value {
  font-size: 1.05rem;
  font-weight: 700;
}
#pdfArea {
  background: #fff;
  border-radius: 14px;
}
@media print {
  nav,
  .card.shadow-sm:not(:has(#pdfArea)),
  #btnRecalc,
  #btnPdf,
  #btnSend {
    display: none !important;
  }
}
/* Estilos solo para exportación PDF (clon) */
.pdf-export {
  width: 1120px;
}
.pdf-export-fixed {
  width: 900px !important;
  max-width: 900px !important;
}

/* Evita que "table-responsive" recorte o meta scroll dentro del PDF */
.pdf-export .table-responsive {
  overflow: visible !important;
}
/* ===== PDF PRO (Resumen Cliente) ===== */
.pdf-sheet {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #eef1f4;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
}

.pdf-hero {
  position: relative;
  height: 220px;
}

.pdf-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdf-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.15));
}

.pdf-hero-content {
  position: absolute;
  inset: 0;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  color: #fff;
}

.pdf-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdf-logo {
  height: 56px;
  width: auto;
  background: #fff;
  padding: 6px 8px;
  border-radius: 12px;
}

.pdf-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.pdf-subtitle {
  font-size: 13px;
  opacity: 0.9;
}

.pdf-meta {
  text-align: right;
  font-size: 13px;
  line-height: 1.35;
}

.muted {
  opacity: 0.85;
}
.small {
  font-size: 12px;
}

.pdf-kpis {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: #fbfcfd;
  border-bottom: 1px solid #eef1f4;
}

.kpi-card {
  border: 1px solid #eef1f4;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
}

.kpi-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
}
.pdf-export .hide-in-pdf {
  display: none !important;
}

.pdf-section {
  padding: 16px;
}

.section-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 10px;
  color: #111827;
}

.pdf-grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

.pdf-table {
  border: 1px solid #eef1f4;
  border-radius: 14px;
  overflow: hidden;
}

.pdf-table .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #eef1f4;
}
.pdf-table .row:last-child {
  border-bottom: none;
}

.pdf-table .cell {
  padding: 10px 12px;
  font-size: 13px;
}

.pdf-table .cell.head {
  background: #f7f9fc;
  font-weight: 700;
  color: #111827;
}

.pdf-table .row.total .cell {
  font-weight: 900;
  font-size: 14px;
}

.pdf-callout {
  border: 1px solid #e7f3ea;
  background: #f4fbf6;
  border-radius: 14px;
  padding: 12px;
}

.callout-title {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 6px;
  color: #14532d;
}
.callout-text {
  font-size: 13px;
  color: #14532d;
  white-space: pre-wrap;
}

.pdf-footer {
  padding: 14px 16px;
  border-top: 1px solid #eef1f4;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: #fbfcfd;
}

/* Evita líneas/cortes al paginar el PDF */
.pdf-export {
  background: #fff !important;
}

.pdf-export * {
  box-shadow: none !important;
}

.pdf-export .table,
.pdf-export table {
  border-collapse: collapse !important;
}

.pdf-export .table td,
.pdf-export .table th,
.pdf-export td,
.pdf-export th {
  border-color: #e9ecef !important; /* borde suave */
}

/* ===== Responsive (móvil) para el resumen PRO ===== */
@media (max-width: 768px) {
  .pdf-hero {
    height: 200px;
  }

  .pdf-hero-content {
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;
  }

  .pdf-meta {
    text-align: left;
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 10px;
    border-radius: 12px;
  }

  .pdf-logo {
    height: 44px;
  }

  .pdf-title {
    font-size: 18px;
  }
  .pdf-subtitle {
    font-size: 12px;
  }

  /* KPIs: de 4 columnas a 2 */
  .pdf-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .kpi-value {
    font-size: 14px;
  }

  /* Sección: de 2 columnas a 1 */
  .pdf-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Footer apilado */
  .pdf-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
