/* Planificador de carga 3D: vale dentro del ERP y en /loader sin el resto de estilos. */
.lp { --lp-ink: var(--ink, #1d2626); --lp-muted: var(--muted, #5c6766); --lp-line: var(--line, #dfe5e3); --lp-card: var(--card, #fff); --lp-teal: var(--teal, #146167); --lp-zebra: var(--zebra, #edf3f2); --lp-mono: var(--f-mono, "IBM Plex Mono", ui-monospace, monospace);
  color: var(--lp-ink); display: grid; gap: 16px; min-width: 0; }
.lp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 14px; padding: 12px 14px; }
.lp-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--lp-muted); font-weight: 600; min-width: 0; }
.lp-f select, .lp-f input, .lp-tbl input { font: 500 14px/1.2 inherit; font-family: inherit; color: var(--lp-ink); border: 1px solid var(--lp-line); border-radius: 8px; padding: 8px 10px; background: #fff; min-height: 38px; }
.lp-f.sm input { width: 92px; font-family: var(--lp-mono); }
.lp-f select { min-width: 200px; }
.lp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.lp-btn { font: 600 14px/1 inherit; font-family: inherit; border: 1px solid var(--lp-line); background: #fff; color: var(--lp-ink); border-radius: 9px; padding: 10px 14px; cursor: pointer; min-height: 38px; }
.lp-btn:hover { border-color: var(--lp-teal); }
.lp-btn.pri { background: var(--lp-teal); border-color: var(--lp-teal); color: #fff; }
.lp-btn.x { padding: 6px 9px; min-height: 0; }
.lp-btn:focus-visible, .lp-views button:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.lp-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.lp-stage { position: relative; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 14px; overflow: hidden; }
.lp-3d { min-height: 320px; position: relative; }
.lp-3d canvas { display: block; width: 100%; touch-action: none; }
.lp-wait { padding: 40px; color: var(--lp-muted); text-align: center; }
.lp-2d { padding: 16px; }
.lp-svg { display: block; max-width: 100%; height: auto; }
.lp-views { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; background: rgba(255,255,255,.92); border: 1px solid var(--lp-line); border-radius: 9px; overflow: hidden; }
.lp-views button { border: 0; background: none; padding: 7px 11px; font: 600 12.5px inherit; font-family: inherit; cursor: pointer; color: var(--lp-muted); }
.lp-views button.on { background: var(--lp-teal); color: #fff; }
.lp-tip { position: absolute; z-index: 3; pointer-events: none; background: #0d2b2e; color: #fff; font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; max-width: 260px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.lp-slider { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--lp-line); font-size: 13px; color: var(--lp-muted); font-weight: 600; }
.lp-slider input { flex: 1; accent-color: var(--lp-teal); min-height: 28px; }
.lp-slider b { font-family: var(--lp-mono); color: var(--lp-ink); min-width: 72px; text-align: right; }
.lp-side { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 14px; padding: 14px; display: grid; gap: 12px; }
.lp-stat { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; }
.lp-stat > span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--lp-muted); }
.lp-stat > b { font: 600 20px var(--lp-mono); }
.lp-stat > small, .lp-stat > .lp-bar-h, .lp-stat > svg { grid-column: 1 / -1; }
.lp-stat > small { color: var(--lp-muted); font-size: 12px; }
.lp-bar-h { display: block; height: 8px; background: var(--lp-zebra); border-radius: 99px; overflow: hidden; }
.lp-bar-h > span { display: block; height: 100%; background: #009688; border-radius: 99px; }
.lp-bar-h.hot > span { background: #e34948; }
.lp-cg { width: 100%; height: 44px; color: var(--lp-ink); }
.lp-warn { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.lp-warn li { padding: 8px 10px; border-radius: 8px; }
.lp-warn .bad { background: #fde8e8; color: #9b1c1c; font-weight: 600; }
.lp-warn .warn { background: #fff4d6; color: #7a5300; }
.lp-warn .ok { background: #e3f5ec; color: #11613f; }
.lp-side h4, .lp-card h4 { margin: 4px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--lp-muted); }
.lp-stops, .lp-un { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lp-stops li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 8px; }
.lp-stops li:nth-child(even) { background: var(--lp-zebra); }
.lp-stops b { font-size: 13.5px; }
.lp-stops small { display: block; color: var(--lp-muted); font-size: 12px; }
.lp-un li { font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.lp-sw { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 7px; color: #fff; font: 700 13px var(--lp-mono); flex: none; padding: 0 5px; }
.lp-sw.sm { min-width: 20px; height: 20px; font-size: 11px; border-radius: 5px; }
.lp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.lp-mono { font-family: var(--lp-mono); font-size: .92em; }
.lp-card { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 14px; padding: 14px; min-width: 0; }
.lp-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.lp-head h3 { margin: 0; font-size: 16px; }
.lp-sub { font-size: 12.5px; color: var(--lp-muted); }
.lp-scroll { overflow-x: auto; max-height: 460px; overflow-y: auto; }
.lp-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.lp-tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--lp-muted); padding: 7px 8px; border-bottom: 1px solid var(--lp-line); position: sticky; top: 0; background: var(--lp-card); }
.lp-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--lp-line); vertical-align: middle; }
.lp-tbl tbody tr:nth-child(even) td { background: var(--lp-zebra); }
.lp-tbl tr[data-k] { cursor: pointer; }
.lp-tbl tr.cur td { background: #fff4d6 !important; font-weight: 600; }
.lp-tbl .r { text-align: right; }
.lp-tbl input { min-height: 32px; padding: 5px 7px; width: 100%; min-width: 90px; }
.lp-tbl input.n { width: 74px; min-width: 0; font-family: var(--lp-mono); }
.lp-tbl input.n2 { width: 52px; min-width: 0; font-family: var(--lp-mono); }
.lp-flags { white-space: nowrap; font-size: 12px; }
.lp-flags label { display: inline-flex; gap: 4px; align-items: center; margin-right: 8px; }
.lp-tbl input[type=checkbox] { width: auto; min-width: 0; min-height: 0; }
.lp-cost { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.lp-cost-in { display: flex; flex-wrap: wrap; gap: 10px; align-content: start; }
.lp-total { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--lp-ink); padding-bottom: 6px; }
.lp-total b { font: 600 26px var(--lp-mono); }
.lp-ratios { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 500 13px var(--lp-mono); color: var(--lp-muted); margin: 8px 0 12px; }
@media (max-width: 1100px) { .lp-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .lp-cost { grid-template-columns: minmax(0, 1fr); }
  .lp-f select { min-width: 0; width: 100%; }
  .lp-bar > .lp-f:first-child { flex: 1 1 100%; }
  .lp-f.sm input { width: 76px; }
  .lp-actions { margin-left: 0; }
  .lp-3d { min-height: 260px; }
}
.lp-tbl select { font: 500 13.5px inherit; font-family: inherit; color: var(--lp-ink); border: 1px solid var(--lp-line); border-radius: 8px; padding: 5px 7px; background: #fff; min-height: 32px; width: 100%; min-width: 170px; max-width: 320px; }
.lp-tbl input[readonly] { background: var(--lp-zebra); color: var(--lp-muted); }
.lp-hint { display: block; color: var(--lp-muted); font-size: 11.5px; margin-top: 2px; white-space: nowrap; }
.lp-tbl tr.lp-sub-row td { border-top-color: transparent; }
.lp-tbl tr.lp-sub-row td:first-child { opacity: .5; }
.lp-tbl input[data-k="label"] { min-width: 170px; }
.lp-tbl select[data-k="customer_id"] { min-width: 210px; }
.lp-tbl select[data-k="product_id"] { min-width: 260px; }
