/* ---------- Gestión de calidad (SGI) ----------
   Estilos propios del módulo, cargados solo cuando la empresa lo tiene
   (ver templates/base.html). Lo genérico (cards, pills, tablas) viene
   de theme.css. */

.cal-normas{ display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:.8rem; }
.cal-norma{
  display:flex; gap:.7rem; align-items:flex-start;
  border:1px solid var(--border); border-radius:var(--radius); padding:.8rem .9rem;
  cursor:pointer; background:var(--surface);
}
.cal-norma.adoptada{ border-color:var(--primary); box-shadow:0 0 0 2px var(--ring); }
.cal-norma input{ margin-top:.25rem; }
.cal-norma-nombre{ font-weight:700; }
.cal-norma-titulo{ font-size:.8rem; color:var(--text-muted); }

.cal-barra{ height:6px; background:var(--surface-2); border-radius:999px; overflow:hidden; }
.cal-barra-relleno{ height:100%; background:var(--primary); border-radius:999px; }

.cal-porcentaje{ text-align:right; }
.cal-porcentaje-valor{ font-size:2.2rem; font-weight:800; color:var(--primary); line-height:1; }

.cal-leyenda{ display:flex; gap:.5rem; flex-wrap:wrap; }
.cal-leyenda a{
  display:inline-flex; gap:.35rem; align-items:center;
  padding:.3rem .6rem; border-radius:999px; border:1px solid var(--border);
  font-size:.8rem; color:var(--text); text-decoration:none;
}
.cal-leyenda a.activa{ border-color:var(--primary); background:var(--surface-2); }

.cal-checklist .cal-numeral{ white-space:nowrap; font-variant-numeric:tabular-nums; color:var(--text-muted); }
.cal-checklist .cal-encabezado td{ background:var(--surface-2); font-weight:600; }
.cal-checklist .cal-encabezado.nivel-0 td{ font-size:.95rem; }

.cal-casillas{ display:flex; flex-wrap:wrap; gap:.4rem .9rem; }
.cal-casilla{ display:inline-flex; align-items:center; gap:.4rem; font-weight:400 !important; font-size:.85rem; margin:0 !important; }

.cal-ficha{ display:grid; grid-template-columns:max-content 1fr; gap:.4rem 1rem; margin:0; font-size:.88rem; }
.cal-ficha dt{ color:var(--text-muted); font-weight:600; }
.cal-ficha dd{ margin:0; }
@media (max-width:600px){ .cal-ficha{ grid-template-columns:1fr; } .cal-ficha dt{ margin-top:.4rem; } }

.cal-procesos{ display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:.8rem; }
.cal-proceso{ border:1px solid var(--border); border-radius:var(--radius); padding:.8rem .9rem; background:var(--surface); }
.cal-proceso.inactivo{ opacity:.55; }
.cal-proceso-codigo{ font-size:.75rem; color:var(--text-muted); font-weight:600; }
.cal-proceso-nombre{ font-weight:700; }
.cal-proceso-pie{ display:flex; gap:.7rem; font-size:.8rem; margin-top:.6rem; color:var(--text-muted); }
.cal-proceso-pie a{ margin-left:auto; }

.cal-flujo{ display:flex; gap:.3rem; flex-wrap:wrap; }
.cal-flujo.vertical{ flex-direction:column; }
.cal-flujo span{
  flex:1; text-align:center; padding:.35rem .5rem; border-radius:var(--radius-sm);
  background:var(--surface-2); color:var(--text-muted); font-size:.78rem; font-weight:600;
}
.cal-flujo span.activo{ background:var(--primary); color:#fff; }

.cal-chip{
  display:inline-block; padding:.15rem .55rem; border-radius:999px;
  font-size:.75rem; font-weight:700; white-space:nowrap;
}
.cal-chip.grande{ font-size:1rem; padding:.35rem .8rem; margin:.3rem 0; }
.cal-nivel-bajo{ background:var(--success-bg); color:var(--success-fg); }
.cal-nivel-moderado{ background:var(--warning-bg); color:var(--warning-fg); }
.cal-nivel-alto{ background:rgba(249,115,22,.18); color:#c2410c; }
.cal-nivel-extremo{ background:var(--danger-bg); color:var(--danger-fg); }

/* En el mapa de calor las celdas van con color pleno (no pastilla):
   la matriz tiene que leerse como semáforo aunque esté vacía. */
.cal-mapa td.cal-nivel-bajo{ background:var(--success-dot); color:#fff; opacity:.75; }
.cal-mapa td.cal-nivel-moderado{ background:var(--warning-dot); color:#fff; opacity:.8; }
.cal-mapa td.cal-nivel-alto{ background:#f97316; color:#fff; opacity:.85; }
.cal-mapa td.cal-nivel-extremo{ background:var(--danger-dot); color:#fff; opacity:.9; }

.cal-valoracion{ display:flex; align-items:center; gap:1rem; justify-content:space-around; text-align:center; }
.cal-valoracion-flecha{ font-size:1.6rem; color:var(--text-muted); }

.cal-mapa{ border-collapse:separate; border-spacing:3px; width:100%; }
.cal-mapa th{ font-size:.72rem; color:var(--text-muted); font-weight:600; text-align:center; }
.cal-mapa td{
  height:44px; text-align:center; font-weight:800; border-radius:var(--radius-sm);
  font-size:1rem;
}

.cal-hallazgo{ border:1px solid var(--border); border-radius:var(--radius); padding:.8rem .9rem; }

/* Los hijos de una rejilla no encogen por debajo de su contenido salvo
   que se les diga: sin esto una tabla ancha (plan de acción, versiones)
   estira la columna más allá de la pantalla en vez de hacer scroll
   dentro de su .table-wrap. */
.cal-grid > *{ min-width:0; }

/* ---------- Mapa de procesos ----------
   Tres franjas horizontales (estratégicos / misionales / apoyo +
   evaluación) entre las dos columnas de "partes interesadas": la
   lectura clásica de izquierda a derecha, del requisito del cliente a
   su satisfacción. Cada caja es un botón que abre el panel lateral. */

.mapa-titulo{ display:flex; justify-content:space-between; align-items:baseline; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }

.mapa{ display:grid; grid-template-columns:120px 1fr 120px; gap:.9rem; align-items:stretch; }
.mapa-lado{ display:flex; align-items:center; }
.mapa-cliente{
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:.3rem;
  width:100%; height:100%; padding:1rem .6rem;
  border:1px dashed var(--border); border-radius:var(--radius);
  background:var(--surface-2); font-size:.76rem; color:var(--text-muted);
}
.mapa-cliente strong{ color:var(--text); font-size:.8rem; }
.mapa-cliente-icono{ font-size:1.6rem; }

.mapa-centro{ display:flex; flex-direction:column; gap:.35rem; min-width:0; }

.mapa-franja{
  border-radius:var(--radius); padding:.7rem .85rem .85rem;
  border:1px solid var(--border);
  background:color-mix(in srgb, var(--franja, var(--primary)) 7%, var(--surface));
  border-color:color-mix(in srgb, var(--franja, var(--primary)) 30%, var(--border));
}
.mapa-estrategicos{ --franja:#8b5cf6; }
.mapa-misionales{ --franja:#0ea5e9; }
.mapa-apoyo{ --franja:#10b981; }
.mapa-evaluacion{ --franja:#f59e0b; }
.mapa-franja-titulo{
  margin:0 0 .55rem; font-size:.7rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
  color:var(--franja);
}

.mapa-cajas{ display:flex; flex-wrap:wrap; gap:.55rem; align-items:stretch; }
.mapa-cadena{ align-items:center; }
.mapa-vacio{ font-size:.8rem; color:var(--text-muted); font-style:italic; }

.mapa-caja{
  flex:1 1 150px; max-width:240px; min-width:0;
  display:flex; flex-direction:column; gap:.2rem; text-align:left;
  padding:.6rem .7rem; border-radius:var(--radius-sm);
  background:var(--surface); border:1px solid var(--border);
  border-left:3px solid var(--franja, var(--primary));
  color:var(--text); cursor:pointer; font:inherit;
  box-shadow:var(--shadow-sm);
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease, border-color .15s ease;
}
.mapa-caja:hover{ transform:translateY(-2px); box-shadow:0 8px 18px color-mix(in srgb, var(--franja) 22%, transparent); }
.mapa-caja.activa{ border-color:var(--franja); box-shadow:0 0 0 3px color-mix(in srgb, var(--franja) 30%, transparent); }
.mapa-caja.apagada{ opacity:.55; }
.mapa-caja-codigo{ font-size:.68rem; font-weight:700; color:var(--text-muted); letter-spacing:.04em; }
.mapa-caja-nombre{ font-size:.85rem; font-weight:600; line-height:1.25; }
.mapa-caja-pie{ display:flex; gap:.5rem; flex-wrap:wrap; font-size:.7rem; color:var(--text-muted); margin-top:.2rem; }
.mapa-caja-pie .alerta{ color:var(--danger-fg); font-weight:700; }

.mapa-flecha-h{ font-size:1.6rem; line-height:1; color:var(--franja); opacity:.7; flex:0 0 auto; padding:0 .1rem; }

.mapa-flecha-v{
  display:flex; align-items:center; justify-content:center; gap:.4rem;
  height:22px; color:var(--text-muted); font-size:.68rem; text-transform:uppercase; letter-spacing:.06em;
}
.mapa-flecha-v::before, .mapa-flecha-v::after{ content:''; flex:1; border-top:1px dashed var(--border); }
.mapa-flecha-v span::after{ content:' ↓'; }
.mapa-flecha-v.arriba span::after{ content:' ↑'; }

.mapa-phva{
  display:flex; justify-content:center; gap:.6rem; margin-top:.9rem;
  font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted);
}

/* Panel lateral con la ficha */
.mapa-panel{
  position:fixed; top:0; right:0; bottom:0; width:min(440px, 100%); z-index:1040;
  background:var(--surface); border-left:1px solid var(--border);
  box-shadow:-12px 0 32px rgba(0,0,0,.18);
  transform:translateX(100%); transition:transform .18s ease;
  overflow-y:auto; padding:1.2rem 1.3rem 1.5rem;
}
.mapa-panel.abierto{ transform:translateX(0); }
.mapa-panel-cerrar{
  position:absolute; top:.7rem; right:.8rem;
  border:1px solid var(--border); background:var(--surface); color:var(--text-muted);
  width:30px; height:30px; border-radius:50%; cursor:pointer;
}
.mapa-panel-cerrar:hover{ color:var(--text); border-color:var(--primary); }
.mapa-panel-nombre{ font-size:1.15rem; margin:.1rem 2rem .7rem 0; }
.mapa-panel-sub{ font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); margin:1rem 0 .3rem; }
.mapa-panel-acciones{ display:flex; gap:.4rem; flex-wrap:wrap; margin-top:1.2rem; padding-top:1rem; border-top:1px solid var(--border); }

@media (max-width:820px){
  .mapa{ grid-template-columns:1fr; }
  .mapa-lado{ display:none; }
}

@media print{
  .sidebar, .topbar, .modulo-tabs, .modulo-acciones, .mapa-panel, .chat-widget-launcher{ display:none !important; }
  .mapa-tarjeta{ border:0; box-shadow:none; }
  .mapa-caja{ break-inside:avoid; }
}


/* ---------- Mapa de procesos circular ----------
   Anillos concéntricos (misionales al centro, apoyo, estratégicos,
   evaluación por fuera) con las entradas del sistema a la izquierda y
   sus salidas a la derecha, y la mejora continua girando alrededor. La
   geometría la calcula calidad/mapa_circular.py; acá solo colores e
   interacción (static/js/calidad_mapa.js). */

.mapa-herramientas{ display:flex; align-items:center; gap:.8rem; flex-wrap:wrap; }
.mapa-zoom{ display:inline-flex; gap:.15rem; }
.mapa-zoom .btn{ padding:.2rem .55rem; font-size:.9rem; line-height:1; }
.mapa-titulo-texto[contenteditable]{ cursor:text; border-bottom:1px dashed transparent; }
.mapa-titulo-texto[contenteditable]:hover, .mapa-titulo-texto[contenteditable]:focus{ border-bottom-color:var(--primary); outline:none; }

.mapa-circular{ display:grid; grid-template-columns:minmax(130px, 190px) minmax(0, 1fr) minmax(130px, 190px); gap:1rem; align-items:center; }
.mapa-lienzo{ position:relative; min-width:0; }
.mapa-svg{ width:100%; height:auto; max-height:78vh; display:block; touch-action:none; user-select:none; }
.mapa-svg.moviendo{ cursor:grabbing; }
.mapa-tarjeta:fullscreen{ background:var(--surface); padding:1rem 2rem; overflow:auto; }
.mapa-tarjeta:fullscreen .mapa-svg{ max-height:88vh; }

.mapa-circular-lado{ font-size:.88rem; color:var(--text); }
.mapa-lado-titulo{ margin:0 0 .4rem; font-size:.7rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:#0e7490; }
.mapa-circular-lado ul{ margin:0; padding-left:1.1rem; display:flex; flex-direction:column; gap:.5rem; }
.mapa-circular-lado li::marker{ color:#0e7490; }
.mapa-circular-lado li[contenteditable]{ cursor:text; border-radius:4px; padding:.1rem .25rem; margin-left:-.25rem; }
.mapa-circular-lado li[contenteditable]:hover{ background:var(--surface-2); }
.mapa-circular-lado li[contenteditable]:focus{ outline:2px solid var(--primary); background:var(--surface); }
.mapa-circular-lado li[contenteditable]:empty::before{ content:'Escribe y pulsa Enter'; color:var(--text-muted); }
.mapa-agregar-texto{ margin-top:.6rem; border:0; background:none; color:var(--primary); font-size:.8rem; cursor:pointer; padding:0; }
.mapa-agregar-texto:hover{ text-decoration:underline; }
.mapa-circular-flecha{
  height:34px; margin:0 0 .9rem; border-radius:6px;
  background:linear-gradient(90deg, rgba(14,116,144,.2), rgba(14,116,144,.6));
  clip-path:polygon(0 25%, 78% 25%, 78% 0, 100% 50%, 78% 100%, 78% 75%, 0 75%);
}
.mapa-circular-lado.derecha .mapa-circular-flecha{ background:linear-gradient(90deg, rgba(14,116,144,.6), rgba(14,116,144,.2)); }

.mapa-fondo{ fill:#e0f2fe; opacity:.7; }

.mapa-sector{ stroke:var(--surface); stroke-width:2.5; transition:opacity .15s ease, filter .15s ease; cursor:grab; }
.mapa-sector.vacio{ cursor:pointer; opacity:.9; stroke-dasharray:5 5; stroke:#94a3b8; }
.mapa-sector-vacio:not([data-crear-en]) .mapa-sector.vacio{ cursor:default; }
.mapa-sector-vacio[data-crear-en]:hover .mapa-sector.vacio{ fill:#e0f2fe; stroke:var(--primary); }
.mapa-sector-grupo:hover .mapa-sector, .mapa-sector-grupo:focus-visible .mapa-sector{ filter:brightness(1.07) saturate(1.2); }
.mapa-sector-grupo:focus{ outline:none; }
.mapa-sector-grupo.activa .mapa-sector{ stroke:var(--primary); stroke-width:3.5; }
.mapa-sector-grupo.apagada{ opacity:.45; }
.mapa-sector-grupo.origen{ opacity:.35; }
.mapa-svg.arrastrando .mapa-sector{ cursor:grabbing; }
.mapa-fantasma{ pointer-events:none; opacity:.75; stroke:var(--primary); stroke-width:3; filter:drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.mapa-anillo.destino .mapa-sector{ stroke:var(--primary); stroke-width:3; stroke-dasharray:6 4; }
.mapa-anillo.destino .mapa-sector.vacio{ fill:#dbeafe; }

/* Texto con halo: legible sobre cualquier relleno, claro u oscuro, y en
   los dos temas. */
/* Negro sobre los sectores claros, blanco sobre los oscuros (lo decide
   mapa_circular._oscuro por la luminancia del relleno); el halo es del
   color contrario para que el nombre no se funda con el borde. */
.mapa-sector-texto{
  font-weight:800; fill:#000; pointer-events:none; letter-spacing:.01em;
  paint-order:stroke fill; stroke:rgba(255,255,255,.7); stroke-width:2.5px; stroke-linejoin:round;
}
.mapa-sector-texto.claro{ fill:#fff; stroke:rgba(0,0,0,.45); }
.mapa-sector-texto.vacio{ fill:#111827; font-weight:700; font-style:italic; stroke:rgba(255,255,255,.9); }
.mapa-alerta{ fill:var(--danger-dot); stroke:#fff; stroke-width:1.5; }

/* El centro lleva el mismo fondo oscuro que la barra lateral: el logo
   de la empresa está pensado para ese fondo (la marca del menú). */
.mapa-centro-disco{ fill:var(--sidebar-bg, #0f172a); stroke:#0e7490; stroke-width:4; }
.mapa-centro-texto{ font-size:14px; font-weight:800; fill:var(--sidebar-text-active, #fff); }
.mapa-centro-sub{ font-size:9px; fill:var(--sidebar-text, #cbd5e1); text-transform:uppercase; letter-spacing:.08em; opacity:.85; }

.mapa-mejora{ fill:none; stroke:#14b8a6; stroke-width:8; stroke-linecap:round; stroke-dasharray:14 10; animation:mapa-fluye 6s linear infinite; }
@keyframes mapa-fluye{ to{ stroke-dashoffset:-96; } }
@media (prefers-reduced-motion: reduce){ .mapa-mejora{ animation:none; stroke-dasharray:none; } }
.mapa-mejora-texto{ font-size:12.5px; font-weight:800; fill:var(--text); letter-spacing:.08em; text-transform:uppercase; }
.mapa-mejora-texto{ fill:#000; }

.mapa-tooltip{
  position:absolute; z-index:5; max-width:260px; pointer-events:none;
  background:var(--text); color:var(--surface); font-size:.76rem; line-height:1.35;
  padding:.45rem .6rem; border-radius:var(--radius-sm); box-shadow:var(--shadow-sm);
}

.mapa-leyenda{ display:flex; gap:.6rem .9rem; flex-wrap:wrap; justify-content:center; align-items:center; margin-top:.9rem; font-size:.78rem; }
.mapa-leyenda-item{ display:inline-flex; align-items:center; gap:.35rem; color:var(--text); font-weight:600; }
.mapa-leyenda-item::before{ content:''; width:12px; height:12px; border-radius:50%; }
.mapa-leyenda-misional::before{ background:#0e7490; }
.mapa-leyenda-apoyo::before{ background:#6ee7b7; }
.mapa-leyenda-estrategico::before{ background:#5eead4; }
.mapa-leyenda-evaluacion::before{ background:#bae6fd; border:1px solid #7dd3fc; }
.mapa-leyenda-mas{
  width:18px; height:18px; border-radius:50%; border:1px solid var(--border); background:var(--surface);
  color:var(--primary); font-size:.8rem; line-height:1; cursor:pointer; padding:0;
}
.mapa-leyenda-mas:hover{ border-color:var(--primary); background:var(--surface-2); }

.mapa-crear{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; margin-top:.9rem; padding:.7rem .9rem; border:1px dashed var(--primary); border-radius:var(--radius); }
.mapa-crear .input{ width:auto; flex:1 1 260px; }

.mapa-aviso{
  position:fixed; left:50%; bottom:1.5rem; transform:translate(-50%, 12px); z-index:1100;
  background:var(--text); color:var(--surface); padding:.55rem .9rem; border-radius:999px; font-size:.85rem;
  opacity:0; transition:opacity .2s ease, transform .2s ease; box-shadow:var(--shadow-sm);
}
.mapa-aviso.visible{ opacity:1; transform:translate(-50%, 0); }
.mapa-aviso.error{ background:var(--danger-dot); color:#fff; }

/* Con menos de ~1100px el mapa se quedaba en un círculo diminuto entre
   las dos columnas de texto: mejor el círculo a todo lo ancho y las
   entradas/salidas debajo, lado a lado. */
@media (max-width:1100px){
  .mapa-circular{ grid-template-columns:1fr 1fr; }
  .mapa-lienzo{ grid-column:1 / -1; order:1; }
  .mapa-circular-lado{ order:2; }
  .mapa-circular-lado.derecha{ order:3; }
  .mapa-circular-flecha{ display:none; }
}
@media (max-width:560px){
  .mapa-circular{ grid-template-columns:1fr; }
}

/* ---------- Ficha del proceso (proceso_detalle) ----------
   Cabecera con el color del anillo al que pertenece, anillo de "salud",
   tarjetas que cambian de pestaña, listas en filas con icono y una
   columna lateral con la actividad reciente. */

.pd-hero{ position:relative; overflow:hidden; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface); margin-bottom:1rem; --pd-color:#0e7490; }
.pd-tipo-misional{ --pd-color:#0e7490; }
.pd-tipo-apoyo{ --pd-color:#059669; }
.pd-tipo-estrategico{ --pd-color:#0891b2; }
.pd-tipo-evaluacion{ --pd-color:#d97706; }
.pd-hero-fondo{
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--pd-color) 26%, transparent), transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--pd-color) 14%, var(--surface)), var(--surface) 60%);
}
.pd-hero::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:6px; background:var(--pd-color); }
.pd-hero-cuerpo{ position:relative; display:grid; grid-template-columns:minmax(0, 1fr) 300px; gap:1.5rem; padding:1.4rem 1.6rem 1.4rem 1.8rem; align-items:start; }
.pd-migas{ display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; font-size:.78rem; color:var(--text-muted); }
.pd-migas a{ color:var(--text-muted); }
.pd-codigo{ font-weight:700; letter-spacing:.06em; color:var(--pd-color); }
.pd-nombre{ font-size:1.7rem; font-weight:800; letter-spacing:-.01em; margin:.2rem 0 .8rem; line-height:1.15; }
.pd-lider{ display:flex; align-items:center; gap:.7rem; font-size:.85rem; line-height:1.25; margin-bottom:1rem; }
.pd-avatar{
  width:40px; height:40px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  background:var(--pd-color); color:#fff; font-weight:800; font-size:.9rem; letter-spacing:.04em;
  box-shadow:0 6px 14px color-mix(in srgb, var(--pd-color) 40%, transparent);
}
.pd-campos{ display:grid; grid-template-columns:1fr 1fr; gap:.8rem 1.2rem; }
.pd-campo-etiqueta{ display:block; font-size:.68rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--pd-color); margin-bottom:.2rem; }
.pd-campo-valor{ margin:0; font-size:.9rem; line-height:1.45; white-space:pre-line; min-height:1.4em; }
.pd-campo-valor.vacio::before{ content:'Sin definir'; color:var(--text-muted); font-style:italic; }
.pd-campo-valor.vacio[contenteditable]::before{ content:'Clic para escribir…'; }
[data-campo][contenteditable]{ cursor:text; border-radius:6px; padding:.15rem .3rem; margin:-.15rem -.3rem; transition:background .15s ease, box-shadow .15s ease; }
[data-campo][contenteditable]:hover{ background:color-mix(in srgb, var(--pd-color) 9%, transparent); }
[data-campo][contenteditable]:focus{ outline:none; background:var(--surface); box-shadow:0 0 0 2px var(--pd-color); }
[data-campo].guardado{ box-shadow:0 0 0 2px var(--success-dot); }
@media (max-width:900px){ .pd-hero-cuerpo{ grid-template-columns:1fr; } .pd-campos{ grid-template-columns:1fr; } }

.pd-salud{ display:flex; align-items:center; gap:1rem; padding:.9rem 1rem; border-radius:var(--radius); background:color-mix(in srgb, var(--surface) 70%, transparent); border:1px solid var(--border); backdrop-filter:blur(6px); }
.pd-anillo{ position:relative; width:104px; height:104px; flex-shrink:0; }
.pd-anillo svg{ width:100%; height:100%; transform:rotate(-90deg); }
.pd-anillo-pista{ fill:none; stroke:var(--surface-2); stroke-width:11; }
.pd-anillo-valor{
  fill:none; stroke-width:11; stroke-linecap:round;
  stroke-dasharray:314; stroke-dashoffset:314; transition:stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1);
}
.pd-anillo-valor.lista{ stroke-dashoffset:calc(314 - 314 * var(--pct) / 100); }
.pd-anillo-alta .pd-anillo-valor{ stroke:var(--success-dot); }
.pd-anillo-media .pd-anillo-valor{ stroke:var(--warning-dot); }
.pd-anillo-baja .pd-anillo-valor{ stroke:var(--danger-dot); }
.pd-anillo-num{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1; }
.pd-anillo-num strong{ font-size:1.7rem; font-weight:800; }
.pd-anillo-num span{ font-size:.62rem; text-transform:uppercase; letter-spacing:.1em; color:var(--text-muted); margin-top:.15rem; }
.pd-frentes{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.45rem; flex:1; min-width:0; }
.pd-frentes li{ display:grid; grid-template-columns:5.2rem 1fr 2rem; gap:.5rem; align-items:center; font-size:.76rem; }
.pd-frentes strong{ text-align:right; font-variant-numeric:tabular-nums; }
.pd-frente-barra{ height:7px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.pd-frente-barra i{ display:block; height:100%; border-radius:999px; transition:width .9s ease; }
.pd-frente-barra i.alta{ background:var(--success-dot); }
.pd-frente-barra i.media{ background:var(--warning-dot); }
.pd-frente-barra i.baja{ background:var(--danger-dot); }
.pd-salud-vacia{ font-size:.8rem; color:var(--text-muted); display:flex; flex-direction:column; gap:.2rem; }
.pd-salud-vacia strong{ color:var(--text); }

.pd-stats{ display:grid; grid-template-columns:repeat(5, 1fr); gap:.8rem; margin-bottom:1rem; }
.pd-stat{
  display:flex; flex-direction:column; align-items:flex-start; gap:.15rem; text-align:left;
  padding:.9rem 1rem; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface);
  color:var(--text); cursor:pointer; font:inherit; box-shadow:var(--shadow-sm);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pd-stat:hover{ transform:translateY(-2px); border-color:var(--primary); box-shadow:0 10px 22px color-mix(in srgb, var(--primary) 14%, transparent); }
.pd-stat-icono{ font-size:1.1rem; }
.pd-stat-num{ font-size:1.7rem; font-weight:800; line-height:1.1; }
.pd-stat-num.alerta, .pd-stat-nota .alerta{ color:var(--danger-fg); }
.pd-stat-etiqueta{ font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); }
.pd-stat-nota{ font-size:.76rem; color:var(--text-muted); }
@media (max-width:1100px){ .pd-stats{ grid-template-columns:repeat(3, 1fr); } }
@media (max-width:640px){ .pd-stats{ grid-template-columns:repeat(2, 1fr); } }

.pd-cuerpo{ display:grid; grid-template-columns:minmax(0, 1fr) 300px; gap:1rem; align-items:start; }
@media (max-width:1100px){ .pd-cuerpo{ grid-template-columns:1fr; } }
.pd-panel{ min-width:0; }
.pd-tabs{ display:flex; gap:.2rem; padding:.4rem .6rem 0; border-bottom:1px solid var(--border); overflow-x:auto; }
.pd-tab{
  border:0; background:none; font:inherit; font-size:.88rem; font-weight:600; color:var(--text-muted);
  padding:.65rem .8rem; border-bottom:2px solid transparent; cursor:pointer; white-space:nowrap;
  display:inline-flex; align-items:center; gap:.4rem; transition:color .15s ease;
}
.pd-tab span{ font-size:.7rem; font-weight:700; background:var(--surface-2); color:var(--text-muted); border-radius:999px; padding:.05rem .45rem; }
.pd-tab:hover{ color:var(--text); }
.pd-tab.activa{ color:var(--primary); border-bottom-color:var(--primary); }
.pd-tab.activa span{ background:var(--primary); color:#fff; }
.pd-seccion{ animation:pd-entra .2s ease; }
@keyframes pd-entra{ from{ opacity:0; transform:translateY(4px); } to{ opacity:1; transform:none; } }
.pd-seccion-cabecera{ display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; flex-wrap:wrap; margin-bottom:.8rem; }
.pd-seccion-cabecera p{ margin:0; font-size:.85rem; max-width:60ch; }
.pd-seccion-botones{ display:flex; gap:.4rem; flex-wrap:wrap; }
.pd-subtitulo{ font-size:.95rem; margin:1.3rem 0 .5rem; }

.pd-lista{ display:flex; flex-direction:column; gap:.4rem; }
.pd-fila{
  display:grid; grid-template-columns:44px minmax(0, 1fr) auto; gap:.8rem; align-items:center;
  padding:.6rem .7rem; border-radius:var(--radius-sm); border:1px solid var(--border);
  color:var(--text); text-decoration:none; background:var(--surface);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.pd-fila:hover{ transform:translateX(3px); border-color:var(--primary); box-shadow:var(--shadow-sm); color:var(--text); }
.pd-fila.cerrada{ opacity:.6; }
.pd-fila-icono{
  width:44px; height:44px; border-radius:11px; display:inline-flex; align-items:center; justify-content:center;
  font-size:.78rem; font-weight:800; background:var(--surface-2); color:var(--text-muted); letter-spacing:.04em; text-align:center; line-height:1.1;
}
.pd-fila-icono.doc-aprobado{ background:var(--success-bg); color:var(--success-fg); }
.pd-fila-icono.doc-en_revision{ background:var(--warning-bg); color:var(--warning-fg); }
.pd-fila-icono.doc-obsoleto{ background:var(--danger-bg); color:var(--danger-fg); }
.pd-fila-icono.aud{ background:var(--info-bg); color:var(--info-fg); font-size:.7rem; }
.pd-fila-icono.acc-correctiva{ background:var(--danger-bg); color:var(--danger-fg); }
.pd-fila-icono.acc-preventiva{ background:var(--warning-bg); color:var(--warning-fg); }
.pd-fila-icono.acc-mejora{ background:var(--success-bg); color:var(--success-fg); }
.pd-fila-texto{ min-width:0; display:flex; flex-direction:column; gap:.15rem; }
.pd-fila-texto strong{ font-size:.9rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pd-fila-texto small{ color:var(--text-muted); font-size:.76rem; }
.pd-fila-derecha{ display:flex; gap:.3rem; align-items:center; flex-wrap:wrap; justify-content:flex-end; }

.pd-tarjetas{ display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:.8rem; }
.pd-indicador{
  display:flex; flex-direction:column; gap:.35rem; padding:.9rem 1rem; border-radius:var(--radius);
  border:1px solid var(--border); border-top:4px solid var(--border); background:var(--surface); color:var(--text); text-decoration:none;
  transition:transform .15s ease, box-shadow .15s ease;
}
.pd-indicador:hover{ transform:translateY(-2px); box-shadow:var(--shadow-sm); color:var(--text); }
.pd-indicador.sem-verde{ border-top-color:var(--success-dot); --spark:var(--success-dot); }
.pd-indicador.sem-amarillo{ border-top-color:var(--warning-dot); --spark:var(--warning-dot); }
.pd-indicador.sem-rojo{ border-top-color:var(--danger-dot); --spark:var(--danger-dot); }
.pd-indicador.sem-nada{ --spark:var(--text-muted); }
.pd-indicador-cab{ display:flex; justify-content:space-between; align-items:center; gap:.5rem; }
.pd-indicador-nombre{ font-size:.92rem; line-height:1.25; }
.pd-indicador-valor b{ font-size:1.6rem; font-weight:800; }
.pd-indicador-valor small{ color:var(--text-muted); }
.pd-indicador-pie{ display:flex; justify-content:space-between; align-items:flex-end; gap:.6rem; margin-top:.2rem; }
.pd-indicador-pie small{ color:var(--text-muted); font-size:.72rem; }
.pd-spark{ width:90px; height:28px; flex-shrink:0; }
.pd-spark polyline{ fill:none; stroke:var(--spark); stroke-width:2.2; stroke-linejoin:round; stroke-linecap:round; vector-effect:non-scaling-stroke; }

.pd-vacio{ text-align:center; padding:2rem 1rem; display:flex; flex-direction:column; align-items:center; gap:.3rem; }
.pd-vacio span{ font-size:2rem; }
.pd-vacio p{ margin:0 0 .5rem; color:var(--text-muted); font-size:.88rem; max-width:40ch; }

.pd-lateral{ position:sticky; top:1rem; }
.pd-actividad{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.pd-actividad li{ position:relative; padding:.45rem 0 .45rem 1.1rem; border-left:2px solid var(--border); font-size:.84rem; display:flex; flex-direction:column; gap:.1rem; }
.pd-actividad li::before{ content:''; position:absolute; left:-6px; top:.75rem; width:10px; height:10px; border-radius:50%; background:var(--text-muted); border:2px solid var(--surface); }
.pd-actividad li.ev-documento::before{ background:var(--primary); }
.pd-actividad li.ev-indicador::before{ background:var(--info-dot); }
.pd-actividad li.ev-riesgo::before{ background:var(--warning-dot); }
.pd-actividad li.ev-accion::before{ background:var(--success-dot); }
.pd-actividad li.ev-hallazgo::before{ background:var(--danger-dot); }
.pd-actividad small{ color:var(--text-muted); font-size:.72rem; }

/* =====================================================
   SISTEMA VISUAL DEL MÓDULO (sgi-*)
   Piezas comunes a todas las pantallas: encabezado con icono, pestañas
   con icono, tarjetas de cifras, barras de progreso, filas con icono
   (pd-fila, definidas arriba), pasos de un flujo, agenda y formularios.
   ===================================================== */

.sgi-encabezado{ align-items:center; }
.sgi-encabezado-texto{ display:flex; gap:.9rem; align-items:center; }
.sgi-encabezado-icono{
  width:46px; height:46px; border-radius:14px; flex-shrink:0;
  display:inline-flex; align-items:center; justify-content:center; color:#fff;
  background:linear-gradient(145deg, #22c55e, #0891b2);
  box-shadow:0 8px 18px rgba(8,145,178,.3);
}
.sgi-encabezado-icono svg{ width:24px; height:24px; }
.sgi-encabezado .page-subtitle{ margin:0; }

.sgi-tabs{
  display:flex; gap:.25rem; flex-wrap:wrap; padding:.3rem;
  background:var(--surface-2); border-radius:14px; border:1px solid var(--border);
}
.sgi-tab{
  display:inline-flex; align-items:center; gap:.45rem;
  padding:.5rem .85rem; border-radius:10px; font-size:.85rem; font-weight:600;
  color:var(--text-muted); text-decoration:none; transition:background .15s ease, color .15s ease, box-shadow .15s ease;
}
.sgi-tab svg{ width:16px; height:16px; opacity:.85; }
.sgi-tab:hover{ color:var(--text); background:color-mix(in srgb, var(--surface) 70%, transparent); }
.sgi-tab.activa{ color:var(--primary); background:var(--surface); box-shadow:var(--shadow-sm); }
.sgi-tab.activa svg{ opacity:1; }

.sgi-card-cabecera{ display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; flex-wrap:wrap; margin-bottom:.9rem; }

.sgi-stats{ display:grid; grid-template-columns:repeat(4, 1fr); gap:.9rem; margin-bottom:1.2rem; }
.sgi-stat{
  display:flex; flex-direction:column; gap:.15rem; padding:1rem 1.1rem;
  border-radius:var(--radius); border:1px solid var(--border); background:var(--surface);
  color:var(--text); text-decoration:none; box-shadow:var(--shadow-sm);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sgi-stat:hover{ transform:translateY(-2px); border-color:var(--primary); box-shadow:0 10px 22px color-mix(in srgb, var(--primary) 14%, transparent); color:var(--text); }
.sgi-stat-icono{ width:36px; height:36px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; font-size:1rem; margin-bottom:.35rem; }
.sgi-stat-icono.azul{ background:#dbeafe; } .sgi-stat-icono.naranja{ background:#ffedd5; } .sgi-stat-icono.verde{ background:#dcfce7; } .sgi-stat-icono.morado{ background:#ede9fe; }
.sgi-stat-num{ font-size:1.8rem; font-weight:800; line-height:1.1; }
.sgi-stat-num.alerta, .alerta{ color:var(--danger-fg); }
.ok{ color:var(--success-fg); } .alerta-suave{ color:var(--warning-fg); } .neutro{ color:var(--text-muted); }
.sgi-semaforos i{ font-style:normal; color:var(--text-muted); font-size:1rem; margin:0 .15rem; }
.sgi-stat-etiqueta{ font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); }
.sgi-stat-nota{ font-size:.76rem; color:var(--text-muted); }
@media (max-width:1000px){ .sgi-stats{ grid-template-columns:repeat(2, 1fr); } }

.sgi-progreso{ display:block; height:9px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.sgi-progreso i{ display:block; height:100%; border-radius:999px; background:var(--primary); transition:width .8s ease; }
.sgi-progreso.alta i{ background:var(--success-dot); } .sgi-progreso.media i{ background:var(--warning-dot); } .sgi-progreso.baja i{ background:var(--danger-dot); }

.sgi-normas-barras{ display:flex; flex-direction:column; gap:.5rem; }
.sgi-norma-barra{
  display:grid; grid-template-columns:170px 1fr 4rem; grid-template-areas:"nombre barra pct" "nombre detalle pct";
  gap:.2rem .9rem; align-items:center; padding:.65rem .8rem; border-radius:var(--radius-sm);
  border:1px solid var(--border); color:var(--text); text-decoration:none; transition:background .15s ease, border-color .15s ease;
}
.sgi-norma-barra:hover{ background:var(--surface-2); border-color:var(--primary); color:var(--text); }
.sgi-norma-barra-nombre{ grid-area:nombre; display:flex; flex-direction:column; }
.sgi-norma-barra-nombre small{ color:var(--text-muted); font-size:.74rem; }
.sgi-norma-barra .sgi-progreso{ grid-area:barra; }
.sgi-norma-barra-pct{ grid-area:pct; font-size:1.2rem; font-weight:800; text-align:right; font-variant-numeric:tabular-nums; }
.sgi-norma-barra-detalle{ grid-area:detalle; font-size:.74rem; color:var(--text-muted); }
@media (max-width:640px){ .sgi-norma-barra{ grid-template-columns:1fr 4rem; grid-template-areas:"nombre pct" "barra barra" "detalle detalle"; } }

.sgi-agenda{ display:flex; flex-direction:column; gap:.4rem; }
.sgi-agenda-item{ display:flex; align-items:center; gap:.7rem; padding:.45rem .5rem; border-radius:var(--radius-sm); color:var(--text); text-decoration:none; transition:background .15s ease; }
.sgi-agenda-item:hover{ background:var(--surface-2); color:var(--text); }
.sgi-agenda-texto{ flex:1; min-width:0; display:flex; flex-direction:column; }
.sgi-agenda-texto strong{ font-size:.86rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sgi-agenda-texto small{ color:var(--text-muted); font-size:.74rem; }
.sgi-fecha{
  width:44px; height:44px; border-radius:11px; flex-shrink:0; display:inline-flex; flex-direction:column; align-items:center; justify-content:center; line-height:1;
  background:var(--info-bg); color:var(--info-fg);
}
.sgi-fecha b{ font-size:1.05rem; font-weight:800; } .sgi-fecha small{ font-size:.6rem; text-transform:uppercase; letter-spacing:.04em; margin-top:.1rem; }
.sgi-fecha.vencida{ background:var(--danger-bg); color:var(--danger-fg); }
.sgi-fecha.alerta{ background:var(--warning-bg); color:var(--warning-fg); }
.sgi-fecha.neutra{ background:var(--surface-2); color:var(--text-muted); }

/* Normas: tarjetas con anillo de avance */
.sgi-normas{ display:grid; grid-template-columns:repeat(auto-fill, minmax(330px, 1fr)); gap:.8rem; }
.sgi-norma{
  display:grid; grid-template-columns:auto 72px minmax(0, 1fr); gap:.8rem; align-items:center;
  padding:.9rem 1rem; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface);
  cursor:pointer; transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.sgi-norma:has(input:checked), .sgi-norma.adoptada{ border-color:var(--primary); box-shadow:0 0 0 3px var(--ring); }
.sgi-norma:hover{ transform:translateY(-1px); }
.sgi-norma input{ width:18px; height:18px; accent-color:var(--primary); }
.sgi-norma:not(:has(input)){ grid-template-columns:72px minmax(0, 1fr); }
.sgi-norma-texto{ display:flex; flex-direction:column; gap:.15rem; min-width:0; }
.sgi-norma-nombre{ font-weight:800; display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; }
.sgi-norma-titulo{ font-size:.8rem; color:var(--text-muted); line-height:1.3; }
.sgi-norma-datos{ font-size:.74rem; color:var(--text-muted); }
.sgi-norma-mini{ display:flex; gap:.4rem; font-size:.74rem; margin-top:.15rem; }
.sgi-norma-mini b{ padding:.05rem .45rem; border-radius:999px; background:var(--surface-2); }
.sgi-norma-boton{ grid-column:1 / -1; justify-self:end; }
.sgi-norma-anillo{ position:relative; width:72px; height:72px; flex-shrink:0; }
.sgi-norma-anillo.grande{ width:96px; height:96px; }
.sgi-norma-anillo svg{ width:100%; height:100%; transform:rotate(-90deg); }
.sgi-norma-anillo .pista{ fill:none; stroke:var(--surface-2); stroke-width:12; }
.sgi-norma-anillo .valor{ fill:none; stroke-width:12; stroke-linecap:round; stroke-dasharray:314; stroke-dashoffset:calc(314 - 314 * var(--pct) / 100); transition:stroke-dashoffset .8s ease; stroke:var(--primary); }
.sgi-norma-anillo.alta .valor{ stroke:var(--success-dot); } .sgi-norma-anillo.media .valor{ stroke:var(--warning-dot); } .sgi-norma-anillo.baja .valor{ stroke:var(--danger-dot); }
.sgi-norma-anillo b{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:.9rem; font-weight:800; }
.sgi-norma-anillo.grande b{ font-size:1.2rem; }

/* Checklist de requisitos */
.sgi-buscar{ margin-left:auto; }
.sgi-buscar .input{ width:220px; padding:.35rem .6rem; font-size:.82rem; }
.sgi-checklist{ display:flex; flex-direction:column; gap:.3rem; }
.sgi-capitulo{ display:flex; gap:.6rem; align-items:baseline; padding:.7rem .6rem .3rem; font-size:.9rem; }
.sgi-capitulo.nivel-0{ font-size:1rem; border-bottom:2px solid var(--border); margin-top:.6rem; }
.sgi-capitulo.nivel-1{ padding-left:1.2rem; color:var(--text-muted); }
.sgi-capitulo.nivel-2{ padding-left:2rem; color:var(--text-muted); font-size:.85rem; }
.sgi-requisito{
  display:grid; grid-template-columns:5.2rem minmax(0, 1fr) auto; gap:.7rem; align-items:center;
  padding:.55rem .7rem; padding-left:calc(.7rem + var(--nivel, 1) * .6rem);
  border-radius:var(--radius-sm); border:1px solid var(--border); border-left-width:4px; background:var(--surface);
  transition:box-shadow .15s ease, border-color .15s ease;
}
.sgi-requisito:hover{ box-shadow:var(--shadow-sm); }
.sgi-requisito.guardado{ box-shadow:0 0 0 2px var(--success-dot); }
.sgi-requisito.estado-cumple{ border-left-color:var(--success-dot); }
.sgi-requisito.estado-parcial{ border-left-color:var(--warning-dot); }
.sgi-requisito.estado-no_cumple{ border-left-color:var(--danger-dot); }
.sgi-requisito.estado-no_aplica{ border-left-color:var(--border); opacity:.75; }
.sgi-requisito.estado-sin_evaluar{ border-left-color:var(--border); border-left-style:dashed; }
.sgi-requisito-numeral{ font-weight:700; color:var(--text-muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
.sgi-requisito-texto{ display:flex; flex-direction:column; gap:.1rem; min-width:0; }
.sgi-requisito-texto strong{ font-weight:600; font-size:.9rem; }
.sgi-requisito-texto small{ color:var(--text-muted); font-size:.76rem; }
.sgi-requisito-meta{ display:flex; gap:.7rem; flex-wrap:wrap; }
.sgi-requisito-estado{ display:flex; gap:.4rem; align-items:center; }
.sgi-estado-select{
  font:inherit; font-size:.78rem; font-weight:700; padding:.3rem 1.6rem .3rem .6rem; border-radius:999px; border:1px solid var(--border);
  background:var(--surface-2); color:var(--text); cursor:pointer; appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23808498' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m4 6 4 4 4-4'/%3e%3c/svg%3e");
  background-repeat:no-repeat; background-position:right .45rem center; background-size:12px;
}
.sgi-estado-select.estado-cumple{ background-color:var(--success-bg); color:var(--success-fg); border-color:transparent; }
.sgi-estado-select.estado-parcial{ background-color:var(--warning-bg); color:var(--warning-fg); border-color:transparent; }
.sgi-estado-select.estado-no_cumple{ background-color:var(--danger-bg); color:var(--danger-fg); border-color:transparent; }
@media (max-width:640px){ .sgi-requisito{ grid-template-columns:1fr; } }

/* Pasos de un flujo (documento, acción) */
.sgi-pasos{ list-style:none; margin:0; padding:0; display:flex; gap:0; counter-reset:paso; }
.sgi-pasos li{ flex:1; display:flex; flex-direction:column; align-items:center; text-align:center; gap:.35rem; position:relative; font-size:.74rem; color:var(--text-muted); }
.sgi-pasos li::before{ content:''; position:absolute; top:13px; left:50%; width:100%; height:2px; background:var(--border); z-index:0; }
.sgi-pasos li:last-child::before{ display:none; }
.sgi-pasos li b{ position:relative; z-index:1; width:28px; height:28px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:var(--surface-2); border:2px solid var(--border); font-size:.75rem; font-weight:800; }
.sgi-pasos li.hecho b{ background:var(--success-dot); border-color:var(--success-dot); color:#fff; }
.sgi-pasos li.hecho b::after{ content:'✓'; }
.sgi-pasos li.hecho b{ font-size:0; } .sgi-pasos li.hecho b::after{ font-size:.8rem; }
.sgi-pasos li.hecho::before{ background:var(--success-dot); }
.sgi-pasos li.actual b{ background:var(--primary); border-color:var(--primary); color:#fff; box-shadow:0 0 0 4px var(--ring); }
.sgi-pasos li.actual{ color:var(--text); font-weight:700; }
.sgi-pasos li.actual.fin b{ background:var(--text-muted); border-color:var(--text-muted); box-shadow:none; }
.sgi-pasos.vertical{ flex-direction:column; gap:.9rem; }
.sgi-pasos.vertical li{ flex-direction:row; text-align:left; align-items:flex-start; gap:.7rem; }
.sgi-pasos.vertical li::before{ top:28px; left:13px; width:2px; height:calc(100% + .9rem); }
.sgi-pasos.vertical li span{ display:flex; flex-direction:column; padding-top:.3rem; }
.sgi-pasos.vertical li span small{ font-weight:400; color:var(--text-muted); font-size:.72rem; }

/* Listas: barra superior de filtros + resumen */
.sgi-barra-lista{ display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }
.sgi-check{ display:inline-flex; align-items:center; gap:.4rem; font-size:.85rem; }
.sgi-semaforo-resumen{ display:flex; gap:.9rem; font-size:.8rem; font-weight:600; }
.pd-indicador.inactivo{ opacity:.55; }
.sgi-doc{ display:inline-flex; align-items:center; gap:.5rem; text-decoration:none; }
.pd-fila-icono.chico{ width:30px; height:30px; border-radius:8px; font-size:.62rem; }
.pd-vacio.compacto{ padding:1.2rem .5rem; } .pd-vacio.compacto span{ font-size:1.5rem; }

/* Formularios */
.sgi-form .field label{ font-size:.8rem; }
.sgi-form .input:focus{ box-shadow:0 0 0 3px var(--ring); }
.sgi-form-pie{
  display:flex; gap:.5rem; align-items:center; margin-top:1.2rem; padding-top:1rem; border-top:1px solid var(--border);
  position:sticky; bottom:0; background:var(--surface); padding-bottom:.2rem;
}
