/* SIPMAN SAS — Estándar de interfaz
 * Archivo:  sipman.css
 * Versión:  1.1.0
 * Requiere tokens.css cargado antes.
 * © 2026 SIPMAN SAS. Todos los derechos reservados. sipman.co
 */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

a { color: var(--acento); text-decoration: underline; text-underline-offset: 2px; }
body { margin: 0; font-family: var(--font-sans); font-size: 14px; line-height: 20px; background: var(--surface); color: var(--ink); }
.sm-fila { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; padding: var(--space-4); }
.sm-num { font-family: var(--font-mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sm-muted { color: var(--ink-muted); }

/* Botón */
.sm-btn { font: inherit; font-weight: 500; height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2); }
.sm-btn:hover { background: var(--surface-alt); }
.sm-btn--primario { background: var(--acento); border-color: var(--acento); color: var(--on-acento); }
.sm-btn--primario:hover { background: var(--acento); filter: brightness(1.12); }
.sm-btn--texto { border-color: transparent; background: transparent; color: var(--acento); padding: 0 var(--space-2); }
.sm-btn--peligro { border-color: var(--error); color: var(--error); }
.sm-btn:disabled { opacity: .45; cursor: not-allowed; }
.sm-btn:focus-visible, .sm-campo__control:focus-visible, .sm-menu a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sm-btn svg { width: 16px; height: 16px; }

/* Campo */
.sm-campo { display: flex; flex-direction: column; gap: var(--space-1); min-width: 220px; }
.sm-campo__etiqueta { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.sm-campo__control { font: inherit; height: 36px; padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.sm-campo__control.sm-num { text-align: right; }
.sm-campo__ayuda { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.sm-campo--error .sm-campo__control { border-color: var(--error); border-width: 2px; }
.sm-campo--error .sm-campo__ayuda { color: var(--error); }

/* Tabla */
.sm-tabla { width: 100%; border-collapse: collapse; background: var(--surface); }
.sm-tabla th { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); text-align: left; padding: var(--space-2) var(--space-3); background: var(--surface-alt); border-bottom: 1px solid var(--line-strong); }
.sm-tabla td { padding: var(--space-2) var(--space-3); height: 24px; border-bottom: 1px solid var(--line); }
.sm-tabla th.sm-num { text-align: right; font-family: var(--font-sans); }
.sm-tabla tbody tr:hover { background: var(--surface-alt); }
.sm-tabla tr.sm-seleccionada { background: var(--acento-soft); }
.sm-tabla tfoot td { font-weight: 600; border-top: 1px solid var(--line-strong); border-bottom: 0; }

/* Estado */
.sm-estado { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.sm-estado::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.sm-estado--exito { color: var(--exito); }
.sm-estado--advertencia { color: var(--advertencia); }
.sm-estado--error { color: var(--error); }

/* Alerta */
.sm-alerta { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); }
.sm-alerta__titulo { font-weight: 600; }
.sm-alerta--info { background: var(--acento-soft); border-color: var(--acento); }
.sm-alerta--advertencia { border-color: var(--advertencia); }
.sm-alerta--advertencia .sm-alerta__titulo { color: var(--advertencia); }
.sm-alerta--error { border-color: var(--error); }
.sm-alerta--error .sm-alerta__titulo { color: var(--error); }
/* Encabezado de pantalla */
.sm-encabezado { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding-bottom: var(--space-4); border-bottom: 1px solid var(--ink); }
.sm-migas { font-size: 12px; line-height: 16px; color: var(--ink-muted); margin: 0 0 var(--space-1); }
.sm-titulo { font-size: 24px; line-height: 30px; font-weight: 600; margin: 0; letter-spacing: -.01em; }

/* Aplicación: barra superior + menú lateral */
.sm-app { display: grid; grid-template-columns: 216px 1fr; grid-template-rows: 48px 1fr auto; min-height: 100%; }
.sm-barra { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-6); background: var(--acento); color: var(--on-acento); }
.sm-barra__marca { font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: var(--space-3); }
.sm-barra__marca img { height: 24px; width: auto; display: block; }
.sm-barra__marca b { color: var(--on-acento); font-weight: 600; }
.sm-barra__marca span { opacity: .7; font-weight: 400; margin-left: var(--space-2); }
.sm-menu { background: var(--surface-alt); border-right: 1px solid var(--line); padding: var(--space-4) 0; }
.sm-menu__grupo { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); padding: var(--space-3) var(--space-6) var(--space-1); }
.sm-menu a { display: block; padding: var(--space-2) var(--space-6); color: var(--ink); text-decoration: none; }
.sm-menu a:hover { background: var(--surface); }
.sm-menu a[aria-current="page"] { background: var(--acento-soft); color: var(--acento); font-weight: 600; }
.sm-contenido { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }

/* Pie SIPMAN */
.sm-pie { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-6); border-top: 1px solid var(--line); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.sm-pie b { color: var(--ink); font-weight: 600; }

/* Firma SIPMAN */
.sm-firma { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 12px; line-height: 16px; color: var(--ink-muted); text-decoration: none; }
.sm-firma__sello { height: 24px; width: auto; flex: 0 0 auto; display: block; }
.sm-firma b { color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.sm-firma--grande { font-size: 14px; line-height: 20px; gap: var(--space-3); }
.sm-firma--grande .sm-firma__sello { height: 24px; width: auto; flex: 0 0 auto; display: block; }
.sm-firma--inversa { color: var(--on-acento); }
.sm-firma--inversa b { color: var(--on-acento); }

/* Ayuda normativa */
.sm-ayuda__boton { position: fixed; right: var(--space-6); bottom: var(--space-6); z-index: 50; display: inline-flex; align-items: center; gap: var(--space-2); height: 48px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-md); background: var(--acento); color: var(--on-acento); font: inherit; font-weight: 600; cursor: pointer; }
.sm-ayuda__boton svg { width: 20px; height: 20px; }
.sm-ayuda__boton:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sm-ayuda__panel { position: fixed; right: var(--space-6); bottom: 88px; z-index: 50; width: 400px; max-width: calc(100% - 2 * var(--space-4)); max-height: calc(100% - 120px); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-md); }
.sm-ayuda__cabeza { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.sm-ayuda__titulo { font-weight: 600; }
.sm-ayuda__cuerpo { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); overflow-y: auto; }
.sm-ayuda__sugerencia { font: inherit; font-size: 13px; text-align: left; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.sm-ayuda__sugerencia:hover { background: var(--surface-alt); }
.sm-ayuda__respuesta { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface-alt); border-radius: var(--radius-md); }
.sm-ayuda__bloque { display: flex; flex-direction: column; gap: var(--space-1); }
.sm-ayuda__norma { margin: 0; padding-left: var(--space-4); }
.sm-ayuda__ruta { color: var(--acento); text-decoration: underline; text-underline-offset: 2px; }
.sm-ayuda__vigencia { margin: 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
@media (max-width: 560px) { .sm-ayuda__boton { width: 48px; padding: 0; justify-content: center; font-size: 0; } .sm-ayuda__boton svg { width: 22px; height: 22px; } .sm-ayuda__panel { right: var(--space-2); left: var(--space-2); width: auto; max-width: none; } }

/* Ayuda por campo */
.sm-campo__cabeza { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.sm-campo__mas { font: inherit; font-size: 12px; line-height: 16px; padding: 0; border: 0; background: none; color: var(--acento); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.sm-campo__detalle { padding: var(--space-2) var(--space-3); background: var(--surface-alt); border-radius: var(--radius-md); font-size: 13px; line-height: 18px; display: flex; flex-direction: column; gap: var(--space-1); }
.sm-campo__detalle-norma { font-size: 12px; color: var(--ink-muted); }
.sm-campo__detalle-norma b { color: var(--ink); }

/* Componentes agregados por SIGP-21502 (v1.1.0) — solo tokens, prefijo sm-
 * sm-app--fija      barra y menú fijos con desplazamiento del contenido; respeta el atributo hidden
 * sm-menu__clausula cláusula de la norma junto a cada opción del menú
 * sm-seccion        bloque de contenido con título (no lista registros)
 * sm-indicadores    grupo de indicadores; sm-indicador con variantes de estado
 * sm-progreso       barra de avance; sm-progreso__valor con variantes de estado
 * sm-clausula       referencia corta a una cláusula normativa
 * sm-rejilla        formulario a dos columnas; sm-campo--ancho ocupa ambas
 * sm-acciones       fila de botones
 * sm-nivel          selector de nivel del diagnóstico (0 a 4)
 * sm-gantt          cronograma de actividades
 * sm-ingreso        pantalla de ingreso sobre fondo de acento
 * sm-reporte        encabezado y pie de documentos imprimibles
 */
html, body { height: 100%; }
.sm-campo__detalle[hidden], .sm-ayuda__panel[hidden] { display: none; }
.sm-barra__marca { text-decoration: none; }
.sm-app--fija { height: 100%; grid-template-rows: 48px 1fr; grid-template-columns: 300px 1fr; }
.sm-app--fija .sm-barra { position: sticky; top: 0; z-index: 20; }
.sm-app--fija .sm-menu { overflow-y: auto; height: calc(100vh - 48px); position: sticky; top: 48px; padding-bottom: var(--space-12); }
.sm-app--fija .sm-principal { display: flex; flex-direction: column; min-width: 0; }
.sm-barra a { color: var(--on-acento); }
.sm-barra__usuario { font-size: 13px; display: flex; gap: var(--space-3); align-items: center; }
.sm-menu a { display: flex; justify-content: space-between; gap: var(--space-2); align-items: baseline; padding: var(--space-1) var(--space-4) var(--space-1) var(--space-6); line-height: 18px; }
.sm-menu__grupo { padding-left: var(--space-6); }
.sm-menu__clausula { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); text-align: right; max-width: 45%; flex: 0 0 auto; }

.sm-seccion { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.sm-seccion__titulo { font-size: 16px; line-height: 22px; font-weight: 600; margin: 0; }
.sm-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.sm-texto { margin: 0; max-width: 920px; }
.sm-desplazable { overflow-x: auto; }

.sm-indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); }
.sm-indicador { border: 1px solid var(--line); border-top: 3px solid var(--acento); padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); }
.sm-indicador__valor { font-family: var(--font-mono); font-size: 20px; line-height: 26px; font-weight: 500; white-space: nowrap; }
.sm-indicador__nombre { font-size: 13px; }
.sm-indicador__detalle { font-size: 12px; color: var(--ink-muted); }
.sm-indicador--exito { border-top-color: var(--exito); }
.sm-indicador--advertencia { border-top-color: var(--advertencia); }
.sm-indicador--error { border-top-color: var(--error); }

.sm-progreso { height: 10px; background: var(--surface-alt); border: 1px solid var(--line); min-width: 80px; }
.sm-progreso__valor { display: block; height: 100%; background: var(--acento); }
.sm-progreso__valor--exito { background: var(--exito); }
.sm-progreso__valor--advertencia { background: var(--advertencia); }
.sm-progreso__valor--error { background: var(--error); }

.sm-clausula { font-family: var(--font-mono); font-size: 11px; line-height: 16px; padding: 0 var(--space-1); background: var(--acento-soft); color: var(--acento); border-radius: var(--radius-sm); white-space: nowrap; }

.sm-rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4) var(--space-6); }
.sm-campo--ancho { grid-column: 1 / -1; }
.sm-rejilla--una { grid-template-columns: 1fr; }
textarea.sm-campo__control { height: auto; min-height: 72px; padding: var(--space-2) var(--space-3); resize: vertical; }
.sm-campo__obligatorio { color: var(--ink); }
.sm-acciones { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.sm-acciones form { display: inline; }

.sm-nivel { display: flex; gap: var(--space-1); }
.sm-nivel label { cursor: pointer; }
.sm-nivel input { position: absolute; opacity: 0; }
.sm-nivel span { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-family: var(--font-mono); }
.sm-nivel input:checked + span { background: var(--acento); color: var(--on-acento); border-color: var(--acento); }
.sm-nivel input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.sm-gantt { border: 1px solid var(--line); font-size: 13px; }
.sm-gantt__fila { display: grid; grid-template-columns: 260px 1fr; border-bottom: 1px solid var(--line); min-height: 30px; }
.sm-gantt__fila:last-child { border-bottom: 0; }
.sm-gantt__nombre { padding: var(--space-1) var(--space-3); border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-gantt__linea { position: relative; }
.sm-gantt__cabeza { background: var(--surface-alt); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.sm-gantt__mes { position: absolute; top: var(--space-1); padding-left: var(--space-1); border-left: 1px solid var(--line); }
.sm-gantt__barra { position: absolute; top: 7px; height: 16px; background: var(--acento-soft); border: 1px solid var(--acento); }
.sm-gantt__avance { display: block; height: 100%; background: var(--acento); }
.sm-gantt__barra--vencida { border-color: var(--error); }
.sm-gantt__barra--vencida .sm-gantt__avance { background: var(--error); }
.sm-gantt__corte { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); }

.sm-ingreso { min-height: 100%; background: var(--acento); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6); padding: var(--space-6); }
.sm-ingreso__caja { width: 360px; max-width: 100%; background: var(--surface); border-radius: var(--radius-md); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.sm-ingreso__logo { width: 140px; height: auto; align-self: center; }
.sm-ingreso .sm-pie { border-top-color: var(--acento-soft); color: var(--on-acento); }

.sm-reporte { display: none; }
.sm-reporte__encabezado { display: flex; align-items: center; gap: var(--space-4); border-bottom: 1px solid var(--ink); padding-bottom: var(--space-3); }
.sm-reporte__encabezado img { height: 48px; width: auto; }
.sm-reporte__titulo { margin-left: auto; text-align: right; }

@media (max-width: 900px) {
  .sm-app--fija { grid-template-columns: 1fr; grid-template-rows: 48px auto 1fr; }
  .sm-app--fija .sm-menu { position: static; height: auto; max-height: 40vh; }
  .sm-columnas, .sm-rejilla { grid-template-columns: 1fr; }
  .sm-gantt__fila { grid-template-columns: 140px 1fr; }
}
@media print {
  .sm-barra, .sm-menu, .sm-ayuda__boton, .sm-ayuda__panel, .sm-sin-impresion { display: none !important; }
  .sm-app--fija { display: block; height: auto; }
  .sm-reporte { display: block; }
  .sm-progreso__valor, .sm-gantt__avance, .sm-estado::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Componentes agregados por SIGP-21502 (v1.2.0) — solo tokens, prefijo sm-
 * sm-menu__seccion   grupo del menú que el usuario puede expandir o contraer
 * sm-edt             diagrama jerárquico de la EDT (raíz, ramas horizontales y listas verticales)
 * sm-gantt--jerarquico  Gantt con columnas de datos, filas agrupables, fases, resúmenes e hitos
 * sm-sangria-N       sangría por nivel jerárquico (1 a 4)
 */
.sm-menu__herramientas { display: flex; gap: var(--space-3); padding: 0 var(--space-4) var(--space-2) var(--space-6); font-size: 12px; }
.sm-menu__herramientas button { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-muted); text-decoration: underline; cursor: pointer; }
.sm-menu__alternar { display: flex; width: 100%; justify-content: space-between; align-items: center; background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; }
.sm-menu__alternar::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: 0 var(--space-4) 3px 0; transition: transform .15s; }
.sm-menu__alternar[aria-expanded="false"]::after { transform: rotate(-45deg); margin-bottom: 0; }
.sm-menu__alternar:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sm-menu__opciones[hidden] { display: none; }

.sm-sangria-0 { padding-left: var(--space-2); }
.sm-sangria-1 { padding-left: var(--space-3); }
.sm-sangria-2 { padding-left: var(--space-6); }
.sm-sangria-3 { padding-left: calc(var(--space-6) + var(--space-4)); }
.sm-sangria-4 { padding-left: calc(var(--space-12)); }
.sm-encabezado--seccion { border: 0; padding: 0; margin: 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3); }

.sm-edt { display: flex; flex-direction: column; align-items: center; min-width: max-content; padding: var(--space-2) var(--space-2) var(--space-4); }
.sm-edt__raiz { display: flex; justify-content: center; padding-bottom: var(--space-6); position: relative; }
.sm-edt__raiz::after { content: ""; position: absolute; left: 50%; bottom: 0; height: var(--space-6); border-left: 1px solid var(--line-strong); }
.sm-edt__ramas { display: flex; list-style: none; margin: 0; padding: 0; }
.sm-edt__ramas > li { position: relative; padding: var(--space-6) var(--space-2) 0; display: flex; flex-direction: column; align-items: flex-start; }
.sm-edt__ramas > li::before, .sm-edt__ramas > li::after { content: ""; position: absolute; top: 0; width: 50%; border-top: 1px solid var(--line-strong); }
.sm-edt__ramas > li::before { left: 0; }
.sm-edt__ramas > li::after { right: 0; }
.sm-edt__ramas > li:first-child::before, .sm-edt__ramas > li:last-child::after { border-top: 0; }
.sm-edt__ramas > li:only-child::before, .sm-edt__ramas > li:only-child::after { display: none; }
.sm-edt__ramas > li > .sm-edt__nodo { position: relative; align-self: center; }
.sm-edt__ramas > li > .sm-edt__nodo::before { content: ""; position: absolute; left: 50%; top: calc(-1 * var(--space-6)); height: var(--space-6); border-left: 1px solid var(--line-strong); }
.sm-edt__ramas > li > .sm-edt__lista { align-self: center; width: 200px; }
.sm-edt__lista { list-style: none; margin: 0 0 0 var(--space-3); padding: 0 0 0 var(--space-4); }
.sm-edt__lista > li { position: relative; padding-top: var(--space-3); }
.sm-edt__lista > li::before { content: ""; position: absolute; left: calc(-1 * var(--space-4)); top: calc(var(--space-3) + 18px); width: var(--space-4); border-top: 1px solid var(--line-strong); }
.sm-edt__lista > li::after { content: ""; position: absolute; left: calc(-1 * var(--space-4)); top: 0; bottom: 0; border-left: 1px solid var(--line-strong); }
.sm-edt__lista > li:last-child::after { bottom: auto; height: calc(var(--space-3) + 18px); }
.sm-edt__lista .sm-edt__lista { margin-left: var(--space-3); }
.sm-edt__nodo { display: flex; flex-direction: column; gap: var(--space-1); width: 200px; padding: var(--space-2) var(--space-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: 13px; line-height: 17px; }
a.sm-edt__nodo:hover { border-color: var(--acento); }
a.sm-edt__nodo:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sm-edt__nodo--raiz { width: 260px; background: var(--acento); border-color: var(--acento); color: var(--on-acento); }
.sm-edt__nodo--raiz .sm-edt__codigo, .sm-edt__nodo--raiz .sm-edt__dato { color: var(--on-acento); }
.sm-edt__nodo--raiz .sm-progreso { border-color: var(--acento-soft); }
.sm-edt__nodo--raiz .sm-progreso__valor { background: var(--on-acento); }
.sm-edt__nodo--nivel1 { background: var(--acento-soft); border-color: var(--acento); border-top-width: 3px; }
.sm-edt__codigo { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.sm-edt__nombre { font-weight: 600; }
.sm-edt__dato { font-size: 12px; color: var(--ink-muted); }
.sm-edt__nodo .sm-progreso { height: 6px; }
.sm-edt__leyenda, .sm-gantt__leyenda { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: 12px; align-items: center; }
.sm-edt__leyenda > span, .sm-gantt__leyenda > span { display: inline-flex; align-items: center; gap: var(--space-1); }
.sm-edt__muestra { display: inline-block; width: 14px; height: 10px; border: 1px solid var(--line); background: var(--surface); }
.sm-edt__muestra--raiz { background: var(--acento); border-color: var(--acento); }
.sm-edt__muestra--nivel1 { background: var(--acento-soft); border-color: var(--acento); }

.sm-gantt--jerarquico { min-width: 1200px; }
.sm-gantt--jerarquico .sm-gantt__fila { grid-template-columns: minmax(260px, 320px) 84px 84px 64px minmax(620px, 1fr); min-height: 28px; }
.sm-gantt--jerarquico .sm-gantt__fila[hidden] { display: none; }
.sm-gantt--jerarquico .sm-gantt__nombre { display: flex; align-items: center; gap: var(--space-1); }
.sm-gantt__dato { padding: var(--space-1) var(--space-2); border-right: 1px solid var(--line); font-size: 12px; white-space: nowrap; display: flex; align-items: center; }
.sm-gantt__dato.sm-num { justify-content: flex-end; }
.sm-gantt__fila--proyecto { background: var(--acento-soft); font-weight: 600; }
.sm-gantt__fila--grupo { background: var(--surface-alt); font-weight: 600; }
.sm-gantt__fila--resumen { font-weight: 600; }
.sm-gantt__alternar { width: 18px; height: 18px; flex: 0 0 18px; border: 0; background: none; cursor: pointer; position: relative; padding: 0; }
.sm-gantt__alternar::after { content: ""; position: absolute; left: 5px; top: 4px; width: 6px; height: 6px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
.sm-gantt__alternar[aria-expanded="false"]::after { transform: rotate(-45deg); left: 4px; top: 6px; }
.sm-gantt__alternar:focus-visible { outline: 2px solid var(--focus); }
.sm-gantt__espacio { width: 18px; flex: 0 0 18px; }
.sm-gantt__division { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.sm-gantt__barra--proyecto { top: 8px; height: 12px; }
.sm-gantt__barra--fase { top: 9px; height: 10px; background: var(--surface-alt); border-color: var(--line-strong); }
.sm-gantt__barra--resumen { top: 10px; height: 8px; background: var(--line); border: 0; border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.sm-gantt__barra--resumen .sm-gantt__avance { background: var(--ink); }
.sm-gantt__barra--actividad { top: 7px; height: 14px; }
.sm-gantt__hito { position: absolute; top: 8px; width: 11px; height: 11px; background: var(--ink); transform: translateX(-50%) rotate(45deg); z-index: 1; }
.sm-gantt__hito--leyenda { position: static; transform: rotate(45deg); display: inline-block; margin: 0 var(--space-1); }
.sm-gantt__muestra { display: inline-block; width: 18px; height: 10px; background: var(--acento-soft); border: 1px solid var(--acento); }
.sm-gantt__muestra--proyecto { background: var(--acento); }
.sm-gantt__muestra--fase { background: var(--surface-alt); border-color: var(--line-strong); }
.sm-gantt__muestra--resumen { height: 6px; background: var(--ink); border: 0; }
.sm-gantt__muestra--vencida { border-color: var(--error); background: var(--error); }
.sm-gantt__muestra--corte { width: 2px; height: 14px; background: var(--ink); border: 0; }
@media print {
  .sm-gantt--jerarquico .sm-gantt__fila[hidden] { display: grid; }
  .sm-edt__nodo, .sm-gantt__barra, .sm-gantt__hito, .sm-gantt__fila--proyecto, .sm-gantt__fila--grupo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Componentes agregados por SIGP-21502 (v1.3.0) — solo tokens, prefijo sm-
 * sm-matriz   matriz de funciones por rol con selector de nivel por celda
 */
.sm-matriz td, .sm-matriz th { white-space: nowrap; }
.sm-matriz__grupo td { background: var(--surface-alt); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.sm-matriz__nivel { height: 32px; min-width: 124px; font-size: 13px; }
.sm-matriz__nivel--edicion { background: var(--acento-soft); border-color: var(--acento); font-weight: 600; }
.sm-matriz__nivel--ninguno { color: var(--ink-muted); }
.sm-matriz tbody td:first-child, .sm-matriz thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 240px; white-space: normal; }
.sm-matriz thead th:first-child { background: var(--surface-alt); }
.sm-matriz__grupo td:first-child { background: var(--surface-alt) !important; }

/* Componentes agregados por SIGP-21502 (v1.4.0) — solo tokens, prefijo sm-
 * sm-mapa         mapa de calor de riesgos 5 x 5 (niveles bajo, moderado, alto y extremo)
 * sm-decision     controles para aceptar o rechazar una sugerencia
 * sm-tabla--alineada  celdas alineadas arriba para textos largos
 */
.sm-mapa { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 460px; font-size: 12px; }
.sm-mapa th { font-weight: 600; color: var(--ink-muted); font-size: 11px; text-align: center; padding: var(--space-1); }
.sm-mapa th span { font-weight: 400; }
.sm-mapa__eje { text-align: right !important; white-space: nowrap; }
.sm-mapa__celda { height: 64px; min-width: 72px; vertical-align: top; padding: var(--space-1); border-radius: var(--radius-sm); }
.sm-mapa__celda--n1 { background: color-mix(in srgb, var(--exito) 16%, var(--surface)); }
.sm-mapa__celda--n2 { background: color-mix(in srgb, var(--advertencia) 22%, var(--surface)); }
.sm-mapa__celda--n3 { background: color-mix(in srgb, var(--error) 22%, var(--surface)); }
.sm-mapa__celda--n4 { background: color-mix(in srgb, var(--error) 42%, var(--surface)); }
.sm-mapa__riesgo { display: inline-block; margin: 2px; padding: 0 var(--space-1); background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 11px; color: var(--ink); text-decoration: none; }
.sm-mapa__riesgo:hover { background: var(--ink); color: var(--surface); }
.sm-mapa__leyenda { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: 12px; }
.sm-mapa__leyenda > span { display: inline-flex; align-items: center; gap: var(--space-1); }
.sm-mapa__muestra { display: inline-block; width: 16px; height: 12px; border-radius: var(--radius-sm); }
.sm-decision { display: flex; flex-direction: column; gap: var(--space-1); min-width: 190px; }
.sm-decision .sm-campo__control { height: 32px; font-size: 12px; }
.sm-control--corto { width: 64px; }
.sm-tabla--alineada td { vertical-align: top; }
.sm-fila--seleccionada td { background: var(--acento-soft); }
@media print { .sm-mapa__celda, .sm-mapa__muestra { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Componentes agregados por SIGP-21502 (v1.5.0) — solo tokens, prefijo sm-
 * sm-barra__alarmas  aviso de alarmas propias en la barra superior
 * sm-alarma          sección de alarmas con borde según la categoría (error, advertencia, info)
 * sm-verificacion    lista de verificación de buenas prácticas del acta
 * sm-acta            documento del acta de seguimiento (pantalla e impresión)
 * sm-mensaje         mensaje de una comunicación, desplegable
 * sm-en-linea        formulario o etiqueta en línea dentro de una celda o barra
 */
.sm-barra__alarmas { padding: 2px var(--space-2); border: 1px solid var(--on-acento); border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; }
.sm-barra__alarmas--vencidas { background: var(--error); border-color: var(--error); }
a.sm-indicador { color: inherit; text-decoration: none; }
a.sm-indicador:hover { border-color: var(--line-strong); }
.sm-en-linea { display: inline-flex; align-items: center; gap: var(--space-1); }
.sm-alarma { border-left: 4px solid var(--line-strong); }
.sm-alarma--error { border-left-color: var(--error); }
.sm-alarma--advertencia { border-left-color: var(--advertencia); }
.sm-alarma--info { border-left-color: var(--acento); }
.sm-verificacion { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2) var(--space-6); font-size: 13px; }
.sm-verificacion__punto { display: flex; gap: var(--space-2); align-items: flex-start; }
.sm-verificacion__marca { flex: 0 0 64px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; padding-top: 2px; }
.sm-verificacion__punto--cumple .sm-verificacion__marca { color: var(--exito); }
.sm-verificacion__punto--falta .sm-verificacion__marca { color: var(--error); }
.sm-verificacion__punto--mejora .sm-verificacion__marca { color: var(--advertencia); }
.sm-acta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6) var(--space-8); margin-bottom: var(--space-6); }
.sm-acta .sm-reporte { display: block; }
.sm-acta__marca { font-family: var(--font-mono); font-size: 11px; color: var(--advertencia); letter-spacing: .04em; margin: 0 0 var(--space-3); }
.sm-acta__identificacion th { width: 16%; background: var(--surface-alt); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 12px; }
.sm-acta__titulo { font-size: 15px; font-weight: 600; margin: var(--space-6) 0 var(--space-2); padding-bottom: var(--space-1); border-bottom: 1px solid var(--line); }
.sm-acta__subtitulo { font-size: 13px; font-weight: 600; margin: var(--space-4) 0 var(--space-2); }
.sm-acta__lista { margin: 0; padding-left: var(--space-6); font-size: 14px; line-height: 1.6; }
.sm-acta__firma-celda { width: 28%; }
.sm-acta__firmas { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); margin-top: var(--space-8); }
.sm-acta__firma { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.sm-acta__linea { border-top: 1px solid var(--ink); margin-bottom: var(--space-1); height: var(--space-8); }
.sm-acta__nuevo { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px dashed var(--line-strong); }
.sm-mensaje summary { cursor: pointer; }
.sm-mensaje__cuerpo { white-space: pre-wrap; font-family: var(--font-sans); font-size: 12px; background: var(--surface-alt); padding: var(--space-3); border-radius: var(--radius-sm); max-width: 640px; margin: var(--space-2) 0 0; }
@media (max-width: 900px) { .sm-verificacion, .sm-acta__firmas { grid-template-columns: 1fr; } .sm-acta { padding: var(--space-4); } }
@media print {
  .sm-acta { border: 0; padding: 0; }
  .sm-acta__titulo { break-after: avoid; }
  .sm-alarma { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.sm-sin-corte { white-space: nowrap; }
.sm-alarma td:nth-child(3) { min-width: 300px; }
@media print {
  .sm-desplazable { overflow: visible; }
  .sm-acta .sm-tabla, .sm-alarma .sm-tabla { font-size: 10.5px; }
  .sm-acta .sm-tabla th, .sm-acta .sm-tabla td { padding: 4px 6px; }
  .sm-alarma td:nth-child(3) { min-width: 0; }
}

/* Logo RiskMan en el menú lateral (manual de marca RiskMan, sección 1):
 * logo en tinta sobre fondo claro, 150 px de ancho (mínimo 120 px), espacio libre de 1/6 de su altura */
.sm-menu__marca { display: block; padding: var(--space-2) var(--space-6) var(--space-4); margin-bottom: var(--space-2); border-bottom: 1px solid var(--line); line-height: 0; }
.sm-menu__marca img { display: block; width: 150px; height: auto; }
.sm-app--fija .sm-menu { padding-top: var(--space-3); }

/* Componentes agregados por SIGP-21502 (v1.6.0) — solo tokens, prefijo sm-
 * sm-anexos  tabla de documentos anexos de un registro */
.sm-anexos__titulo { margin-top: var(--space-6); }
.sm-anexos td:first-child { min-width: 240px; word-break: break-word; }
