/**
 * VendGuard — Estilos de Informe Resumen Ejecutivo Imprimible (metrics-print.css)
 * 
 * Requisitos: RF-06 (EARS 6.3), RNF-06 (Diseño Sobrio y Funcional).
 * Da cumplimiento a la presentación limpia de KPIs, alertas de SLA y desgloses
 * para salida directa a PDF o impresora física sin barras laterales ni botones interactivos.
 * 
 * Dogma Vanilla: CSS nativo sin preprocesadores.
 */

/* ─── 1. Estilos de Previsualización en Pantalla (Modal y Hoja A4) ───────────── */
.executive-report-sheet {
  background-color: #ffffff;
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 15mm 20mm;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  box-sizing: border-box;
  font-family: var(--font-body, Inter, sans-serif);
  color: #1e293b;
  line-height: 1.4;
}

.executive-report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 2px solid #2560ff;
  margin-bottom: 20px;
}

.executive-brand-title {
  font-family: var(--font-display, 'DM Sans', sans-serif);
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.executive-meta-box {
  text-align: right;
  font-size: 12px;
  color: #64748b;
}

.executive-section-title {
  font-family: var(--font-display, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #cbd5e1;
}

.executive-kpi-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.executive-kpi-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.executive-kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.executive-kpi-value {
  font-family: var(--font-display, 'DM Sans', sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.executive-kpi-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.executive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 16px;
}

.executive-table th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  text-align: left;
}

.executive-table td {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.executive-sla-banner {
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.executive-footer-note {
  margin-top: 30px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

/* ─── 2. Directivas de Impresión Real (@media print) ───────────────────────── */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 15mm;
  }

  /* Ocultar interfaz web global */
  body * {
    visibility: hidden;
  }

  /* Mostrar exclusivamente el contenedor del informe */
  .executive-report-print-zone,
  .executive-report-print-zone * {
    visibility: visible;
  }

  .executive-report-print-zone {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
  }

  /* Supresión de botones, barras de navegación, modales de fondo y sombras */
  .no-print,
  .executive-report-actions,
  .vg-modal-backdrop,
  header,
  nav,
  footer,
  button {
    display: none !important;
  }

  .executive-report-sheet {
    max-width: 100% !important;
    min-height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  .executive-kpi-summary-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .executive-table {
    page-break-inside: auto;
  }

  .executive-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .executive-kpi-box,
  .executive-sla-banner,
  .executive-section-title {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
