@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,600&display=swap');

/* =========================================================
   ARTISJET DOCUMENTARY ENGINE - TOKENS DE DISENO BASE
   ========================================================= */
:root {
  --ui-primary: #008BD2;
  --ui-primary-hover: #0079B8;
  --ui-primary-soft: #EAF7FD;
  --ui-ink: #17242C;
  --ui-text: #34454F;
  --ui-muted: #71818A;
  --ui-border: #DCE5E9;
  --ui-border-strong: #C7D4DA;
  --ui-surface: #FFFFFF;
  --ui-background: #F3F7F9;
  --ui-danger: #D83B3B;
  --ui-danger-soft: #FFF0F0;
  --ui-success: #17875D;
  --ui-success-soft: #EAF8F2;
  --ui-amber: #8A6116;
  --ui-amber-soft: #FFF7E6;
  --ui-amber-border: #F3D48C;
}

/* Botones de alta jerarquía para la toolbar del visualizador documental */
.aj-doc-btn-guardar-pdf {
  background: #008bd2 !important;
  color: #ffffff !important;
  border: 1px solid #008bd2 !important;
  font-weight: 800 !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: background-color .15s, transform .12s !important;
}
.aj-doc-btn-guardar-pdf:hover {
  background: #0079b8 !important;
  border-color: #0079b8 !important;
}
.aj-doc-btn-guardar-pdf:active {
  transform: scale(.97) !important;
}
.aj-doc-btn-acciones {
  background: var(--ui-primary-soft, #EAF7FD) !important;
  color: var(--ui-primary, #008BD2) !important;
  border: 1.5px solid var(--ui-primary, #008BD2) !important;
  font-weight: 700 !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: background-color .15s, border-color .15s, color .15s, transform .12s !important;
}
.aj-doc-btn-acciones:hover {
  background: #DBF0FB !important;
  border-color: var(--ui-primary-hover, #0079B8) !important;
  color: var(--ui-primary-hover, #0079B8) !important;
}
.aj-doc-btn-acciones:active {
  transform: scale(.97) !important;
}

/* =========================================================
   H2R2D1D — ESTILOS DEL RENDERER DOCUMENTAL (NAMESPACE .aj-doc-*)
   - Documentos tamaño Carta físico: 215.9mm x 279.4mm @ 96 DPI
   - Capa vectorial de fondo aislada (SVG institucional ArtisJet)
   - Contenido dinámico tipográfico estructurado
   - Soporte específico para Plantilla Equipos, Plantilla Tintas y Plantilla Mixta
   - Preview responsivo con escalado automático para móviles y tablets
   - Reglas de impresión limpias (@media print)
   ========================================================= */

#ajDocPreviewRoot {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: var(--ui-background, #F3F7F9);
  color: var(--ui-ink, #17242C);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
}

#ajDocPreviewRoot[hidden] {
  display: none !important;
}

/* Toolbar superior del visualizador — Homologación visual ArtisJet V1 (H2R2D3B2.1) */
.aj-doc-toolbar {
  flex: 0 0 auto;
  background: var(--ui-surface, #FFFFFF);
  color: var(--ui-ink, #17242C);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--ui-border, #DCE5E9);
  box-shadow: 0 2px 8px rgba(23, 36, 44, 0.05);
  flex-wrap: wrap;
  z-index: 10;
}

.aj-doc-toolbar-left, .aj-doc-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aj-doc-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}

.aj-doc-btn-back {
  background: var(--ui-background, #F3F7F9);
  color: var(--ui-ink, #17242C);
  border: 1px solid var(--ui-border, #DCE5E9);
}
.aj-doc-btn-back:hover {
  background: #E9EFF1;
  color: var(--ui-ink, #17242C);
  border-color: var(--ui-border-strong, #C7D4DA);
}

.aj-doc-btn-primary {
  background: var(--ui-primary, #008BD2);
  color: #ffffff;
}
.aj-doc-btn-primary:hover {
  background: var(--ui-primary-hover, #0079B8);
}

.aj-doc-btn-nueva {
  background: var(--ui-primary, #008BD2) !important;
  color: #ffffff !important;
  border: 1.5px solid var(--ui-primary, #008BD2) !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(0, 139, 210, 0.35);
}
.aj-doc-btn-nueva:hover:not(:disabled) {
  background: var(--ui-primary-hover, #0079B8) !important;
  border-color: var(--ui-primary-hover, #0079B8) !important;
  color: #ffffff !important;
}

/* Control de zoom auxiliar y discreto (COTIZADOR-FLOW-01C) */
.aj-doc-zoom-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aj-doc-zoom-wrap label {
  font-size: 11px !important;
  color: var(--ui-muted, #71818A) !important;
  font-weight: 600 !important;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.aj-doc-select {
  background: var(--ui-background, #F3F7F9);
  color: var(--ui-muted, #71818A);
  border: 1px solid var(--ui-border, #DCE5E9);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  box-shadow: none !important;
}
.aj-doc-select:hover {
  color: var(--ui-ink, #17242C);
  border-color: var(--ui-border-strong, #C7D4DA);
}
.aj-doc-select:focus {
  border-color: var(--ui-border-strong, #C7D4DA);
  outline: none;
  color: var(--ui-ink, #17242C);
}

.aj-doc-badge-plantilla {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--ui-primary, #008BD2);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
}

.aj-doc-page-info {
  display: none !important;
}

/* Grupo de botones principales de acción (H2R2D3B3.2) */
.aj-doc-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Documento emitido — Balance visual del toolbar desktop (COTIZADOR-FLOW-01C.1) */
.aj-doc-toolbar.aj-doc-emitida {
  justify-content: space-between !important;
}
.aj-doc-toolbar.aj-doc-emitida #ajDocBtnCerrar {
  display: none !important;
}
.aj-doc-toolbar.aj-doc-emitida .aj-doc-toolbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* Bloque izquierdo de Branding ArtisJet + Estado Documental (COTIZADOR-FLOW-01C.1) */
.aj-doc-brand-home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.aj-doc-brand-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
  color: inherit;
  text-decoration: none;
}
.aj-doc-brand-home-btn:hover {
  background: var(--ui-primary-soft, #EAF7FD);
  border-color: rgba(0, 139, 210, 0.2);
}
.aj-doc-brand-home-btn:focus-visible {
  outline: 2px solid var(--ui-primary, #008BD2);
  outline-offset: 2px;
}
/* Logotipo oficial ArtisJet responsive (COTIZADOR-FLOW-01C.2) */
.aj-doc-brand-picture {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.aj-doc-brand-logo-img {
  display: block;
  height: 28px;
  width: auto;
  max-height: 30px;
  object-fit: contain;
  vertical-align: middle;
  transition: opacity .15s ease, transform .15s ease;
}
.aj-doc-brand-home-btn:hover .aj-doc-brand-logo-img {
  opacity: 0.92;
  transform: translateY(-1px);
}

.aj-doc-txt-compact {
  display: none !important;
}

.aj-doc-estado-emitido {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ui-success-soft, #EAF8F2);
  color: var(--ui-success, #17875D);
  border: 1px solid rgba(23, 135, 93, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  user-select: none;
  cursor: default;
}
.aj-doc-estado-emitido .aj-doc-estado-label {
  color: var(--ui-success, #17875D);
  font-weight: 700;
}
.aj-doc-estado-emitido .aj-doc-estado-sep {
  color: var(--ui-muted, #71818A);
  opacity: 0.7;
}
.aj-doc-estado-emitido .aj-doc-estado-folio {
  color: var(--ui-ink, #17242C);
  font-weight: 600;
  letter-spacing: .03em;
}

.aj-doc-toolbar.aj-doc-emitida #ajDocBtnGuardarPdf {
  background: #ffffff !important;
  color: var(--ui-ink, #17242C) !important;
  border: 1.5px solid var(--ui-border-strong, #C7D4DA) !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(23, 36, 44, 0.05);
}
.aj-doc-toolbar.aj-doc-emitida #ajDocBtnGuardarPdf:hover {
  background: var(--ui-background, #F3F7F9) !important;
  border-color: var(--ui-primary, #008BD2) !important;
  color: var(--ui-primary, #008BD2) !important;
}
.aj-doc-toolbar.aj-doc-emitida #ajDocBtnAcciones {
  background: var(--ui-primary-soft, #EAF7FD) !important;
  color: var(--ui-primary, #008BD2) !important;
  border: 1.5px solid var(--ui-primary, #008BD2) !important;
  font-weight: 700 !important;
}
.aj-doc-toolbar.aj-doc-emitida #ajDocBtnAcciones:hover {
  background: #DBF0FB !important;
  border-color: var(--ui-primary-hover, #0079B8) !important;
}

/* Tablet 640px – 959.98px: Logotipo compacto presente y visible, balance horizontal (AJUSTE RESPONSIVE) */
@media (max-width: 959.98px) and (min-width: 640px) {
  .aj-doc-toolbar.aj-doc-emitida {
    padding: 10px 16px !important;
    gap: 10px 14px !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-toolbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-brand-home {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-brand-home-btn {
    padding: 3px 6px !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-brand-picture {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-brand-logo-img {
    height: 32px !important;
    max-height: 34px !important;
    width: auto !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    display: block !important;
  }
  .aj-doc-estado-emitido {
    padding: 4px 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-toolbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-zoom-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 11px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-select {
    height: 36px !important;
    padding: 2px 6px !important;
    font-size: 11.5px !important;
  }
  .aj-doc-actions-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .aj-doc-actions-group .aj-doc-btn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    font-size: 12.5px !important;
  }
  #ajDocBtnNuevaCotizacion {
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }
}

/* Base general responsive toolbar móvil <= 639.98px (Preserva modo Borrador) */
@media (max-width: 639.98px) {
  .aj-doc-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    padding: 12px 14px !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }
  .aj-doc-toolbar-left {
    display: flex !important;
    width: 100% !important;
    align-items: stretch !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #ajDocBtnCerrar {
    display: inline-flex !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 14px !important;
    white-space: nowrap !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    gap: 8px !important;
  }
  .aj-doc-toolbar-right {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
  }
  .aj-doc-zoom-wrap {
    display: none !important;
  }
  .aj-doc-actions-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    align-items: stretch !important;
  }
  .aj-doc-actions-group .aj-doc-btn {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    font-size: 13.5px !important;
  }

  /* =========================================================
     POST-EMISIÓN MÓVIL (< 640px) — 2 FILAS EQUILIBRADAS
     Fila 1: Branding ArtisJet + Chip Estado
     Fila 2: Zoom Compacto + Acciones con Jerarquía
     ========================================================= */
  .aj-doc-toolbar.aj-doc-emitida {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px 14px !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
  }

  /* FILA 1: Branding ArtisJet Oficial Compacto + Chip Estado (COTIZADOR-FLOW-01C.4: Pulido y aire vertical) */
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-toolbar-left {
    display: flex !important;
    order: 1 !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 32px !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocBtnCerrar {
    display: none !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocBrandHome {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocBrandHomeBtn {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    border: none !important;
    line-height: 1 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-brand-picture {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-brand-logo-img {
    height: 29px !important;
    max-height: 30px !important;
    width: auto !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    display: block !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocEstadoEmitido {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4.5px !important;
    padding: 3px 8px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border-radius: 999px !important;
    line-height: 1.2 !important;
    letter-spacing: .01em !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocEstadoEmitido svg {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
  }

  /* FILA 2: Controles de Acción (COTIZADOR-FLOW-01C.3 / FLOW-01C.4) */
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-toolbar-right {
    display: flex !important;
    order: 2 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Ocultar visualmente Zoom en móvil post-emisión (COTIZADOR-FLOW-01C.3) */
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-zoom-wrap {
    display: none !important;
  }

  /* Grupo de Acciones en Fila 2: 3 botones balanceados */
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-actions-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-actions-group .aj-doc-btn {
    height: 38px !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-actions-group .aj-doc-btn svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }

  /* Botón Secundario: Guardar PDF */
  .aj-doc-toolbar.aj-doc-emitida #ajDocBtnGuardarPdf {
    order: 1 !important;
    flex: 1 1 auto !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: #ffffff !important;
    color: var(--ui-ink, #17242C) !important;
    border: 1px solid var(--ui-border-strong, #C7D4DA) !important;
  }

  /* Botón Terciario: Acciones */
  .aj-doc-toolbar.aj-doc-emitida #ajDocBtnAcciones {
    order: 2 !important;
    flex: 1 1 auto !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: var(--ui-primary-soft, #EAF7FD) !important;
    color: var(--ui-primary, #008BD2) !important;
    border: 1px solid var(--ui-primary, #008BD2) !important;
  }

  /* Botón Principal Dominante: Nueva cotización */
  .aj-doc-toolbar.aj-doc-emitida #ajDocBtnNuevaCotizacion {
    order: 3 !important;
    flex: 1.5 1 auto !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    background: var(--ui-primary, #008BD2) !important;
    color: #ffffff !important;
    border: 1px solid var(--ui-primary, #008BD2) !important;
    box-shadow: 0 2px 6px rgba(0, 139, 210, 0.3) !important;
    padding: 0 12px !important;
  }
}

/* Pantallas extra estrechas <= 380px: adaptación de texto para evitar overflow */
@media (max-width: 380px) {
  .aj-doc-toolbar.aj-doc-emitida {
    padding: 10px 8px !important;
    gap: 8px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-brand-logo-img {
    height: 27px !important;
    max-height: 28px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocEstadoEmitido {
    font-size: 10px !important;
    padding: 2.5px 7px !important;
    gap: 3.5px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-actions-group {
    gap: 4px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-actions-group .aj-doc-btn {
    padding: 0 6px !important;
    font-size: 11.5px !important;
    gap: 4px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-txt-full {
    display: none !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-txt-compact {
    display: inline !important;
  }
}

/* Área de scroll de hojas */
.aj-doc-viewport {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 16px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Shell de escala responsive */
.aj-preview-page-shell {
  position: relative;
  flex: 0 0 auto;
  overflow: visible;
  transition: transform .12s ease-out;
}

/* Página Carta física */
.aj-doc-page {
  position: relative;
  width: 215.9mm;
  height: 279.4mm;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  box-sizing: border-box;
}

/* Capa de fondo SVG */
.aj-doc-svg-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.aj-doc-svg-bg svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Capa de contenido dinámico */
.aj-doc-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #231f20;
  box-sizing: border-box;
}

/* Encabezados y Metadatos */
.aj-doc-meta-tipo-documento {
  position: absolute;
  left: 160.68mm;
  top: 28.5mm;
  width: 41.37mm;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 10pt;
  font-weight: 800;
  color: #231f20;
  letter-spacing: 0.5px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.aj-doc-meta-folio {
  position: absolute;
  left: 160.68mm;
  top: 40.2mm;
  width: 41.37mm;
  height: 8.2mm;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13pt;
  font-weight: 700;
  color: #231f20;
  line-height: 1;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  word-break: keep-all;
  overflow-wrap: normal;
  z-index: 5;
}
.aj-doc-meta-folio.aj-doc-meta-folio-medium {
  font-size: 10.5pt;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.aj-doc-meta-folio.aj-doc-meta-folio-long {
  font-size: 9pt;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.aj-doc-meta-folio.aj-doc-meta-folio-xl {
  font-size: 7.5pt;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aj-doc-meta-fecha {
  position: absolute;
  left: 160.68mm;
  top: 56mm;
  width: 41.37mm;
  text-align: center;
  font-size: 11.5pt;
  font-weight: 600;
  color: #231f20;
}

.aj-doc-meta-pagenum {
  position: absolute;
  left: 158.3mm;
  top: 64.9mm;
  width: 41.37mm;
  text-align: right;
  font-size: 7.5pt;
  font-weight: 400;
  color: #888888;
}

/* Contacto Comercial del Asesor en Footer (H2R2D2C1.4.2) */
.aj-doc-footer-asesor-movil {
  position: absolute;
  left: 17.05mm;
  top: 254.2mm;
  font-family: 'Montserrat', sans-serif;
  font-size: 8.5pt;
  font-weight: 700;
  color: #231f20;
  line-height: 1.15;
  pointer-events: none;
  z-index: 2;
  letter-spacing: 0.2px;
}

/* ---------- Bloque Bancario Superior BanBajío Horizontal (H2R2D2B-R2.1) ----------
   Identidad institucional del emisor: ubicado en la zona izquierda, debajo del logo ArtisJet.
   Alineado al margen izquierdo (15.7mm), dentro del tercio izquierdo del documento.
   Separación clara con el logo ArtisJet y más de 60mm de separación libre con el bloque derecho (160.7mm).
   Formato horizontal corporativo: logo BanBajío + datos BANBAJÍO / CUENTA / CLABE.
   Sin caja, sin borde, sin fondo, sin sombra. */
.aj-doc-bank-block,
.aj-doc-bank-box {
  position: absolute;
  left: 15.7mm;
  top: 33mm;
  width: 85mm;
  display: flex;
  align-items: flex-start;
  gap: 3.5mm;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  box-sizing: border-box;
}
.aj-doc-bank-logo {
  width: 19mm;
  flex-shrink: 0;
  line-height: 0;
  margin-top: .6mm;
}
.aj-doc-bank-logo svg {
  width: 100%;
  height: auto;
  display: block;
}
.aj-doc-bank-info {
  display: flex;
  flex-direction: column;
  font-size: 8.3pt;
  line-height: 1.35;
  color: #0f172a;
  overflow: visible;
  word-break: break-word;
  overflow-wrap: break-word;
}
.aj-doc-bank-title {
  font-weight: 800;
  color: #0f172a;
  font-size: 9.2pt;
  letter-spacing: .03em;
  margin-bottom: .8mm;
  line-height: 1.15;
  text-transform: uppercase;
}
.aj-doc-bank-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2mm;
  margin-bottom: .5mm;
  word-break: break-word;
  overflow-wrap: break-word;
}
.aj-doc-bank-k {
  font-weight: 700;
  color: #0f172a;
  font-size: 8.3pt;
  white-space: nowrap;
}
.aj-doc-bank-v {
  font-weight: 600;
  color: #1e293b;
  font-size: 8.3pt;
  letter-spacing: .02em;
  word-break: break-all;
}

/* Línea Horizontal Divisoria Principal Oficial (H2R2D2B-R3.6)
   UNA SOLA línea continua entre la zona institucional y los datos del cliente.
   Termina antes de invadir los bloques de Folio/Fecha de la derecha. */
.aj-doc-header-divider {
  position: absolute;
  left: 15.7mm;
  top: 51.5mm;
  width: 138mm;
  height: 0.8px;
  background: #cbd5e1;
  box-sizing: border-box;
}

/* Ficha de datos del cliente — H2R2D2B-R3.7
   Estructura fija simétrica de 3 filas x 2 columnas:
   Fila 1: EMPRESA  |  TEL
   Fila 2: ATENCIÓN |  MAIL
   Fila 3: CIUDAD   |  ASESOR
   Idéntica en Página 1 y Continuaciones */
.aj-doc-client-block,
.aj-doc-client-grid {
  position: absolute;
  left: 15.7mm;
  top: 54mm;
  width: 138mm;
  max-width: 138mm;
  display: flex;
  align-items: flex-start;
  gap: 5mm;
  font-size: 9pt;
  line-height: 1.35;
  box-sizing: border-box;
}

/* H2R2D2C-2.1: Variante Documental de Ficha de Cliente
   Aplica ÚNICAMENTE a:
   1. Páginas de GARANTÍA DE EQUIPO (.aj-doc-page-anexo)
   2. Páginas de presentación / condiciones documentales (.aj-doc-page-presentacion, .aj-doc-page-documental)
   Ajuste vertical de 6 mm hacia arriba (top: 48mm vs 54mm comercial).
   NO APLICA a páginas comerciales normales (.aj-doc-page-comercial). */
.aj-doc-client-grid-documental,
.aj-doc-page-anexo .aj-doc-client-grid,
.aj-doc-page-presentacion .aj-doc-client-grid,
.aj-doc-page-ficha-tecnica .aj-doc-client-grid,
.aj-doc-page-documental .aj-doc-client-grid {
  top: 48mm;
}
.aj-doc-client-grid-documental .aj-doc-client-k,
.aj-doc-page-anexo .aj-doc-client-k,
.aj-doc-page-ficha-tecnica .aj-doc-client-k {
  font-size: 9pt;
  font-weight: 800;
  width: 20mm;
}
.aj-doc-client-grid-documental .aj-doc-client-v,
.aj-doc-page-anexo .aj-doc-client-v,
.aj-doc-page-ficha-tecnica .aj-doc-client-v {
  font-size: 9pt;
  font-weight: 500;
  color: #1e293b;
}
.aj-doc-client-grid-documental .aj-doc-client-v-mail,
.aj-doc-page-anexo .aj-doc-client-v-mail,
.aj-doc-page-ficha-tecnica .aj-doc-client-v-mail {
  font-size: 8.5pt;
}
.aj-doc-client-grid-documental .aj-doc-client-v-asesor,
.aj-doc-page-anexo .aj-doc-client-v-asesor,
.aj-doc-page-ficha-tecnica .aj-doc-client-v-asesor {
  font-size: 9pt;
  font-weight: 600;
}
.aj-doc-client-grid-documental .aj-doc-client-row,
.aj-doc-page-anexo .aj-doc-client-row,
.aj-doc-page-ficha-tecnica .aj-doc-client-row {
  margin-bottom: 1.2mm;
  min-height: 4.3mm;
}
.aj-doc-client-col-main {
  flex: 1 1 68mm;
  min-width: 58mm;
  max-width: 72mm;
  box-sizing: border-box;
}
.aj-doc-client-col-side {
  flex: 1 1 65mm;
  min-width: 56mm;
  max-width: 68mm;
  box-sizing: border-box;
}
.aj-doc-client-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.1mm;
  border-bottom: none; /* CERO líneas bajo filas individuales */
  min-height: 4mm;
}
.aj-doc-client-k {
  font-weight: 700;
  width: 19mm;
  flex-shrink: 0;
  color: #0f172a;
  font-size: 8.6pt;
  line-height: 1.35;
  padding-top: 0;
  white-space: nowrap;
}
.aj-doc-client-v {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: #334155;
  font-size: 8.6pt;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}
.aj-doc-client-v-mail {
  min-width: 0;
  font-size: 8.2pt;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.aj-doc-client-v-asesor {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  font-weight: 600;
  font-size: 8.6pt;
}

/* Cliente en Páginas de Continuación (H2R2D2B-R3.6)
   Mismo diseño y estructura exacta que Página 1 */
.aj-doc-client-compact,
.aj-doc-client-summary {
  display: flex;
}
.aj-doc-client-compact strong,
.aj-doc-client-summary strong {
  color: #0f172a;
  font-weight: 700;
}
.aj-doc-client-compact-sep {
  color: #94a3b8;
}

/* Encabezado de continuación en páginas 2+ — H2R2D2B */
.aj-doc-header-continuacion {
  position: absolute;
  left: 15.7mm;
  top: 33mm;
  width: 76mm;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.aj-doc-cont-title {
  font-size: 11.5pt;
  font-weight: 800;
  color: #008bd2;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 1.5mm;
}
.aj-doc-cont-meta {
  font-size: 8pt;
  font-weight: 600;
  color: #64748b;
}

/* Contenedor de flujo comercial alineado al margen derecho del header (202.05mm) */
.aj-doc-flow-container {
  position: absolute;
  left: 15.7mm;
  width: 186.35mm;
  box-sizing: border-box;
}

/* Título de categoría */
.aj-doc-cat-header {
  font-size: 10pt;
  font-weight: 800;
  color: #008bd2;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 3mm 0 2mm;
  padding-bottom: 1.2mm;
  border-bottom: 1px solid #cbd5e1;
}

/* Tabla de Equipos (V1 Heritage) */
table.aj-doc-equip-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 9pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
  box-sizing: border-box;
}
table.aj-doc-equip-table th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 9pt;
  letter-spacing: .02em;
  height: 7.5mm;
  text-align: center;
  padding: 0 2mm;
  box-sizing: border-box;
}
table.aj-doc-equip-table th:last-child {
  padding-left: 2mm;
  padding-right: 2.5mm;
  text-align: right;
}
table.aj-doc-equip-table td {
  padding: 2.8mm 2.2mm;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  box-sizing: border-box;
}
table.aj-doc-equip-table td:last-child {
  border-right: none;
  padding-left: 2mm;
  padding-right: 2.5mm;
  text-align: right;
}
table.aj-doc-equip-table th:nth-child(1), table.aj-doc-equip-table td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-equip-table th:nth-child(2), table.aj-doc-equip-table td:nth-child(2) { width: 22%; font-weight: 700; text-align: center; }
table.aj-doc-equip-table th:nth-child(3), table.aj-doc-equip-table td:nth-child(3) { width: 49%; }
table.aj-doc-equip-table th:nth-child(4), table.aj-doc-equip-table td:nth-child(4) { width: 20%; text-align: right; }

.aj-doc-equip-modelo {
  font-size: 9.5pt;
  font-weight: 800;
  color: #0f172a;
}
.aj-doc-bullets-list {
  margin: 1.2mm 0 0;
  padding-left: 3.5mm;
  list-style: none;
  font-size: 8.5pt;
  line-height: 1.35;
  color: #334155;
}
.aj-doc-bullets-list li {
  margin-bottom: .6mm;
  position: relative;
}
.aj-doc-bullets-list li::before {
  content: "\2022\00a0";
  color: #008bd2;
  font-weight: 700;
  display: inline-block;
  width: 3.5mm;
  margin-left: -3.5mm;
}

/* Descripción de equipo como párrafo único (H2R2D2B-R3) */
.aj-doc-equip-desc-p {
  font-size: 8.5pt;
  line-height: 1.35;
  color: #334155;
  margin: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.aj-doc-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-price-final {
  color: #d6001c;
  font-size: 12pt;
  font-weight: 800;
  margin-top: .8mm;
  text-align: right;
  white-space: nowrap;
}
.aj-doc-price-iva-tag {
  font-size: 7.5pt;
  color: #64748b;
  font-weight: 500;
  text-align: right;
}
.aj-doc-price-note {
  font-size: 7.5pt;
  color: #008bd2;
  font-style: italic;
  font-weight: 600;
  text-align: right;
}

/* Tabla de Tintas y Consumibles */
table.aj-doc-ink-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 8.5pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
}
table.aj-doc-ink-table th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: .02em;
  height: 7mm;
  text-align: center;
  padding: 0 2mm;
}
table.aj-doc-ink-table td {
  padding: 1.8mm 2mm;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}
table.aj-doc-ink-table td:last-child { border-right: none; }
table.aj-doc-ink-table th:nth-child(1), table.aj-doc-ink-table td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-ink-table th:nth-child(2), table.aj-doc-ink-table td:nth-child(2) { width: 36%; font-weight: 600; }
table.aj-doc-ink-table th:nth-child(3), table.aj-doc-ink-table td:nth-child(3) { width: 21%; text-align: center; }
table.aj-doc-ink-table th:nth-child(4), table.aj-doc-ink-table td:nth-child(4) { width: 17%; text-align: center; }
table.aj-doc-ink-table th:nth-child(5), table.aj-doc-ink-table td:nth-child(5) { width: 17%; text-align: center; font-weight: 700; }

/* Tabla de Servicios / Refacciones / Otros */
table.aj-doc-generic-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 8.5pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
}
table.aj-doc-generic-table th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: .02em;
  height: 7mm;
  text-align: center;
  padding: 0 2mm;
}
table.aj-doc-generic-table td {
  padding: 2mm 2.2mm;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}
table.aj-doc-generic-table td:last-child { border-right: none; }
table.aj-doc-generic-table th:nth-child(1), table.aj-doc-generic-table td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-generic-table th:nth-child(2), table.aj-doc-generic-table td:nth-child(2) { width: 57%; font-weight: 600; }
table.aj-doc-generic-table th:nth-child(3), table.aj-doc-generic-table td:nth-child(3) { width: 17%; text-align: right; }
table.aj-doc-generic-table th:nth-child(4), table.aj-doc-generic-table td:nth-child(4) { width: 17%; text-align: right; font-weight: 700; }

/* Tabla de Producción (PRODUCCION-01C) */
table.aj-doc-prod-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 8.5pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
}
table.aj-doc-prod-table th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: .02em;
  height: 7mm;
  text-align: center;
  padding: 0 2mm;
}
table.aj-doc-prod-table td {
  padding: 2mm 2.2mm;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}
table.aj-doc-prod-table td:last-child { border-right: none; }
table.aj-doc-prod-table th:nth-child(1), table.aj-doc-prod-table td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-prod-table th:nth-child(2), table.aj-doc-prod-table td:nth-child(2) { width: 57%; text-align: left; }
table.aj-doc-prod-table th:nth-child(3), table.aj-doc-prod-table td:nth-child(3) { width: 17%; text-align: center; }
table.aj-doc-prod-table th:nth-child(4), table.aj-doc-prod-table td:nth-child(4) { width: 17%; text-align: center; font-weight: 700; }

/* Tabla de Servicios (SERVICIOS-01B) */
table.aj-doc-serv-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 8.5pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
}
table.aj-doc-serv-table th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: .02em;
  height: 7mm;
  text-align: center;
  padding: 0 2mm;
}
table.aj-doc-serv-table td {
  padding: 2mm 2.2mm;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}
table.aj-doc-serv-table td:last-child { border-right: none; }
table.aj-doc-serv-table th:nth-child(1), table.aj-doc-serv-table td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-serv-table th:nth-child(2), table.aj-doc-serv-table td:nth-child(2) { width: 57%; text-align: left; }
table.aj-doc-serv-table th:nth-child(3), table.aj-doc-serv-table td:nth-child(3) { width: 17%; text-align: center; }
table.aj-doc-serv-table th:nth-child(4), table.aj-doc-serv-table td:nth-child(4) { width: 17%; text-align: center; font-weight: 700; }

/* Política de Tintas */
/* Política de Tintas / Consumibles — Alineada al Margen Maestro (H2R2D2B-R3) */
.aj-doc-ink-policy-box {
  background: #f8fafc;
  border-left: 3px solid #008bd2;
  border-radius: 4px;
  padding: 2mm 3mm;
  font-size: 8pt;
  line-height: 1.35;
  color: #475569;
  margin: 2.5mm 0;
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-ink-policy-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: .8mm;
}

/* Notas Adicionales del Vendedor — Alineada al Margen Maestro (H2R2D2B-R3) */
.aj-doc-notes-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 2.5mm 3mm;
  font-size: 8pt;
  line-height: 1.35;
  color: #334155;
  margin: 2.5mm 0;
  white-space: pre-wrap;
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-notes-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: .8mm;
  text-transform: uppercase;
  font-size: 7.5pt;
  letter-spacing: .04em;
}

/* Cuadro de Totales Unificado — Bloque Continuo Limpio (PDF-SERVICIOS-AJUSTES-VISUALES-01)
   Tabla compacta continua: AZUL | BLANCO, anclada al eje derecho unificado del contenedor de flujo */
.aj-doc-block-totales {
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-totals-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  margin: 3.5mm 0 2.5mm;
  width: 100%;
  box-sizing: border-box;
  padding-right: 0;
}
.aj-doc-totals-nota-iva {
  width: 76mm;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 6.8pt;
  color: #64748b;
  text-align: right;
  line-height: 1.25;
  margin-top: 1.2mm;
  padding: 0 1mm 0 0;
  font-style: italic;
  letter-spacing: .01em;
}
.aj-doc-totals-table {
  width: 76mm;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 9pt;
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: 0;
  border-top: 1px solid #dce5e9;
  border-left: 1px solid #008bd2;
  table-layout: fixed;
}
.aj-doc-totals-table td {
  padding: 1.6mm 2.5mm;
  box-sizing: border-box;
  vertical-align: middle;
}
.aj-doc-totals-label {
  background: #008bd2;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  font-size: 8.5pt;
  letter-spacing: .02em;
  width: 36mm;
  border-radius: 0;
  border-bottom: 1px solid #0077b5;
  border-right: 1px solid #dce5e9;
}
.aj-doc-totals-val {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  padding: 1.6mm 2mm;
  font-size: 9pt;
  white-space: nowrap;
  border-radius: 0;
  border-bottom: 1px solid #dce5e9;
  border-right: 1px solid #dce5e9;
}
.aj-doc-totals-row-total td {
  padding-top: 1.8mm;
  padding-bottom: 1.8mm;
}
.aj-doc-totals-label-total {
  background: #008bd2;
  color: #ffffff;
  font-size: 9.5pt;
  font-weight: 800;
  text-align: center;
  letter-spacing: .03em;
  border-radius: 0;
  border-bottom: 1px solid #008bd2;
  border-right: 1px solid #dce5e9;
}
.aj-doc-totals-val-total {
  background: #ffffff;
  color: #dc2626; /* PDF-TOTALES-WIDTH-01: Rojo corporativo únicamente para el IMPORTE de TOTAL */
  font-size: 11pt; /* FASE PDF-PULIDO-FINAL-01: 11pt bold calibrado para mantener cifra y MXN en una sola línea */
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
  padding: 1.8mm 1.5mm;
  white-space: nowrap;
  border-radius: 0;
  border-bottom: 1px solid #dce5e9;
  border-right: 1px solid #dce5e9;
}
.aj-doc-totals-val-compact {
  font-size: 10pt !important;
}
.aj-doc-totals-val-mini {
  font-size: 9pt !important;
}

/* =========================================================
   PDF-TOTALES-WIDTH-01: Ancho ampliado para categorías sin equipo
   (Tintas, Producción, Servicios, Refacciones y mixtas sin equipo)
   ========================================================= */
.aj-doc-block-totales .aj-doc-totals-table,
.aj-doc-totals-standalone .aj-doc-totals-table {
  width: 92mm;
}
.aj-doc-block-totales .aj-doc-totals-label,
.aj-doc-totals-standalone .aj-doc-totals-label {
  width: 42mm;
}
.aj-doc-block-totales .aj-doc-totals-table td,
.aj-doc-totals-standalone .aj-doc-totals-table td {
  padding: 1.8mm 3mm;
}
.aj-doc-block-totales .aj-doc-totals-nota-iva,
.aj-doc-totals-standalone .aj-doc-totals-nota-iva {
  width: 92mm;
}

/* Preservar dimensiones calibradas en Equipos (82mm) - FASE PDF-PULIDO-FINAL-01 */
.aj-doc-cierre-equipo .aj-doc-totals-table,
.aj-doc-totals-equipo .aj-doc-totals-table {
  width: 82mm;
}
.aj-doc-cierre-equipo .aj-doc-totals-label,
.aj-doc-totals-equipo .aj-doc-totals-label {
  width: 28mm;
}
.aj-doc-cierre-equipo .aj-doc-totals-nota-iva,
.aj-doc-totals-equipo .aj-doc-totals-nota-iva {
  width: 82mm;
}

/* =========================================================
   PDF-MAQUETACION-COMERCIAL-01: Cierre Comercial Coordinado
   Columna Izquierda: Condiciones / Políticas Comerciales
   Columna Derecha: Totales (92mm)
   ========================================================= */
.aj-doc-cierre-comercial-coordinado {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5mm;
  width: 100%;
  box-sizing: border-box;
  margin-top: 3.5mm;
}
.aj-doc-cierre-comercial-coordinado .aj-doc-cierre-col-condiciones {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
}
.aj-doc-cierre-comercial-coordinado .aj-doc-cierre-col-totales {
  flex: 0 0 92mm;
  width: 92mm;
  max-width: 92mm;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.aj-doc-cierre-comercial-coordinado .aj-doc-cierre-col-totales .aj-doc-totals-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
}
.aj-doc-condiciones-comerciales-block {
  background: #f8fafc;
  border-left: 2.5px solid #008bd2;
  border-radius: 0;
  padding: 2.5mm 3.2mm;
  box-sizing: border-box;
  font-family: inherit;
}
.aj-doc-condiciones-title {
  color: #008bd2;
  font-size: 8.5pt;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 1.8mm;
}
.aj-doc-condiciones-lista {
  margin: 0;
  padding-left: 3.5mm;
  list-style-type: disc;
}
.aj-doc-condiciones-item {
  font-size: 7.2pt;
  line-height: 1.35;
  color: #334155;
  margin-bottom: 1.4mm;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.aj-doc-condiciones-item:last-child {
  margin-bottom: 0;
}

/* Datos del Vendedor y Cierre Sutil Comercial — H2R2D2B */
.aj-doc-seller-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 3mm;
  padding-top: 2mm;
  border-top: 1px solid #e2e8f0;
  font-size: 8.5pt;
  box-sizing: border-box;
  width: 100%;
}
.aj-doc-seller-info {
  display: flex;
  flex-direction: column;
  max-width: 110mm;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.aj-doc-seller-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 8.5pt;
  line-height: 1.25;
}
.aj-doc-seller-role {
  color: #008bd2;
  font-weight: 600;
  font-size: 7.5pt;
  line-height: 1.25;
  margin-top: .4mm;
}
.aj-doc-seller-phone {
  color: #64748b;
  font-size: 7.5pt;
  margin-top: .4mm;
  font-weight: 500;
}
.aj-doc-validity-note {
  font-size: 7.5pt;
  color: #64748b;
  font-weight: 500;
  text-align: right;
  max-width: 65mm;
  line-height: 1.25;
}

/* Páginas de Anexos (Garantías) — H2R2D2C2.5.2.1 Línea de Garantía Corta */
.aj-doc-annex-header {
  position: absolute;
  left: 15.7mm;
  top: 31mm; /* +3mm de respiración vertical bajo el logo ArtisJet */
  width: 186.35mm; /* Ancho completo alineado al eje derecho 202.05mm */
  padding-bottom: 0;
  border-bottom: none; /* Retirado para no invadir el bloque derecho de Folio/Fecha/Equipos */
  box-sizing: border-box;
}
.aj-doc-annex-divider {
  width: 138mm; /* Ancho idéntico al bloque izquierdo, termina antes del bloque derecho */
  height: 2px;
  background: #008bd2; /* Azul institucional ArtisJet */
  margin-top: 2mm;
  box-sizing: border-box;
}
.aj-doc-annex-eyebrow {
  font-size: 7.5pt;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1mm;
}
.aj-doc-annex-aplica {
  font-size: 8.5pt;
  font-weight: 600;
  color: #475569;
  letter-spacing: .01em;
  text-align: left;
  line-height: 1.3;
  margin-bottom: 1.2mm;
}
.aj-doc-annex-title {
  font-size: 15.5pt;
  font-weight: 900;
  color: #008bd2;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-align: left;
  margin-bottom: 1.2mm;
}
.aj-doc-annex-institucional {
  font-size: 9.2pt;
  font-weight: 700;
  color: #334155;
  letter-spacing: .02em;
  line-height: 1.3;
  text-transform: uppercase;
  margin-bottom: 0.8mm;
}
.aj-doc-annex-body {
  position: absolute;
  left: 15.7mm;
  top: 83mm;
  width: 186.35mm;
  max-height: 165mm;
  font-size: 8.6pt;
  line-height: 1.42;
  color: #0f172a;
  box-sizing: border-box;
}
.aj-doc-annex-p {
  margin: 0 0 3mm 0;
  font-size: 8.6pt;
  line-height: 1.42;
  color: #0f172a;
}
.aj-doc-annex-p-intro {
  font-size: 8.8pt;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4.2mm;
  line-height: 1.42;
}
.aj-doc-annex-sec-title {
  font-size: 9pt;
  font-weight: 800;
  color: #0f172a; /* Subtítulos internos en NEGRO institucional (#0f172a) */
  margin: 4.5mm 0 2mm 0;
  letter-spacing: .01em;
}
.aj-doc-annex-list {
  list-style: none;
  margin: 0 0 3.8mm 0;
  padding-left: 3.5mm;
}
.aj-doc-annex-list li {
  position: relative;
  margin-bottom: 1.4mm;
  line-height: 1.4;
  font-size: 8.6pt;
  color: #0f172a;
}
.aj-doc-annex-list li::before {
  content: "\2022\00a0";
  color: #0f172a; /* Bullet en negro (#0f172a) */
  font-weight: 700;
  display: inline-block;
  width: 3.5mm;
  margin-left: -3.5mm;
}
.aj-doc-annex-num-list {
  list-style: none;
  margin: 0 0 3.8mm 0;
  padding-left: 0;
}
.aj-doc-annex-num-item {
  margin-bottom: 1.6mm;
  line-height: 1.4;
  padding-left: 5mm;
  position: relative;
  font-size: 8.6pt;
  color: #0f172a;
}
.aj-doc-annex-num-item-num {
  font-weight: 700;
  color: #0f172a; /* Número en negro (#0f172a) */
  position: absolute;
  left: 0;
}
.aj-doc-annex-num-item-txt {
  color: #0f172a;
}

/* =========================================================
   H2R2D2C-1.2 — CIERRE COMERCIAL ADAPTATIVO COORDINADO (EQUIPOS)
   PDF-SERVICIOS-AJUSTES-VISUALES-01: Anclaje al eje derecho unificado del contenedor de flujo
   ========================================================= */
.aj-doc-block-cierreEquipo {
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-cierre-equipo {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4mm;
  page-break-inside: avoid;
  break-inside: avoid;
}

/* MODO A / MODO B: Cierre Lateral */
.aj-doc-cierre-equipo-lateral {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5mm;
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-cierre-equipo-lateral .aj-doc-cierre-col-info {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
}
.aj-doc-cierre-equipo-lateral .aj-doc-cierre-col-info .aj-doc-info-equipo-block {
  margin: 0;
  padding: 0;
}
.aj-doc-cierre-equipo-lateral .aj-doc-cierre-col-totales {
  flex: 0 0 82mm;
  width: 82mm;
  max-width: 82mm;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.aj-doc-cierre-equipo-lateral .aj-doc-cierre-col-totales .aj-doc-totals-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* MODO C: Cierre Apilado */
.aj-doc-cierre-equipo-apilado {
  display: flex;
  flex-direction: column;
  gap: 4mm;
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-cierre-equipo-apilado .aj-doc-cierre-apilado-info {
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-cierre-equipo-apilado .aj-doc-cierre-apilado-totales {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-end;
}

/* H2R2D2C-1.3: Bloque de Logística y Entrega Real en Flujo Comercial */
.aj-doc-logistica-box {
  margin-top: 2.5mm;
  margin-bottom: 2.5mm;
  padding: 2mm 3.5mm;
  background: #f8fafc;
  border-left: 3px solid #008bd2;
  border-radius: 2px;
  font-family: 'Montserrat', sans-serif;
  font-size: 8pt;
  color: #334155;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  break-inside: avoid;
  page-break-inside: avoid;
}
.aj-doc-logistica-item {
  line-height: 1.4;
  font-weight: 500;
}

/* Bloque individual Info Equipo */
.aj-doc-info-equipo-block {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  color: #1e293b;
  margin-top: 4mm;
  padding: 3mm 4mm;
  background: #ffffff;
  page-break-inside: avoid;
  break-inside: avoid;
}
.aj-doc-page-info-equipo .aj-doc-info-equipo-body {
  position: absolute;
  left: 15.7mm;
  top: 78mm;
  width: 186.35mm;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  color: #1e293b;
}
.aj-doc-info-equipo-title {
  font-size: 10pt;
  font-weight: 800;
  color: #008bd2;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding-bottom: 1.5mm;
  border-bottom: 1.5px solid #008bd2;
  margin-top: 0;
  margin-bottom: 3.5mm;
}
.aj-doc-info-equipo-lista {
  margin: 0 0 3.5mm 0;
  padding: 0;
  list-style: none;
}
.aj-doc-info-equipo-item {
  position: relative;
  padding-left: 5mm;
  margin-bottom: 2mm;
  font-size: 8.2pt;
  line-height: 1.4;
  color: #334155;
}
.aj-doc-info-equipo-item::before {
  content: "•";
  position: absolute;
  left: 0;
  top: -0.5mm;
  color: #008bd2;
  font-size: 11pt;
  font-weight: 800;
}
.aj-doc-info-equipo-subtitle {
  font-size: 9pt;
  font-weight: 700;
  color: #008bd2;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-top: 3.5mm;
  margin-bottom: 2mm;
  padding-bottom: 1mm;
  border-bottom: 1px solid #e2e8f0;
}
.aj-doc-info-equipo-vigencia {
  font-size: 8.2pt;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2.5mm;
  padding: 1.5mm 3mm;
  background: #f1f5f9;
  border-left: 3px solid #008bd2;
  border-radius: 2px;
}

/* Página de Presentación Documental / Condiciones Expo (H2R2D2C3.1-B) */
.aj-doc-presentacion-header {
  position: absolute;
  left: 15.7mm;
  top: 31mm; /* +3mm de respiración vertical bajo el logo ArtisJet */
  width: 186.35mm;
  box-sizing: border-box;
}
.aj-doc-presentacion-title {
  font-size: 15.5pt;
  font-weight: 900;
  color: #008bd2; /* Azul ArtisJet institucional */
  line-height: 1.2;
  letter-spacing: -.01em;
  text-align: left;
  margin-bottom: 1.2mm;
  text-transform: uppercase;
}
.aj-doc-presentacion-subtitle {
  font-size: 9.2pt;
  font-weight: 600;
  color: #1e293b; /* Negro / gris muy oscuro institucional */
  line-height: 1.3;
  letter-spacing: .01em;
  text-align: left;
  margin-bottom: 3mm; /* Antes 2mm — +1mm de aire entre subtítulo y línea */
}
.aj-doc-presentacion-divider {
  width: 138mm; /* Ancho idéntico al bloque izquierdo, termina antes del bloque derecho */
  height: 1px;
  background: #000000; /* Negro sólido (H2R2D2C3.1-A / H2R2D2C3.1-B) */
  box-sizing: border-box;
  margin-top: 0;       /* El espacio arriba lo gestiona margin-bottom del subtítulo */
  margin-bottom: 4mm;  /* Antes 0 — 4mm de aire entre línea y datos del cliente */
}
.aj-doc-presentacion-body {
  position: absolute;
  left: 15.7mm;
  top: 76mm; /* Inicia fluidamente tras ficha de cliente */
  width: 186.35mm;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  color: #0f172a;
}
.aj-doc-expo-p {
  font-size: 8.6pt;
  line-height: 1.42;
  color: #0f172a;
  margin: 0 0 2.5mm 0;
  text-align: left;
}
/* H2R2D2C3.1-C: párrafo inicial de saludo en semibold */
.aj-doc-expo-saludo {
  font-size: 8.6pt;
  line-height: 1.42;
  color: #0f172a;
  margin: 0 0 2.5mm 0;
  text-align: left;
  font-weight: 600;
}
.aj-doc-expo-sec-title {
  font-size: 8.8pt;
  font-weight: 800;
  color: #0f172a;
  margin: 3.2mm 0 1.2mm 0;
  letter-spacing: .01em;
}
.aj-doc-expo-rojo {
  color: #dc2626;
  font-weight: 800;
}
.aj-doc-expo-list {
  list-style: none;
  margin: 0 0 2.5mm 0;
  padding-left: 3.5mm;
}
.aj-doc-expo-list li {
  margin-bottom: 1.2mm;
  line-height: 1.38;
  font-size: 8.6pt;
  color: #0f172a;
}
.aj-doc-expo-list li::before {
  content: "\2022\00a0";
  color: #0f172a;
  font-weight: 700;
  display: inline-block;
  width: 3.5mm;
  margin-left: -3.5mm;
}
/* H2R2D2C3.1-C: bloque firma centrado respecto al ancho útil de la hoja */
.aj-doc-expo-firma {
  margin-top: 4.5mm;
  line-height: 1.35;
  page-break-inside: avoid;
  text-align: center;
  width: 186.35mm;
}
.aj-doc-expo-atentamente {
  font-size: 8.6pt;
  font-weight: 500;
  color: #0f172a; /* H2R2D2C3.1-C: negro, antes era gris #475569 */
  margin-bottom: 1.2mm;
}
.aj-doc-expo-marca {
  font-size: 9.8pt;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 0.8mm;
}
/* H2R2D2C3.1-C: ASESOR DE VENTAS en azul institucional ArtisJet */
.aj-doc-expo-cargo {
  font-size: 8.2pt;
  font-weight: 700;
  color: #008bd2; /* Azul institucional ArtisJet (H2R2D2C3.1-C) */
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* =========================================================
   H2R2D2A-1 — TABLAS CONTINUAS: Estilos adicionales
   ========================================================= */

/* Tabla continua de Equipos — una sola tabla, múltiples filas (H2R2D2B) */
table.aj-doc-equip-table-cont {
  border-collapse: collapse;
  width: 100%;
  font-size: 9pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
}
table.aj-doc-equip-table-cont th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 9pt;
  letter-spacing: .02em;
  height: 7.5mm;
  text-align: center;
  padding: 0 2mm;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  box-sizing: border-box;
}
table.aj-doc-equip-table-cont th:last-child {
  border-right: 1px solid #cbd5e1;
  padding-left: 2mm;
  padding-right: 2.5mm;
  text-align: right;
}
table.aj-doc-equip-table-cont td {
  padding: 2.0mm 2.2mm;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  box-sizing: border-box;
}
table.aj-doc-equip-table-cont td:last-child {
  border-right: 1px solid #cbd5e1;
  padding-left: 2mm;
  padding-right: 2.5mm;
  text-align: right;
}
table.aj-doc-equip-table-cont th:nth-child(1),
table.aj-doc-equip-table-cont td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-equip-table-cont th:nth-child(2),
table.aj-doc-equip-table-cont td:nth-child(2) { width: 22%; font-weight: 700; text-align: center; }
table.aj-doc-equip-table-cont th:nth-child(3),
table.aj-doc-equip-table-cont td:nth-child(3) { width: 49%; word-break: break-word; overflow-wrap: break-word; }
table.aj-doc-equip-table-cont th:nth-child(4),
table.aj-doc-equip-table-cont td:nth-child(4) { width: 20%; text-align: right; }
/* Fila separadora visible entre equipos */
table.aj-doc-equip-table-cont tr.aj-equip-row-sep td {
  border-top: 2px solid #cbd5e1;
}

/* Tabla continua de Tintas — una sola tabla, múltiples filas (H2R2D2B) */
table.aj-doc-ink-table-cont {
  border-collapse: collapse;
  width: 100%;
  font-size: 8.5pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
}
table.aj-doc-ink-table-cont th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: .02em;
  height: 7mm;
  text-align: center;
  padding: 0 2mm;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  box-sizing: border-box;
}
table.aj-doc-ink-table-cont th:last-child {
  border-right: 1px solid #cbd5e1;
  padding-right: 3mm;
}
table.aj-doc-ink-table-cont td {
  padding: 1.8mm 2mm;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  box-sizing: border-box;
}
table.aj-doc-ink-table-cont td:last-child {
  border-right: 1px solid #cbd5e1;
  padding-right: 3mm;
}
table.aj-doc-ink-table-cont th:nth-child(1),
table.aj-doc-ink-table-cont td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-ink-table-cont th:nth-child(2),
table.aj-doc-ink-table-cont td:nth-child(2) { width: 34%; font-weight: 600; word-break: break-word; }
table.aj-doc-ink-table-cont th:nth-child(3),
table.aj-doc-ink-table-cont td:nth-child(3) { width: 23%; text-align: center; word-break: break-word; }
table.aj-doc-ink-table-cont th:nth-child(4),
table.aj-doc-ink-table-cont td:nth-child(4) { width: 17%; text-align: center; }
table.aj-doc-ink-table-cont th:nth-child(5),
table.aj-doc-ink-table-cont td:nth-child(5) { width: 17%; text-align: center; font-weight: 700; }

/* Color dot en columna COLOR/PRESENTACIÓN */
.aj-doc-ink-color-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
  border: 1px solid rgba(0,0,0,.15);
}

/* Descripción estructurada de tintas y precios con ajuste comercial — PDF-TINTAS-02 */
.aj-doc-ink-main-desc {
  font-weight: 700;
  font-size: 8.5pt;
  color: #1e293b;
  line-height: 1.25;
}

.aj-doc-ink-sub-desc {
  font-size: 7.5pt;
  color: #64748b;
  font-weight: 400;
  line-height: 1.2;
  margin-top: 1px;
}

.aj-doc-ink-price-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.aj-doc-ink-price-effective {
  font-weight: 700;
  font-size: 8.5pt;
  color: #0f172a;
}

.aj-doc-ink-price-base {
  font-size: 7pt;
  color: #64748b;
  font-weight: 500;
  margin-top: 1px;
  white-space: nowrap;
}

/* Header de continuación mejorado — H2R2D2A-1 */
.aj-doc-header-continuacion-v2 {
  position: absolute;
  left: 15.7mm;
  top: 15mm;
  width: 186.35mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #008bd2;
  padding-bottom: 2mm;
  box-sizing: border-box;
}
.aj-doc-cont-v2-brand {
  font-size: 8pt;
  font-weight: 800;
  color: #008bd2;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.aj-doc-cont-v2-label {
  font-size: 8.5pt;
  font-weight: 700;
  color: #475569;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.aj-doc-cont-v2-meta {
  font-size: 8pt;
  font-weight: 600;
  color: #94a3b8;
  text-align: right;
}

/* Wrapper de tabla con cabecera repetible al inicio de continuación */
.aj-doc-table-block {
  width: 100%;
  margin-bottom: 1mm;
}
.aj-doc-table-block-cat-label {
  font-size: 9pt;
  font-weight: 800;
  color: #008bd2;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 3mm 0 1.5mm;
  padding-bottom: 1.2mm;
  border-bottom: 1px solid #cbd5e1;
}
/* Tabla continua de Servicios/Refacciones/Otros (H2R2D2B) */
table.aj-doc-generic-table-cont {
  border-collapse: collapse;
  width: 100%;
  font-size: 8.5pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
}
table.aj-doc-generic-table-cont th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: .02em;
  height: 7mm;
  text-align: center;
  padding: 0 2mm;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  box-sizing: border-box;
}
table.aj-doc-generic-table-cont th:last-child {
  border-right: 1px solid #cbd5e1;
  padding-right: 3mm;
}
table.aj-doc-generic-table-cont td {
  padding: 2mm 2.2mm;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  box-sizing: border-box;
}
table.aj-doc-generic-table-cont td:last-child {
  border-right: 1px solid #cbd5e1;
  padding-right: 3mm;
}
table.aj-doc-generic-table-cont th:nth-child(1),
table.aj-doc-generic-table-cont td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-generic-table-cont th:nth-child(2),
table.aj-doc-generic-table-cont td:nth-child(2) { width: 57%; font-weight: 600; word-break: break-word; }
table.aj-doc-generic-table-cont th:nth-child(3),
table.aj-doc-generic-table-cont td:nth-child(3) { width: 17%; text-align: right; }
table.aj-doc-generic-table-cont th:nth-child(4),
table.aj-doc-generic-table-cont td:nth-child(4) { width: 17%; text-align: right; font-weight: 700; }

/* Tabla continua de Producción (PRODUCCION-01C) */
table.aj-doc-prod-table-cont {
  border-collapse: collapse;
  width: 100%;
  font-size: 8.5pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
}
table.aj-doc-prod-table-cont th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: .02em;
  height: 7mm;
  text-align: center;
  padding: 0 2mm;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  box-sizing: border-box;
}
table.aj-doc-prod-table-cont th:last-child {
  border-right: 1px solid #cbd5e1;
  padding-right: 3mm;
}
table.aj-doc-prod-table-cont td {
  padding: 2mm 2.2mm;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  box-sizing: border-box;
}
table.aj-doc-prod-table-cont td:last-child {
  border-right: 1px solid #cbd5e1;
  padding-right: 3mm;
}
table.aj-doc-prod-table-cont th:nth-child(1),
table.aj-doc-prod-table-cont td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-prod-table-cont th:nth-child(2),
table.aj-doc-prod-table-cont td:nth-child(2) { width: 57%; text-align: left; word-break: break-word; }
table.aj-doc-prod-table-cont th:nth-child(3),
table.aj-doc-prod-table-cont td:nth-child(3) { width: 17%; text-align: center; }
table.aj-doc-prod-table-cont th:nth-child(4),
table.aj-doc-prod-table-cont td:nth-child(4) { width: 17%; text-align: center; font-weight: 700; }

.aj-doc-prod-main-title {
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}
.aj-doc-prod-obs {
  margin-top: 1mm;
  font-size: 7.5pt;
  line-height: 1.3;
  color: #64748b;
  word-break: break-word;
  white-space: pre-wrap;
}

/* =========================================================
   PDF-ENVIO-CATEGORIA-01C: Estilos para la Categoría ENVÍO
   ========================================================= */
.aj-doc-envio-nota-iva {
  margin-top: 1.2mm;
  font-size: 7pt;
  color: #64748b;
  font-style: italic;
  font-weight: 500;
}

.aj-doc-envio-info-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 3.5px solid #008bd2;
  border-radius: 4px;
  padding: 2.2mm 3.5mm;
  font-family: 'Montserrat', sans-serif;
  font-size: 8pt;
  line-height: 1.35;
  color: #1e293b;
  margin-bottom: 2.5mm;
  width: 100%;
  box-sizing: border-box;
  page-break-inside: avoid;
  break-inside: avoid;
}

.aj-doc-envio-info-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 8pt;
  margin-bottom: .8mm;
  text-transform: uppercase;
}

.aj-doc-envio-info-desc {
  color: #334155;
  font-size: 8pt;
  font-weight: 500;
}

.aj-doc-envio-info-desc.aj-doc-envio-alerta {
  color: #0284c7;
  font-weight: 700;
}

.aj-doc-envio-info-sub {
  color: #64748b;
  font-size: 7.5pt;
  margin-top: .8mm;
}

/* =========================================================
   PRODUCCION-OBSERVACIONES-01B: Observaciones de Producción
   ========================================================= */
.aj-doc-prod-obs-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 2.5mm 3mm;
  font-size: 8pt;
  line-height: 1.35;
  color: #1e293b;
  margin: 2.5mm 0;
  white-space: pre-wrap;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-prod-obs-title {
  font-weight: 700;
  color: #475569;
  margin-bottom: .8mm;
  text-transform: uppercase;
  font-size: 7.5pt;
  letter-spacing: .04em;
}
.aj-doc-prod-obs-text {
  font-size: 8pt;
  line-height: 1.35;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================================================
   SERVICIOS-01B: Tabla continua y conceptos de Servicios
   ========================================================= */
table.aj-doc-serv-table-cont {
  border-collapse: collapse;
  width: 100%;
  font-size: 8.5pt;
  table-layout: fixed;
  margin-bottom: 2.5mm;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
}
table.aj-doc-serv-table-cont th {
  background: #008bd2;
  color: #ffffff;
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: .02em;
  height: 7mm;
  text-align: center;
  padding: 0 2mm;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  box-sizing: border-box;
}
table.aj-doc-serv-table-cont th:last-child {
  border-right: 1px solid #cbd5e1;
  padding-right: 3mm;
}
table.aj-doc-serv-table-cont td {
  padding: 2mm 2.2mm;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  box-sizing: border-box;
}
table.aj-doc-serv-table-cont td:last-child {
  border-right: 1px solid #cbd5e1;
  padding-right: 3mm;
}
table.aj-doc-serv-table-cont th:nth-child(1),
table.aj-doc-serv-table-cont td:nth-child(1) { width: 9%; text-align: center; font-weight: 700; }
table.aj-doc-serv-table-cont th:nth-child(2),
table.aj-doc-serv-table-cont td:nth-child(2) { width: 57%; text-align: left; word-break: break-word; }
table.aj-doc-serv-table-cont th:nth-child(3),
table.aj-doc-serv-table-cont td:nth-child(3) { width: 17%; text-align: center; }
table.aj-doc-serv-table-cont th:nth-child(4),
table.aj-doc-serv-table-cont td:nth-child(4) { width: 17%; text-align: center; font-weight: 700; }

.aj-doc-serv-main-title {
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}
.aj-doc-servicio-equipo {
  margin-top: 1mm;
  font-size: 7.5pt;
  line-height: 1.3;
  color: #475569;
  font-weight: 600;
  word-break: break-word;
}
.aj-doc-servicio-fecha {
  margin-top: 0.8mm;
  font-size: 7.5pt;
  line-height: 1.3;
  color: #475569;
  font-weight: 600;
  word-break: break-word;
}
.aj-doc-servicio-obs {
  margin-top: 0.8mm;
  font-size: 7.5pt;
  line-height: 1.3;
  color: #64748b;
  word-break: break-word;
  white-space: pre-wrap;
}

/* =========================================================
   SERVICIOS-01B1-EQUIPO-AGRUPADO: Equipo relacionado agrupado de Servicios
   ========================================================= */
.aj-doc-serv-equipo-comun {
  margin-top: 1mm;
  margin-bottom: 2mm;
  padding: 0;
  font-family: inherit;
  font-size: 7.5pt;
  line-height: 1.3;
  color: #475569;
  word-break: break-word;
}
.aj-doc-serv-equipo-comun-label {
  font-weight: 500;
  color: #64748b;
}
.aj-doc-serv-equipo-comun-val {
  font-weight: 700;
  color: #1e293b;
}

/* =========================================================
   SERVICIOS-01B: Observaciones generales de Servicios
   ========================================================= */
.aj-doc-serv-obs-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 2.5mm 3mm;
  font-size: 8pt;
  line-height: 1.35;
  color: #1e293b;
  margin: 2.5mm 0;
  white-space: pre-wrap;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-serv-obs-title {
  font-weight: 700;
  color: #475569;
  margin-bottom: .8mm;
  text-transform: uppercase;
  font-size: 7.5pt;
  letter-spacing: .04em;
}
.aj-doc-serv-obs-text {
  font-size: 8pt;
  line-height: 1.35;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================================================
   PDF-REFACCIONES-OBSERVACIONES-01: Conceptos y Observaciones de Refacciones
   ========================================================= */
.aj-doc-ref-main-title {
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}
.aj-doc-ref-obs {
  margin-top: 1mm;
  font-size: 7.5pt;
  font-weight: 400;
  line-height: 1.3;
  color: #64748b;
  word-break: break-word;
  white-space: pre-line;
}
.aj-doc-ref-obs-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 2.5mm 3mm;
  font-size: 8pt;
  line-height: 1.35;
  color: #1e293b;
  margin: 2.5mm 0;
  white-space: pre-line;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
}
.aj-doc-ref-obs-title {
  font-weight: 700;
  color: #475569;
  margin-bottom: .8mm;
  text-transform: uppercase;
  font-size: 7.5pt;
  letter-spacing: .04em;
}
.aj-doc-ref-obs-text {
  font-size: 8pt;
  line-height: 1.35;
  color: #1e293b;
  white-space: pre-line;
  word-break: break-word;
}

/* =========================================================
   FASE: PDF-SERVICIOS-PAGINACION-ADICIONALES-01A2 (v1.0.37.2)
   Estilos Canónicos de Hoja Técnica de Mantenimiento
   Ancho útil homologado a 186.35 mm (margen izq 15.7mm, der 202.05mm)
   Encabezado contenido a 138mm sin invadir columna derecha de metadatos
   ========================================================= */

.aj-doc-page-ficha-tecnica {
  /* Clase heredera de .aj-doc-page y .aj-doc-page-documental */
}

.aj-doc-page-ficha-tecnica .aj-doc-ft-header {
  position: absolute;
  left: 15.7mm;
  top: 31mm;
  width: 138mm;
  max-width: 138mm;
  box-sizing: border-box;
}

.aj-doc-ft-eyebrow {
  font-size: 8pt;
  font-weight: 700;
  color: #008bd2;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 1mm;
}

.aj-doc-ft-title {
  font-size: 14pt;
  font-weight: 900;
  color: #008bd2;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-align: left;
  margin-bottom: 1.5mm;
  text-transform: uppercase;
  max-width: 138mm;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.aj-doc-ft-title-continuacion {
  font-size: 13.5pt;
  line-height: 1.22;
  max-width: 138mm;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.aj-doc-ft-subtitle {
  font-size: 8.8pt;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
  text-align: left;
  margin-bottom: 2.5mm;
  max-width: 138mm;
}

.aj-doc-ft-divider {
  width: 138mm;
  height: 1px;
  background: #000000;
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 3.5mm;
}

.aj-doc-ft-body {
  position: absolute;
  left: 15.7mm;
  width: 186.35mm;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  color: #0f172a;
}

.aj-doc-ft-intro {
  font-size: 8.6pt;
  line-height: 1.4;
  color: #0f172a;
  font-weight: 600;
  margin: 0 0 2.5mm 0;
  text-align: left;
}

.aj-doc-ft-task-item {
  margin: 0 0 2.2mm 0;
  page-break-inside: avoid;
  break-inside: avoid;
}

.aj-doc-ft-task-title {
  font-size: 8.8pt;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 0.6mm;
}

.aj-doc-ft-task-num {
  color: #008bd2;
  font-weight: 800;
  margin-right: 1.5mm;
}

.aj-doc-ft-task-text {
  font-size: 8.3pt;
  line-height: 1.35;
  color: #334155;
  margin: 0;
  text-align: justify;
}

.aj-doc-ft-custom-section {
  margin: 4mm 0 3mm 0;
  page-break-inside: avoid;
  break-inside: avoid;
}

.aj-doc-ft-custom-title {
  font-size: 8.8pt;
  font-weight: 800;
  color: #008bd2;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 0 0 2mm 0;
  padding-bottom: 1mm;
  border-bottom: 1px dashed #cbd5e1;
}

.aj-doc-ft-custom-list {
  list-style: none;
  margin: 0 0 2.5mm 0;
  padding-left: 3.5mm;
}

.aj-doc-ft-custom-item {
  font-size: 8.5pt;
  line-height: 1.38;
  color: #1e293b;
  margin-bottom: 1.2mm;
}

.aj-doc-ft-custom-item::before {
  content: "•\00a0";
  color: #008bd2;
  font-weight: 800;
  display: inline-block;
  width: 3.5mm;
  margin-left: -3.5mm;
}

.aj-doc-ft-custom-item.aj-doc-ft-custom-item-continua {
  margin-top: -0.5mm;
}

.aj-doc-ft-custom-item.aj-doc-ft-custom-item-continua::before {
  content: "" !important;
  display: none !important;
}

.aj-doc-ft-obs-box {
  background: #f8fafc;
  border-left: 3.5px solid #008bd2;
  border-radius: 2px;
  padding: 2.5mm 3.5mm;
  margin: 3.5mm 0 3mm 0;
  page-break-inside: avoid;
  break-inside: avoid;
}

.aj-doc-ft-obs-title {
  font-size: 8.3pt;
  font-weight: 700;
  color: #008bd2;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 1mm;
}

.aj-doc-ft-obs-text {
  font-size: 8.3pt;
  line-height: 1.35;
  color: #334155;
  white-space: pre-line;
  word-break: break-word;
}

.aj-doc-ft-consideracion-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid #475569;
  border-radius: 2px;
  padding: 2.2mm 3.2mm;
  margin: 2.5mm 0 2mm 0;
  page-break-inside: avoid;
  break-inside: avoid;
}

.aj-doc-ft-consideracion-title {
  font-size: 7.8pt;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 0.8mm;
}

.aj-doc-ft-consideracion-text {
  font-size: 8.1pt;
  line-height: 1.35;
  color: #475569;
  font-style: italic;
  margin: 0;
}

/* ===========================================================
 * PDF-SERVICIOS-REFACCIONES-01B: Refacciones Sugeridas
 * Sección / Hoja complementaria independiente
 * =========================================================== */
.aj-doc-page-ref-sugeridas {
  /* Estructura base heredada de aj-doc-page y aj-doc-page-documental */
}

.aj-doc-page-ref-sugeridas .aj-doc-rs-header {
  position: absolute;
  top: 31mm;
  left: 15.5mm;
  width: 138mm;
  max-width: 138mm;
  box-sizing: border-box;
  z-index: 2;
}

.aj-doc-page-ref-sugeridas .aj-doc-rs-eyebrow {
  font-size: 7.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #008bd2;
  margin-bottom: 1mm;
}

.aj-doc-page-ref-sugeridas .aj-doc-rs-title {
  font-size: 13pt;
  font-weight: 800;
  color: #008bd2;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.2;
}

.aj-doc-page-ref-sugeridas .aj-doc-rs-divider {
  width: 138mm;
  max-width: 138mm;
  box-sizing: border-box;
  height: 2px;
  background: #008bd2;
  margin-top: 2mm;
  margin-bottom: 2mm;
}

.aj-doc-page-ref-sugeridas .aj-doc-rs-body {
  position: absolute;
  left: 15.5mm;
  width: 184.5mm;
  z-index: 2;
}

/* Tarjeta / Fila de Refacción Sugerida */
.aj-doc-rs-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid #64748b;
  border-radius: 4px;
  padding: 3mm 4mm;
  margin-bottom: 2.8mm;
  page-break-inside: avoid;
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  gap: 1.5mm;
}

.aj-doc-rs-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3mm;
}

.aj-doc-rs-card-main {
  flex: 1;
}

.aj-doc-rs-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 2mm;
  align-items: center;
  margin-bottom: 1.2mm;
}

.aj-doc-rs-badge-no-total {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 6.8pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 0.8mm 2mm;
  border-radius: 3px;
  white-space: nowrap;
}

.aj-doc-rs-badge-equipo {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 6.8pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 0.8mm 2mm;
  border-radius: 3px;
  white-space: nowrap;
}

.aj-doc-rs-card-title {
  font-size: 9.5pt;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
}

.aj-doc-rs-card-cant {
  font-size: 8pt;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.8mm;
}

.aj-doc-rs-card-pricing {
  text-align: right;
  min-width: 42mm;
}

.aj-doc-rs-price {
  font-size: 10.5pt;
  font-weight: 800;
  color: #0f172a;
}

.aj-doc-rs-price-confirmar {
  font-size: 9.5pt;
  font-weight: 700;
  color: #64748b;
  font-style: italic;
}

.aj-doc-rs-price-note {
  display: block;
  font-size: 6.8pt;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-top: 0.5mm;
}

.aj-doc-rs-obs {
  font-size: 8pt;
  line-height: 1.35;
  color: #334155;
  border-top: 1px dashed #e2e8f0;
  padding-top: 1.5mm;
  margin-top: 1mm;
  white-space: pre-line;
  word-break: break-word;
}

.aj-doc-rs-obs-label {
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  font-size: 7.2pt;
  letter-spacing: .02em;
  margin-right: 1.5mm;
}

/* Caja de Subtotal Informativo */
.aj-doc-rs-subtotal-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2.8mm 4mm;
  margin-top: 2.5mm;
  margin-bottom: 2.5mm;
  page-break-inside: avoid;
  break-inside: avoid;
}

.aj-doc-rs-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aj-doc-rs-subtotal-label {
  font-size: 8.5pt;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.aj-doc-rs-subtotal-val {
  font-size: 11pt;
  font-weight: 800;
  color: #008bd2;
}

.aj-doc-rs-subtotal-val.aj-doc-rs-confirmar {
  font-size: 9.5pt;
  font-weight: 700;
  color: #64748b;
  font-style: italic;
}

.aj-doc-rs-subtotal-disclaimer {
  font-size: 7.2pt;
  font-weight: 600;
  color: #64748b;
  font-style: italic;
  margin-top: 1mm;
}

/* Caja de Nota Legal Obligatoria */
.aj-doc-rs-legal-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid #008bd2;
  border-radius: 3px;
  padding: 2.5mm 3.5mm;
  margin-top: 2mm;
  page-break-inside: avoid;
  break-inside: avoid;
}

.aj-doc-rs-legal-title {
  font-size: 7.5pt;
  font-weight: 700;
  color: #008bd2;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 0.8mm;
}

.aj-doc-rs-legal-text {
  font-size: 7.8pt;
  line-height: 1.35;
  color: #475569;
  font-style: italic;
  margin: 0;
}

/* Sandbox de medición */
#ajDocMeasureSandbox {
  position: absolute;
  left: -99999px;
  top: 0;
  width: 215.9mm;
  visibility: hidden;
  pointer-events: none;
  font-family: 'Montserrat', sans-serif;
}

/* =========================================================
   H2R2D3B — REGLAS DE IMPRESIÓN WEB PRINT NATIVO
   Tamaño Carta exacto 215.9mm x 279.4mm, cero márgenes y aislamiento
   ========================================================= */
@page {
  size: 215.9mm 279.4mm;
  margin: 0;
}

@media print {
  html, body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 215.9mm !important;
    height: auto !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Ocultar interfaz del cotizador, modales, toasts y toolbars */
  #v2AppShell, .v2-app, .aj-doc-toolbar, .v2-modal-overlay, .v2-actions-overlay,
  .v2-toast-host, #v2ModalProgreso, #v2BloqueoSesion, .v2-header, .v2-paso-footer {
    display: none !important;
    visibility: hidden !important;
  }

  /* Aislamiento riguroso si está activa la clase artisjet-print-mode */
  body.artisjet-print-mode > *:not(#ajDocPreviewRoot) {
    display: none !important;
    visibility: hidden !important;
  }

  #ajDocPreviewRoot {
    display: block !important;
    position: static !important;
    background: transparent !important;
    overflow: visible !important;
    width: 215.9mm !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .aj-doc-viewport {
    padding: 0 !important;
    gap: 0 !important;
    overflow: visible !important;
    display: block !important;
    width: 215.9mm !important;
  }

  #ajDocPagesContainer {
    display: block !important;
    gap: 0 !important;
    width: 215.9mm !important;
  }

  .aj-preview-page-shell {
    position: relative !important;
    transform: none !important;
    width: 215.9mm !important;
    height: 279.4mm !important;
    page-break-after: always !important;
    break-after: page !important;
    margin: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .aj-preview-page-shell:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  .aj-doc-page {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 215.9mm !important;
    height: 279.4mm !important;
    transform: none !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
}