/* Playfair Display (marca y titulos) servida desde el propio servidor: sin pedidos
   a Google Fonts, que con mala conexion bloqueaban el pintado. Un archivo variable
   cubre 700 y 800; solo el bloque latin (espanol completo). */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('/static/vendor/playfair-display@v40/playfair-display-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Variables ─────────────────────────────────────────── */
:root {
  --color-primario:    #1a3a5c;
  --color-secundario:  #2d8c1e;
  --color-fondo:       #f0f2f5;
  --color-sidebar:     #111f2e;
  --color-texto:       #2c2c2c;
  --color-acento:      #c1622d;
  --color-alerta:      #a63d3d;
  --color-panel:       #eef1f6;
  --color-grid:        rgba(26,58,92,.08);
  --sidebar-ancho:     240px;
}
/* Lo de otros roles no se pinta nunca: el script tras el sidebar marca el rol en
   <html> antes del primer pintado e iniciarPagina() lo quita del DOM despues. */
html[data-rol-actual="admin"] [data-rol]:not([data-rol*="admin"]),
html[data-rol-actual="encargado"] [data-rol]:not([data-rol*="encargado"]),
html[data-rol-actual="supervisor"] [data-rol]:not([data-rol*="supervisor"]),
html[data-rol-actual="compras"] [data-rol]:not([data-rol*="compras"]),
html[data-rol-actual="rrhh"] [data-rol]:not([data-rol*="rrhh"]),
html[data-rol-actual="tecnico"] [data-rol]:not([data-rol*="tecnico"]) { display: none !important; }
html:not([data-rol-actual]):not(.rol-filtrado) [data-rol] { visibility: hidden; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--color-fondo);
  color: var(--color-texto);
  margin: 0;
  font-size: 0.925rem;
}
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
}
.login-card {
  background: #fff;
  border-radius: 4px;
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  border-top: 3px solid var(--color-primario);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo-img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 0.5rem;
}
.login-logo p {
  color: #6c757d;
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-ancho);
  background: var(--color-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
}
.sidebar-header {
  padding: 1.3rem 1.25rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.marca-sub {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}
.marca-nombre {
  display: inline-block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: none;
  padding-bottom: 0.1rem;
  line-height: 1;
}
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; min-height: 0; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.sidebar-nav a:hover, .sidebar-nav a.activo {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.sidebar-nav a.activo { border-left: 3px solid var(--color-secundario); }
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.sidebar-footer #nombre-usuario {
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}
/* min-width: 0: un hijo flex no se encoge por debajo de su contenido; sin esto una
   tabla ancha ensanchaba la pagina entera (botones y columnas fuera de la ventana)
   en vez de desplazarse dentro de su .table-responsive. */
.main-content { margin-left: var(--sidebar-ancho); flex: 1; min-width: 0; padding: 1.5rem 2rem; }
/* Etiqueta que puede partirse en varias lineas (nombres largos de equipo). */
.badge-ajustable { white-space: normal; text-align: left; line-height: 1.3; }
/* Celdas de acciones (botones sueltos o en grupo): los botones van en una sola
   linea. Con .main-content en min-width: 0 la tabla ya no ensancha la pagina y el
   navegador angostaba esta columna, apilando los botones y estirando cada fila. */
.table td:has(> .btn), .table td:has(> .btn-group), .table td:has(> div > .btn) { white-space: nowrap; }
.table td > .d-flex:has(> .btn) { flex-wrap: nowrap !important; }
/* Tabla mas ancha que su recuadro (Maquinaria en laptop: los numeros de chasis y
   las 11 columnas no entran): la columna de acciones queda fija al borde derecho
   para que los botones se vean sin desplazar la tabla. */
@media (min-width: 768px) {
  .table-responsive > .table:has(tbody td:last-child .btn) > * > tr > :last-child {
    position: sticky; right: 0; z-index: 1;
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, transparent)),
      inset 1px 0 0 #dee2e6, -6px 0 8px -6px rgba(0, 0, 0, 0.18);
  }
}
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.topbar h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primario);
  margin: 0;
  letter-spacing: 0.01em;
}
.metricas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.metrica-card {
  background: #fff; border-radius: 14px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border-top: 4px solid var(--color-primario);
  text-align: center;
}
.metrica-card .numero {
  display: block;
  font-size: 3rem; font-weight: 800;
  color: var(--color-primario); line-height: 1;
  margin-bottom: 0.5rem;
}
.metrica-card .etiqueta {
  display: block;
  font-size: 0.78rem; color: #888;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
}
.metrica-card.alerta { border-top-color: #dc3545; }
.metrica-card.alerta .numero { color: #dc3545; }
.metrica-card.ok     { border-top-color: #28a745; }
.metrica-card.ok .numero  { color: #28a745; }
.metrica-card.warn   { border-top-color: #e8a020; }
.metrica-card.warn .numero { color: #e8a020; }
.tabla-wrapper { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); overflow: hidden; }
.tabla-wrapper .tabla-header { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid #eee; }
.tabla-wrapper .tabla-header h5 { margin: 0; font-weight: 600; color: var(--color-primario); }
/* Grupo de filtros del encabezado: en pantallas angostas pasa a varias lineas. */
.tabla-wrapper .tabla-header > .d-flex { flex-wrap: wrap; }

/* ── Masthead de analisis (modulo Reportes) ─────────────── */
.masthead-reporte {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1.1rem 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: 10px;
  border-left: 4px solid var(--color-primario);
  background-color: var(--color-panel);
  background-image:
    repeating-linear-gradient(0deg, var(--color-grid) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, var(--color-grid) 0 1px, transparent 1px 24px);
}
.masthead-reporte .eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-acento);
  margin-bottom: 0.15rem;
}
.masthead-reporte h2 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-primario);
  line-height: 1;
}
.masthead-reporte .timestamp {
  font-size: 0.78rem;
  color: #6b7686;
  white-space: nowrap;
}
.masthead-reporte .timestamp strong { color: var(--color-primario); font-weight: 600; }

/* ── Chart cards (modulo Reportes) ───────────────────────── */
.chart-card-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  color: var(--color-primario);
  padding: 0.85rem 1.25rem;
}

/* ── Divisor hairline (modulo Reportes) ──────────────────── */
.divisor-hairline {
  height: 1px;
  background-color: rgba(26,58,92,.16);
  margin: 0.25rem 0 1.25rem;
}

/* ── Numeros tabulares (modulo Reportes) ─────────────────── */
.num-tabular { font-variant-numeric: tabular-nums; }

/* ── Entrada escalonada de tarjetas KPI (modulo Reportes) ── */
@keyframes tarjetaEntrada {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.metrica-card.entrada { animation: tarjetaEntrada 0.28s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .metrica-card.entrada { animation: none; }
  .metrica-card, .metrica-card:hover { transition: none; }
}

.badge-activa     { background: #d4edda; color: #155724; }
.badge-pausada    { background: #fff3cd; color: #856404; }
.badge-completada { background: #cce5ff; color: #004085; }
.badge-problema   { background: #f8d7da; color: #721c24; }
#mapa { height: 500px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
/* Leyenda bajo el mapa del dashboard (obras por estatus + almacenes por tipo) */
.mapa-leyenda { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: center; margin-top: 0.75rem; font-size: 0.82rem; color: #555; }
.mapa-leyenda .leyenda-grupo { font-weight: 600; color: #333; }
.mapa-leyenda .leyenda-pin { display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.35); }
.mapa-leyenda .leyenda-pin.circulo  { border-radius: 50%; }
.mapa-leyenda .leyenda-pin.cuadrado { border-radius: 3px; }
/* Los avisos dejan pasar los clics (2026-10-14): un aviso persistente tapaba
   botones ("Reportar Avería", el pie de los modales) y el clic no llegaba. Solo
   la X de cerrar los recibe. Arriba al centro: a la derecha caia encima de
   "Reportar Avería" y abajo encima del pie de los modales (sus botones). */
#toast-container { position: fixed; top: .75rem; left: 50%; right: auto; bottom: auto; transform: translateX(-50%); z-index: 9999; width: min(380px, calc(100vw - 2rem)); pointer-events: none; }
#toast-container .toast { pointer-events: none; }
#toast-container .btn-close { pointer-events: auto; }

/* ── Hover en tarjetas ──────────────────────────────────── */
.metrica-card { transition: transform 0.15s, box-shadow 0.15s; }
.metrica-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }

/* ── Barra superior movil ────────────────────────────────── */
.barra-movil {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: var(--color-sidebar);
  align-items: center;
  padding: 0 1rem;
  gap: 0.75rem;
  z-index: 300;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.barra-movil-marca {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fff;
}
.btn-hamburguesa {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.9);
  font-size: 1.35rem;
  padding: 0.3rem 0.4rem;
  line-height: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.btn-hamburguesa:hover,
.btn-hamburguesa:focus { background: rgba(255,255,255,0.12); outline: none; }

/* Botón X dentro del sidebar header (solo mobile) */
.btn-cerrar-sidebar {
  display: none;
  position: absolute;
  top: 0.9rem; right: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  padding: 0.3rem 0.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-cerrar-sidebar:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ── Overlay oscuro del sidebar en mobile ───────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 52px; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
}
.sidebar-overlay.activo { display: block; }

/* ── Soporte para modales apilados ──────────────────────── */
.modal-backdrop + .modal-backdrop { z-index: 1059; }
#modal-checklist-mp { z-index: 1060; }

/* ── Centrar modales respecto al sidebar ────────────────── */
.modal {
  left: var(--sidebar-ancho);
  width: calc(100% - var(--sidebar-ancho));
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Barra movil visible */
  .barra-movil { display: flex; }

  /* Sidebar: arranca bajo la barra movil, oculto por defecto */
  .sidebar {
    top: 52px;
    height: calc(100vh - 52px);
    transform: translateX(-100%);
    transition: transform 0.26s ease;
    z-index: 250;
  }
  .sidebar.sidebar-abierto { transform: translateX(0); }

  /* Botón cerrar sidebar visible dentro del header */
  .sidebar-header { position: relative; }
  .btn-cerrar-sidebar { display: block; }

  /* Contenido ocupa toda la pantalla y baja bajo la barra */
  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-top: calc(52px + 1rem);
  }

  /* Topbar de pagina */
  .topbar { margin-bottom: 1rem; gap: 0.5rem; }
  .topbar h1 { font-size: 1.05rem; }

  /* Metricas: 1 columna */
  .metricas { grid-template-columns: 1fr; }

  /* Modales full width */
  .modal { left: 0; width: 100%; }

  /* Mapa mas corto */
  #mapa { height: 280px; }

  /* Tablas con scroll horizontal */
  .table-responsive { overflow-x: auto; }
}

/* ── Modo oscuro (toggle en /dashboard) ──────────────────── */
.btn-modo-oscuro {
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  color: var(--color-primario);
  border-radius: 8px;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-modo-oscuro:hover { background: #f0f2f5; }

body.modo-oscuro {
  background-color: #10161d;
  color: #d8dee5;
}
body.modo-oscuro .btn-modo-oscuro {
  background: #1a222c;
  border-color: rgba(255,255,255,0.14);
  color: #eef2f6;
}
body.modo-oscuro .btn-modo-oscuro:hover { background: #202a35; }
body.modo-oscuro .metrica-card,
body.modo-oscuro .tabla-wrapper,
body.modo-oscuro .modal-content,
body.modo-oscuro .card {
  background-color: #1a222c;
  color: #d8dee5;
}
body.modo-oscuro .metrica-card .etiqueta { color: #8b96a3; }
body.modo-oscuro .tabla-wrapper .tabla-header,
body.modo-oscuro .modal-header,
body.modo-oscuro .modal-footer {
  border-color: rgba(255,255,255,0.08);
}
body.modo-oscuro .tabla-wrapper .tabla-header h5,
body.modo-oscuro .topbar h1 {
  color: #eef2f6;
}
body.modo-oscuro .table { color: #d8dee5; }
body.modo-oscuro thead.table-light th {
  background-color: #202a35;
  color: #d8dee5;
  border-color: rgba(255,255,255,0.08);
}
body.modo-oscuro .table-hover > tbody > tr:hover > * {
  background-color: rgba(255,255,255,0.06);
  color: #eef2f6;
}
body.modo-oscuro .table > :not(caption) > * > * {
  border-color: rgba(255,255,255,0.08);
}
body.modo-oscuro .text-muted { color: #8b96a3 !important; }
body.modo-oscuro a.text-dark { color: #eef2f6 !important; }
body.modo-oscuro .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }


/* ── Maquinaria: lista + panel de detalle (2026-10-13) ─────────────────────
   Izquierda la lista de equipos, derecha la ficha del equipo elegido. En
   pantallas angostas una sola columna: la lista, y al elegir un equipo la
   ficha ocupa la pantalla (.con-detalle) con el boton "Equipos" para volver. */
.maq-split { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 1rem; height: calc(100vh - 7.5rem); min-height: 480px; }
.maq-lista, .maq-detalle { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); min-height: 0; display: flex; flex-direction: column; }
.maq-lista { overflow: hidden; }
.maq-detalle { overflow-y: auto; }
.maq-lista-header { padding: .9rem 1rem; border-bottom: 1px solid #eee; display: flex; flex-direction: column; gap: .5rem; }
.maq-lista-header h5 { margin: 0; font-weight: 600; color: var(--color-primario); }
.maq-filtros { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.maq-filtros #filtro-obra, .maq-filtros #filtro-mp { grid-column: 1 / -1; }
.maq-lista-items { flex: 1; overflow-y: auto; outline: none; }
.maq-item { display: flex; gap: .65rem; align-items: flex-start; width: 100%; text-align: left; padding: .6rem 1rem .6rem calc(1rem - 3px); background: none; border: 0; border-bottom: 1px solid #f0f1f3; border-left: 3px solid transparent; color: inherit; }
.maq-item:hover { background: #f6f8fa; }
.maq-item:focus-visible { outline: 2px solid var(--color-primario); outline-offset: -2px; }
.maq-item.activo { background: #eaf1fb; border-left-color: var(--color-primario); }
.maq-item-foto { width: 40px; height: 40px; flex: none; border-radius: 6px; object-fit: cover; }
.maq-item-texto { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.maq-item-fila { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.maq-item-nombre { font-weight: 600; font-size: .9rem; line-height: 1.25; }
.maq-item-fila .badge { flex: none; font-size: .68rem; }
.maq-item-sub { font-size: .78rem; color: #6c757d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sin-foto { display: inline-flex; align-items: center; justify-content: center; background: #f1f3f5; color: #adb5bd; }
.maq-detalle-vacio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: #adb5bd; }
.maq-detalle-vacio i { font-size: 2.5rem; }
.maq-detalle-header { padding: 1rem 1.25rem; border-bottom: 1px solid #eee; }
.maq-detalle-header h4 { font-size: 1.2rem; font-weight: 600; color: var(--color-primario); }
.maq-detalle-img { width: 72px; height: 72px; flex: none; border-radius: 8px; object-fit: cover; font-size: 1.8rem; }
.maq-detalle .nav-tabs .nav-link { padding: .45rem .7rem; font-size: .85rem; }
.maq-volver { display: none; margin-bottom: .75rem; }
@media (max-width: 991.98px) {
  .maq-split { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .maq-lista, .maq-detalle { overflow: visible; }
  .maq-split .maq-detalle { display: none; }
  .maq-split.con-detalle .maq-lista { display: none; }
  .maq-split.con-detalle .maq-detalle { display: flex; }
  .maq-volver { display: inline-block; }
}
.maq-bloque { border: 1px solid #edf0f3; border-radius: 8px; padding: .85rem 1rem; height: 100%; }
.maq-bloque h6 { font-weight: 600; color: var(--color-primario); margin-bottom: .6rem; }
.maq-dato { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px dashed #edf0f3; font-size: .9rem; }
.maq-dato:last-child { border-bottom: 0; }
.maq-dato-etiqueta { color: #6c757d; }
.maq-dato-etiqueta { flex: none; }
.maq-dato-valor { font-weight: 500; text-align: right; min-width: 0; overflow-wrap: break-word; }
.maq-general { display: grid; grid-template-columns: repeat(auto-fit, minmax(max(290px, calc(50% - .5rem)), 1fr)); gap: 1rem; }
.maq-bloque-ancho { grid-column: 1 / -1; }
.maq-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.maq-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .65rem .85rem; background: #f8f9fb; border: 1px solid #edf0f3; border-radius: 8px; text-align: left; color: inherit; }
.maq-kpi:hover { background: #eef3f9; border-color: #d6e0ec; }
.maq-kpi-valor { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.maq-kpi-etiqueta { font-size: .8rem; color: #495057; font-weight: 500; }
.maq-kpi-detalle { font-size: .72rem; color: #6c757d; }
.maq-kpi-cargando { grid-column: 1 / -1; padding: .5rem 0; }
.maq-kpi-monto { font-size: 1.05rem; white-space: nowrap; padding-top: .2rem; }

/* ── Stepper de una Solicitud (averia): Taller y detalle de Tareas (gestion-sc.ts) ── */
.sc-stepper { display: flex; align-items: flex-start; margin: 1.5rem 0; }
.sc-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.sc-step-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #d1d5db; background: #fff; display: flex; align-items: center; justify-content: center; font-size: .82rem; color: #9ca3af; font-weight: 700; z-index: 1; }
.sc-step-dot.done { border-color: #22c55e; background: #22c55e; color: #fff; }
.sc-step-dot.active { border-color: #3b82f6; background: #3b82f6; color: #fff; }
.sc-step-label { font-size: .7rem; margin-top: .4rem; text-transform: uppercase; letter-spacing: .06em; color: #9ca3af; font-weight: 600; text-align: center; }
.sc-step-label.done { color: #166534; }
.sc-step-label.active { color: #1d4ed8; }
.sc-connector { flex: 1; height: 2px; background: #e5e7eb; margin-top: 16px; }
.sc-connector.done { background: #22c55e; }

/* ── Pestanas de estado sobre listados (ui/pestanas.ts) ─────────────────── */
.pestanas-estado { gap: .25rem; flex-wrap: wrap; }
.pestanas-estado .nav-link { font-size: .85rem; color: #495057; border: 1px solid #dee2e6; background: #fff; }
.pestanas-estado .nav-link.active { background: var(--color-primario); border-color: var(--color-primario); color: #fff; }
.pestanas-estado .pestana-n { background: rgba(0,0,0,.08); color: inherit; font-weight: 600; }
.pestanas-estado .nav-link.active .pestana-n { background: rgba(255,255,255,.25); }

/* ── Conocer factura (asistente de perfil de proveedor, 2026-10-14) ───── */
/* El proyecto corre los modales a la derecha del sidebar (.modal arriba):
   el dialogo a pantalla completa ocupa ese ancho, no 100vw. */
#modal-conocer-factura .modal-dialog { width: 100%; max-width: none; }
.cf { background: var(--color-fondo); }
.cf-cabecera { background: #fff; gap: 1.5rem; }
.cf-pasos { display: flex; gap: 1.25rem; list-style: none; margin: 0 auto 0 1rem; padding: 0; }
.cf-paso { display: flex; align-items: center; gap: .45rem; color: #8a94a3; font-size: .85rem; font-weight: 600; }
.cf-paso span { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid currentColor; font-size: .78rem; }
.cf-paso.activo { color: var(--color-primario); }
.cf-paso.activo span { background: var(--color-primario); border-color: var(--color-primario); color: #fff; }
.cf-paso.hecho { color: var(--color-secundario); }
.cf-cuerpo { padding: 1rem; overflow: hidden; }
.cf-etapa-centro { height: 100%; display: flex; align-items: center; justify-content: center; }
.cf-zona { width: min(560px, 100%); padding: 3rem 2rem; border: 2px dashed #b9c3d0; border-radius: 14px; background: #fff; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.cf-zona:hover, .cf-zona.arrastrando { border-color: var(--color-primario); background: #f5f8fc; }
.cf-zona.arrastrando { transform: scale(1.02); }
.cf-zona > .bi { font-size: 3rem; color: var(--color-primario); }
.cf-zona-titulo { font-size: 1.1rem; font-weight: 600; margin: .5rem 0 .25rem; }
.cf-tiene-perfil { margin-top: 1rem; font-size: .82rem; color: var(--color-secundario); }
.cf-analisis { width: min(420px, 100%); background: #fff; border-radius: 14px; padding: 1.75rem 2rem; box-shadow: 0 6px 24px rgba(17,31,46,.08); }
.cf-analisis-titulo { font-weight: 700; font-size: 1.05rem; color: var(--color-primario); margin-bottom: 1rem; }
.cf-analisis-pasos { list-style: none; padding: 0; margin: 0; }
.cf-analisis-paso { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; color: #9aa4b2; transition: color .3s; }
.cf-analisis-paso.activo { color: var(--color-texto); font-weight: 600; }
.cf-analisis-paso.hecho { color: var(--color-secundario); }
.cf-analisis-icono { width: 1.25rem; display: inline-flex; justify-content: center; }
.cf-revisar { height: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem; }
.cf-doc { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 10px; border: 1px solid #dde3ea; min-height: 0; }
.cf-doc-barra { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; border-bottom: 1px solid #e6eaef; }
.cf-doc-barra .nav-link { font-size: .82rem; }
.cf-doc-barra .nav-link.active { background: var(--color-primario); }
.cf-doc-vista { position: relative; flex: 1; overflow: auto; min-height: 0; }
.cf-pdf { width: 100%; height: 100%; border: 0; display: block; }
.cf-texto { margin: 0; padding: .9rem 1rem; font-size: .78rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; color: #26313d; user-select: text; }
.cf-texto::selection, .cf-texto *::selection { background: #ffd8a8; }
.cf-marca { background: #ffe08a; color: inherit; padding: 0 .1rem; border-radius: 3px; box-shadow: 0 0 0 1px #f0c040; animation: cf-destello .9s ease-out; }
@keyframes cf-destello { from { background: #ffb347; } to { background: #ffe08a; } }
.cf-barra-seleccion { position: absolute; z-index: 5; display: flex; align-items: center; gap: .25rem; padding: .3rem .4rem; background: var(--color-sidebar); color: #fff; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.cf-barra-seleccion .btn { font-size: .75rem; padding: .15rem .45rem; }
.cf-panel { overflow: auto; min-height: 0; padding-right: .25rem; display: flex; flex-direction: column; gap: 1rem; }
.cf-resumen { display: flex; flex-wrap: wrap; gap: .5rem; }
.cf-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: #fff; border: 1px solid #dde3ea; font-size: .82rem; }
.cf-chip.ok { border-color: #b7dfb0; background: #effaec; color: #23611a; }
.cf-chip.mal { border-color: #f1cf8a; background: #fff7e6; color: #8a5a00; }
.cf-bloque { background: #fff; border: 1px solid #dde3ea; border-radius: 10px; padding: .85rem 1rem; }
.cf-bloque-titulo { font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #5b6878; margin-bottom: .6rem; }
.cf-columnas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.cf-columna { display: flex; flex-direction: column; gap: .4rem; padding: .55rem .65rem; border-radius: 8px; border: 1px solid #e3e8ee; border-left: 4px solid #c3cbd5; cursor: pointer; transition: box-shadow .15s; }
.cf-columna:hover { box-shadow: 0 2px 10px rgba(17,31,46,.08); }
.cf-columna.rol-sku { border-left-color: #6f42c1; }
.cf-columna.rol-nombre { border-left-color: var(--color-primario); }
.cf-columna.rol-cantidad { border-left-color: #0d9488; }
.cf-columna.rol-precio_unitario { border-left-color: var(--color-secundario); }
.cf-columna.rol-descuento { border-left-color: var(--color-acento); }
.cf-columna.rol-impuesto { border-left-color: #b8860b; }
.cf-columna.rol-total { border-left-color: #64748b; }
.cf-columna.rol-otro { opacity: .7; }
.cf-columna-nombre { font-weight: 600; font-size: .88rem; }
.cf-columna-ejemplo { font-size: .76rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cf-columna-ejemplo code { margin-right: .3rem; }
.cf-marca-exento { display: inline-block; margin: .15rem .25rem 0 0; padding: .05rem .45rem; border-radius: 4px; background: #f3f0e6; color: #6b5a1f; font-size: .75rem; }
.cf-ejemplo { display: flex; flex-wrap: wrap; gap: .4rem; }
.cf-ejemplo-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .4rem .25rem .65rem; border-radius: 6px; background: #eef3fb; font-size: .8rem; }
.cf-ejemplo-chip .btn-close { font-size: .55rem; }
.cf-tabla { font-size: .8rem; }
.cf-tabla tbody tr { cursor: pointer; }
.cf-tabla tbody tr.cf-activa > td { background: #fff6dc; }
.cf-tabla tbody tr.cf-cambio > td { animation: cf-cambio 2.4s ease-out; }
@keyframes cf-cambio { 0% { background: #d9f2d4; } 100% { background: transparent; } }
.cf-totales { font-size: .8rem; max-width: 460px; margin-left: auto; }
.cf-pie { background: #fff; }
@media (max-width: 991.98px) {
  .cf-pasos { display: none; }
  .cf-cuerpo { overflow: auto; }
  .cf-revisar { display: flex; flex-direction: column; height: auto; }
  .cf-doc { height: 60vh; }
  .cf-panel { overflow: visible; }
}

/* ── Esconder el menu para trabajar a pantalla completa (2026-10-14) ──── */
.sidebar-header { position: relative; }
.btn-esconder-menu {
  position: absolute; top: 1.15rem; right: .7rem;
  width: 30px; height: 30px; border: none; border-radius: 6px;
  background: transparent; color: rgba(255,255,255,.55);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.btn-esconder-menu:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-mostrar-menu {
  position: fixed; top: .85rem; left: .7rem; z-index: 150;
  width: 36px; height: 36px; border: 1px solid #d5dbe3; border-radius: 8px;
  background: #fff; color: var(--color-primario); font-size: 1.15rem;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(17,31,46,.12);
}
.btn-mostrar-menu:hover { background: var(--color-primario); color: #fff; border-color: var(--color-primario); }
@media (min-width: 769px) {
  html.menu-animado .sidebar { transition: transform .25s ease; }
  html.menu-animado .main-content { transition: margin-left .25s ease, padding-left .25s ease; }
  html.menu-oculto .sidebar { transform: translateX(-100%); }
  html.menu-oculto .main-content { margin-left: 0; padding-left: 3.75rem; }
  html.menu-oculto .modal { left: 0; width: 100%; }
  html.menu-oculto .btn-mostrar-menu { display: inline-flex; }
}
@media (max-width: 768px) {
  .btn-esconder-menu, .btn-mostrar-menu { display: none !important; }
}
body.modo-oscuro .btn-mostrar-menu { background: #1e2a38; border-color: #33465a; color: #e6edf5; }

/* Fila que abre su detalle al tocarla (listado de comparativas, 2026-10-14). */
tr.fila-abrir { cursor: pointer; }
tr.fila-abrir:hover > td { background: #f2f6fb; }
tr.fila-abrir:hover .fila-abrir-flecha { color: var(--color-primario) !important; }
body.modo-oscuro tr.fila-abrir:hover > td { background: #1c2632; }

/* Zona para arrastrar o elegir un archivo (subida de cotizacion, 2026-10-14). */
.zona-archivo { border: 2px dashed #b9c3d0; border-radius: 12px; background: #fafbfd; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.zona-archivo:hover, .zona-archivo:focus-visible, .zona-archivo.arrastrando { border-color: var(--color-primario); background: #f2f6fb; outline: none; }
.zona-archivo.arrastrando { transform: scale(1.015); }
.zona-archivo.con-archivo { border-style: solid; border-color: #b7dfb0; background: #f4fbf2; }
.zona-archivo-vacia { text-align: center; padding: 1.4rem 1rem 1.2rem; }
.zona-archivo-vacia > .bi { font-size: 2.2rem; color: var(--color-primario); }
.zona-archivo-titulo { font-weight: 600; margin: .25rem 0 .1rem; }
.zona-archivo-elegido { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; }
.zona-archivo-elegido > .bi { font-size: 1.9rem; color: var(--color-secundario); }
.zona-archivo-info { min-width: 0; }
.zona-archivo-nombre { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.modo-oscuro .zona-archivo { background: #17202a; border-color: #3a4b5e; }

/* Varias cotizaciones por proveedor (2026-10-14). */
.prov-documentos { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.prov-documento { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .15rem .5rem; border: 1px solid #dde3ea; border-radius: 6px; background: #fff; font-size: .78rem; }
.prov-documento > .bi { color: var(--color-primario); }
.prov-documento-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.linea-origen { font-size: .72rem; color: #7a8594; margin-top: .1rem; }
.upload-modo { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.upload-modo-opcion { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid #d5dbe3; border-radius: 10px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.upload-modo-opcion > .bi { font-size: 1.2rem; color: #7a8594; margin-top: .1rem; }
.upload-modo-opcion small { display: block; color: #6c757d; font-size: .74rem; line-height: 1.3; margin-top: .1rem; }
.btn-check:checked + .upload-modo-opcion { border-color: var(--color-primario); background: #f0f5fb; box-shadow: inset 0 0 0 1px var(--color-primario); }
.btn-check:checked + .upload-modo-opcion > .bi { color: var(--color-primario); }
.btn-check:focus-visible + .upload-modo-opcion { outline: 2px solid var(--color-primario); outline-offset: 2px; }
body.modo-oscuro .prov-documento, body.modo-oscuro .upload-modo-opcion { background: #17202a; border-color: #33465a; }
@media (max-width: 575.98px) { .upload-modo { grid-template-columns: 1fr; } }

/* Tabla Comparativa (2026-10-15): una celda por proveedor con el producto que
   cotizo, la opcion elegida marcada y las demas opciones plegadas. */
.cmp-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.cmp-resumen-item { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .9rem; border: 1px solid #dde3ea; border-radius: 10px; background: #fff; }
.cmp-resumen-item > span { font-size: .76rem; color: #6c757d; }
.cmp-resumen-item > strong { font-size: 1.2rem; color: var(--color-primario); font-variant-numeric: tabular-nums; }
.cmp-resumen-item > small { font-size: .76rem; color: #6c757d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-resumen-plan { border-color: #b7dfb0; background: #f4fbf2; }
.cmp-resumen-plan > strong { color: #1e6b14; }
.cmp-resumen-ahorro > strong { color: var(--color-acento); }
.cmp-tabla { border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.cmp-tabla > :not(caption) > * > * { padding: .6rem .7rem; border-bottom: 1px solid #e6eaef; background: #fff; }
.cmp-tabla thead th { position: sticky; top: 0; z-index: 2; background: var(--color-primario); color: #fff; font-weight: 600; font-size: .8rem; line-height: 1.25; vertical-align: bottom; border-bottom: 0; }
.cmp-tabla thead th small { display: block; font-weight: 400; font-size: .7rem; color: rgba(255,255,255,.65); margin-top: .15rem; }
.cmp-tabla thead th:first-child { border-top-left-radius: 8px; }
.cmp-tabla thead th:last-child { border-top-right-radius: 8px; }
.cmp-tabla .cmp-articulo { position: sticky; left: 0; z-index: 1; min-width: 200px; max-width: 260px; box-shadow: 1px 0 0 #e6eaef; }
.cmp-tabla thead .cmp-articulo { z-index: 3; }
.cmp-articulo code { font-size: .74rem; background: #eef1f6; color: var(--color-primario); padding: 1px 6px; border-radius: 4px; }
.cmp-articulo-nombre { font-weight: 600; line-height: 1.3; margin: .2rem 0 .1rem; }
.cmp-tabla .cmp-celda { min-width: 150px; max-width: 200px; text-align: right; vertical-align: top; }
.cmp-tabla .cmp-vacia { color: #a3acb7; font-size: .78rem; vertical-align: middle; }
.cmp-precio { font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; }
.cmp-subtotal { font-size: .74rem; color: #7a8594; font-variant-numeric: tabular-nums; }
.cmp-producto { font-size: .72rem; color: #5b6573; margin-top: .3rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmp-tabla .cmp-mejor { background: #edf8ea; box-shadow: inset 3px 0 0 var(--color-secundario); }
.cmp-mejor .cmp-precio { color: #1e6b14; }
.cmp-etiqueta-mejor { display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 600; color: #1e6b14; background: #d5efcf; border-radius: 20px; padding: .05rem .5rem; margin-bottom: .25rem; }
.cmp-alternativas { margin-top: .35rem; font-size: .72rem; text-align: left; }
.cmp-alternativas summary { cursor: pointer; color: var(--color-primario); text-align: right; list-style: none; }
.cmp-alternativas summary::-webkit-details-marker { display: none; }
.cmp-alternativas summary:hover { text-decoration: underline; }
.cmp-alternativa { padding: .3rem 0; border-top: 1px dashed #dde3ea; text-align: right; }
.cmp-alternativa-fila { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; text-align: left; }
.cmp-alternativa-elegida { background: #edf8ea; margin: 0 -.35rem; padding: .3rem .35rem; border-radius: 6px; }
.cmp-alternativa-fila > span { color: #5b6573; line-height: 1.25; }
.cmp-alternativa-fila > strong { white-space: nowrap; font-weight: 600; }
.cmp-tabla .cmp-comprar { min-width: 150px; font-size: .8rem; vertical-align: middle; }
.cmp-tabla tbody tr:hover > * { background: #f8fafc; }
.cmp-tabla tbody tr:hover > .cmp-mejor { background: #e4f4df; }
.cmp-tabla tfoot .cmp-total > * { font-weight: 700; border-top: 2px solid #cfd6df; border-bottom: 0; vertical-align: middle; }
.cmp-tabla tfoot .cmp-total > td:first-child { text-align: right; }
.cmp-tabla tfoot .cmp-fiscal-titulo > td { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #7a8594; padding-top: 1rem; border-bottom: 0; }
.cmp-tabla tfoot .cmp-fiscal > td { font-size: .78rem; color: #5b6573; text-align: right; padding-top: .3rem; padding-bottom: .3rem; font-variant-numeric: tabular-nums; }
.cmp-tabla tfoot .cmp-fiscal > td:first-child { position: sticky; left: 0; }
.cmp-tabla tfoot .cmp-total > td:first-child { position: sticky; left: 0; z-index: 1; }
body.modo-oscuro .cmp-resumen-item, body.modo-oscuro .cmp-tabla > :not(caption) > * > * { background: #17202a; border-color: #2b3a4a; }
body.modo-oscuro .cmp-tabla .cmp-mejor { background: #1d3320; }

.cmp-elegir { display: inline-block; margin-top: .35rem; padding: .05rem .55rem; font-size: .7rem; font-weight: 600; color: var(--color-primario); background: transparent; border: 1px solid #c5d0dc; border-radius: 20px; cursor: pointer; transition: background .15s, border-color .15s; }
.cmp-elegir:hover, .cmp-elegir:focus-visible { background: #eef3f9; border-color: var(--color-primario); outline: none; }
.cmp-alternativa .cmp-elegir, .cmp-alternativa .cmp-etiqueta-mejor { margin-top: .2rem; margin-bottom: 0; }
.cmp-volver { display: block; margin-top: .45rem; }
.cmp-etiqueta-manual { color: #fff; background: var(--color-primario); }
.cmp-tabla .cmp-mejor-alt { background: #f6fbf4; box-shadow: inset 3px 0 0 #9fd393; }
body.modo-oscuro .cmp-elegir { color: #9ec5f0; border-color: #3a4b5e; }
.cmp-cantidad { display: flex; align-items: center; gap: .35rem; margin: .45rem 0 .1rem; }
.cmp-cantidad label { font-size: .74rem; color: #5b6573; margin: 0; }
.cmp-cantidad input { width: 5.2rem; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cmp-cantidad-auto { border: 0; background: transparent; color: var(--color-primario); padding: .1rem .3rem; border-radius: 6px; cursor: pointer; }
.cmp-cantidad-auto:hover, .cmp-cantidad-auto:focus-visible { background: #eef3f9; outline: none; }
.cmp-cotizo { font-size: .7rem; color: var(--color-acento); font-weight: 400; }

/* Plan de Compra (2026-10-15): una tarjeta por proveedor con su orden de compra. */
.plan-resumen { display: grid; grid-template-columns: 1fr 1fr auto; gap: .6rem; align-items: stretch; margin-bottom: 1rem; }
.plan-resumen-dato { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .9rem; border: 1px solid #dde3ea; border-radius: 10px; background: #fff; }
.plan-resumen-dato > span { font-size: .76rem; color: #6c757d; }
.plan-resumen-dato > strong { font-size: 1.2rem; color: var(--color-primario); font-variant-numeric: tabular-nums; }
.plan-resumen-dato > small { font-size: .76rem; color: #6c757d; }
.plan-progreso { height: 6px; border-radius: 3px; background: #e6eaef; overflow: hidden; margin-top: .35rem; }
.plan-progreso > div { height: 100%; background: var(--color-secundario); border-radius: 3px; transition: width .3s; }
.plan-resumen-accion { display: flex; align-items: center; justify-content: flex-end; }
.plan-listo { color: #1e6b14; font-weight: 600; font-size: .9rem; }
.plan-aviso { border: 1px solid #f1d7a8; background: #fffaf0; border-radius: 10px; padding: .6rem .9rem; margin-bottom: .8rem; font-size: .84rem; }
.plan-aviso-titulo { font-weight: 600; color: #8a5a00; margin-bottom: .2rem; }
.plan-aviso ul { margin: 0; padding-left: 1.2rem; }
.plan-oc-estado { font-size: .7rem; font-weight: 600; border-radius: 20px; padding: .1rem .55rem; background: #eef1f6; color: #5b6573; }
.plan-oc-aprobada, .plan-oc-recibida { background: #d5efcf; color: #1e6b14; }
.plan-oc-pendiente { background: #fdeccf; color: #8a5a00; }
.plan-confirmar { list-style: none; margin: 0; padding: 0; }
.plan-confirmar li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid #eef1f5; }
.plan-confirmar li small { display: block; color: #6c757d; font-size: .75rem; }
.plan-confirmar li > span { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-confirmar-total { display: flex; justify-content: space-between; padding-top: .6rem; font-size: 1.05rem; }
.plan-confirmar-total strong { color: var(--color-primario); font-variant-numeric: tabular-nums; }
@media (max-width: 767.98px) {
  .plan-resumen { grid-template-columns: 1fr; }
  .plan-resumen-accion { justify-content: stretch; }
  .plan-resumen-accion .btn { width: 100%; }
  .plan-proveedores { grid-template-columns: 1fr; }
}
body.modo-oscuro .plan-resumen-dato, body.modo-oscuro .plan-prov { background: #17202a; border-color: #2b3a4a; }
.plan-ver-ordenes { display: flex; justify-content: center; margin-top: 1rem; }
.oc-preview { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; min-height: 70vh; }
.oc-preview-lista { display: flex; flex-direction: column; gap: .4rem; overflow-y: auto; }
.oc-preview-item { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; padding: .6rem .75rem; border: 1px solid #dde3ea; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.oc-preview-item:hover, .oc-preview-item:focus-visible { border-color: var(--color-primario); outline: none; }
.oc-preview-item.activo { border-color: var(--color-primario); background: #f0f5fb; box-shadow: inset 3px 0 0 var(--color-primario); }
.oc-preview-item > span { font-size: .82rem; color: #5b6573; }
.oc-preview-item > small { display: flex; gap: .4rem; align-items: center; font-size: .74rem; color: #6c757d; }
.oc-preview-visor { position: relative; border: 1px solid #dde3ea; border-radius: 10px; overflow: hidden; background: #eef1f6; min-height: 70vh; }
.oc-preview-visor iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.oc-preview-cargando { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--color-primario); }
@media (max-width: 767.98px) {
  .oc-preview { grid-template-columns: 1fr; }
  .oc-preview-lista { flex-direction: row; overflow-x: auto; }
  .oc-preview-item { min-width: 180px; }
}
body.modo-oscuro .oc-preview-item { background: #17202a; border-color: #2b3a4a; }
body.modo-oscuro .oc-preview-item.activo { background: #1d2a38; }
.oc-preview-sin-visor { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1rem; text-align: center; color: #5b6573; }
.oc-preview-sin-visor > .bi { font-size: 2.5rem; color: var(--color-primario); }

/* Compras modernizado (2026-10-15): pestanas del modulo, encabezado con
   conteo y buscador, tablas limpias, estados suaves y acciones uniformes.
   Las clases son genericas para poder usarlas en otros modulos. */
.tabs-modulo { display: flex; flex-wrap: wrap; gap: .35rem; padding: .3rem; background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; width: fit-content; max-width: 100%; }
.tabs-modulo .nav-link { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 8px; color: #5b6573; font-weight: 500; font-size: .88rem; border: 0; transition: background .15s, color .15s; }
.tabs-modulo .nav-link:hover { background: #f1f4f8; color: var(--color-primario); }
.tabs-modulo .nav-link.active { background: var(--color-primario); color: #fff; box-shadow: 0 1px 3px rgba(26,58,92,.25); }
.tabs-modulo .nav-link .bi { font-size: 1rem; }
.tabla-conteo { display: block; font-size: .78rem; color: #7a8594; margin-top: .1rem; }
.tabla-herramientas { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.buscador-tabla { position: relative; margin: 0; }
.buscador-tabla > .bi { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: #9aa4b0; font-size: .85rem; pointer-events: none; }
.buscador-tabla > input { width: 260px; max-width: 100%; padding-left: 2rem; border-radius: 8px; }
.tabla-pestanas { padding: .75rem 1.5rem .25rem; }
.tabla-moderna { font-size: .87rem; }
.tabla-moderna > thead th { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #7a8594; background: #f8fafc; border-bottom: 1px solid #e6eaef; padding: .6rem .9rem; white-space: nowrap; }
.tabla-moderna > tbody td { padding: .7rem .9rem; vertical-align: middle; border-bottom: 1px solid #eef1f5; }
.tabla-moderna > tbody tr:last-child td { border-bottom: 0; }
.tabla-moderna > tbody tr:hover > td { background: #f8fafc; }
.tabla-moderna > :not(caption) > * > :first-child { padding-left: 1.5rem; }
.tabla-moderna .col-acciones { text-align: right; white-space: nowrap; width: 1%; padding-right: 1.25rem; }
.tabla-vacia { text-align: center; color: #7a8594; padding: 2rem 1rem !important; }
.dato-principal { font-weight: 600; color: #1f2933; line-height: 1.3; }
.dato-secundario { font-size: .77rem; color: #7a8594; margin-top: .1rem; }
.dato-vacio { color: #b8c0ca; }
.dato-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
div.celda-titulo { display: flex; align-items: center; gap: .65rem; }
.avatar-iniciales { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #e8eef5; color: var(--color-primario); font-weight: 700; font-size: .75rem; letter-spacing: .02em; }
.chip-suave { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 600; padding: .1rem .55rem; border-radius: 20px; background: #eef1f6; color: #5b6573; margin-top: .15rem; }
.chip-ok { background: #e3f4df; color: #1e6b14; }
.chip-codigo { display: inline-block; font-size: .72rem; background: #eef1f6; color: var(--color-primario); padding: 0 6px; border-radius: 4px; margin-top: .15rem; }
.chip-estado { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 600; padding: .2rem .6rem; border-radius: 20px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); white-space: nowrap; }
.chip-estado::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.origen-enlace { display: inline-flex; align-items: center; gap: .3rem; font-size: .77rem; color: var(--color-primario); text-decoration: none; margin-top: .1rem; }
.origen-enlace:hover { text-decoration: underline; }
.btn-icono { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: .15rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #5b6573; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-icono:hover, .btn-icono:focus-visible { background: #eef3f9; color: var(--color-primario); border-color: #d5dfea; outline: none; }
.btn-icono.principal { color: var(--color-primario); border-color: #d5dfea; }
.btn-icono.principal:hover { background: var(--color-primario); color: #fff; }
.btn-icono.peligro:hover, .btn-icono.peligro:focus-visible { background: #fdecec; color: #c0392b; border-color: #f3c9c9; }
tr.fila-abrir { cursor: pointer; }
@media (max-width: 767.98px) {
  .tabs-modulo { width: 100%; }
  .tabs-modulo .nav-link { flex: 1 1 auto; justify-content: center; }
  .buscador-tabla, .buscador-tabla > input { width: 100%; }
  .tabla-herramientas { width: 100%; }
}
body.modo-oscuro .tabs-modulo { background: #17202a; border-color: #2b3a4a; }
body.modo-oscuro .tabla-moderna > thead th { background: #1b2632; border-color: #2b3a4a; }
body.modo-oscuro .tabla-moderna > tbody td { border-color: #2b3a4a; }
body.modo-oscuro .tabla-moderna > tbody tr:hover > td { background: #1b2632; }
body.modo-oscuro .dato-principal { color: #eef2f6; }
body.modo-oscuro .chip-estado { background: color-mix(in srgb, var(--c) 22%, #17202a); }

/* Aprobacion de OC respondiendo el correo, en el Plan de Compra (2026-10-15). */
.aprob-cuando { color: #7a8594; font-size: .76rem; margin-left: .3rem; white-space: nowrap; }
.aprob-pulso { flex: none; width: 10px; height: 10px; margin: .3rem .15rem 0; border-radius: 50%; background: #e8a020; animation: aprob-pulso 1.6s ease-in-out infinite; }
@keyframes aprob-pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,160,32,.55); } 50% { box-shadow: 0 0 0 6px rgba(232,160,32,0); } }
@media (prefers-reduced-motion: reduce) { .aprob-pulso { animation: none; } }
.aprob-oc-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.aprob-oc-opcion { display: flex; gap: .6rem; align-items: center; padding: .55rem .7rem; border: 1px solid #d5dbe3; border-radius: 10px; cursor: pointer; margin: 0; }
.aprob-oc-opcion:has(input:checked) { border-color: var(--color-primario); background: #f0f5fb; }
.aprob-oc-opcion .form-check-input { margin: 0; flex: none; }
.aprob-oc-opcion small { display: block; color: #6c757d; font-size: .75rem; }
body.modo-oscuro .aprob-oc-opcion { border-color: #33465a; }
.aprob-chip { display: inline-block; font-size: .68rem; font-weight: 600; padding: .05rem .45rem; border-radius: 20px; margin-left: .3rem; background: #eef1f6; color: #5b6573; font-style: normal; }
.aprob-ok .aprob-chip { background: #e3f4df; color: #1e6b14; }
.aprob-no .aprob-chip { background: #fdecec; color: #a93226; }
.plan-resumen-aprob { display: block; margin-top: .35rem; }

/* Plan de Compra, tarjetas livianas (2026-10-15: "que no se vea tan cargado"). */
.plan-proveedores { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem; align-items: start; }
.plan-prov { display: flex; flex-direction: column; border: 1px solid #e3e8ee; border-top: 3px solid var(--color-primario); border-radius: 12px; background: #fff; overflow: hidden; }
.plan-prov-con-orden { border-top-color: var(--color-secundario); }
.plan-prov-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: .85rem 1rem .6rem; }
.plan-prov-nombre { font-weight: 700; color: #1f2933; line-height: 1.25; }
.plan-prov-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .2rem; font-size: .76rem; color: #7a8594; }
.plan-prov-sep { color: #c3cad3; }
.plan-oc-num { font-weight: 600; color: #3d4652; }
.plan-prov-total { font-size: 1.05rem; font-weight: 700; color: var(--color-primario); white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-items { list-style: none; margin: 0; padding: 0 1rem; }
.plan-items li { display: grid; grid-template-columns: 1fr auto; gap: .1rem .75rem; padding: .55rem 0; border-top: 1px solid #f0f2f5; font-size: .84rem; }
.plan-item-nombre { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-weight: 600; color: #2c3440; }
.plan-item-calc { grid-column: 1; font-size: .75rem; color: #7a8594; font-variant-numeric: tabular-nums; }
.plan-item-total { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-chip { font-size: .66rem; font-weight: 600; color: #5b6573; background: #eef1f6; border-radius: 20px; padding: .05rem .45rem; }
.plan-chip-elegido { color: #fff; background: var(--color-primario); }
.plan-aprobacion { display: flex; flex-direction: column; gap: .5rem; padding: .6rem 1rem .2rem; }
.aprob-cita { margin: 0; padding: .55rem .75rem; border-left: 3px solid #c3cad3; border-radius: 0 8px 8px 0; background: #f7f9fb; }
.aprob-cita p { margin: 0 0 .25rem; font-size: .9rem; color: #1f2933; }
.aprob-cita footer { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .72rem; color: #7a8594; }
.aprob-cita.aprob-ok { border-left-color: var(--color-secundario); background: #f3faf1; }
.aprob-cita.aprob-ok footer .bi { color: var(--color-secundario); }
.aprob-cita.aprob-no { border-left-color: #c0392b; background: #fdf4f3; }
.aprob-cita.aprob-no footer .bi { color: #c0392b; }
.aprob-espera { display: flex; align-items: center; gap: .45rem; font-size: .8rem; color: #8a5a00; }
.aprob-espera .aprob-pulso { margin: 0; }
.plan-prov-pie { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .7rem 1rem; }
.plan-pie-principal { display: flex; flex-wrap: wrap; gap: .4rem; }
.plan-pie-iconos { display: flex; gap: .1rem; margin-left: auto; }
a.btn-icono { text-decoration: none; }
@media (max-width: 767.98px) { .plan-proveedores { grid-template-columns: 1fr; } }
body.modo-oscuro .plan-prov { background: #17202a; border-color: #2b3a4a; }
body.modo-oscuro .plan-prov-nombre, body.modo-oscuro .plan-item-nombre, body.modo-oscuro .aprob-cita p { color: #eef2f6; }
body.modo-oscuro .plan-items li { border-color: #2b3a4a; }
body.modo-oscuro .aprob-cita { background: #1b2632; }

/* Contador de respuestas de aprobacion sin revisar (2026-10-15): menu,
   lista de comparativas y pestana Plan de Compra. */
.nav-contador { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; margin-left: .4rem; border-radius: 999px; background: #e8a020; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; vertical-align: middle; }
.nav-contador[hidden] { display: none; }
.sidebar-nav a .nav-contador { margin-left: auto; }
.aprob-cita.aprob-nueva { box-shadow: 0 0 0 2px rgba(232,160,32,.35); }
.aprob-nueva-chip { float: right; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: #e8a020; border-radius: 4px; padding: .05rem .4rem; margin-left: .5rem; }
.plan-buzon { display: block; margin-top: .3rem; color: #7a8594; }
.plan-buzon[hidden] { display: none; }
.aprob-cita.aprob-ajeno { border-left-style: dashed; opacity: .9; }

/* Plantillas de correo y "Conocer correo" (2026-10-15). */
.plantilla-marcadores { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .4rem; }
.cc-marcador { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; padding: .1rem .45rem; border: 1px solid #d5dfea; border-radius: 6px; background: #f4f7fb; color: var(--color-primario); cursor: pointer; }
.cc-marcador:hover, .cc-marcador:focus-visible { background: var(--color-primario); color: #fff; border-color: var(--color-primario); outline: none; }
.plantilla-adjuntos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .4rem; }
.plantilla-adjunto { display: flex; gap: .5rem; align-items: center; padding: .45rem .65rem; border: 1px solid #dde3ea; border-radius: 8px; font-size: .86rem; cursor: pointer; margin: 0; }
.plantilla-adjunto:has(input:checked) { border-color: var(--color-primario); background: #f0f5fb; }
.plantilla-adjunto .form-check-input { margin: 0; flex: none; }
.cc-cuerpo { min-height: 60vh; }
.cc-pegar { max-width: 760px; margin: 1rem auto; }
.cc-pegar-titulo { display: block; font-weight: 600; color: var(--color-primario); margin-bottom: .5rem; }
.cc-ejemplo { font-size: .9rem; line-height: 1.5; }
.cc-centro { min-height: 50vh; }
.cc-revisar { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem; }
.cc-partes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.cc-parte { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; align-items: start; font-size: .82rem; }
.cc-parte-tipo { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .15rem .4rem; border-radius: 4px; background: #eef1f6; color: #5b6573; text-align: center; }
.cc-tipo-saludo, .cc-tipo-cierre, .cc-tipo-firma { background: #e8eef5; color: var(--color-primario); }
.cc-tipo-detalle, .cc-tipo-montos { background: #fdf3e4; color: #8a5a00; }
.cc-tipo-instrucciones { background: #e3f4df; color: #1e6b14; }
.cc-parte-texto { white-space: pre-wrap; color: #26313d; }
.cc-parte-nota { font-size: .74rem; color: #7a8594; margin-top: .1rem; }
.cc-panel { padding: .75rem; }
.cc-plantilla { font-size: .86rem; line-height: 1.5; }
.cc-marcadores { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.cc-aviso { margin-top: .4rem; font-size: .8rem; color: #8a5a00; }
.cc-vista { border: 1px solid #dde3ea; border-radius: 8px; background: #fafbfd; padding: .85rem 1rem; font-size: .88rem; }
.cc-vista-asunto { font-weight: 600; padding-bottom: .5rem; margin-bottom: .6rem; border-bottom: 1px solid #e6eaef; }
.cc-vista-asunto span { color: #7a8594; font-weight: 400; }
.cc-vista-cuerpo { white-space: pre-wrap; line-height: 1.55; color: #26313d; }
@media (max-width: 991.98px) { .cc-revisar { grid-template-columns: 1fr; } }
body.modo-oscuro .cc-vista, body.modo-oscuro .plantilla-adjunto { background: #17202a; border-color: #2b3a4a; }
body.modo-oscuro .cc-vista-cuerpo, body.modo-oscuro .cc-parte-texto { color: #dde4ec; }

/* OC editadas desde la Tabla Comparativa y aviso del cambio (2026-10-15). */
.plan-oc-rev { font-size: .66rem; font-weight: 700; color: #8a5a00; background: #fdeccf; border-radius: 4px; padding: .05rem .35rem; }
.aviso-cambios { display: flex; flex-wrap: wrap; gap: .35rem; }
.aviso-cambio-chip { font-size: .78rem; padding: .2rem .6rem; border-radius: 20px; background: #fdf3e4; color: #6b4a00; border: 1px solid #f1d7a8; }
.aviso-destinos { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.aviso-destino { display: flex; gap: .6rem; align-items: center; padding: .55rem .75rem; border: 1px solid #d5dbe3; border-radius: 10px; cursor: pointer; margin: 0; }
.aviso-destino > .bi { font-size: 1.15rem; color: #7a8594; }
.aviso-destino small { display: block; color: #6c757d; font-size: .74rem; }
.btn-check:checked + .aviso-destino { border-color: var(--color-primario); background: #f0f5fb; box-shadow: inset 0 0 0 1px var(--color-primario); }
.btn-check:checked + .aviso-destino > .bi { color: var(--color-primario); }
.btn-check:disabled + .aviso-destino { opacity: .45; cursor: not-allowed; }
@media (max-width: 767.98px) { .aviso-destinos { grid-template-columns: 1fr; } }

/* "Enviar a aprobacion": un correo editable por proveedor (2026-10-16). */
.aprob-oc-mensajes { display: flex; flex-direction: column; gap: .75rem; }
.aprob-msg { border: 1px solid #dde3ea; border-radius: 10px; padding: .7rem .8rem; background: #fafbfd; display: flex; flex-direction: column; gap: .45rem; }
.aprob-msg-cab { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.aprob-msg-sel { display: flex; gap: .5rem; align-items: center; margin: 0; cursor: pointer; }
.aprob-msg-sel .form-check-input { margin: 0; }
.aprob-msg-info { font-size: .76rem; color: #7a8594; }
.aprob-msg-cuerpo { font-size: .86rem; line-height: 1.5; }
.aprob-msg:has(.aprob-msg-check:not(:checked)) { opacity: .55; }
.plan-resumen-accion { flex-direction: column; align-items: flex-end; gap: .25rem; }
body.modo-oscuro .aprob-msg { background: #17202a; border-color: #2b3a4a; }

/* ── Conocer orden de compra (diseño del PDF, 2026-10-16) ───────────── */
.do-cuerpo { height: 76vh; }
.do-centro { height: 100%; }
.do-revisar { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.do-hoja { background: #e9edf2; padding: .75rem; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.do-pagina { width: 100%; max-width: 640px; background: #fff; box-shadow: 0 2px 10px rgba(17,31,46,.15); border-radius: 2px; }
.do-zona { margin: auto; }
.do-cargando { margin: auto; color: var(--color-primario); }
.do-estado { display: inline-block; margin-top: .2rem; font-size: .75rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: #eef1f6; color: #5b6573; }
.do-estado.propio { background: #e3f4df; color: #1e6b14; }
.do-estado.pendiente { background: #fff3d6; color: #8a5a00; }
.do-logo { display: flex; align-items: center; gap: .35rem; }
.do-logo img { height: 26px; max-width: 90px; object-fit: contain; border: 1px solid #e3e8ee; border-radius: 4px; background: #fff; }
.do-avisos { display: flex; flex-wrap: wrap; gap: .35rem; padding: .5rem .75rem 0; }
.do-pedir { display: flex; gap: .5rem; padding: .6rem .75rem; border-top: 1px solid #e6eaef; }
@media (max-width: 991.98px) {
  .do-cuerpo { height: auto; }
  .do-revisar { grid-template-columns: 1fr; }
}

/* Reportes de errores (Configuración, 2026-10-16) */
.re-zona { padding: 1.25rem; border: 2px dashed #b9c3d0; border-radius: 12px; background: #fff; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.re-zona:hover, .re-zona.arrastrando { border-color: var(--color-primario); background: #f5f8fc; }
.re-zona > .bi { font-size: 2rem; color: var(--color-primario); }
.re-pruebas { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .75rem; margin-top: .75rem; }
.re-prueba { position: relative; display: flex; gap: .65rem; padding: .6rem; border: 1px solid #dfe4ea; border-radius: 10px; background: #fff; }
.re-prueba.sin-tipo { border-color: #f0ad4e; background: #fffaf0; }
.re-miniatura { position: relative; flex: 0 0 96px; height: 96px; border-radius: 8px; background: #eef1f5; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.re-miniatura img { width: 100%; height: 100%; object-fit: cover; }
.re-miniatura > .bi { font-size: 2rem; color: #6c7a8a; }
.re-numero { position: absolute; top: 4px; left: 4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--color-primario); color: #fff; font-size: .75rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.re-prueba-datos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.re-prueba-nombre { font-size: .8rem; color: #6c7a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 1.5rem; }
.re-quitar { position: absolute; top: 2px; right: 2px; padding: .15rem .35rem; }
@media (max-width: 576px) { .re-pruebas { grid-template-columns: 1fr; } }
.prov-documento-nocuadra { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .4rem; border-radius: 4px; background: #f8d7da; color: #842029; font-weight: 600; white-space: nowrap; }

/* ── Impresion (2026-11-05) ─────────────────────────────────────────────────
   En cualquier pagina: fuera la barra de telefono ("Teddy"), el menu y sus
   botones (salian en cada hoja y dejaban una hoja de mas casi en blanco), y
   la tabla comparativa se ajusta al ancho de la hoja en vez de cortarse. */
@media print {
  .barra-movil, .btn-mostrar-menu, .btn-hamburguesa, .sidebar, .sidebar-overlay { display: none !important; }
  .main-content { margin: 0 !important; padding: 0 !important; }
  /* .layout mide 100vh en pantalla: al imprimir agregaba una hoja en blanco */
  html, body, .layout { height: auto !important; min-height: 0 !important; }
  .cmp-tabla thead th, .cmp-tabla td { position: static !important; }
  .cmp-tabla { table-layout: fixed; width: 100% !important; font-size: 8px !important; }
  .cmp-tabla th, .cmp-tabla td { white-space: normal !important; overflow-wrap: anywhere; padding: 2px 3px !important; }
}
