  /* ── Selección múltiple de lotes (Ficha de Prefactibilidad / Norma) ── */
  /* #btn-multi-lotes — vive ahora como tool-item en el drawer.
     El estilo .is-active sobreescribe .tool-item con el azul de marca. */
  #btn-multi-lotes.is-active {
    background: var(--color-primary-900) !important;
    color: #fff !important;
    border-color: var(--color-primary-900) !important;
  }
  /* Panel de selección múltiple: aparece como overlay flotante cuando hay lotes */
  #multi-lotes-panel {
    position: fixed; left: 50%; transform: translateX(-50%);
    top: calc(var(--topbar-h) + var(--sa-top) + 8px);
    width: min(360px, calc(100vw - 16px));
    max-height: calc(100vh - var(--topbar-h) - var(--bottombar-h) - 48px);
    z-index: var(--z-bottombar);
    display: none;
    background: #fff;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    font-family: "Inter", system-ui, sans-serif;
    flex-direction: column;
  }
  @media (min-width: 1024px) {
    /* En desktop, el panel cabe junto al sidebar de capas */
    #multi-lotes-panel {
      top: 12px; left: calc(var(--layers-w-desktop) + 16px); transform: none;
    }
  }
  #multi-lotes-panel.visible { display: flex; }
  #multi-lotes-panel .ml-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-bottom: 1px solid #e5e7eb;
    background: #fafafa; font-size: 13px; font-weight: 600; color: #1f2937;
  }
  #multi-lotes-panel .ml-head .ml-help {
    font-size: 11px; font-weight: 400; color: #6b7280; margin-top: 2px;
  }
  #multi-lotes-panel .ml-list {
    flex: 1; overflow-y: auto; padding: 6px 0; margin: 0; list-style: none;
  }
  #multi-lotes-panel .ml-empty {
    padding: 18px 14px; font-size: 12px; color: #9ca3af; text-align: center; font-style: italic;
  }
  #multi-lotes-panel .ml-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 14px; border-bottom: 1px solid #f3f4f6; font-size: 12px;
  }
  #multi-lotes-panel .ml-item:hover { background: #fef9c3; }
  #multi-lotes-panel .ml-item .ml-cbml { font-family: "JetBrains Mono", monospace; color: #1f2937; }
  #multi-lotes-panel .ml-item .ml-area { color: #6b7280; font-variant-numeric: tabular-nums; }
  #multi-lotes-panel .ml-item .ml-rm {
    background: #fee2e2; color: #b91c1c; border: none; border-radius: 4px;
    width: 22px; height: 22px; cursor: pointer; font-size: 14px; line-height: 1;
    margin-left: 8px;
  }
  #multi-lotes-panel .ml-item .ml-rm:hover { background: #fecaca; }
  #multi-lotes-panel .ml-foot {
    padding: 10px 14px; border-top: 1px solid #e5e7eb; background: #fafafa;
  }
  #multi-lotes-panel .ml-area-total {
    display: flex; justify-content: space-between; font-size: 12px; color: #1f2937;
    margin-bottom: 8px;
  }
  #multi-lotes-panel .ml-area-total strong {
    font-family: "JetBrains Mono", monospace; font-size: 13px; color: #1f4e79;
  }
  #multi-lotes-panel .ml-actions { display: flex; gap: 6px; flex-wrap: wrap; }
  #multi-lotes-panel .ml-btn {
    flex: 1; padding: 7px 10px; border: none; border-radius: 6px; cursor: pointer;
    font-size: 12px; font-weight: 600;
  }
  #multi-lotes-panel .ml-btn:disabled { opacity: .55; cursor: not-allowed; }
  #multi-lotes-panel .ml-btn--prefact { background: #c0392b; color: #fff; }
  #multi-lotes-panel .ml-btn--prefact:hover:not(:disabled) { background: #a82d20; }
  #multi-lotes-panel .ml-btn--norma   { background: #1f4e79; color: #fff; }
  #multi-lotes-panel .ml-btn--norma:hover:not(:disabled) { background: #14385a; }
  #multi-lotes-panel .ml-btn--clear   { background: #e5e7eb; color: #1f2937; flex: 0 0 auto; padding: 7px 12px; }
  #multi-lotes-panel .ml-btn--clear:hover:not(:disabled) { background: #d1d5db; }
