/* importaciones.css — Módulo Seguimiento Compras/Importaciones (imp_*). Prefijo imp- en todo.
   imp-hidden es la única utilidad de visibilidad del módulo y va última en el archivo para
   ganar la cascada. Un elemento que la use debe alternarse con
   classList.toggle('imp-hidden', ...) y NUNCA con style.display: mezclar ambos mecanismos
   deja el elemento invisible aunque su contenido esté generado. */

.imp-placeholder { padding: 40px; text-align: center; color: var(--text-muted); }

/* ── Sub-tabs tipo pill ── */
.imp-subtabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.imp-subtab-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.imp-subtab-btn { padding: 8px 16px; border: none; border-radius: 20px; background: #f1f1f1; color: var(--odoo-dark); font-size: 12px; font-weight: 700; cursor: pointer; transition: background 0.15s, color 0.15s; }
.imp-subtab-btn.imp-subtab-active { background: var(--odoo-red); color: #fff; }
.imp-subtab-subtitulo { font-size: 10px; color: var(--text-muted); }
.imp-tab-content { display: block; }

/* ── Toolbar de filtros ── */
.imp-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.imp-toolbar .form-select, .imp-toolbar .form-input { width: auto; min-width: 140px; }
.imp-toolbar-spacer { flex: 1; }

/* ── Chips de estado (8 estados del ENUM imp_compras.estado) ── */
.imp-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }
.imp-chip-borrador { background: #94a3b8; }
.imp-chip-confirmada { background: #2563eb; }
.imp-chip-en_produccion { background: #f59e0b; }
.imp-chip-lista_despacho { background: #8b5cf6; }
.imp-chip-embarcada_parcial { background: #06b6d4; }
.imp-chip-embarcada { background: #0d9488; }
.imp-chip-cerrada { background: #16a34a; }
.imp-chip-cancelada { background: #dc2626; }

/* ── Chips de estado de embarque (9 estados del ENUM imp_embarques.estado) ── */
.imp-chip-planificado { background: #94a3b8; }
.imp-chip-en_transito { background: #2563eb; }
.imp-chip-en_puerto { background: #0ea5e9; }
.imp-chip-en_frontera { background: #f59e0b; }
.imp-chip-en_aduana { background: #8b5cf6; }
.imp-chip-levante { background: #06b6d4; }
.imp-chip-entregado { background: #0d9488; }
.imp-chip-cerrado { background: #16a34a; }
.imp-chip-observado { background: #ea580c; }

/* ── Chips de riesgo (imp_embarques.riesgo) ── */
.imp-chip-riesgo-verde { background: #16a34a; }
.imp-chip-riesgo-amarillo { background: #ca8a04; }
.imp-chip-riesgo-rojo { background: #dc2626; }

/* ── Lista de compras ── */
.imp-lista-table { width: 100%; }
.imp-lista-table th { text-align: left; padding: 9px 12px; font-size: 11px; font-weight: 600; color: #fff; background: var(--odoo-header-bg); letter-spacing: 0.03em; white-space: nowrap; }
.imp-lista-table td { padding: 9px 12px; font-size: 12px; vertical-align: middle; }
.imp-lista-table tbody tr { cursor: pointer; }
.imp-lista-num { text-align: right; }
.imp-lista-vacio { padding: 30px; text-align: center; color: var(--text-muted); font-size: 12px; }

/* ── Tarjeta desplegable de carga (Fase 3c-1) ── */
.imp-imp-chevron { width: 24px; text-align: center; color: var(--text-muted); font-size: 11px; cursor: pointer; }
.imp-lista-table tr[id$="-fila-cuerpo"] { cursor: default; }
.imp-lista-table tr[id$="-fila-cuerpo"] > td { background: var(--odoo-row-alt, #f8f8f6); padding: 12px; }

/* ── Formulario de cabecera ── */
.imp-form-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.imp-form-codigo { font-size: 20px; font-weight: 800; color: var(--odoo-dark); }
.imp-btn-borrar-embarque { margin-left: auto; padding: 8px 14px; border: none; border-radius: 6px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.imp-btn-borrar-embarque:hover { background: #b91c1c; }
.imp-save-indicator { font-size: 11px; color: var(--text-muted); min-height: 14px; }
.imp-save-indicator.imp-saving { color: var(--text-muted); }
.imp-save-indicator.imp-saved { color: #16a34a; }
.imp-save-indicator.imp-error { color: #dc2626; }
.imp-form-card { background: #fff; border: 1px solid var(--odoo-border); border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); padding: 16px; margin-bottom: 16px; }
.imp-form-field label { font-size: 10px; font-weight: 700; color: var(--text-muted); display: block; margin-bottom: 4px; }
.imp-form-readonly { padding: 8px 10px; background: var(--odoo-row-alt, #f8f8f6); border: 1px solid var(--odoo-border); border-radius: 6px; font-size: 13px; color: var(--text-mid); }
.imp-form-help { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.imp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.imp-form-observaciones { margin-top: 12px; }
.imp-section-title { font-weight: 700; font-size: 13px; margin-bottom: 10px; }

/* ── Botonera de estado (transiciones) ── */
.imp-estado-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.imp-btn-estado { border: none; border-radius: 6px; padding: 8px 16px; font-size: 12px; font-weight: 700; cursor: pointer; background: #f1f1f1; color: var(--odoo-dark); }
.imp-btn-estado.imp-btn-estado-confirmar { background: #2563eb; color: #fff; }
.imp-btn-estado.imp-btn-estado-cancelar { background: #dc2626; color: #fff; }
.imp-btn-estado.imp-btn-estado-avanzar { background: #0d9488; color: #fff; }

/* ── Tabla de ítems editable inline ── */
.imp-items-table { width: 100%; border-collapse: collapse; }
.imp-items-table th { text-align: left; padding: 6px 8px; font-size: 10px; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--odoo-border); white-space: nowrap; }
.imp-items-table th:nth-child(2) { width: 18%; }
.imp-items-table th.imp-col-origen, .imp-items-table td.imp-col-origen { width: 46px; text-align: center; }
.imp-items-table td { padding: 5px 8px; vertical-align: top; }
.imp-items-input { width: 100%; box-sizing: border-box; border: 1px solid var(--odoo-border); border-radius: 5px; padding: 4px 6px; font-size: 12px; }
.imp-items-input.imp-items-num { text-align: right; }
.imp-items-readonly { font-size: 12px; font-weight: 700; text-align: right; padding: 4px 6px; }
.imp-items-btn-quitar { background: none; border: none; color: #dc2626; font-size: 14px; cursor: pointer; padding: 2px 4px; }
.imp-item-sin-guardar td { outline: 1px dashed #f59e0b; outline-offset: -2px; }
.imp-items-btn-agregar { margin-top: 8px; }
.imp-items-input.imp-items-input-atencion { border-color: #f59e0b; background: rgba(245,158,11,0.08); }

/* ── Origen de ítem traído de una OC (snapshot historico, no editable) — paleta sobria de
   5 colores que se ciclan por OC distinta, nunca saturados ── */
.imp-badge-origen { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.imp-origen-0 td:first-child { border-left: 3px solid #3b6ea5; }
.imp-origen-1 td:first-child { border-left: 3px solid #5b8a72; }
.imp-origen-2 td:first-child { border-left: 3px solid #a56b3b; }
.imp-origen-3 td:first-child { border-left: 3px solid #7a5ea5; }
.imp-origen-4 td:first-child { border-left: 3px solid #a53b5b; }
.imp-origen-manual td:first-child { border-left: 3px solid #9ca3af; }
.imp-badge-origen.imp-origen-manual { background: rgba(156,163,175,0.15); color: #6b7280; }
.imp-badge-origen.imp-origen-0 { background: rgba(59,110,165,0.12); color: #3b6ea5; }
.imp-badge-origen.imp-origen-1 { background: rgba(91,138,114,0.12); color: #5b8a72; }
.imp-badge-origen.imp-origen-2 { background: rgba(165,107,59,0.12); color: #a56b3b; }
.imp-badge-origen.imp-origen-3 { background: rgba(122,94,165,0.12); color: #7a5ea5; }
.imp-badge-origen.imp-origen-4 { background: rgba(165,59,91,0.12); color: #a53b5b; }
.imp-origen-leyenda { font-size: 11px; margin-bottom: 8px; min-height: 14px; }
.imp-origen-leyenda-label { color: var(--text-muted); margin-right: 4px; }

/* ── Typeahead compartido (dropdown flotante) ── */
.imp-sugg { display: none; position: fixed; background: #fff; border: 1px solid var(--odoo-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); max-height: 220px; overflow-y: auto; z-index: 6000; }
.imp-sugg-item { padding: 7px 10px; cursor: pointer; font-size: 12px; border-bottom: 1px solid #f1f5f9; }
.imp-sugg-item:hover { background: #fafafa; }
.imp-sugg-item-sub { color: var(--text-muted); font-size: 11px; }

/* ── Panel OC vinculadas ── */
.imp-oc-panel { background: #fff; border: 1px solid var(--odoo-border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.imp-oc-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: 12px; }
.imp-oc-row:last-child { border-bottom: none; }
.imp-oc-vincular-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.imp-oc-select { max-width: 320px; }
.imp-oc-vacio { font-size: 12px; color: var(--text-muted); }
.imp-oc-row-info { flex: 1; }
.imp-estado-actual-label { font-size: 11px; color: var(--text-muted); margin-left: 6px; align-self: center; }

/* ── Modal genérico (overlay + caja) — usado por "Nuevo embarque" y "Asignar ítem" ── */
.imp-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9000; align-items: flex-start; justify-content: center; padding: 20px; overflow-y: auto; }
.imp-modal-box { background: #fff; border-radius: 12px; width: 100%; max-width: 480px; margin: auto; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.imp-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--odoo-border); flex-shrink: 0; }
.imp-modal-title { font-size: 14px; font-weight: 700; }
.imp-modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #999; }
.imp-modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.imp-modal-footer { padding: 14px 20px; border-top: 1px solid var(--odoo-border); display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.imp-modal-help { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Modal con contenido potencialmente largo (Fase 3b) — a diferencia de .imp-modal-box a
   secas (sin max-height: confía en que el OVERLAY entero scrollee, lo que puede sacar el
   header de la vista en una pantalla chica), esto acota la caja al viewport para que el
   scroll pase adentro de .imp-modal-body y el header con la ✕ quede siempre visible. ── */
.imp-modal-box-alto { max-height: calc(100vh - 40px); }

/* ── Timeline vertical de hitos (Fase 2c-3) ── */
.imp-hitos-resumen { font-size: 11px; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }
.imp-hitos-leyenda { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.imp-timeline { display: flex; flex-direction: column; }
.imp-hito-row { display: flex; gap: 12px; cursor: pointer; }
.imp-hito-marcador-col { display: flex; flex-direction: column; align-items: center; width: 18px; flex-shrink: 0; }
.imp-hito-marcador { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #cbd5e1; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; color: #fff; margin-top: 2px; }
.imp-hito-linea { flex: 1; width: 2px; background: #e2e8f0; margin: 2px 0; min-height: 10px; }
.imp-hito-row:last-child .imp-hito-linea { visibility: hidden; }
.imp-hito-contenido { flex: 1; padding-bottom: 18px; }
.imp-hito-row:last-child .imp-hito-contenido { padding-bottom: 0; }
.imp-hito-titulo { font-size: 13px; font-weight: 700; }
.imp-hito-orden { color: var(--text-muted); margin-right: 4px; }
.imp-hito-bloqueante { margin-left: 6px; font-size: 11px; cursor: help; }
.imp-hito-fechas, .imp-hito-responsable, .imp-hito-notas { font-size: 11px; color: var(--text-mid); margin-top: 2px; }
.imp-hito-fecha-real { color: var(--text-muted); }
.imp-hito-docs { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.imp-hito-doc-chip { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; background: rgba(37,99,235,0.1); color: #2563eb; cursor: help; }
.imp-hito-etiqueta { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #e2e8f0; color: var(--text-muted); }
.imp-hito-cumplido .imp-hito-marcador { background: #16a34a; border-color: #16a34a; }
.imp-hito-en_curso .imp-hito-marcador { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.18); }
.imp-hito-futuro .imp-hito-marcador { border-color: #cbd5e1; }
.imp-hito-atrasado .imp-hito-marcador { border-color: #dc2626; border-width: 3px; }
.imp-hito-atrasado .imp-hito-titulo { color: #dc2626; }
.imp-hito-no_registrado { opacity: 0.6; }
.imp-hito-no_registrado .imp-hito-marcador { background: #f1f5f9; border-color: #cbd5e1; }
.imp-hito-omitido { opacity: 0.45; }
.imp-hito-omitido .imp-hito-titulo { text-decoration: line-through; }
.imp-hito-observado .imp-hito-marcador { background: #ca8a04; border-color: #ca8a04; }
.imp-hito-observado .imp-hito-titulo { color: #ca8a04; }

/* ── Aviso de hitos anteriores sin resolver (Fase 2c-3b) ── */
.imp-hito-aviso-anteriores { background: #fef3c7; border: 1px solid #fbbf24; border-radius: 8px; padding: 12px; font-size: 12px; color: #92400e; }
.imp-hito-aviso-ayuda { font-size: 11px; color: #92400e; opacity: 0.85; margin-top: 6px; }
.imp-hito-aviso-btn { margin-top: 10px; }

/* ── Sub-tab Configuración (Fase 2d) — pills de sub-sección, un nivel debajo de imp-subtabs ── */
.imp-cfg-subtabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.imp-cfg-subtab-btn { padding: 6px 14px; border: 1px solid var(--odoo-border); border-radius: 16px; background: #fff; color: var(--odoo-dark); font-size: 12px; font-weight: 600; cursor: pointer; }
.imp-cfg-subtab-btn.imp-cfg-subtab-active { background: var(--odoo-dark); color: #fff; border-color: var(--odoo-dark); }
.imp-cfg-aviso-plantilla { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #1e40af; margin-bottom: 14px; }
.imp-cfg-hito-check-cell { text-align: center; }
.imp-chip-cfg-activo { background: #16a34a; }
.imp-chip-cfg-inactivo { background: #94a3b8; }

/* ── Alertas de seguimiento (Fase 5b) ── */
.imp-cfg-alerta-card { margin-bottom: 14px; }
.imp-cfg-alerta-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.imp-cfg-alerta-nombre { font-size: 14px; }
.imp-cfg-alerta-check { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-mid); display: flex; align-items: center; gap: 6px; }
.imp-cfg-alerta-desc { font-size: 12px; color: var(--text-mid); line-height: 1.5; margin-bottom: 12px; }
.imp-cfg-alerta-controles { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--text-mid); }
.imp-cfg-alerta-controles label { display: flex; align-items: center; gap: 6px; }
.imp-cfg-alerta-dias input { width: 70px; margin-left: 6px; }
.imp-chip-severidad-info { background: #2563eb; }
.imp-chip-severidad-advertencia { background: #ca8a04; }
.imp-chip-severidad-critica { background: #dc2626; }

/* ── Panel de documentos compartido compra/embarque (Fase 3b) ── */
.imp-doc-com-ayuda { margin-bottom: 12px; }
.imp-doc-carga { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.imp-doc-tipo-select { min-width: 220px; }
.imp-doc-table { width: 100%; }
.imp-doc-table th { text-align: left; padding: 9px 12px; font-size: 11px; font-weight: 600; color: #fff; background: var(--odoo-header-bg); letter-spacing: 0.03em; white-space: nowrap; }
.imp-doc-table td { padding: 9px 12px; font-size: 12px; vertical-align: middle; }
.imp-doc-acciones { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.imp-doc-btn-accion { border: none; border-radius: 6px; padding: 5px 10px; font-size: 11px; font-weight: 700; cursor: pointer; background: #f1f1f1; color: var(--odoo-dark); }
.imp-doc-btn-borrar { color: #dc2626; }
.imp-doc-estado-select { min-width: 150px; }
.imp-doc-falta-original { color: #dc2626; font-size: 10px; font-weight: 700; }

/* ── Chips de estado de documento (ENUM imp_documentos.estado) — namespace propio, no
   reutiliza imp-chip-observado (que es el estado de embarque, otro dominio) ── */
.imp-chip-doc-pendiente { background: #94a3b8; }
.imp-chip-doc-emitido { background: #2563eb; }
.imp-chip-doc-revisado_ok { background: #16a34a; }
.imp-chip-doc-original_recibido { background: #0f5c31; }
.imp-chip-doc-observado { background: #ca8a04; }

/* ── Semáforo de documentos en el timeline de hitos (Fase 3b) ── */
.imp-hito-faltan-docs { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #fee2e2; color: #dc2626; }
.imp-hito-doc-chip-ok { background: rgba(22,163,74,0.12); color: #16a34a; }
.imp-hito-doc-chip-falta { background: rgba(220,38,38,0.12); color: #dc2626; }

/* ── Panel de costos compartido compra/embarque (Fase 4b) ── */
.imp-cos-btn-agregar { margin-bottom: 12px; }
.imp-cos-table { width: 100%; }
.imp-cos-table th { text-align: left; padding: 9px 12px; font-size: 11px; font-weight: 600; color: #fff; background: var(--odoo-header-bg); letter-spacing: 0.03em; white-space: nowrap; }
.imp-cos-table td { padding: 9px 12px; font-size: 12px; vertical-align: middle; }
.imp-cos-totales-row td { padding: 9px 12px; font-size: 12px; font-weight: 700; border-top: 2px solid var(--odoo-border); }
.imp-cos-total-celda { white-space: nowrap; }
.imp-cos-base-heredada { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.imp-cos-acciones { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.imp-cos-check-field label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-mid); }
.imp-cos-advertencias { background: #fef3c7; border: 1px solid #fbbf24; border-radius: 8px; padding: 12px; font-size: 12px; color: #92400e; margin-bottom: 12px; }
.imp-cos-advertencias ul { margin: 6px 0 0; padding-left: 18px; }
.imp-cos-variacion-sube { color: #dc2626; font-weight: 600; white-space: nowrap; }
.imp-cos-variacion-baja { color: #16a34a; font-weight: 600; white-space: nowrap; }

/* ── Chips de estado de costo (ENUM imp_costos.estado) — namespace propio, distinto del de
   embarque (imp-chip-<estado_embarque>) y del de documento (imp-chip-doc-*) ── */
.imp-chip-costo-estimado { background: #94a3b8; }
.imp-chip-costo-real { background: #2563eb; }
.imp-chip-costo-pagado { background: #16a34a; }

/* ── Panel de landed cost, solo en la compra (Fase 4b) ── */
.imp-lan-aviso-incompletos { background: #fee2e2; border: 1px solid #dc2626; border-radius: 8px; padding: 12px; font-size: 12px; color: #991b1b; margin-bottom: 12px; }
.imp-lan-aviso-incompletos ul { margin: 6px 0 8px; padding-left: 18px; }
.imp-lan-aviso-incompletos-consecuencia { font-size: 11px; color: #991b1b; opacity: 0.9; }
.imp-lan-falta-dato { margin-left: 4px; cursor: help; font-size: 11px; }
.imp-lan-pct-vacio { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.imp-lan-aviso-tc { background: #fef3c7; border: 1px solid #fbbf24; border-radius: 8px; padding: 12px; font-size: 12px; color: #92400e; margin-bottom: 12px; }
.imp-lan-advertencias { background: #fef3c7; border: 1px solid #fbbf24; border-radius: 8px; padding: 12px; font-size: 12px; color: #92400e; margin-bottom: 12px; }
.imp-lan-advertencias ul { margin: 6px 0 0; padding-left: 18px; }
.imp-lan-resumen { display: flex; flex-wrap: wrap; gap: 18px; background: var(--odoo-row-alt, #f8f8f6); border: 1px solid var(--odoo-border); border-radius: 10px; padding: 14px 18px; margin-bottom: 16px; }
.imp-lan-resumen-item { display: flex; flex-direction: column; gap: 2px; }
.imp-lan-resumen-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.imp-lan-resumen-valor { font-size: 15px; font-weight: 700; color: var(--odoo-dark); }
.imp-lan-resumen-pct { margin-left: auto; }
.imp-lan-pct-destacado { font-size: 22px; color: var(--odoo-red); }
.imp-lan-table { width: 100%; }
.imp-lan-table th { text-align: left; padding: 9px 12px; font-size: 11px; font-weight: 600; color: #fff; background: var(--odoo-header-bg); letter-spacing: 0.03em; white-space: nowrap; }
.imp-lan-table td { padding: 9px 12px; font-size: 12px; vertical-align: middle; }
.imp-lan-fila-item { cursor: pointer; }
.imp-lan-fila-detalle td { background: var(--odoo-row-alt, #f8f8f6); }
.imp-lan-unitario-destacado { font-size: 14px; font-weight: 800; color: var(--odoo-dark); }
.imp-lan-ga-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.imp-lan-ga-real { background: rgba(22,163,74,0.15); color: #16a34a; }
.imp-lan-ga-estimado { background: rgba(202,138,4,0.15); color: #ca8a04; }
.imp-lan-desglose { font-size: 12px; }
.imp-lan-desglose-fila { display: flex; justify-content: space-between; max-width: 320px; padding: 3px 0; border-bottom: 1px solid #f1f5f9; }
.imp-lan-desglose-vacio { font-size: 11px; color: var(--text-muted); }

/* ── Botón de acceso a la ayuda, junto al título del módulo ── */
.imp-titulo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.imp-ayu-btn-abrir { border: 1px solid var(--odoo-border); border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 700; cursor: pointer; background: #fff; color: var(--odoo-dark); }

/* ── Panel de ayuda a pantalla completa — prefijo imp-ayu- ── */
.imp-ayu-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.imp-ayu-titulo { font-size: 18px; font-weight: 800; color: var(--odoo-dark); }
.imp-ayu-layout { display: flex; gap: 28px; align-items: flex-start; }
.imp-ayu-indice { width: 240px; flex-shrink: 0; position: sticky; top: 12px; background: #fff; border: 1px solid var(--odoo-border); border-radius: 10px; padding: 14px; }
.imp-ayu-indice-titulo { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px; }
.imp-ayu-indice-link { display: block; font-size: 12px; color: var(--odoo-dark); text-decoration: none; padding: 6px 4px; border-radius: 6px; line-height: 1.4; }
.imp-ayu-indice-link:hover { background: var(--odoo-row-alt, #f8f8f6); }
.imp-ayu-contenido { flex: 1; min-width: 0; max-width: 760px; }
.imp-ayu-seccion { background: #fff; border: 1px solid var(--odoo-border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.imp-ayu-seccion-header { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: none; background: none; cursor: pointer; text-align: left; }
.imp-ayu-seccion-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--odoo-row-alt, #f1f1ef); font-size: 11px; font-weight: 700; color: var(--odoo-dark); flex-shrink: 0; }
.imp-ayu-seccion-titulo { flex: 1; font-size: 13px; font-weight: 700; color: var(--odoo-dark); }
.imp-ayu-seccion-flecha { color: var(--text-muted); font-size: 12px; transition: transform 0.15s; }
.imp-ayu-seccion.imp-ayu-abierta .imp-ayu-seccion-flecha { transform: rotate(180deg); }
.imp-ayu-seccion-body { display: none; padding: 0 20px 18px; font-size: 13px; line-height: 1.65; color: var(--text-mid); }
.imp-ayu-seccion.imp-ayu-abierta .imp-ayu-seccion-body { display: block; }
.imp-ayu-seccion-body p { margin: 0 0 10px; }
.imp-ayu-seccion-body ul, .imp-ayu-seccion-body ol { margin: 0 0 10px; padding-left: 20px; }
.imp-ayu-seccion-body li { margin-bottom: 6px; }
.imp-ayu-aviso { background: #fef3c7; border: 1px solid #fbbf24; border-radius: 8px; padding: 14px; font-size: 12px; color: #92400e; margin-top: 6px; }
.imp-ayu-tabla { width: 100%; font-size: 12px; }
.imp-ayu-tabla th { text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 700; color: #fff; background: var(--odoo-header-bg); white-space: nowrap; }
.imp-ayu-tabla td { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid #f1f5f9; }
.imp-ayu-nota { font-size: 11px; color: var(--text-muted); margin-top: 10px; }

/* ── Utilidades — van últimas para ganar por orden de cascada ── */
.imp-hidden { display: none; }
