/* ============================================================
   PLANO UNIFICADO — 31,00 x 20,00 m (620 m²)
   Plano 1: 21 m · Plano 2: 10 m · Escala: 1 m = 40 px
   Máquinas dibujadas con sus medidas reales (proforma BRTW)
   ============================================================ */
:root{
  --papel:#F7F6F2; --ink:#23272C; --muro:#C43A2E; --linea:#B9B4A8;
  --z-trotadoras:#2C55C4;
  --z-poleas-f:#D9EAF6;  --z-poleas-b:#5B9BC9;
  --z-maquinas-f:#F5E8CF; --z-maquinas-b:#C9A96A;
  --z-pesos-f:#FCF4D3;   --z-pesos-b:#D9A400;
  --z-alfombra-f:#F8D6E3; --z-alfombra-b:#D4739F;
  --z-escalera-f:#E2F1E5; --z-escalera-b:#2E7D46;
  --z-pasillo-f:#FBDFC5; --z-pasillo-b:#DE7527;
  --z-oficina-f:#E7E7E5; --z-oficina-b:#8A8A8A;
  --z-futuro-f:#F0F0EE;  --z-futuro-b:#9A9A98;
}
*{ box-sizing:border-box; margin:0; padding:0; }
body{ background:var(--papel); color:var(--ink); font-family:'Barlow Condensed',Arial,sans-serif; padding:16px 6px 40px; }

.rotulo{ max-width:1240px; margin:0 auto 18px; display:flex; justify-content:space-between; align-items:flex-end; gap:16px; border-bottom:3px solid var(--ink); padding-bottom:12px; flex-wrap:wrap; }
.rotulo h1{ font-size:clamp(26px,4vw,40px); font-weight:700; letter-spacing:.5px; text-transform:uppercase; line-height:1; }
.rotulo h1 span{ color:var(--muro); }
.rotulo .datos{ font-family:'IBM Plex Mono',monospace; font-size:13px; text-align:right; line-height:1.7; color:#4A4E54; }

.editor-bar{ max-width:1240px; margin:0 auto 10px; background:#23272C; color:#EDEDEA; font-family:'IBM Plex Mono',monospace; font-size:12.5px; padding:10px 16px; border-radius:6px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.editor-bar button{ font-family:'Barlow Condensed',sans-serif; font-size:14px; font-weight:600; letter-spacing:.5px; text-transform:uppercase; background:#D9A400; color:#23272C; border:none; border-radius:4px; padding:6px 12px; cursor:pointer; }
.editor-bar button:hover{ filter:brightness(1.1); }
image.drag{ cursor:grab; }
image.drag.moviendo{ cursor:grabbing; }
.plano-wrap{ max-width:1240px; margin:0 auto; background:#FFF; border:1px solid var(--linea); box-shadow:0 2px 14px rgba(0,0,0,.07); padding:10px; position:relative; }
svg{ width:100%; height:auto; display:block; }

.lbl{ font-family:'Barlow Condensed',Arial,sans-serif; font-weight:600; text-transform:uppercase; letter-spacing:.6px; fill:var(--ink); }
.lbl-sub{ font-family:'IBM Plex Mono',monospace; font-weight:400; text-transform:none; letter-spacing:0; fill:#5A5E64; }
.cota{ font-family:'IBM Plex Mono',monospace; font-size:15px; fill:var(--ink); }
.maq{ font-family:'IBM Plex Mono',monospace; font-size:9px; fill:#FFFFFF; paint-order:stroke; stroke:#23272C; stroke-width:2.4px; stroke-linejoin:round; }

.zona{ cursor:pointer; transition:filter .15s ease; }
.zona:hover{ filter:brightness(.94) saturate(1.25); }

#tip{ position:fixed; pointer-events:none; background:var(--ink); color:#fff; font-family:'IBM Plex Mono',monospace; font-size:12.5px; padding:7px 11px; border-radius:4px; opacity:0; transform:translate(-50%,-130%); transition:opacity .12s ease; white-space:nowrap; z-index:50; }
#tip strong{ display:block; font-family:'Barlow Condensed',sans-serif; font-size:16px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; }
#tip.equipo{ white-space:normal; max-width:240px; text-align:center; line-height:1.45; }
#tip.equipo img{ width:150px; display:block; margin:0 auto 8px; background:#FFF; border-radius:6px; padding:6px; }
#tip.equipo .musculo{ display:block; margin-top:5px; color:#FFD98A; font-weight:500; }
#tip.equipo .cod{ color:#9AA0A8; font-size:11px; }
#aviso{ position:fixed; left:50%; bottom:28px; transform:translateX(-50%); background:#C43A2E; color:#fff;
  font-family:'IBM Plex Mono',monospace; font-size:13px; padding:10px 18px; border-radius:6px;
  opacity:0; transition:opacity .25s ease; z-index:60; pointer-events:none; max-width:640px; text-align:center; }
#ficha{ display:none; position:fixed; z-index:70; width:262px; background:#23272C; color:#EDEDEA;
  border-radius:10px; padding:14px 16px 12px; box-shadow:0 8px 30px rgba(0,0,0,.35);
  font-family:'IBM Plex Mono',monospace; font-size:12px; line-height:1.5; }
#ficha img{ width:100%; max-height:150px; object-fit:contain; background:#FFF; border-radius:6px; padding:6px; }
#ficha h3{ font-family:'Barlow Condensed',sans-serif; font-size:19px; text-transform:uppercase; letter-spacing:.5px; margin-top:8px; }
#ficha .cod{ color:#9AA0A8; font-size:11px; margin-bottom:6px; }
#ficha p{ margin:4px 0; }
#ficha .musculo{ color:#FFD98A; margin:6px 0 8px; }
#ficha .dato{ display:flex; justify-content:space-between; border-top:1px solid #3A3F46; padding:5px 0; }
#ficha .dato span{ color:#9AA0A8; }
#ficha .acciones{ display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
#ficha .acc{ flex:1; min-width:70px; background:#3A3F46; color:#EDEDEA; border:none; border-radius:5px;
  padding:7px 4px; cursor:pointer; font-family:'Barlow Condensed',sans-serif; font-size:13px; font-weight:600;
  text-transform:uppercase; letter-spacing:.4px; }
#ficha .acc:hover{ background:#D9A400; color:#23272C; }
#ficha .cerrar{ position:absolute; top:8px; right:10px; background:none; border:none; color:#9AA0A8;
  font-size:15px; cursor:pointer; }
#ficha .cerrar:hover{ color:#fff; }

.leyenda{ max-width:1240px; margin:22px auto 0; display:grid; grid-template-columns:repeat(auto-fit,minmax(215px,1fr)); gap:10px 26px; }
.leyenda .item{ display:flex; align-items:center; gap:10px; font-size:16px; font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.leyenda .item small{ display:block; font-family:'IBM Plex Mono',monospace; font-weight:400; font-size:11.5px; text-transform:none; letter-spacing:0; color:#6A6E74; }
.leyenda .sw{ width:30px; height:20px; border:2.5px solid; flex:none; }

.nota{ max-width:1240px; margin:24px auto 0; background:#FDF3E7; border:2px solid #DE7527; border-radius:6px; padding:14px 18px; font-family:'IBM Plex Mono',monospace; font-size:13px; line-height:1.7; }
.nota strong{ font-family:'Barlow Condensed',sans-serif; font-size:17px; text-transform:uppercase; letter-spacing:.5px; color:#B85A14; display:block; margin-bottom:4px; }

.resumen{ max-width:1240px; margin:26px auto 0; font-family:'IBM Plex Mono',monospace; font-size:13px; border-collapse:collapse; width:100%; }
.resumen caption{ font-family:'Barlow Condensed',sans-serif; font-size:20px; font-weight:700; text-transform:uppercase; text-align:left; padding-bottom:8px; letter-spacing:.5px; }
.resumen th,.resumen td{ border-bottom:1px solid var(--linea); padding:7px 10px; text-align:left; }
.resumen th{ background:var(--ink); color:#fff; font-weight:500; }
.resumen td:last-child,.resumen th:last-child{ text-align:right; }
.resumen tr.total td{ font-weight:700; border-top:2.5px solid var(--ink); }

@media (max-width:640px){ .rotulo{ flex-direction:column; align-items:flex-start; } .rotulo .datos{ text-align:left; } }
