/* Formatos corporativos CP.08.02 · vista previa e impresión. */
.rep {
  /* azul corporativo de las plantillas CP.08.02 (fijo: no sigue la paleta de la app) */
  --rep-font:var(--nexus-font-informe);
  --rep-ink:#14283f;
  --rep-muted:#55657a;
  --rep-line:#d9e0eb;
  --rep-blue:#14283f;
  --rep-tint:#eaf0fd;
  --rep-faint:#f5f7fa;
  max-width:960px;
  margin-inline:auto;
  padding:24px;
  border:1px solid var(--rep-line);
  border-radius:18px;
  background:#fff;
  color:var(--rep-ink);
  font:400 13px/1.43 var(--rep-font);
  overflow-wrap:anywhere;
}
.rep .rhead{margin:0 0 11px;padding:0 0 10px;border-bottom:1.5px solid var(--rep-blue)}
.rep .rhead-superior{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,1.3fr);align-items:end;gap:8px 16px;margin-bottom:10px}
.rep .rlogo :is(img,canvas){display:block;width:min(100%,220px);height:74px;object-fit:contain;object-position:left center}
.rep .rlogo .rlogo-txt{font:800 17px/1.2 var(--rep-font);color:var(--rep-blue)}
.rep .rep-tipo{margin:0 0 3px;color:var(--rep-blue);font-size:11px;font-weight:700;letter-spacing:.04em}
.rep .rtitulo h2{margin:0 0 3px;font:700 24px/1.2 var(--rep-font);color:var(--rep-ink);letter-spacing:-.02em}
.rep .rk{color:var(--rep-muted);font-size:10px;letter-spacing:.015em}
.rep .rmeta{display:grid;grid-template-columns:.9fr 1.35fr .9fr .67fr;gap:5px 8px;margin:0}
.rep .rmeta dt{font-size:8px;color:var(--rep-muted)}
.rep .rmeta dd{margin:2px 0 0;font-size:9px;font-weight:600;line-height:1.24}
.rep .rmeta div:first-child dd{color:var(--rep-blue);white-space:nowrap}
.rep .rep-note{margin:3px 0 0;font-size:9px;color:var(--rep-muted)}
.rep .rep-seccion{margin:0 0 9px;padding:10px 12px;border:1px solid var(--rep-line);border-radius:14px}
.rep .rep-cierre-icono{width:18px;height:18px;flex:none;align-self:center;fill:none;stroke:var(--rep-blue);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rep .rep-dos{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rep h3{display:flex;align-items:center;gap:7px;margin:0 0 6px;color:var(--rep-blue);font-size:13px;line-height:1.3}
.rep .rep-num{display:inline-grid;min-width:20px;height:20px;place-items:center;flex:none;border-radius:50%;background:var(--rep-blue);color:#fff;font-size:10px;font-weight:700}
.rep h4{margin:7px 0 5px;color:var(--rep-blue);font-size:12px}
.rep h4:first-child{margin-top:0}
.rep p{margin:0 0 6px}
.rep p:last-child,.rep ul:last-child,.rep ol:last-child{margin-bottom:0}
.rep ul,.rep ol{margin:0 0 6px;padding-left:18px}
.rep .rep-pendiente{color:var(--rep-muted)}
.rep table{width:100%;border-collapse:separate;border-spacing:0;margin:0 0 5px;font-size:11px;line-height:1.35;border:1px solid var(--rep-line);border-radius:12px}
.rep table:last-child{margin-bottom:0}
.rep th,.rep td{padding:4px 6px;border-right:1px solid var(--rep-line);border-bottom:1px solid var(--rep-line);vertical-align:top;text-align:left}
.rep tr>:last-child{border-right:0}
.rep tbody tr:last-child>*{border-bottom:0}
.rep thead th{overflow-wrap:normal;background:var(--rep-blue);color:#fff;font-weight:650;text-align:center;vertical-align:middle}
.rep thead th:first-child{border-top-left-radius:4px}
.rep thead th:last-child{border-top-right-radius:4px}
.rep .rep-id{white-space:nowrap}
.rep tbody th{background:var(--rep-tint);color:var(--rep-blue);font-weight:650}
.rep tbody tr:nth-child(even)>td{background:var(--rep-faint)}
.rep .rep-step-meta{color:var(--rep-muted);font-size:10px}
.rep .rep-step{margin-bottom:4px;padding:5px 7px;border:1px solid var(--rep-line);border-radius:4px;background:var(--rep-faint)}
.rep .rep-step .rep-code{display:inline-block;min-width:22px;color:var(--rep-blue);font-weight:700}
.rep .rep-subpaso-icono{width:13px;height:13px;margin-right:4px;vertical-align:-2px;fill:none;stroke:var(--rep-blue);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rep .rep-subnum{display:inline-block;padding:1px 4px;border-radius:3px;background:var(--rep-tint);color:var(--rep-blue)}
.rep .rep-rutas{display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:var(--rep-muted)}
.rep .rep-subregla{margin-top:4px;padding:4px 6px;border:1px solid var(--rep-line);border-radius:5px;background:#fff}
.rep .rep-pasos-head{margin-top:10px}
.rep .rep-nota{padding:5px 7px;border-left:2px solid var(--rep-blue);background:var(--rep-tint);border-radius:3px;font-size:10px}
dialog.modal.rep-mapa-dialogo{width:min(1450px,calc(100vw - 24px));max-width:calc(100vw - 24px)}
.rep-mapa-herramientas{display:flex;gap:6px;max-width:1260px;margin:0 auto 10px}
.rep-mapa-herramientas [aria-pressed="true"]{background:var(--rep-blue);border-color:var(--rep-blue);color:#fff}
.rep.rep-mapa{max-width:1260px}
.rep .rep-mapa-visual{border:0;padding:0}
.rep .rep-mapa-alcance{margin-bottom:12px;color:var(--rep-muted);font-size:11px;font-weight:600}
.rep .rep-mapa-franja{margin:0 0 9px}
.rep .rep-mapa-franja:last-child{margin-bottom:0}
.rep .rep-mapa-franja h4{display:flex;gap:8px;align-items:center;margin:0;padding:5px 9px;border-radius:5px 5px 0 0;background:var(--rep-blue);color:#fff}
.rep .rep-mapa-franja h4 span{margin-left:auto;font-size:.84em}
.rep .rep-mapa-tarjetas{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:5px;padding:6px;border:1px solid var(--rep-line);border-top:0;border-radius:0 0 5px 5px}
.rep .rep-mapa-identidad{background:var(--rep-tint);padding:6px 8px;font-size:11px;line-height:1.25;display:grid;align-content:center;gap:2px}
.rep .rep-mapa-tarjetas .rep-mapa-identidad{border:1px solid var(--rep-line);border-radius:4px}
.rep .rep-mapa-codigo{display:block;color:var(--rep-blue);font-weight:700;font-variant-numeric:tabular-nums}
.rep .rep-mapa-editar{justify-self:start;margin-top:4px;padding:2px 4px;text-align:left;border:1px solid var(--rep-line);background:#fff;color:var(--rep-blue);border-radius:4px;cursor:pointer;font:600 10px/1.2 var(--rep-font)}
.rep .rep-mapa-editar:hover{border-color:var(--rep-blue)}
.rep .rep-mapa-cadena{display:grid;grid-template-columns:minmax(92px,.9fr) minmax(105px,1.05fr) minmax(0,3.3fr) minmax(105px,1.05fr);border:1px solid var(--rep-line);border-top:0;font-size:11px;line-height:1.3}
.rep .rep-mapa-cadena:last-child{border-radius:0 0 5px 5px}
.rep .rep-mapa-cadena>div{min-width:0}
.rep .rep-mapa-entrada,.rep .rep-mapa-salida{display:flex;align-items:center;gap:4px;padding:6px}
.rep .rep-mapa-extremo{min-width:0;flex:1}
.rep .rep-mapa-extremo b{display:block;color:var(--rep-blue);margin-bottom:2px}
.rep .rep-mapa-extremo ul{padding-left:12px;margin-bottom:0}
.rep .rep-mapa-trayecto{padding:6px;border-inline:1px solid var(--rep-line);align-content:center}
.rep .rep-mapa-confirmada .rep-mapa-trayecto{border-inline:0;padding-inline:0}
.rep .rep-mapa-flecha{flex:none;color:var(--rep-blue);font-size:16px;font-weight:700;line-height:1}
.rep .rep-mapa-etapas,.rep .rep-mapa-etapa ul,.rep .rep-mapa-vinculos{padding:0;margin:0;list-style:none}
.rep .rep-mapa-etapas,.rep .rep-mapa-vinculos{display:flex;align-items:stretch;flex-wrap:wrap;gap:4px}
.rep .rep-mapa-etapa{display:flex;align-items:center;gap:4px;flex:1 1 95px;min-width:0}
.rep .rep-mapa-etapa-cuerpo{flex:1;min-width:0;padding:4px;border:1px solid var(--rep-line);border-radius:4px;background:var(--rep-faint)}
.rep .rep-mapa-etapa-titulo{display:block;margin-bottom:3px;color:var(--rep-blue);font-size:.9em;font-weight:700}
.rep .rep-mapa-nodo{padding:3px 5px;border:1px solid var(--rep-line);border-radius:4px;min-width:0}
.rep .rep-mapa-etapa .rep-mapa-nodo{background:#fff}
.rep .rep-mapa-etapa .rep-mapa-nodo+.rep-mapa-nodo{margin-top:3px}
.rep .rep-mapa-vinculos .rep-mapa-nodo{flex:1 1 95px;background:var(--rep-faint)}
.rep .rep-mapa-nodo strong{display:block;font-weight:600}
.rep .rep-mapa-aviso,.rep .rep-mapa-vacio{color:var(--rep-muted);font-size:.92em}
.rep .rep-mapa-vacio{margin:0;padding:5px 8px;border:1px solid var(--rep-line);border-top:0}
.rep .rep-mapa-detalle{margin-top:14px}
.rep-mapa-config{display:grid;gap:8px}
.rep-mapa-campo{display:grid;grid-template-columns:minmax(0,1fr) minmax(135px,210px);gap:8px;align-items:center;padding:5px 0;border-bottom:1px solid var(--rep-line)}
.rep-mapa-campo .rep-mapa-codigo{display:block;color:var(--rep-blue);font-size:.88em}
.rep .rep-mapa-proceso{margin:0 0 5px;padding:5px;border:1px solid var(--rep-line);border-radius:12px}
.rep .rep-mapa-proceso table{table-layout:fixed}
.rep .rep-mapa-proceso thead th:last-child{width:36%}
.rep .sign{display:flex;align-items:end;gap:4px;height:32px;border-bottom:1px solid #9aa8bb}
.rep .sign small{font-size:9px;color:var(--rep-muted)}
.rep .flowrep{margin:0 0 8px;padding:7px;border:1px solid var(--rep-line);border-radius:7px;background:var(--rep-faint)}
.rep .flowrep svg{width:auto;max-width:100%;height:auto;display:block;margin-inline:auto;border:1px dashed var(--rep-line);border-radius:5px;font-family:var(--rep-font)}
.rep .flowrep figcaption{margin:0 0 6px;color:var(--rep-blue);font-size:11px;font-weight:700}
.rep-print{max-width:960px;margin:20px auto;background:#fff}
@page{
  size:A4;
  margin:13mm 13mm 15mm;
  @top-left{content:" "}
  @top-center{content:" "}
  @top-right{content:" "}
  @bottom-left{content:"Eljuri Licores · Gestión de procesos";font:8pt Inter,Arial,sans-serif;color:#51617d}
  @bottom-right{content:"Página " counter(page) " de " counter(pages);font:8pt Inter,Arial,sans-serif;color:#51617d}
}
@page mapa-corporativo{
  size:A3 landscape;
  margin:11mm 12mm 12mm;
}
@media print{
  .rep-print{margin:0;color:#14213d}
  .rep{max-width:none;padding:0;border:0;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .rep .rhead,.rep .rep-step,.rep .flowrep,.rep td .sign,.rep .rep-dos{break-inside:avoid}
  .rep .rep-seccion{box-decoration-break:clone;-webkit-box-decoration-break:clone}
  .rep-print:has(.rep-mapa),.rep.rep-mapa{max-width:none}
  .rep .rep-mapa-portada{page:mapa-corporativo}
  .rep .rep-mapa-detalle{margin:0;break-before:page}
  .rep .rep-mapa-editar{display:none}
  .rep .rep-mapa-cadena,.rep .rep-mapa-tarjetas,.rep .rep-mapa-proceso{break-inside:avoid}
  .rep .rep-mapa-alcance{margin-bottom:7px}
  .rep .rep-mapa-identidad,.rep .rep-mapa-cadena{font-size:12px}
  .rep .rep-mapa-franja{margin-bottom:6px}
  .rep .rep-actividades{break-inside:auto}
  .rep .flowrep svg{max-height:137mm}
  .rep h3,.rep h4{break-after:avoid}
  .rep tr{break-inside:avoid}
  .rep thead{display:table-header-group}
  .rep p{orphans:2;widows:2}
}

.rep-sipoc{display:block;width:100%;height:auto;margin:4px 0 12px;break-inside:avoid}

/* tablas redondeadas también en los formatos: las esquinas se redondean en las celdas porque la tabla no recorta */
.rep thead tr:first-child>th:first-child{border-top-left-radius:11px}
.rep thead tr:first-child>th:last-child{border-top-right-radius:11px}
.rep tbody:last-child>tr:last-child>:first-child{border-bottom-left-radius:11px}
.rep tbody:last-child>tr:last-child>:last-child{border-bottom-right-radius:11px}
.rep tbody:last-child>tr:last-child>*{border-bottom:0}
.rep .rep-step,.rep .rep-subregla,.rep .rep-mapa-tarjetas .rep-mapa-identidad{border-radius:9px}
