/* OnKaizen Enterprise UI: tokens y componentes base.
   Usar cuando el proyecto no trae su propio sistema. Reglas de uso en references/.
   Fuentes: https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&family=Montserrat:wght@600;700&display=swap */

:root {
  --carbon: #1e2329;
  --verde: #4a9b3a;
  --verde-fuerte: #357a2b;
  --verde-claro: #6abf56;
  --gris: #a3a8ae;
  --niebla: #f4f6f8;

  --bg: var(--niebla);
  --surface: #ffffff;
  --surface-sunken: #f7f8f9;
  --surface-hover: #eef0f2;
  --line: #e3e6ea;
  --line-strong: #d6dadf;
  --text: #1e2329;
  --text-2: #5b636d;
  --text-3: #80868e;
  --accent: var(--verde);
  --accent-strong: var(--verde-fuerte);
  --on-accent: #ffffff;
  --selected: rgba(74, 155, 58, 0.10);
  --focus: 0 0 0 3px rgba(74, 155, 58, 0.35);

  --bad: #dc2626;  --bad-text: #b91c1c;  --bad-bg: #fef2f2;
  --warn: #d97706; --warn-text: #92400e; --warn-bg: #fffbeb;
  --ok: #4a9b3a;   --ok-text: #357a2b;   --ok-bg: #f1f8ef;
  --proc: #5b636d; --proc-text: #1e2329;
  --neutral: #a3a8ae;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-display: "Montserrat", "IBM Plex Sans", system-ui, sans-serif;
  --fs-aux: 12px; --fs-table: 13px; --fs-body: 14px; --fs-panel: 16px; --fs-page: 20px; --fs-figure: 24px;

  --r-control: 3px; --r-button: 3px; --r-panel: 4px;
  --shadow-menu: 0 4px 12px rgba(30, 35, 41, 0.12);
  --shadow-overlay: 0 12px 32px rgba(30, 35, 41, 0.16);

  --row: 28px;
  --th-bg: #eef0f2;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16191d; --surface: #1e2329; --surface-sunken: #191d22; --surface-hover: #2a3038;
    --line: #2e353d; --line-strong: #3a424b; --th-bg: #252b33;
    --text: #eef1f4; --text-2: #a3a8ae; --text-3: #80868e;
    --accent: #6abf56; --accent-strong: #6abf56; --on-accent: #0f1f0b; --selected: rgba(106, 191, 86, 0.14);
    --bad: #f87171; --bad-text: #fca5a5; --bad-bg: rgba(248, 113, 113, 0.12);
    --warn: #fbbf24; --warn-text: #fcd34d; --warn-bg: rgba(251, 191, 36, 0.12);
    --ok: #6abf56; --ok-text: #8de876; --ok-bg: rgba(106, 191, 86, 0.12);
    --proc: #a3a8ae; --proc-text: #eef1f4; --neutral: #6b7280;
    color-scheme: dark;
  }
}
:root[data-theme="dark"], [data-theme="dark"] {
  --bg: #16191d; --surface: #1e2329; --surface-sunken: #191d22; --surface-hover: #2a3038;
  --line: #2e353d; --line-strong: #3a424b; --th-bg: #252b33;
  --text: #eef1f4; --text-2: #a3a8ae; --text-3: #80868e;
  --accent: #6abf56; --accent-strong: #6abf56; --on-accent: #0f1f0b; --selected: rgba(106, 191, 86, 0.14);
  --bad: #f87171; --bad-text: #fca5a5; --bad-bg: rgba(248, 113, 113, 0.12);
  --warn: #fbbf24; --warn-text: #fcd34d; --warn-bg: rgba(251, 191, 36, 0.12);
  --ok: #6abf56; --ok-text: #8de876; --ok-bg: rgba(106, 191, 86, 0.12);
  --proc: #a3a8ae; --proc-text: #eef1f4; --neutral: #6b7280;
  color-scheme: dark;
}

body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--fs-body); line-height: 1.45; margin: 0; }
[data-theme] { background: var(--bg); color: var(--text); }
.num, .ie-table, time { font-variant-numeric: tabular-nums; }
.mono, .ie-table td.n, .ie-table td.id, .ie-table time { font-family: var(--font-mono); font-size: 12.5px; }

/* Encabezado */
.ie-crumb { font-size: var(--fs-aux); color: var(--text-2); }
.ie-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ie-head h1 { font-family: var(--font-display); font-size: var(--fs-page); font-weight: 600; margin: 2px 0 0; }
.ie-meta { font-size: var(--fs-table); color: var(--text-2); }
.ie-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); }
.ie-tabs a { padding: 8px 0; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; }
.ie-tabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-color: var(--accent); }
.ie-tabs .count { color: var(--text-2); font-weight: 400; margin-left: 4px; }

/* Panel */
.ie-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }

/* Banda de título (sustituye a las tarjetas) */
.ie-band { padding: 8px 16px; background: var(--surface-sunken); border-bottom: 1px solid var(--line); font-size: var(--fs-table); font-weight: 600; }

/* Barra de herramientas */
.ie-toolbar { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px; background: var(--surface-sunken); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ie-tools { display: inline-flex; }
.ie-tool { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-aux); cursor: pointer; margin-right: -1px; white-space: nowrap; }
.ie-tool:first-child { border-radius: var(--r-control) 0 0 var(--r-control); }
.ie-tool:last-child { border-radius: 0 var(--r-control) var(--r-control) 0; margin-right: 0; }
.ie-tool:only-child { border-radius: var(--r-control); }
.ie-tool:hover { background: var(--surface-hover); }
.ie-tool:disabled { color: var(--text-3); cursor: not-allowed; }
.ie-tool.danger { color: var(--bad-text); }
.ie-tool svg { width: 14px; height: 14px; }
.ie-toolbar .sep { width: 1px; height: 20px; background: var(--line-strong); }
.ie-filter { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r-control); font-size: var(--fs-aux); background: var(--surface); }

/* Tabla */
.ie-table-wrap { overflow-x: auto; }
.ie-table { width: 100%; border-collapse: collapse; font-size: var(--fs-table); }
.ie-table th { position: sticky; top: 0; height: var(--row); padding: 0 6px; text-align: left; font-size: var(--fs-aux); font-weight: 500; color: var(--text-2); background: var(--th-bg); border: 1px solid var(--line); white-space: nowrap; }
.ie-table td { height: var(--row); padding: 0 6px; border: 1px solid var(--line); white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.ie-table tbody tr:nth-child(even) td { background: var(--surface-sunken); }
.ie-table .n { text-align: right; }
.ie-table .id { color: var(--text-2); }
.ie-table tbody tr:hover td { background: var(--surface-hover); }
.ie-table tr[aria-selected="true"] td { background: var(--selected); }
.ie-table th.n { text-align: right; }
.ie-table tr[aria-selected="true"] td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.ie-table tfoot td { font-weight: 500; border-top: 1px solid var(--line-strong); background: var(--th-bg); }
.ie-table.medium { --row: 32px; }
.ie-table.medium td, .ie-table.medium th { border-left: 0; border-right: 0; }
.ie-table.medium tbody tr:nth-child(even) td { background: transparent; }

/* Estado */
.ie-status { display: inline-flex; align-items: center; gap: 6px; }
.ie-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--neutral); flex: none; }
.ie-status.bad::before { background: var(--bad); }   .ie-status.bad { color: var(--bad-text); }
.ie-status.warn::before { background: var(--warn); } .ie-status.warn { color: var(--warn-text); }
.ie-status.ok::before { background: var(--ok); }
.ie-status.proc::before { background: var(--proc); }

/* Franja de cifras */
.ie-strip { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ie-strip > a { flex: 1 0 140px; padding: 10px 16px; border-right: 1px solid var(--line); color: inherit; text-decoration: none; }
.ie-strip > a:last-child { border-right: 0; }
.ie-strip > a:hover { background: var(--surface-hover); }
.ie-strip .label { font-size: var(--fs-aux); color: var(--text-2); }
.ie-strip .value { font-family: var(--font-display); font-size: var(--fs-figure); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ie-strip .delta { font-size: var(--fs-aux); color: var(--text-2); }
.ie-strip .delta.bad { color: var(--bad-text); }

/* Botones */
.ie-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--r-button); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.ie-btn:hover { background: var(--surface-hover); }
.ie-btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.ie-btn.danger { color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.ie-btn.text { border-color: transparent; background: transparent; color: var(--accent-strong); }
.ie-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ie-btn:focus-visible, .ie-input:focus-visible, .ie-table tr:focus-visible { outline: none; box-shadow: var(--focus); }

/* Formularios */
.ie-form { max-width: 520px; }
.ie-section { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.ie-section > h2 { font-size: var(--fs-table); font-weight: 600; margin: 0 -16px; padding: 8px 16px; background: var(--surface-sunken); border-block: 1px solid var(--line); }
.ie-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ie-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ie-field label { font-size: var(--fs-aux); font-weight: 500; color: var(--text-2); }
.ie-field label .req { color: var(--bad); margin-left: 2px; }
.ie-input { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); color: var(--text); font: inherit; }
.ie-input:focus { border-color: var(--accent); }
.ie-input.mono { font-family: var(--font-mono); font-size: 13px; }
.ie-field .error { font-size: var(--fs-aux); color: var(--bad-text); }
.ie-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); }
@media (max-width: 640px) { .ie-pair { grid-template-columns: 1fr; } }

/* Avisos de bloque */
.ie-notice { padding: 10px 12px; border-radius: var(--r-control); border: 1px solid var(--line); background: var(--surface-sunken); font-size: var(--fs-table); }
.ie-notice.bad { background: var(--bad-bg); border-color: transparent; color: var(--bad-text); }
.ie-notice.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn-text); }

/* Panel lateral */
.ie-drawer { background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-overlay); min-width: 380px; width: 40%; }
.ie-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: var(--fs-table); margin: 0; }
.ie-kv dt { color: var(--text-2); }
.ie-kv dd { margin: 0; }
.ie-link { color: var(--accent-strong); text-decoration: none; }
.ie-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Navegación lateral clara */
.ie-nav { width: 220px; background: var(--surface); border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.ie-nav a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--r-control); color: var(--text); text-decoration: none; font-size: var(--fs-body); }
.ie-nav a:hover { background: var(--surface-hover); }
/* Una sola marca: la opción activa lleva fondo gris, peso 600 y barra de 2 px. Sin relleno verde ni píldora. */
.ie-nav a[aria-current="page"] { background: var(--surface-hover); color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.ie-nav svg { width: 16px; height: 16px; flex: none; }

/* Panel abierto: la tabla oculta las columnas marcadas como secundarias (th/td con class="sec") */
.has-drawer .ie-table .sec { display: none; }

/* ---------- Navegación (ver references/navegacion.md y assets/nav.js) ---------- */
/* nav.js abre y cierra capas con el atributo hidden: ningún display de componente debe ganarle. */
[hidden] { display: none !important; }
.ie-scroll-lock { overflow: hidden; }
.ie-nav { transition: width .18s ease; overflow: hidden; }
.ie-nav-group { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--text); font: inherit; font-size: var(--fs-body); cursor: pointer; text-align: left; }
.ie-nav-group:hover { background: var(--surface-hover); }
.ie-nav-group::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: rotate(-45deg); transition: transform .15s; }
.ie-nav-group[aria-expanded="true"]::after { transform: rotate(45deg); }
.ie-nav [data-ie-group-body] a { padding-left: 36px; height: 28px; font-size: var(--fs-table); color: var(--text-2); }
.ie-nav [data-ie-group-body] a[aria-current="page"] { color: var(--text); }
/* Secciones de un grupo abierto: sangradas y sin icono. En el riel colapsado sí llevan su icono. */
html:not(.ie-nav-collapsed) .ie-nav [data-ie-group-body] a svg { display: none; }
/* La cabeza del grupo abierto solo cambia el color del texto: la marca es de la opción, no del grupo. */
.ie-nav-group[data-active] { color: var(--accent-strong); font-weight: 600; }
.ie-nav .label { white-space: nowrap; }
html.ie-nav-collapsed .ie-nav { width: 56px; padding-inline: 8px; }
html.ie-nav-collapsed .ie-nav .label,
html.ie-nav-collapsed .ie-nav [data-ie-group-body],
html.ie-nav-collapsed .ie-nav-group::after { display: none !important; }
.ie-nav-toggle { margin-top: auto; }
@media (max-width: 1023px) {
  .ie-nav { position: fixed; inset: 0 auto 0 0; z-index: 30; box-shadow: var(--shadow-overlay); }
  html.ie-nav-collapsed .ie-nav { width: 0; padding: 0; border: 0; }
  .ie-scrim { position: fixed; inset: 0; background: rgba(15, 17, 19, .4); z-index: 29; }
}

/* Paginación */
.ie-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 36px; padding: 0 12px; border-top: 1px solid var(--line); font-size: var(--fs-aux); color: var(--text-2); }
.ie-pager .pages { display: inline-flex; }
.ie-pager .pages a, .ie-pager .pages span { min-width: 28px; height: 24px; padding: 0 8px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); margin-right: -1px; color: var(--text); text-decoration: none; font-size: 12px; font-variant-numeric: tabular-nums; background: var(--surface); }
.ie-pager .pages a:first-child { border-radius: var(--r-control) 0 0 var(--r-control); }
.ie-pager .pages a:last-child { border-radius: 0 var(--r-control) var(--r-control) 0; }
.ie-pager .pages [aria-current="page"] { background: var(--selected); border-color: var(--accent); color: var(--accent-strong); position: relative; }
.ie-pager .pages [aria-disabled="true"] { color: var(--text-3); pointer-events: none; }

/* Avisos (toasts): abajo a la izquierda, máximo 3 */
.ie-toasts { position: fixed; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 40; max-width: 420px; }
.ie-toast { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-panel); background: var(--carbon); color: #eef1f4; font-size: var(--fs-table); box-shadow: var(--shadow-menu); }
.ie-toast.bad { border-left: 3px solid var(--bad); }
.ie-toast a, .ie-toast button { color: var(--verde-claro); background: none; border: 0; font: inherit; cursor: pointer; }


/* ---------- Marco del menú lateral (un solo marco para todos los módulos) ----------
   Marca arriba, bloque de sesión, lista, pie y botón de colapsar. Igual en el portal y en cada módulo:
   cada módulo solo aporta su lista. Ver references/adopcion.md#1-un-solo-marco. */
.ie-side { box-sizing: border-box; flex: none; min-width: 0; width: 272px; height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px;
  padding: 16px 12px 12px; background: var(--surface); border-right: 1px solid var(--line); overflow: hidden; transition: width .18s ease; }
.ie-side .ie-nav { width: auto; padding: 0; border: 0; background: none; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.ie-brand { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 0; }
.ie-brand img { display: block; max-width: 196px; height: auto; }
.ie-brand .ie-logo-dark, .ie-brand .ie-logo-mark { display: none; }
.ie-brand .ie-system { font-size: var(--fs-aux); font-weight: 500; color: var(--text-2); white-space: nowrap; }
/* Sesión: el nombre en su propio renglón (elipsis + title); debajo los iconos de tema, avisos y salir.
   Nunca rótulo «Sesión activa» + nombre + botones con texto en un solo renglón: no cabe y recorta el nombre. */
.ie-session { display: grid; grid-template-columns: repeat(3, 32px) minmax(0, 1fr); gap: 8px; align-items: center;
  padding: 10px 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ie-session .ie-user { grid-column: 1 / -1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-table); font-weight: 600; }
.ie-icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line-strong);
  border-radius: var(--r-control); background: var(--surface); color: var(--text-2); cursor: pointer; }
.ie-icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.ie-icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.ie-icon-btn svg { width: 16px; height: 16px; }
.ie-side .ie-context { padding: 12px 10px 4px; font-size: var(--fs-aux); font-weight: 600; color: var(--text-2); }
.ie-side-foot { font-size: 11px; line-height: 1.4; color: var(--text-3); padding: 0 4px; }
.ie-side .ie-nav-toggle { width: 100%; min-height: 32px; margin-top: 0; }
/* Riel colapsado: 72 px, todo centrado en 36 px, sin cabezas de grupo, una sola marca y nada fuera del riel. */
html.ie-nav-collapsed .ie-side { width: 72px; padding: 12px 10px; }
html.ie-nav-collapsed .ie-side .ie-nav { width: auto; padding: 0; align-items: center; }
html.ie-nav-collapsed .ie-brand { align-items: center; padding: 4px 0 0; }
html.ie-nav-collapsed .ie-brand .ie-logo-light, html.ie-nav-collapsed .ie-brand .ie-logo-dark, html.ie-nav-collapsed .ie-brand .ie-system,
html.ie-nav-collapsed .ie-session .ie-user, html.ie-nav-collapsed .ie-side .ie-context, html.ie-nav-collapsed .ie-side-foot,
html.ie-nav-collapsed .ie-side .ie-nav-group { display: none !important; }
html.ie-nav-collapsed .ie-brand .ie-logo-mark { display: block; width: 40px; }
html.ie-nav-collapsed .ie-session { grid-template-columns: 36px; justify-content: center; padding: 8px 0; }
html.ie-nav-collapsed .ie-session .ie-icon-btn { width: 36px; height: 36px; }
html.ie-nav-collapsed .ie-side [data-ie-group-body] { display: flex !important; flex-direction: column; align-items: center; gap: 2px; }
html.ie-nav-collapsed .ie-side .ie-nav a { width: 36px; height: 36px; padding: 0; justify-content: center; }
html.ie-nav-collapsed .ie-side .ie-nav-toggle { margin-top: auto; padding: 0; justify-content: center; }
/* El botón de colapsar vive fuera de .ie-nav: su texto también se oculta en el riel, o lo ensancha. */
html.ie-nav-collapsed .ie-side .ie-nav-toggle .label { display: none; }
html.ie-nav-collapsed .ie-side .ie-nav-toggle::before { content: "»"; font-size: 16px; line-height: 1; }
/* Pantallas bajas (laptop al 125 %, barra de tareas): el pie cede su lugar a la lista. */
@media (max-height: 760px) { .ie-side-foot { display: none; } }
@media (max-width: 1023px) { .ie-side { position: fixed; inset: 0 auto 0 0; z-index: 30; box-shadow: var(--shadow-overlay); }
  html.ie-nav-collapsed .ie-side { width: 0; padding: 0; border: 0; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ie-brand .ie-logo-light { display: none; } :root:not([data-theme="light"]) .ie-brand .ie-logo-dark { display: block; } }
:root[data-theme="dark"] .ie-brand .ie-logo-light { display: none; }
:root[data-theme="dark"] .ie-brand .ie-logo-dark { display: block; }

/* ---------- Portal de módulos (lanzador) ----------
   Tarjetas planas como el resto: borde de 1 px, radio 4, sin sombra ni movimiento; icono sin caja;
   marca en gris sin mayúsculas; pie «Entrar →» separado por una línea; «Próximamente» en gris, sin píldora. */
.ie-launcher { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); max-width: 1180px; }
.ie-module { box-sizing: border-box; display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; align-items: start;
  padding: 0; overflow: hidden; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-panel);
  font: inherit; text-align: left; text-decoration: none; }
a.ie-module, button.ie-module { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ie-module:focus-visible { outline: none; border-color: var(--accent); box-shadow: inset 0 2px 0 var(--accent); }
/* En pantallas táctiles el :hover se queda pegado tras tocar: el realce va solo con mouse. */
@media (hover: hover) {
  a.ie-module:hover, button.ie-module:hover { border-color: var(--accent); box-shadow: inset 0 2px 0 var(--accent); }
  a.ie-module:hover .ie-module-foot, button.ie-module:hover .ie-module-foot { background: var(--surface-sunken); }
}
.ie-module-icon { grid-column: 1; grid-row: 1; width: 20px; height: 20px; margin: 18px 0 0 16px; color: var(--accent-strong); }
.ie-module-icon svg { width: 18px; height: 18px; }
.ie-module-title { grid-column: 2; grid-row: 1; margin: 16px 16px 0 0; font: 600 var(--fs-panel)/1.3 var(--font-display); }
.ie-module-brand { grid-column: 2; grid-row: 2; margin: 2px 16px 0 0; font-size: var(--fs-aux); color: var(--text-3); }
.ie-module-desc { grid-column: 1 / -1; grid-row: 3; margin: 10px 16px 16px; font-size: var(--fs-table); line-height: 1.45; color: var(--text-2); }
.ie-module-foot { grid-column: 1 / -1; grid-row: 4; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px;
  border-top: 1px solid var(--line); font-size: var(--fs-table); font-weight: 500; color: var(--accent-strong); }
.ie-module[aria-disabled="true"] { cursor: not-allowed; }
.ie-module[aria-disabled="true"] .ie-module-icon, .ie-module[aria-disabled="true"] .ie-module-title { color: var(--text-3); }
.ie-module[aria-disabled="true"] .ie-module-foot { color: var(--text-3); font-weight: 400; }

/* ---------- Tablas anchas que deben caber ----------
   Ver references/patrones.md#4-tablas: medir con el menú abierto; fechas, folios y estado sin cortar;
   el texto largo sí envuelve y una palabra larga no fija el ancho; acciones en cuadrícula de 2. */
.ie-table .wrap { white-space: normal; overflow-wrap: anywhere; min-width: 120px; }
.ie-row-actions { display: grid; grid-template-columns: repeat(2, max-content); gap: 4px; }
.ie-row-actions .ie-btn { height: 26px; padding: 0 6px; font-size: 12px; }
@media (max-width: 1700px) { .ie-table .opt-1700 { display: none; } }
