:root {
  --bg: #e1e5e9; --panel: #ffffff; --panel2: #f4f6f8; --line: #d5dbe1; --line2: #e8ecf0;
  --ink: #18202a; --ink2: #4a5563; --ink3: #8592a0;
  --accent: #2563d9; --accent-soft: #e6eefc;
  --ok: #1f9d55; --warn: #e08a00; --fail: #d64545;
  --long: #b8452f; --tie: #2f6fd6; --cross: #0f9c90; --conc: #c9ced4;
  --r: 6px; --shadow: 0 1px 2px rgba(20,30,40,.06), 0 4px 16px rgba(20,30,40,.06);
  --glass: rgba(255,255,255,.92); --hl: #c9d9f7; --cube-hi: #d9e6fb; --head-a: #f4f6f8; --head-b: #eceff2; --rib-a: #fff; --rib-b: #fafbfc;
  --inv: #18202a; --inv-ink: #fff; --warnbg: #fff7e6; --warnline: #f3d9a4; --warnink: #7a5200; --canvas: #e1e5e9; --paper: #ffffff;
  --btn: #2563d9; --cube-f: rgba(240,243,246,.97); --cube-ink: #4a5563; --cube-line: #9aa6b3;
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-variant-numeric: tabular-nums; color: var(--ink); font-size: 13px;
}
/* tema oscuro (como el de Revit 2024+): la interfaz en carbón; los dibujos 2D siguen en papel blanco, como las hojas */
:root[data-theme="dark"] {
  --bg: #1b2027; --panel: #232a33; --panel2: #2b333d; --line: #3a4450; --line2: #313a45;
  --ink: #e6ebf0; --ink2: #b4bec9; --ink3: #8794a3;
  --accent: #6ea0ff; --accent-soft: #24365a; --hl: #3a5486; --cube-hi: #2c4170;
  --ok: #3fbf74; --warn: #f0a32e; --fail: #ef6464;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --glass: rgba(35,42,51,.92); --head-a: #2a313b; --head-b: #252c35; --rib-a: #232a33; --rib-b: #20262e;
  --inv: #e6ebf0; --inv-ink: #18202a; --warnbg: #3a2f17; --warnline: #6b5323; --warnink: #f3cf85; --canvas: #2a3038;
  --btn: #3b74e6; --cube-f: rgba(52,61,72,.97); --cube-ink: #c9d2dc; --cube-line: #5a6573;
  color-scheme: dark;
}
/* los dibujos 2D (alzados, cortes, plantas, croquis de la cédula) van en papel claro en los dos temas */
.wbody.pv { --ink: #18202a; --ink2: #4a5563; --ink3: #8592a0; --line: #d5dbe1; --line2: #e8ecf0; --panel: #ffffff; --panel2: #f4f6f8; color: #18202a; }
.wbody.pv { background: var(--paper); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }

.app { display: grid; grid-template-rows: 40px auto 1fr 24px; height: 100vh; position: relative; }
.top { display: flex; align-items: center; gap: 10px; padding: 0 10px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .2px; }
.brand small { font-weight: 500; color: var(--ink3); }
.brand svg { display: block; flex: none; }
.brand .bw { font-weight: 800; letter-spacing: .24em; color: var(--ink); font-size: 14.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line2); color: var(--ink2); font-size: 12px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.fail { background: var(--fail); } .dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(31,157,85,.18); }
.dot.steel { background: #6f8fb3; border-radius: 2px; }
.dot.conf { background: #aebd96; border-radius: 2px; } .dot.conf.d { background: #8fa173; height: 5px; }
.cfrow.on { background: var(--accent-soft); color: var(--accent); }
.cfrow i.bad { font-style: normal; color: #fff; background: #c2410c; border-radius: 8px; padding: 0 5px; font-size: 10px; }
.cfarm { font-size: 11px; color: var(--ink3, #6b7785); padding: 0 6px 4px 22px; }
.cfedit { display: flex; gap: 10px; padding: 6px 6px 8px 22px; align-items: flex-start; }
.cff { display: flex; flex-direction: column; gap: 5px; font-size: 12px; flex: 1; min-width: 0; }
.cff select { font: inherit; padding: 1px 2px; }
.cff small.ok { color: #2e7d32; }
.cfopts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink2); padding: 4px 0; }
.cfopts label { display: inline-flex; align-items: center; gap: 4px; }
.cfopts select { font: inherit; }
.cfbtns { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 0 2px; }
.cfprop { font-size: 11.5px; color: var(--ink2); background: #effaf3; border: 1px solid #c6ead3; border-radius: 4px; padding: 6px 8px; margin-top: 6px; }
.sp { flex: 1; }
.btn { height: 30px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--ink3); }
.btn.primary { background: var(--btn); border-color: var(--btn); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg, .ico svg { width: 16px; height: 16px; }
.ico { width: 28px; height: 28px; border-radius: var(--r); border: 1px solid transparent; background: none; display: inline-grid; place-items: center; color: var(--ink2); }
.ico:hover { background: var(--panel2); border-color: var(--line2); }
.ico.on { background: var(--accent-soft); color: var(--accent); border-color: var(--hl); }

/* panel izquierdo */
.left { overflow: auto; padding: 8px 10px 10px; }
.h { font-size: 11px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .6px; margin: 4px 2px 8px; display: flex; align-items: center; gap: 6px; }
.grp { border: 1px solid var(--line2); border-radius: var(--r); margin-bottom: 8px; background: var(--panel); }
.grp.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.grp-h { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; cursor: pointer; }
.grp-sec { width: 38px; height: 38px; }
.grp-tag { font-size: 15px; font-weight: 700; }
.grp-sub { color: var(--ink3); font-size: 12px; }
.pct { font-weight: 700; font-size: 13px; }
.pct.ok { color: var(--ok); } .pct.warn { color: var(--warn); } .pct.fail { color: var(--fail); }
.cols { border-top: 1px solid var(--line2); padding: 4px; }
.colrow { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; cursor: pointer; color: var(--ink2); }
.colrow:hover { background: var(--panel2); }
.colrow.sel { background: var(--accent-soft); color: var(--accent); }
.colrow .lv { color: var(--ink3); font-size: 11px; margin-left: auto; }
.colrow .x { opacity: 0; } .colrow:hover .x { opacity: 1; }
.empty { color: var(--ink3); padding: 20px 8px; text-align: center; line-height: 1.6; }
.empty b { color: var(--ink2); }

/* centro */
.mid canvas { display: block; width: 100%; height: 100%; }
.toast { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: var(--inv); color: var(--inv-ink); padding: 8px 14px; border-radius: 6px; box-shadow: var(--shadow); font-size: 12.5px; max-width: 70%; z-index: 5; }
.toast.err { background: var(--fail); }
.toast:not([hidden]) { animation: tin .18s cubic-bezier(.2,.8,.3,1); }
@keyframes tin { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translateX(-50%); } }
.hover { position: absolute; pointer-events: none; background: rgba(24,32,42,.88); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 12px; white-space: nowrap; transform: translate(12px, -50%); }

/* panel derecho */
.right { overflow: auto; display: flex; flex-direction: column; }
.tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.tabs button { flex: 1; height: 38px; border: 0; background: none; border-bottom: 2px solid transparent; color: var(--ink2); font-weight: 600; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.sec { padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.ehead { display: flex; align-items: baseline; gap: 10px; }
.ehead .tag { font-size: 22px; font-weight: 800; white-space: nowrap; }
.ehead .sub { color: var(--ink3); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.kpi { background: var(--panel2); border-radius: var(--r); padding: 6px 8px; }
.kpi b { display: block; font-size: 15px; }
.kpi span { color: var(--ink3); font-size: 11px; }
.draw { display: grid; grid-template-columns: 1fr 118px; gap: 8px; align-items: start; }
.draw svg { width: 100%; height: auto; display: block; user-select: none; }
.svgbtn { cursor: pointer; }
.svgbtn rect { fill: #fff; stroke: var(--line); }
.svgbtn:hover rect { stroke: var(--accent); fill: var(--accent-soft); }
.svgbtn text { fill: var(--ink2); font-weight: 700; }
.svgedit { cursor: pointer; }
.svgedit:hover rect { stroke: var(--accent); }
.cap { font-size: 11px; color: var(--ink3); text-align: center; margin-top: 2px; }

.pf { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; min-height: 32px; }
.pf + .pf { border-top: 1px solid var(--line2); }
.pf .g { color: var(--ink3); display: grid; place-items: center; }
.pf .g svg { width: 18px; height: 18px; }
.pf label { color: var(--ink2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: 0 8px; height: 26px; min-width: 32px; color: var(--ink2); font-size: 12px; }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button.on { background: var(--btn); color: #fff; font-weight: 600; }
.num { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); height: 26px; overflow: hidden; }
.num input { width: 56px; border: 0; text-align: right; padding: 0 4px; height: 100%; background: transparent; outline: none; }
.num input::placeholder { color: var(--accent); opacity: .8; }
.num .u { color: var(--ink3); font-size: 11px; padding: 0 6px 0 2px; }
.num .auto { border: 0; border-left: 1px solid var(--line2); height: 100%; background: var(--panel2); font-size: 11px; color: var(--ink3); padding: 0 6px; }
.num .auto.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tog { width: 34px; height: 20px; border-radius: 10px; background: var(--line); border: 0; position: relative; }
.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tog.on { background: var(--accent); } .tog.on::after { left: 16px; }
.ro { color: var(--ink2); font-weight: 600; }

.chk { display: grid; grid-template-columns: 10px 1fr 64px 44px; gap: 8px; align-items: center; padding: 6px 2px; cursor: pointer; border-top: 1px solid var(--line2); }
.chk:first-child { border-top: 0; }
.bar { height: 6px; border-radius: 3px; background: var(--line2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); }
.bar i.warn { background: var(--warn); } .bar i.fail { background: var(--fail); }
.chk .p { text-align: right; font-weight: 700; font-size: 12px; }
.chk-d { grid-column: 2 / -1; color: var(--ink2); font-size: 12px; line-height: 1.5; padding: 2px 0 4px; }
.chk-d .ref { color: var(--ink3); }
.rige { font-size: 12px; color: var(--ink3); margin-bottom: 6px; }

table.ced { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ced th { text-align: right; color: var(--ink3); font-weight: 600; font-size: 11px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.ced td { text-align: right; padding: 5px 4px; border-bottom: 1px solid var(--line2); }
.ced th:first-child, .ced td:first-child { text-align: left; }
.ced tr.tot td { font-weight: 700; border-bottom: 0; border-top: 1px solid var(--line); }
.ced .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.warnbox { background: var(--warnbg); border: 1px solid var(--warnline); color: var(--warnink); border-radius: var(--r); padding: 8px 10px; font-size: 12px; line-height: 1.5; }

.modal { position: fixed; inset: 0; background: rgba(20,28,36,.35); display: grid; place-items: center; z-index: 1000; }
.modal .box { background: var(--panel); border-radius: 10px; width: min(520px, 92vw); max-height: 80vh; overflow: auto; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.modal h3 { margin: 0 0 10px; }
.modal { animation: mfade .16s ease-out; }
.modal .box { animation: mpop .18s cubic-bezier(.2,.8,.3,1); }
.modal.out { animation: mfade .14s ease-in reverse forwards; pointer-events: none; }
.modal.out .box { animation: mpop .14s ease-in reverse forwards; }
@keyframes mfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mpop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.mbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.mtext { margin: 0; font-size: 13px; color: var(--ink2); line-height: 1.5; }
.mlist { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--ink2); }
.mlist li::marker { color: var(--accent, #2563d9); }
.res-row { display: flex; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line2); font-size: 12.5px; }


.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 10px; background: var(--panel2); padding: 3px; border-radius: 8px; }
.kinds button { flex: 1; border: 0; background: none; height: 30px; border-radius: 6px; color: var(--ink2); font-weight: 600; font-size: 12.5px; white-space: nowrap; padding: 0 4px; }
.kinds button b { font-weight: 700; color: var(--ink3); margin-left: 4px; }
.kinds button.on { background: var(--panel); color: var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.v3d { position: absolute; inset: 0; }

.dock { position: absolute; left: 0; right: 0; bottom: 0; height: 340px; background: var(--panel); border-top: 1px solid var(--line); overflow: auto; }

.dock-h { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px 0; font-size: 12px; color: var(--ink3); }
.dock-h b { font-size: 14px; color: var(--ink); }
.dock-svg { padding: 4px 12px 8px; }
.elev .bar { cursor: default; }
.elev .grip { cursor: ew-resize; }
body.bdraw svg.elev { cursor: crosshair; }
body.bdraw svg.elev .bar { pointer-events: none; }
.elev .grip:hover { r: 7; }
.etag { cursor: pointer; }
.etag:hover rect { fill: var(--accent-soft); }
select { border: 1px solid var(--line); border-radius: var(--r); height: 26px; background: var(--panel); padding: 0 6px; }

/* etiquetas de varillas en el 3D */
.tags3 { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tag3 { position: absolute; font: 600 10.5px/15px var(--font, system-ui); font-variant-numeric: tabular-nums; padding: 1px 4px; border-radius: 3px; white-space: nowrap;
  background: color-mix(in srgb, var(--panel, #fff) 82%, transparent); border: 1px solid currentColor; }
.tag3.long { color: #b8452f; } .tag3.tie { color: #2f6fd6; } .tag3.cross { color: #0f9c90; }
.tdot { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tdot.long { color: #b8452f; } .tdot.tie { color: #2f6fd6; } .tdot.cross { color: #0f9c90; }
.shapes { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: var(--ink3, #667); }
.shapes b { color: var(--ink, #222); font-weight: 600; margin-right: 3px; }
.rot { display: inline-flex; align-items: center; gap: 4px; color: var(--ink3, #667); margin-right: 4px; }
.rot svg { width: 15px; height: 15px; }
.rot select { border: 1px solid var(--line, #d6dbe1); border-radius: 6px; padding: 4px 6px; background: var(--panel, #fff); font: inherit; font-size: 12.5px; }
.rotulo { margin: 0 16px 6px; padding: 8px 10px; border: 1px dashed var(--line, #d6dbe1); border-radius: 6px; font-variant-numeric: tabular-nums; }
.rotulo .rl { font-size: 12.5px; color: var(--ink, #222); line-height: 1.5; }
.rotulo .rl.t { font-weight: 700; font-size: 13.5px; }
.rotulo .rl.e { color: #2f6fd6; }
.grp-tag .cnt { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 0 5px; margin-left: 4px; }
.grp-ax { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px 8px 54px; }
.grp-ax .ax { font: inherit; font-size: 11px; border: 1px solid var(--line, #d6dbe1); background: var(--panel, #fff); border-radius: 10px; padding: 1px 7px; cursor: pointer; color: var(--ink3, #667); }
.grp-ax .ax.on { border-color: var(--accent); color: var(--accent); }
.grp-ax .ax.split { border-style: dashed; }
/* grupos libres de varillas */
.groups .h { display: flex; align-items: center; gap: 6px; }
.gadd { margin-left: auto; display: inline-flex; gap: 4px; }
.gadd button { font: inherit; font-size: 11.5px; border: 1px dashed var(--line, #c9d0d8); background: none; border-radius: 6px; padding: 2px 7px; cursor: pointer; color: var(--accent); }
.groups .hint { font-size: 11.5px; color: var(--ink3, #778); line-height: 1.4; }
.gcard { border: 1px solid var(--line, #d6dbe1); border-left: 3px solid #b8452f; border-radius: 6px; padding: 6px 8px; margin-top: 6px; display: grid; gap: 5px; background: var(--panel, #fff); }
.gcard.bot { border-left-color: #2f6fd6; }
.gcard.open { box-shadow: 0 0 0 2px var(--accent-soft); }
.gcard .gr1, .gcard .gr3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gcard .sp { flex: 1; }
.gcard .gface { font: inherit; font-size: 11.5px; font-weight: 600; border: none; background: none; cursor: pointer; color: inherit; padding: 0; min-width: 40px; text-align: left; }
.gcard .stp { display: inline-flex; align-items: center; border: 1px solid var(--line, #d6dbe1); border-radius: 6px; }
.gcard .stp button { border: none; background: none; cursor: pointer; width: 20px; font-size: 13px; color: var(--ink3, #667); }
.gcard .stp b { min-width: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.gcard select { font: inherit; font-size: 12px; border: 1px solid var(--line, #d6dbe1); border-radius: 6px; padding: 2px 4px; background: var(--panel, #fff); }
.gcard .ic { border: none; background: none; cursor: pointer; color: var(--ink3, #778); font-size: 13px; }
.gcard .seg.pos button { padding: 1px 4px; line-height: 0; }
.gcard .num input { width: 46px; }
.gcard .ends { display: inline-flex; gap: 4px; margin-left: auto; }

.ctx { position: fixed; z-index: 950; min-width: 200px; background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; display: flex; flex-direction: column; }
.ctx button { text-align: left; border: none; background: none; padding: 6px 10px; border-radius: 5px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.ctx button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.ctx button:disabled { color: var(--ink3, #9aa); cursor: default; }
.ctx hr { border: none; border-top: 1px solid var(--line); margin: 3px 0; }

.dimcap { cursor: pointer; } .dimcap:hover rect { fill: var(--accent-soft); }
.dimin { font: inherit; font-size: 12px; text-align: center; border: 1.5px solid var(--accent); border-radius: 10px; outline: none; background: var(--panel); }
.btn.sm { padding: 2px 8px; font-size: 12px; }

/* espacio de trabajo: vistas 2D dentro de su ventana */
.pv .pb { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: 4px; overflow: hidden; height: 100%; }
.pv .pb > .sectools { flex: none; align-self: stretch; }
.pv .pb > svg { flex: 1; min-height: 0; width: 100%; height: 100%; max-height: 100%; }
.ico.sm { width: 24px; height: 24px; font-size: 13px; }
/* herramientas del corte */
.sectools { position: sticky; top: 0; z-index: 2; background: var(--panel); border-bottom: 1px solid var(--line2); padding: 4px 6px; margin-bottom: 4px; }
.sectools .row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sectools .ico { width: auto; padding: 0 7px; gap: 4px; display: inline-flex; align-items: center; height: 26px; font-size: 11.5px; }
.sectools .ico.on { background: var(--btn); color: #fff; border-color: var(--btn); }
.sectools .hint { color: var(--ink2); font-size: 11px; line-height: 1.35; margin-top: 3px; }
.sectools .picks { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; margin-left: 6px; flex-wrap: wrap; }
.btn.sm { height: 24px; padding: 0 8px; font-size: 11.5px; }
.seg.sm button { height: 22px; padding: 0 6px; font-size: 11px; }
.tchk { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; margin-left: 6px; cursor: pointer; }
.pickhit { cursor: pointer; }
.pickhit:hover { fill: rgba(37, 99, 217, .18); }
.note { color: var(--ink3); font-size: 11px; margin: 2px 0 6px 26px; }
.pickline { cursor: pointer; }
.pickline:hover { stroke: rgba(37, 99, 217, .3); }

/* cimentación: lista y panel con jerarquía */
.fitem { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; cursor: pointer; }
.fico svg { width: 34px; height: 34px; display: block; }
.fico.lg svg { width: 44px; height: 44px; }
.fmain { min-width: 0; }
.fl1 { display: flex; align-items: center; gap: 6px; }
.fl1 b { font-size: 15px; }
.kchip { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--ink2); background: var(--panel2); border: 1px solid var(--line2); border-radius: 9px; padding: 1px 7px; white-space: nowrap; }
.fl2 { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 1px; }
.fl2 span { color: var(--ink3); font-weight: 500; margin-left: 4px; }
.fl3 { font-size: 11px; color: var(--ink2); margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sw { width: 10px; height: 3px; border-radius: 2px; display: inline-block; flex: none; }
.fhead .fh1 { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.fh-tag { font-size: 22px; font-weight: 800; white-space: nowrap; }
.fh-sub { color: var(--ink2); font-size: 12.5px; }
.fh-sub b { color: var(--ink); }
.pct.big { font-size: 18px; }
.ftype { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; }
.ftype button { border: 1px solid var(--line2); background: var(--panel); border-radius: 8px; padding: 4px 2px 3px; display: grid; justify-items: center; gap: 1px; color: var(--ink2); font-size: 10.5px; cursor: pointer; }
.ftype button svg { width: 30px; height: 30px; }
.ftype button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.fcards { display: grid; gap: 6px; }
.fcard { border: 1px solid var(--line2); border-left: 3px solid var(--c); border-radius: 8px; background: var(--panel); }
.fcard.open { box-shadow: 0 1px 6px rgba(0,0,0,.07); border-color: var(--line); border-left-color: var(--c); }
.fcard-h { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 6px; cursor: pointer; }
.fcard-h b { font-size: 13px; white-space: nowrap; }
.fcard-h .sum { margin-left: auto; color: var(--ink2); font-size: 12px; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fcard-h .chev svg { width: 14px; height: 14px; color: var(--ink3); transition: transform .15s; display: block; }
.fcard.open .chev svg { transform: rotate(90deg); }
.fcard-h .ico.sm { width: 24px; height: 24px; flex: none; }
.fcard-h .ico.sm svg { width: 16px; height: 16px; }
.fcard-b { padding: 2px 10px 8px 12px; border-top: 1px solid var(--line2); }
.frow { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; min-height: 32px; }
.frow + .frow { border-top: 1px dashed var(--line2); }
.frow .g { color: var(--ink3); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.frow .g svg { width: 18px; height: 18px; }
.frow label { color: var(--ink2); font-size: 12.5px; }
.frow .seg button svg { width: 16px; height: 16px; vertical-align: middle; }
.bsep { display: inline-flex; align-items: center; gap: 4px; }
.bsep select { height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 0 4px; font-weight: 600; }
.bsep .at { color: var(--ink3); font-weight: 700; }
.bsep .num input { width: 46px; }
.fnote { color: var(--ink3); font-size: 11px; line-height: 1.4; margin-top: 4px; }
.pm { display: inline-flex; align-items: center; gap: 6px; }
/* inspector común */
.ihead .ih1 { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.iico svg, .iico .iico-svg { width: 40px; height: 40px; display: block; }
.ih-tag { font-size: 22px; font-weight: 800; white-space: nowrap; line-height: 1.1; }
.ih-sub { color: var(--ink2); font-size: 12.5px; margin-top: 2px; }
.ih-sub b { color: var(--ink); }
.ih-sub .kgs { color: var(--ink3); white-space: nowrap; }
.irot { margin-top: 8px; font-size: 11.5px; color: var(--ink2); background: var(--panel2); border-radius: 6px; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ckbadge { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px 0 4px; border-radius: 15px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; font-size: 13px; position: relative; }
.ckbadge .ci { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ckbadge .ci svg { width: 14px; height: 14px; }
.ckbadge.ok .ci { background: var(--ok); } .ckbadge.warn .ci { background: var(--warn); } .ckbadge.fail .ci { background: var(--fail); }
.ckbadge.ok b { color: var(--ok); } .ckbadge.warn b { color: var(--warn); } .ckbadge.fail b { color: var(--fail); }
.ckbadge .cn { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--inv); color: var(--inv-ink); font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 3px; }
.ckbadge:hover { border-color: var(--ink3); }
.ckpop { position: fixed; z-index: 950; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.ckpop-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line2); }
.ckpop-h span { color: var(--ink3); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ckpop-b { overflow: auto; padding: 4px 8px 8px; }
.ckpop .warnbox { margin: 8px 10px 0; }
.ckpop-n { color: var(--ink3); font-size: 11px; padding: 6px 10px 8px; border-top: 1px solid var(--line2); }
.ck summary { display: grid; grid-template-columns: 10px 1fr 64px 40px; gap: 8px; align-items: center; padding: 6px 2px; cursor: pointer; list-style: none; }
.ck summary::-webkit-details-marker { display: none; }
.ck + .ck { border-top: 1px solid var(--line2); }
.ck .t { font-size: 12.5px; }
.ck .p { text-align: right; font-weight: 700; font-size: 12px; }
.ck .bar { height: 5px; background: var(--panel2); border-radius: 3px; overflow: hidden; }
.ck .bar i { display: block; height: 100%; }
.ck .bar i.ok { background: var(--ok); } .ck .bar i.warn { background: var(--warn); } .ck .bar i.fail { background: var(--fail); }
.ckd { color: var(--ink2); font-size: 12px; line-height: 1.5; padding: 0 2px 6px 18px; }
.itools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0; font-size: 12px; }
.ibtn { height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 600; color: var(--ink2); cursor: pointer; }
.ibtn.on { background: var(--btn); border-color: var(--btn); color: #fff; }
.btn.sm.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.isub { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink3); margin: 8px 0 2px; }
.blist { display: grid; gap: 3px; margin: 4px 0 6px; }
.bitem { display: grid; grid-template-columns: 12px 1fr auto 48px 22px; gap: 6px; align-items: center; text-align: left; border: 1px solid var(--line2); background: var(--panel); border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; color: var(--ink2); }
.bitem b { color: var(--ink); } .bitem span { color: var(--ink3); text-align: right; }
.bitem:hover { border-color: var(--accent); }
.fcard-b .groups .h { margin-top: 6px; }
.secchip { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; font-size: 11.5px; border-radius: 14px; padding: 3px 4px 3px 12px; box-shadow: var(--shadow); white-space: nowrap; }
.secchip button { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; }
.pv .pb { position: relative; }
/* alzado y planta de trabe a escala de trabajo: no se encogen, la ventana se recorre (rueda, Mayús+rueda, arrastre con
   el botón central); Ctrl+rueda acerca o aleja */
.pv .pb.scroll { overflow: auto; justify-content: flex-start; align-items: flex-start; display: block; }
.pv .pb.scroll > svg { flex: none; width: auto; height: auto; max-height: none; display: block; }
.pv .pb.scroll > .sectools { position: sticky; left: 0; z-index: 2; }
.pv .pb.scroll.panning { cursor: grabbing; }
.pv:has(> .zbar) { position: relative; }
.zbar { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--panel) 92%, transparent); box-shadow: 0 1px 4px rgb(0 0 0 / 0.12); font-size: 11px; }
.zbar button { min-width: 24px; height: 22px; padding: 0 6px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.zbar button:hover { background: var(--hover, rgb(0 0 0 / 0.06)); }
.zbar span { min-width: 38px; text-align: right; padding-right: 4px; color: var(--ink3); font-variant-numeric: tabular-nums; }

/* barra superior compacta */
.btn .bi { display: none; }
@media (max-width: 1440px) { #doc { max-width: 150px; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 1250px) { #doc { display: none; } .top .btn.primary .bt { display: none; } }
.tag3.bx { color: #2f6fd6; } .tag3.by { color: #0f9c90; } .tag3.tx { color: #b8452f; } .tag3.ty { color: #e07b2e; } .tag3.hole { color: #8a4fd0; }

/* ================================================================ cinta tipo Revit */
.rtabs { display: flex; align-items: stretch; height: 40px; margin-left: 6px; }
.rtab { border: 0; background: none; padding: 0 12px; font-weight: 600; font-size: 13px; color: var(--ink2); border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
.rtab i { font-style: normal; width: 17px; height: 17px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; background: var(--panel2); color: var(--ink3); border: 1px solid var(--line); }
.rtab:hover { color: var(--ink); }
.rtab.on { color: var(--accent); border-bottom-color: var(--accent); }
.rtab.on i { background: var(--btn); color: #fff; border-color: var(--btn); }
.rtab.rmin { color: var(--ink3); padding: 0 8px; font-size: 11px; }
.ribbon { display: flex; align-items: stretch; height: 70px; background: linear-gradient(var(--rib-a), var(--rib-b)); border-bottom: 1px solid var(--line); padding: 0 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.ribbon.min { height: 0; border: 0; padding: 0; }
.ribbon.peek { position: absolute; left: 0; right: 0; top: 40px; z-index: 120; box-shadow: 0 8px 24px rgba(20,30,40,.18); }
.rpanel { display: flex; flex-direction: column; border-right: 1px solid var(--line2); padding: 3px 4px 0; flex: none; }
.rbtns { flex: 1; display: flex; align-items: center; gap: 1px; }
.rlab { font-size: 10px; color: var(--ink3); text-align: center; padding: 1px 0 3px; white-space: nowrap; letter-spacing: .2px; }
.rb { position: relative; border: 1px solid transparent; background: none; border-radius: 5px; min-width: 50px; height: 48px; padding: 3px 4px 2px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink2); }
.rb svg { width: 22px; height: 22px; }
.rb span { font-size: 10.5px; line-height: 1.1; white-space: nowrap; }
.rb:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--hl); color: var(--ink); }
.rb.on { background: var(--accent-soft); color: var(--accent); border-color: var(--hl); }
.rb.go { color: var(--accent); }
.rb:disabled { opacity: .4; cursor: default; }
.rbadge { position: absolute; top: 1px; right: 3px; font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--ink3); background: var(--panel2); border-radius: 7px; padding: 0 4px; line-height: 14px; }
.rb.on .rbadge { color: var(--accent); background: var(--panel); }
.rcol { display: flex; flex-direction: column; gap: 4px; justify-content: center; padding: 0 4px; }
.rcol .rot select { max-width: 150px; height: 22px; font-size: 12px; padding: 0 4px; }
.rcol .rot { margin: 0; }
.rnote { font-size: 11.5px; color: var(--ink2); line-height: 1.4; }
.rnote b { font-size: 15px; color: var(--ink); } .rnote span { color: var(--ink3); font-size: 10.5px; }
.rgrid { display: flex; gap: 6px; align-items: center; padding: 0 2px; }
.rg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.rs { border: 0; background: none; width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink2); }
.rs + .rs { border-left: 1px solid var(--line2); }
.rs svg { width: 18px; height: 18px; }
.rs.on { background: var(--accent-soft); color: var(--accent); }

/* ================================================================ escenario, ventanas y área del 3D */
.stage { position: relative; overflow: hidden; background: var(--bg); min-height: 0; }
.mid { position: absolute; overflow: hidden; background: var(--canvas); }
.p3d { position: absolute; inset: 0; }
.win { position: absolute; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); overflow: hidden; min-width: 0; }
.win.side-F { border-radius: 7px; box-shadow: 0 6px 24px rgba(20,30,40,.16), 0 1px 3px rgba(20,30,40,.08); background: var(--glass); backdrop-filter: blur(12px); }
.win.side-L { border-width: 0 1px 1px 0; } .win.side-R { border-width: 0 0 1px 1px; } .win.side-B { border-width: 1px 1px 0 0; }
.win.max { border-radius: 6px; box-shadow: 0 10px 40px rgba(20,30,40,.25); }
/* animaciones: solo al plegar, maximizar, abrir, cerrar o cambiar de distribución (clase .wanim un momento) */
.stage.wanim .win, .stage.wanim .mid, .stage.wanim .wsplit { transition: left .18s cubic-bezier(.2,.8,.3,1), top .18s cubic-bezier(.2,.8,.3,1), width .18s cubic-bezier(.2,.8,.3,1), height .18s cubic-bezier(.2,.8,.3,1), border-radius .18s; }
.win.opening { animation: wopen .18s cubic-bezier(.2,.8,.3,1); }
.win.closing { animation: wclose .13s ease-in forwards; pointer-events: none; }
@keyframes wopen { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes wclose { to { opacity: 0; transform: scale(.96); } }
.ribbon { transition: height .16s ease; }
@media (prefers-reduced-motion: reduce) {
  .stage.wanim .win, .stage.wanim .mid, .stage.wanim .wsplit, .ribbon { transition: none !important; }
  .win.opening, .win.closing, .modal, .modal .box, .modal.out, .modal.out .box { animation-duration: 1ms !important; }
}
.wh { flex: none; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 6px; background: linear-gradient(var(--head-a), var(--head-b)); border-bottom: 1px solid var(--line); cursor: grab; user-select: none; min-width: 0; }
.wsdragging .wh, .wsdragging { cursor: grabbing !important; }
.wgrip { color: var(--ink3); font-size: 11px; letter-spacing: -2px; flex: none; }
.wico { display: grid; place-items: center; color: var(--ink2); flex: none; }
.wico svg { width: 15px; height: 15px; }
.wt { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; flex: none; }
.wx { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.wx select { height: 22px; font-size: 12px; font-weight: 600; padding: 0 4px; }
.wsum { font-size: 11.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbtns { display: flex; gap: 1px; flex: none; }
.wbtns button { width: 22px; height: 22px; border: 0; background: none; border-radius: 4px; color: var(--ink3); font-size: 14px; line-height: 1; display: grid; place-items: center; }
.wbtns button:hover { background: rgba(0,0,0,.07); color: var(--ink); }
.wbody { flex: 1; min-height: 0; overflow: auto; position: relative; }
.wbody.pv { display: flex; flex-direction: column; overflow: hidden; background: var(--panel); }
.wres { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; display: none; background: linear-gradient(135deg, transparent 50%, var(--line) 50%, var(--line) 60%, transparent 60%, transparent 70%, var(--line) 70%, var(--line) 80%, transparent 80%); }
.win.side-F.m-full:not(.max) .wres { display: block; }
/* mini (Spotify): una barra con lo esencial */
.win.m-mini { border-radius: 21px; }
.win.m-mini .wh { height: 100%; border: 0; background: var(--glass); padding: 0 6px 0 10px; }
.win.m-mini .wbody, .win.m-acc .wbody, .win.m-strip .wbody { display: none; }
.win.m-mini .wt { display: none; }
.win.m-mini .wbm { display: none; }
.win.m-acc .wh { cursor: pointer; }
.win.m-acc .wbm, .win.m-strip .wbm { display: none; }
/* acoplada sin nada abierto: pestaña vertical */
.win.m-strip { border-width: 0 1px 1px 0; }
.win.m-strip .wh { flex-direction: column; height: 100%; width: 100%; padding: 8px 0; gap: 8px; cursor: pointer; border: 0; }
.win.m-strip .wt { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11.5px; }
.win.m-strip .wgrip, .win.m-strip [data-wclose] { display: none; }
.win.m-strip .wx { flex: none; flex-direction: column; }
.win.m-strip .wbtns { flex-direction: column; }
.wkinds { display: inline-flex; gap: 2px; }
.win.m-strip .wkinds { flex-direction: column; }
.wkinds button { width: 26px; height: 26px; border: 1px solid transparent; background: none; border-radius: 5px; display: grid; place-items: center; color: var(--ink2); padding: 0; }
.wkinds button svg { width: 17px; height: 17px; }
.wkinds button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--hl); }
.mp { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.mpi { flex: none; display: grid; place-items: center; width: 28px; height: 28px; color: var(--ink2); }
.mpi svg { width: 26px; height: 26px; }
.mpt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; flex: 1; }
.mpt b { font-size: 13px; } .mpt small { color: var(--ink3); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp .pct { font-size: 12px; }
.mp button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; color: var(--ink2); padding: 0; flex: none; }
.mp button svg { width: 14px; height: 14px; }
.mp button:hover { border-color: var(--accent); color: var(--accent); }
.win.m-acc .mp .mpi, .win.m-acc .mp small { display: none; }
.wsplit { position: absolute; z-index: 8; width: 6px; cursor: col-resize; }
.wsplit[data-wsplit="B"] { width: auto; height: 6px; cursor: row-resize; }
.wsplit:hover { background: var(--accent-soft); }
.wsguide { position: absolute; z-index: 89; background: rgba(37,99,217,.12); border: 2px dashed var(--accent); pointer-events: none; }
.win .left .grp:last-child { margin-bottom: 0; }

/* barra de estado (como Revit) */
.status { display: flex; align-items: center; gap: 14px; padding: 0 10px; background: var(--panel); border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; }
.status .shint { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.status .ssel { font-weight: 600; color: var(--ink); }
.status .skg, .status .slay { color: var(--ink3); }
.status .slay { border-left: 1px solid var(--line2); padding-left: 10px; }

/* ================================================================ 3D: control de vista, navegación, cubo */
.vcb { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 1px; padding: 3px; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); max-width: calc(100% - 16px); overflow: hidden; z-index: 3; }
.vcb .ico { width: 26px; height: 26px; }
.vcb .ico svg { width: 17px; height: 17px; }
.vsep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 4px; }
.lgs { display: flex; gap: 2px; overflow: hidden; }
.lg { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink2); border: 1px solid transparent; background: none; border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
.lg i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; }
button.lg:hover { border-color: var(--line); }
.lg.off { color: var(--ink3); text-decoration: line-through; } .lg.off i { opacity: .3; }
.navbar { position: absolute; right: 10px; top: 136px; display: flex; flex-direction: column; gap: 1px; padding: 3px; background: var(--glass); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); z-index: 3; }
.navbar .ico { width: 26px; height: 26px; } .navbar .ico svg { width: 16px; height: 16px; }
.navbar .ico.on { background: var(--accent-soft); color: var(--accent); }
.nsep { height: 1px; background: var(--line); margin: 2px 3px; }
.vcube { position: absolute; right: 6px; top: 6px; width: 124px; height: 124px; z-index: 3; }
.cubewrap { position: absolute; left: 30px; top: 30px; width: 64px; height: 64px; perspective: none; }
.cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.cube .f { position: absolute; left: 0; top: 0; width: 64px; height: 64px; border: 1px solid var(--cube-line); background: var(--cube-f); color: var(--cube-ink); font: 700 9.5px/1 var(--font, system-ui); letter-spacing: .3px; backface-visibility: hidden; padding: 0; display: grid; place-items: center; }
.cube .f:hover { background: var(--cube-hi); color: var(--accent); border-color: var(--accent); }
.cube .f-front { transform: translateZ(32px); } .cube .f-back { transform: rotateY(180deg) translateZ(32px); }
.cube .f-right { transform: rotateY(90deg) translateZ(32px); } .cube .f-left { transform: rotateY(-90deg) translateZ(32px); }
.cube .f-top { transform: rotateX(90deg) translateZ(32px); background: rgba(250,251,252,.98); } .cube .f-bot { transform: rotateX(-90deg) translateZ(32px); }
.ring { position: absolute; left: -22px; top: -22px; width: 108px; height: 108px; border-radius: 50%; border: 7px solid rgba(150,162,176,.35); transform: rotateX(90deg) translateZ(-33px); transform-style: preserve-3d; pointer-events: none; }
.ring button { pointer-events: auto; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 0; background: var(--glass); color: var(--ink2); font: 700 9px/16px var(--font, system-ui); padding: 0; box-shadow: 0 0 0 1px var(--line); }
.ring button:hover { color: var(--accent); }
.ring .rn { left: 39px; top: -12px; } .ring .rs2 { left: 39px; bottom: -12px; } .ring .re { right: -12px; top: 39px; } .ring .rw { left: -12px; top: 39px; }
.vhome { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border: 0; background: var(--glass); border-radius: 5px; display: grid; place-items: center; color: var(--ink2); padding: 0; box-shadow: 0 0 0 1px var(--line); }
.vhome svg { width: 15px; height: 15px; } .vhome:hover { color: var(--accent); }
.tmpframe { position: absolute; inset: 0; border: 3px solid #14a8c9; pointer-events: none; z-index: 2; }
.tmpframe span { position: absolute; left: 8px; top: 6px; background: #14a8c9; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.tmpframe button { pointer-events: auto; position: absolute; left: 160px; top: 5px; border: 0; background: #fff; color: #14a8c9; border-radius: 50%; width: 20px; height: 20px; font-size: 11px; }
.zregion { position: absolute; border: 1.5px dashed var(--accent); background: rgba(37,99,217,.08); pointer-events: none; z-index: 4; }
.ctx button.on { color: var(--accent); font-weight: 600; }

/* ================================================================ contenido por etapa */
.mh { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
.mh b { font-size: 16px; } .mh span { color: var(--ink3); font-size: 12px; }
.mkpis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.mk { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; border: 1px solid var(--line2); background: var(--panel); border-radius: 8px; padding: 8px; }
.mk svg { width: 24px; height: 24px; grid-row: 1 / 3; color: var(--ink2); }
.mk b { font-size: 18px; line-height: 1; } .mk span { display: none; }
.mk small { color: var(--ink3); font-size: 11px; grid-column: 2; }
.mk:hover { border-color: var(--accent); }
.mrow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-top: 1px solid var(--line2); font-size: 12.5px; }
.mrow span { color: var(--ink2); } .mrow b { text-align: right; font-weight: 600; }
.btn.wide { width: 100%; justify-content: center; height: 34px; margin-top: 8px; }
.pls { display: grid; gap: 8px; }
.plg { border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.plh { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--panel2); cursor: pointer; }
.plh svg { width: 18px; height: 18px; color: var(--ink2); }
.plh span { margin-left: auto; color: var(--ink3); font-size: 11px; }
.pli { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 10px; border-top: 1px solid var(--line2); cursor: pointer; font-size: 12.5px; }
.pli span { margin-left: auto; color: var(--ink3); font-size: 11px; white-space: nowrap; }
.pli b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pli.off b { color: var(--ink3); text-decoration: line-through; }
.nlist { margin: 6px 0 10px; padding-left: 18px; font-size: 11.5px; color: var(--ink2); line-height: 1.45; }
kbd { font: 600 11px/1 var(--font, system-ui); background: var(--panel2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 6px; }
.ced.keys td { text-align: left; } .ced.keys td:first-child { width: 110px; }
/* croquis de la cédula */
.ced td.cqc, .ced th.cqc { text-align: center; padding: 1px 6px; }
svg.cq { display: block; margin: 0 auto; overflow: visible; }
svg.cq .cqb { fill: var(--ink3); stroke: none; }
svg.cq path, svg.cq rect { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg.cq text { font: 600 9px/1 var(--font, system-ui); fill: var(--ink2); font-variant-numeric: tabular-nums; }
.pre .pf1 { display: flex; gap: 8px; align-items: flex-start; padding: 4px 2px; font-size: 12.5px; color: var(--ink2); line-height: 1.35; }
.pre .pf1 .dot { margin-top: 5px; }
.pre .pf1[data-pfgo] { cursor: pointer; } .pre .pf1[data-pfgo]:hover span:last-child { color: var(--accent); text-decoration: underline; }
.pre .pf1.fail { color: var(--fail); }
/* buscador de comandos (Ctrl+K) */
.search { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); color: var(--ink3); font-size: 12px; }
.search svg { width: 14px; height: 14px; } .search kbd { font-size: 10px; padding: 1px 5px; }
.search:hover { border-color: var(--ink3); color: var(--ink2); }
@media (max-width: 1350px) { .search span, .search kbd { display: none; } }
.pal { position: fixed; inset: 0; z-index: 980; background: rgba(20,28,36,.25); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palbox { width: min(560px, 92vw); background: var(--panel); border-radius: 10px; box-shadow: 0 16px 50px rgba(0,0,0,.28); overflow: hidden; border: 1px solid var(--line); }
.palbox input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 13px 16px; font-size: 15px; outline: none; }
.pall { max-height: 52vh; overflow: auto; padding: 4px; }
.pall button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.pall button small { margin-left: auto; color: var(--ink3); font-size: 11px; }
.pall button.on, .pall button:hover { background: var(--accent-soft); color: var(--accent); }
.palf { font-size: 11px; color: var(--ink3); padding: 6px 14px; border-top: 1px solid var(--line2); }
/* medidas en el 3D */
.meas { position: absolute; transform: translate(-50%, -125%); background: #c2255c; color: #fff; border-radius: 6px; padding: 3px 8px; font: 600 12px/1.25 var(--font, system-ui); font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; flex-direction: column; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); pointer-events: none; }
.meas i { font-style: normal; font-size: 11px; background: rgba(255,255,255,.22); border-radius: 4px; padding: 0 5px; margin-top: 1px; }
.meas small { font-size: 9.5px; opacity: .85; font-weight: 500; }
.meas.tmp { background: rgba(194,37,92,.8); }
/* cambios del modelo de Revit */
.hs { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink3); font-size: 11px; }
.chg0 { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.chips .chip { cursor: pointer; height: 24px; font-size: 11.5px; gap: 4px; }
.chips .chip b { color: var(--ink); }
.chips .chip.on { background: var(--inv); color: var(--inv-ink); border-color: var(--inv); } .chips .chip.on b { color: var(--inv-ink); }
.chgl { display: grid; gap: 2px; max-height: 300px; overflow: auto; }
.chg { display: grid; grid-template-columns: 22px auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; border: 1px solid var(--line2); border-left: 3px solid var(--c, var(--ink3)); background: var(--panel); border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.chg i { font-style: normal; font-weight: 700; color: var(--c); grid-row: 1 / 3; text-align: center; }
.chg span { color: var(--ink3); font-size: 11px; } .chg small { grid-column: 2 / 4; color: var(--ink2); font-size: 11px; }
.chg:hover { border-color: var(--c); }
.c-new { --c: #2f9e44; } .c-del { --c: #e03131; } .c-sec, .c-len { --c: #f08c00; } .c-mov { --c: #1c7ed6; } .c-fc, .c-lvl { --c: #9c36b5; }
.chips .chip.c-new, .chips .chip.c-del, .chips .chip.c-sec, .chips .chip.c-len, .chips .chip.c-mov, .chips .chip.c-fc, .chips .chip.c-lvl { border-left: 3px solid var(--c); }
.chgb { display: flex; gap: 6px; margin-top: 8px; }
.diffbar { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 10px; background: #1f2a36; color: #fff; border-radius: 16px; padding: 4px 6px 4px 14px; font-size: 12px; box-shadow: var(--shadow); }
.diffbar span { opacity: .75; } .diffbar button { border: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; }
.tag3.dnew { color: #2f9e44; } .tag3.dsec, .tag3.dlen { color: #d9480f; } .tag3.dmov { color: #1c7ed6; } .tag3.ddel { color: #e03131; } .tag3.dfc, .tag3.dlvl { color: #9c36b5; }
.tdot.dnew { color: #2f9e44; } .tdot.dsec, .tdot.dlen { color: #d9480f; } .tdot.dmov { color: #1c7ed6; } .tdot.ddel { color: #e03131; } .tdot.dfc, .tdot.dlvl { color: #9c36b5; }
.tag3.mcol { color: #4a5563; } .tag3.mbeam { color: #9a4d00; } .tag3.mslab { color: #2f6fd6; } .tag3.mfoot { color: #5c6f2b; }
.tdot.mcol { color: #4a5563; } .tdot.mbeam { color: #9a4d00; } .tdot.mslab { color: #2f6fd6; } .tdot.mfoot { color: #5c6f2b; }
/* cotas del dibujo (estilo plano): las editables en azul con zona de clic */
.dimed { cursor: pointer; }
.dimed .dimhit { fill: transparent; }
.dimed:hover .dimhit { fill: var(--accent-soft); }
.dimed:hover text { font-weight: 700; }
.cutm { cursor: pointer; } .cutm:hover path, .cutm:hover text { stroke-opacity: .7; fill-opacity: .7; }
.axis text { pointer-events: none; }

/* juego de planos (etapa Planos): orden, clave y título de cada hoja */
.shcfg { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; font-size: 12px; color: var(--ink2); }
.shcfg label { display: flex; align-items: center; gap: 4px; }
.shpre { width: 52px; height: 26px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 6px; font: inherit; color: var(--ink); background: var(--panel); }
.shpl { display: flex; flex-direction: column; gap: 2px; }
.shg { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink3); margin: 6px 0 1px; }
.shr { display: grid; grid-template-columns: 20px 72px 1fr; gap: 4px; align-items: center; }
.shmv { display: flex; flex-direction: column; }
.shmv button { border: 0; background: none; padding: 0; height: 12px; width: 18px; font-size: 9.5px; line-height: 12px; color: var(--ink2); cursor: pointer; border-radius: 3px; }
.shmv button:hover:not(:disabled) { background: var(--hover, rgb(0 0 0 / 0.06)); }
.shmv button:hover:not(:disabled) { color: var(--accent, #2563d9); }
.shmv button:disabled { opacity: .25; cursor: default; }
.shr input { text-overflow: ellipsis; height: 24px; border: 1px solid transparent; border-radius: 4px; padding: 0 6px; font: inherit; font-size: 12px; background: transparent; color: var(--ink); min-width: 0; }
.shr input:hover, .shr input:focus { border-color: var(--line); background: var(--panel); }
.shr input.shn { font-weight: 700; font-variant-numeric: tabular-nums; }
.shr input::placeholder { color: var(--ink2); opacity: 1; }
.shr input.shn::placeholder { font-weight: 700; }
.shinfo { margin-top: 8px; font-size: 12px; }
.shinfo summary { cursor: pointer; color: var(--ink2); font-weight: 600; padding: 2px 0; }
.shf { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 4px; margin-top: 3px; }
.shf span { color: var(--ink3); }
.shf input { height: 24px; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; font: inherit; background: var(--panel); color: var(--ink); min-width: 0; }

.ih-sub .ihp { white-space: nowrap; }

/* bienvenida (sin modelo): una sola tarjeta al centro del 3D */
.welcome { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; pointer-events: none; }
.welcome .wc { pointer-events: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 40px rgba(20,30,40,.14); padding: 22px 24px 16px; max-width: min(620px, calc(100% - 32px)); text-align: center; animation: mpop .22s cubic-bezier(.2,.8,.3,1); }
.wct { font-size: 17px; font-weight: 750; color: var(--ink); }
.wcs { font-size: 12px; color: var(--ink3); margin-top: 3px; }
.wcb { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.wbig { flex: 1 1 150px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; color: var(--ink); font: inherit; transition: border-color .12s, background .12s, transform .12s; }
.wbig svg { width: 26px; height: 26px; color: var(--accent, #2563d9); }
.wbig b { font-size: 13px; }
.wbig span { font-size: 11px; color: var(--ink3); }
.wbig:hover:not(:disabled) { border-color: var(--accent, #2563d9); background: color-mix(in srgb, var(--accent, #2563d9) 6%, var(--panel)); transform: translateY(-1px); }
.wbig:disabled { opacity: .45; cursor: default; }
.wcf { margin-top: 12px; font-size: 11px; color: var(--ink3); }

/* etiquetas del 3D en tema oscuro: tonos más claros para que se lean sobre el carbón */
:root[data-theme="dark"] .tag3.long, :root[data-theme="dark"] .tag3.tx { color: #ff8f78; }
:root[data-theme="dark"] .tag3.tie, :root[data-theme="dark"] .tag3.bx, :root[data-theme="dark"] .tag3.mslab { color: #7fb0ff; }
:root[data-theme="dark"] .tag3.cross, :root[data-theme="dark"] .tag3.by { color: #4fd1c1; }
:root[data-theme="dark"] .tag3.ty { color: #ffaa66; } :root[data-theme="dark"] .tag3.hole { color: #c39bff; }
:root[data-theme="dark"] .tag3.mcol { color: #c9d2dc; } :root[data-theme="dark"] .tag3.mbeam { color: #f0b46a; } :root[data-theme="dark"] .tag3.mfoot { color: #b6cc7a; }

.supd { flex: none; height: 18px; padding: 0 8px; margin: 0 6px; border-radius: 9px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; line-height: 16px; cursor: pointer; }
.supd.warn { border-color: var(--warnline); background: var(--warnbg); color: var(--warnink); cursor: help; }

/* Ajustes */
.modal.settings .box { width: min(660px, 94vw); height: min(640px, 86vh); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.sthead { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 4px; }
.sthead h3 { margin: 0; }
.sttabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.sttabs button { border: 0; background: none; padding: 8px 12px; font-weight: 600; color: var(--ink3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sttabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.stbody { flex: 1; overflow: auto; padding: 12px 16px 16px; }
.strow { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.strow > label { width: 110px; flex: none; color: var(--ink2); font-size: 12.5px; }
.strow select { height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 0 6px; }
.stro { color: var(--ink3); font-size: 12px; }
.sth { font-size: 11px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 6px; }
.sth small { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.stgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; }
.stgrid label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); }
.stgrid label span { width: 96px; flex: none; }
.stgrid input, .strepl input { flex: 1; min-width: 0; height: 26px; border: 1px solid var(--line); border-radius: 5px; padding: 0 7px; background: var(--panel); font-variant-numeric: tabular-nums; }
.stgrid input:focus, .strepl input:focus { outline: none; border-color: var(--accent); }
.strepl { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.strepl > div { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 420px; }
.strepl > div span { color: var(--ink3); }
.stprev { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; }
.stprev div { display: flex; gap: 8px; font-size: 12px; align-items: baseline; min-width: 0; }
.stprev span { color: var(--ink3); width: 92px; flex: none; }
.stprev b { color: var(--long); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stcard { display: flex; flex-direction: column; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); }
.stcard span { font-size: 11.5px; color: var(--ink3); }
.stcard:not([aria-disabled]):hover { border-color: var(--accent); }
.stcard[aria-disabled] { opacity: .55; cursor: default; }
.stdiag { background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; font-size: 11px; white-space: pre-wrap; max-height: 160px; overflow: auto; margin: 0; }
.stabout { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.stabout div { display: flex; flex-direction: column; } .stabout b { font-size: 16px; } .stabout span { color: var(--ink3); font-size: 12px; }
@media (max-width: 560px) { .stcards { grid-template-columns: 1fr; } }
.strow > .seg { flex-wrap: wrap; }
.stcov label em { font-style: normal; color: var(--ink3); font-size: 12px; }
.strow > label { width: 150px; }

/* hojas en papel */
.modal.shprev .box { width: min(1500px, 96vw); height: min(940px, 92vh); max-width: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.shhead { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.shhead b { font-size: 15px; }
.shhead .shcount { color: var(--ink3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.shhead .sp { flex: 1; }
.shbody { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px 1fr; }
.shlist { overflow: auto; border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.shpg { display: grid; grid-template-columns: 54px 1fr; gap: 6px; text-align: left; border: 0; background: none; border-radius: 6px; padding: 7px 8px; cursor: pointer; color: var(--ink2); font: inherit; font-size: 12.5px; }
.shpg b { font-variant-numeric: tabular-nums; color: var(--ink); }
.shpg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shpg:hover { background: var(--hover, rgba(0,0,0,.05)); }
.shpg.on { background: var(--sel, #e7efff); color: var(--ink); }
.shpaper { overflow: auto; background: #7d858e; padding: 18px; display: flex; align-items: center; justify-content: center; min-width: 0; }
.shpaper svg.sheet { width: 100%; max-width: calc((min(940px, 92vh) - 160px) * 1.5); height: auto; aspect-ratio: 3 / 2; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.shbody { min-width: 0; } .shbody > * { min-width: 0; }

/* plan de cortes */
.modal.cuts .box { width: min(1200px, 96vw); height: min(900px, 92vh); max-width: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.modal.cuts .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.modal.cuts .seg button { border: 0; background: none; padding: 5px 10px; font: inherit; font-size: 12.5px; color: var(--ink2); cursor: pointer; }
.modal.cuts .seg button.on { background: var(--accent, #2563d9); color: #fff; }
.cuttabs { display: flex; gap: 4px; padding: 8px 14px 0; border-bottom: 1px solid var(--line); }
.cuttabs button { border: 0; background: none; padding: 7px 12px; font: inherit; font-weight: 600; color: var(--ink2); border-bottom: 2px solid transparent; cursor: pointer; display: inline-flex; gap: 6px; align-items: baseline; }
.cuttabs button small { font-weight: 500; color: var(--ink3); font-variant-numeric: tabular-nums; }
.cuttabs button.on { color: var(--ink); border-bottom-color: var(--accent, #2563d9); }
.cutbody { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px 20px; }
.cstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.cstats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.cstats > div.all { background: var(--sel, #eef4ff); }
.cstats small { color: var(--ink3); font-size: 11.5px; }
.cstats b { font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cstats span { font-size: 12px; color: var(--ink2); }
.cstats em { font-style: normal; color: #1a8a4a; font-weight: 700; }
.cnote { font-size: 12px; color: var(--ink2); margin: 6px 0; }
.cscale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink3); margin: 6px 44px 4px 0; font-variant-numeric: tabular-nums; }
.crows { display: flex; flex-direction: column; gap: 5px; }
.crow { display: grid; grid-template-columns: 1fr 40px; gap: 8px; align-items: center; }
.cbar { position: relative; height: 26px; background: repeating-linear-gradient(90deg, transparent 0 calc(8.333% - 1px), rgba(0,0,0,.07) calc(8.333% - 1px) 8.333%); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.cpc { position: absolute; top: 2px; bottom: 2px; background: var(--c); border-right: 2px solid #fff; border-radius: 3px; color: #fff; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; white-space: nowrap; overflow: hidden; }
.cpc b { font-weight: 700; } .cpc i { font-style: normal; opacity: .85; font-variant-numeric: tabular-nums; }
.cwaste { position: absolute; top: 2px; bottom: 2px; background: repeating-linear-gradient(45deg, rgba(200,40,40,.28) 0 4px, rgba(200,40,40,.08) 4px 8px); color: #b42318; font-size: 10.5px; display: flex; align-items: center; justify-content: center; border-radius: 3px; }
.crow .cnt { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink2); font-size: 13px; }
.crows.anim .cpc { animation: cutIn .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d); }
.crows.anim .cwaste { animation: cutFade .5s ease both; animation-delay: .4s; }
@keyframes cutIn { from { transform: translateX(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cutFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .crows.anim .cpc, .crows.anim .cwaste { animation: none; } }

/* secuencia de construcción */
.modal.seq .box { width: min(1400px, 96vw); height: min(940px, 94vh); max-width: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.modal.seq .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.modal.seq .seg button { border: 0; background: none; padding: 5px 10px; font: inherit; font-size: 12.5px; color: var(--ink2); cursor: pointer; }
.modal.seq .seg button.on { background: var(--accent, #2563d9); color: #fff; }
.modal.seq .seqt { color: var(--ink3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.modal.seq .btn.rec { color: #c2452c; font-weight: 700; }
.modal.seq.recording .btn.rec { background: #c2452c; color: #fff; }
.seqphases { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.seqphases button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12px; color: var(--ink2); cursor: pointer; }
.seqphases button.on { background: #073a4f; border-color: #073a4f; color: #fff; }
.seqbody { flex: 1; min-height: 0; display: grid; place-items: center; background: #d9dee3; padding: 10px; }
.seqcanvas { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; box-shadow: 0 4px 16px rgba(0,0,0,.25); cursor: grab; border-radius: 4px; }
.seqbar { width: calc(100% - 28px); margin: 8px 14px 12px; accent-color: #0592ab; }

/* costo */
.modal.cost .box { width: min(980px, 96vw); max-width: none; padding: 0; overflow: hidden; }
.costbody { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; max-height: 80vh; overflow: auto; }
.cprices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cprice { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.cprice.mine { border-color: var(--accent, #2563d9); }
.cprice .ci { grid-row: span 2; font-size: 20px; color: var(--ink3); text-align: center; }
.cprice .cl { font-size: 11.5px; color: var(--ink3); }
.cprice input { border: 0; background: none; font: 600 18px/1.2 inherit; font-variant-numeric: tabular-nums; color: var(--ink); width: 100%; padding: 0; outline: none; }
.cprice .cu { grid-column: 2; font-size: 11px; color: var(--ink3); }
.csrc { font-size: 11.5px; color: var(--ink3); }
.ctotal { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.ctotal > div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ctotal > div:first-child { background: var(--sel, #eef4ff); }
.ctotal small { font-size: 11.5px; color: var(--ink3); }
.ctotal b { font-size: 24px; font-variant-numeric: tabular-nums; }
.ctotal .warn { font-size: 12px; color: #b54708; }
.ctab { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ctab th, .ctab td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ctab thead th { color: var(--ink3); font-weight: 600; font-size: 11.5px; }
.ctab tbody th { text-align: left; font-weight: 600; }
.ctab td.na { color: var(--ink3); }
.ctab tr.tot td, .ctab tr.tot th { border-top: 2px solid var(--ink3); font-weight: 700; }
.cnote2 { font-size: 11.5px; color: var(--ink3); }

/* etiquetas de taller */
.modal.tags .box { width: min(1180px, 96vw); height: min(900px, 92vh); max-width: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.tagbody { flex: 1; min-height: 0; overflow: auto; background: #d9dee3; padding: 18px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, 100mm); gap: 12px; justify-content: center; }

/* atajos */
.modal.keysdlg .box { width: min(980px, 96vw); max-width: none; }
.kshint { color: var(--ink3); font-size: 12.5px; margin: 4px 0 10px; }
.ksgrid { columns: 2 380px; column-gap: 24px; max-height: 66vh; overflow: auto; }
.ksgrid > div { break-inside: avoid; margin-bottom: 12px; }
.ksgrid h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); }
.ksgrid td:first-child { white-space: nowrap; width: 1%; }

/* ---------- alzado de trabe: varilla elegida, «+» para agregar y barra contextual ---------- */
.elev .barhit { cursor: pointer; pointer-events: stroke; }
.elev .barhit:hover + .grip, .elev polyline.bar.on { filter: drop-shadow(0 0 1px rgba(37,99,217,.4)); }
.elev .addghost { cursor: copy; }
.elev .addghost:hover line { opacity: 1; stroke-dasharray: none; }
.elev .addghost:hover circle { fill: var(--accent-soft); }
.elev .grip.on { cursor: ew-resize; }
.elev .dragtip { pointer-events: none; }
.bctx { position: absolute; z-index: 5; transform: translate(-50%, -50%); width: max-content; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--c, var(--accent)); border-radius: 10px; box-shadow: 0 6px 24px rgba(20,30,40,.16); padding: 6px 8px 7px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; min-width: 330px; }
.bctx .bc-h { display: flex; align-items: center; gap: 7px; }
.bctx .bc-sw { width: 14px; height: 4px; border-radius: 2px; background: var(--c); }
.bctx .bc-h b { font-size: 12.5px; white-space: nowrap; }
.bctx .bc-hint { color: var(--ink3); font-size: 10.5px; margin-left: auto; white-space: nowrap; }
.bctx .bc-x { border: 0; background: none; color: var(--ink3); padding: 0 2px; }
.bctx .bc-r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bctx .bc-g { display: inline-flex; align-items: center; gap: 2px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 7px; padding: 2px; }
.bctx .bc-g button { height: 24px; min-width: 24px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; font-size: 12px; color: var(--ink2); }
.bctx .bc-g button:hover { background: #fff; color: var(--ink); }
.bctx .bc-g button.on { background: var(--c, var(--accent)); color: #fff; font-weight: 600; }
.bctx .bc-g.stp b { min-width: 20px; text-align: center; font-size: 14px; }
.bctx .bc-g.chips button { padding: 0 5px; font-weight: 600; }
.bctx .bc-g input { width: 62px; height: 24px; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; text-align: right; background: #fff; }
.bctx .bc-g .u { color: var(--ink3); font-size: 11px; margin: 0 4px 0 2px; }
.bctx .bc-ico { font-style: normal; color: var(--ink3); padding: 0 3px; }
.bctx .bc-end { font-weight: 700; }
.bctx .bc-del:hover { background: #fde8e8 !important; }
.bctx .pos svg { display: block; }

/* ---------- avance: etapas con estado, pendientes, tipos sin revisar ---------- */
.rtabs .tsep { color: var(--ink3); align-self: center; margin: 0 -4px; font-size: 14px; }
.rtab .tpill { margin-left: 6px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: var(--panel2); color: var(--ink2); border: 1px solid var(--line2); }
.rtab .tpill.ok { background: #e3f4ea; color: var(--ok); border-color: #c4e6d2; }
.rtab .tpill.fail { background: #fde8e8; color: var(--fail); border-color: #f6c7c7; }
.rtab .tpill.go { background: var(--accent); color: #fff; border-color: var(--accent); }
.rb.kdone .rbadge { background: var(--ok) !important; }
.rb.go.ready { box-shadow: 0 0 0 2px var(--accent) inset; animation: readyPulse 1.6s ease-in-out 3; }
@keyframes readyPulse { 50% { box-shadow: 0 0 0 4px rgba(37,99,217,.35) inset; } }
.grp.unseen .grp-tag::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.kinds button.kpend::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 5px; vertical-align: middle; }
.grp.unseen .fl1 > b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.bitem.on { border-color: var(--accent) !important; box-shadow: 0 0 0 2px var(--accent-soft); }

/* ---------- ventanas que cambian de forma según su tamaño (como las de Revit / Spotify) ---------- */
.kinds .kico { display: none; width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.kinds .kico svg { width: 16px; height: 16px; }
.win[data-win="nav"]:not(.m-mini):not(.m-acc):not(.m-strip) { container-type: size; container-name: nav; }
.win[data-win="props"]:not(.m-mini):not(.m-acc):not(.m-strip) { container-type: size; container-name: props; }
/* angosto: pestañas en un renglón, solo ícono y número */
@container nav (max-width: 330px) {
  #left .kinds { display: flex; }
  #left .kinds .kn { display: none; }
  #left .kinds .kico { display: inline-block; }
  #left .kinds button { padding: 0 2px; }
}
/* mediano: tarjetas de un renglón (marca y %); el tipo elegido conserva sus ejes y «separar» */
@container nav (max-height: 440px) {
  #left .kinds { display: flex; margin-bottom: 6px; }
  #left .kinds .kn { display: none; }
  #left .kinds .kico { display: inline-block; }
  #left .grp { margin-bottom: 4px; }
  #left .grp-h { padding: 4px 9px; gap: 8px; grid-template-columns: 1fr auto; }
  #left .grp-sec, #left .grp-sub { display: none; }
  #left .grp-tag { font-size: 13px; }
  #left .grp-ax { padding: 0 9px 6px; }
  #left .fgrp .fico, #left .fgrp .fl2, #left .fgrp .fl3 { display: none; }
}
/* chico (poca altura o muy angosto): lista de chips, para saltar entre muchos tipos sin abrir una ventana grande */
@container nav (max-height: 230px) or (max-width: 200px) {
  #left { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; padding: 6px !important; }
  #left .kinds { flex: 1 1 100%; display: flex; margin-bottom: 2px; padding: 2px; }
  #left .kinds .kn { display: none; }
  #left .kinds .kico { display: inline-block; }
  #left .kinds button { height: 24px; padding: 0 2px; font-size: 11.5px; }
  #left .grp { margin: 0; flex: 0 0 auto; border-radius: 14px; }
  #left .grp.sel { box-shadow: none; background: var(--accent-soft); }
  #left .grp-h { display: flex; gap: 6px; padding: 2px 9px; }
  #left .grp-sec, #left .grp-sub, #left .grp-ax, #left .cols, #left > .h, #left .colrow, #left .warnbox, #left .empty { display: none; }
  #left .grp-tag { font-size: 12.5px; }
  #left .grp-tag .cnt { display: none; }
  #left .grp .pct { font-size: 10.5px; }
  #left .fgrp .fico, #left .fgrp .fl2, #left .fgrp .fl3, #left .fgrp .kchip, #left .fgrp .cnt { display: none; }
  #left .fgrp .fitem, #left .fgrp .fmain { padding: 2px 9px !important; gap: 6px; }
}
/* Propiedades angosta o chata: lo esencial (marca, % y tarjetas); los textos de apoyo se esconden */
@container props (max-height: 380px) or (max-width: 280px) {
  #right .ih-sub, #right .irot, #right .fnote, #right .hint, #right .fcard-h .sum { display: none; }
  #right .iico { display: none; }
  #right .ihead { padding-bottom: 4px; }
}
@container props (max-width: 280px) {
  #right .frow label { display: none; }
}
/* acomodo: cada botón es el corte en chico */
.bctx .pos button { height: 30px; padding: 0 3px; }
.bctx .pos svg { width: 28px; height: 22px; display: block; }
.bctx .pos .pa { display: inline-block; width: 28px; font-size: 13px; }
.bctx .pos button.on { background: #fff; box-shadow: 0 0 0 2px var(--c, var(--accent)) inset; color: var(--ink); }
/* números de los dibujos que se pueden escribir */
svg .dimed { cursor: text; }
svg .dimed:hover text { fill: var(--accent); text-decoration: underline; }
.npop { position: fixed; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(20,30,40,.18); padding: 8px 10px; font-size: 12px; min-width: 210px; }
.npop .np-h { font-weight: 700; margin-bottom: 6px; }
.npop .np-r { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.npop .np-r span { flex: 1; color: var(--ink2); }
.npop .np-r input { width: 70px; height: 26px; border: 1px solid var(--line); border-radius: 6px; text-align: right; padding: 0 6px; }
.npop .np-r input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.npop .np-r i { font-style: normal; color: var(--ink3); }
.npop .np-f { color: var(--ink3); font-size: 10.5px; margin-top: 4px; }
/* estado del tipo: palomita al revisarlo (el % queda en la pista), medidas a la vista */
#left .pct.mark { width: 20px; flex: none; justify-self: end; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; padding: 0; }
#left .pct.mark.ok { color: #fff; background: var(--ok); }
#left .pct.mark.ok:empty { background: none; }
#left .pct.mark.warn { color: #fff; background: var(--warn); }
#left .pct.mark.fail { color: #fff; background: var(--fail); }
#left .gmeas { display: none; color: var(--ink2); font-size: 12px; font-weight: 600; margin-left: 6px; white-space: nowrap; }
#left .grp-h > div { display: flex; flex-wrap: wrap; align-items: baseline; }
#left .grp-h > div > .grp-sub { flex-basis: 100%; }
@container nav (max-height: 440px) { #left .gmeas { display: inline; } }
@container props (max-height: 380px) or (max-width: 280px) { #right .fcard-h .ico { margin-left: auto; } }

/* ---------- vista previa de planos ---------- */
.prevw { position: absolute; inset: 0; z-index: 12; background: #dfe3e8; display: flex; flex-direction: column; min-height: 0; }
.pv-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--ink2); max-width: 420px; }
.pv-empty svg { color: var(--ink3); }
.pv-empty b { font-size: 17px; color: var(--ink); }
.pv-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); }
.pv-q { display: flex; flex-direction: column; line-height: 1.15; font-size: 12px; }
.pv-q b.ok { color: var(--ok); } .pv-q b.warn { color: var(--warn); }
.pv-q span { color: var(--ink3); font-size: 11px; }
.pv-f, .pv-z { display: inline-flex; gap: 2px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 7px; padding: 2px; }
.pv-f button, .pv-z button { border: 0; background: none; height: 24px; padding: 0 8px; border-radius: 5px; font-size: 12px; color: var(--ink2); }
.pv-f button i { display: inline-block; width: 9px; height: 9px; border: 2px solid var(--c); border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.pv-f button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pv-f button.on i { background: color-mix(in srgb, var(--c) 30%, transparent); }
.pv-tabs { display: flex; gap: 4px; padding: 6px 10px; overflow-x: auto; background: var(--panel2); border-bottom: 1px solid var(--line); flex: none; }
.pv-tab { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 8px; font-size: 11.5px; white-space: nowrap; max-width: 230px; }
.pv-tab span { overflow: hidden; text-overflow: ellipsis; color: var(--ink2); }
.pv-tab.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pv-n { font-style: normal; background: var(--warn); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 10.5px; font-weight: 700; }
.pv-ok { font-style: normal; color: var(--ok); font-weight: 800; }
.pv-body { flex: 1; min-height: 0; display: flex; }
.pv-side { width: 270px; flex: none; background: var(--panel); border-right: 1px solid var(--line); overflow: auto; padding: 10px; font-size: 12px; display: flex; flex-direction: column; gap: 8px; }
.pv-h { font-weight: 700; font-size: 13px; }
.pv-h2 { font-weight: 700; color: var(--ink2); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.pv-h2 button { margin-left: auto; border: 0; background: none; color: var(--accent); font-size: 11px; }
.pv-hint { color: var(--ink3); }
.pv-sel { background: var(--accent-soft); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.pv-mv { display: flex; align-items: center; gap: 4px; }
.pv-mv input { width: 54px; height: 24px; border: 1px solid var(--line); border-radius: 5px; text-align: right; padding: 0 4px; }
.pv-mv button { border: 1px solid var(--line); background: #fff; border-radius: 5px; height: 24px; }
.pv-sel small { color: var(--ink3); }
.pv-iss-l { display: flex; flex-direction: column; gap: 3px; }
.pv-i { text-align: left; border: 0; background: var(--panel2); border-left: 3px solid var(--warn); border-radius: 4px; padding: 4px 6px; font-size: 11.5px; }
.pv-i.vista, .pv-i.margen { border-left-color: var(--accent); }
.pv-i.escala { border-left-color: var(--fail); }
.pv-i:hover { background: #fff4e0; }
.pv-w { color: var(--ink3); } .pv-w div { margin: 3px 0; }
.pv-canvas { flex: 1; min-width: 0; overflow: auto; padding: 16px; }
.pv-page { position: relative; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.18); margin: 0 auto; }
.pv-page img { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; }
.pv-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink3); }
.pv-ov { position: absolute; inset: 0; width: 100%; height: 100%; }
.pv-b { fill: transparent; stroke-width: 0.35; vector-effect: non-scaling-stroke; cursor: move; }
.pv-b.pv-vp { stroke: #2563d9; stroke-dasharray: 4 3; stroke-opacity: .55; fill: rgba(37,99,217,.02); }
.pv-b.pv-tag { stroke: #e07b2e; stroke-opacity: .8; fill: rgba(224,123,46,.06); }
.pv-b.pv-txt { stroke: #0f9c90; stroke-opacity: .8; fill: rgba(15,156,144,.06); }
.pv-b.pv-dim { stroke: #8a4fd0; stroke-opacity: .6; }
.pv-b:hover { stroke-width: 2; stroke-opacity: 1; }
.pv-b.on { stroke: #2563d9 !important; stroke-width: 2.4; stroke-dasharray: none; fill: rgba(37,99,217,.12); }
.pv-b.moved { fill: rgba(37,99,217,.16); stroke: #2563d9; stroke-dasharray: none; }
.pv-old { fill: none; stroke: #8592a0; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; stroke-width: 1; pointer-events: none; }
.pv-iss { fill: rgba(224,138,0,.18); stroke: #e08a00; stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.pv-iss.pv-vista, .pv-iss.pv-margen { fill: rgba(37,99,217,.08); stroke: #2563d9; }
/* familias de etiqueta */
.fam-l { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.fam-r { display: flex; align-items: center; gap: 8px; }
.fam-r span { flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.fam-r small { color: var(--ink3); font-size: 10.5px; }
.fam-r select { max-width: 170px; }
.fam-r input[data-brand] { width: 130px; font: inherit; padding: 2px 6px; border: 1px solid var(--line, #d5dbe1); border-radius: 4px; }
.fam-f { display: flex; flex-direction: column; gap: 6px; color: var(--ink3); }
/* en Planos la vista previa manda: las vistas 2D del armado no se muestran */
body[data-stage="planos"] .win[data-win="v1"], body[data-stage="planos"] .win[data-win="v2"], body[data-stage="planos"] .win[data-win="v3"],
body[data-stage="modelo"] .win[data-win="v1"], body[data-stage="modelo"] .win[data-win="v2"], body[data-stage="modelo"] .win[data-win="v3"] { display: none !important; }
.pv-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.7); z-index: 2; }
.pv-busy span { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; box-shadow: var(--shadow); font-weight: 600; }
.pv-arm { align-self: flex-start; border: 1px solid var(--accent); color: var(--accent); background: #fff; border-radius: 6px; padding: 2px 8px; font-size: 11.5px; }
/* bloqueo del armado (junto al nombre del tipo) */
.ilock { border: 0; background: none; cursor: pointer; font-size: 12px; padding: 0 4px; opacity: .35; vertical-align: 1px; }
.ilock:hover { opacity: .8; }
.ilock.on { opacity: 1; }

.ihead .irev { margin-left: 4px; color: var(--ink2); }
.ihead .irev:hover { color: var(--accent); }

.fl1 b, .grp-tag, .ntag { white-space: nowrap; }
.barpop { min-width: 0; }
.barpop .np-h small { font-weight: 400; color: var(--ink3, #6b7785); }
.barpop .bp-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.barpop .bp-row button { font: inherit; font-size: 12px; padding: 3px 8px; border: 1px solid var(--line, #d5dbe1); border-radius: 5px; background: #fff; cursor: pointer; }
.barpop .bp-row button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.barpop .bp-sc button { font-size: 11px; padding: 2px 7px; }
.barpop .bp-sc button.on { background: var(--accent-soft); color: var(--accent); border-color: #c9d9f7; }
.barpop .bp-tie.on { background: #e6f6f4; color: #0f7d74; border-color: #9fd9d2; }

/* licencia: chip de la barra y ventana de activación */
.lic { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); color: var(--ink2); font: 600 12px/1 inherit; cursor: pointer; }
.lic svg { width: 14px; height: 14px; }
.lic.ok { color: var(--ok, #1f8a5b); }
.lic.warn { color: #b26a00; border-color: #e7b766; }
.lic.need { color: #fff; background: var(--accent, #2563d9); border-color: transparent; }
.licdlg .box { width: min(440px, 92vw); }
.licbox { display: flex; flex-direction: column; gap: 14px; }
.lichead { display: flex; gap: 12px; align-items: center; }
.lichead > svg { width: 30px; height: 30px; color: var(--accent, #2563d9); flex: none; }
.lichead b { display: block; font-size: 16px; }
.lichead span { font-size: 12.5px; color: var(--ink3); }
.licform { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.licform label { font-weight: 600; font-size: 13px; }
.licform small { font-weight: 400; color: var(--ink3); margin-left: 4px; }
.licin { display: flex; gap: 6px; }
.licin input { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font: inherit; background: var(--bg, #fff); color: var(--ink); }
.licrow { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line); }
.licerr { font-size: 12.5px; color: #c2452c; background: rgb(194 69 44 / .08); border-radius: 6px; padding: 8px 10px; }
.licbtns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.licbtns a.btn { text-decoration: none; }
/* reporte de errores */
.bugbtn svg { color: var(--ink2); }
.bugbtn:hover svg { color: #c2452c; }
.bugbox, .bugbox form { display: flex; flex-direction: column; gap: 10px; }
.bugbox textarea, .bugbox input[type=email] { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; background: var(--bg, #fff); color: var(--ink); resize: vertical; }
.bugchk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.bugwhere { font-size: 11.5px; color: var(--ink3); }
.lichead > svg { width: 30px; height: 30px; }
.licnote { color: var(--ink3); font-size: 12px; }
/* el aviso de la herramienta no se sale de la vista: se parte en renglones */
.secchip { max-width: calc(100% - 16px); white-space: normal; flex-wrap: wrap; justify-content: center; }
/* espacio al final de las vistas con zoom: la barra − Todo + no tapa las últimas cotas */
.pb.scroll > svg { margin-bottom: 40px; }

/* confirmar armado (inspector) */
.confbar { display: flex; align-items: center; gap: 8px; margin: 0 10px 8px; padding: 6px 6px 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.confbar .cb-ok { flex: 0 0 auto; border: 0; border-radius: 6px; padding: 6px 12px; font: 600 12.5px/1 inherit; background: var(--accent); color: #fff; cursor: pointer; }
.confbar .cb-ok:hover { filter: brightness(1.08); }
.confbar .cb-h { margin-left: auto; font-size: 11px; opacity: .6; white-space: nowrap; }
.confbar .cb-t { font-weight: 600; font-size: 12.5px; }
.confbar .cb-x { margin-left: auto; border: 0; background: none; color: inherit; opacity: .6; font-size: 11.5px; cursor: pointer; text-decoration: underline; }
.confbar.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 32%, transparent); color: var(--ok); }
.confbar.chg { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 38%, transparent); color: var(--warn); }
.confbar.chg .cb-ok { margin-left: auto; background: var(--warn); }
.grp.conf-chg .grp-tag::before, .grp.conf-chg .fl1 > b::before { background: var(--warn) !important; }
.bitem .bdel { margin-left: 4px; font-style: normal; font-size: 12px; opacity: .35; padding: 2px 4px; border-radius: 4px; }
.bitem:hover .bdel { opacity: .8; }
.bitem .bdel:hover { opacity: 1; background: color-mix(in srgb, var(--fail) 15%, transparent); }

/* demo web (plinto.net/demo) */
.webbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 9000; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 12px; background: #0f2d4c; color: #cfe0ee; font-size: 13px; box-shadow: 0 8px 28px rgba(15,45,76,.35); max-width: calc(100vw - 24px); }
.webbar b { color: #fff; white-space: nowrap; }
.webbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.webbar .wb-x { border: 0; background: none; color: #9fb6c9; cursor: pointer; font-size: 14px; padding: 4px 6px; }
.wb-go { background: #1aa6b7; color: #fff !important; text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
@media (max-width: 760px) { .webbar span { display: none; } }
.webmodal { position: fixed; inset: 0; z-index: 9500; background: rgba(15,45,76,.35); display: grid; place-items: center; padding: 16px; }
.webmodal .wm-card { background: var(--panel, #fff); color: var(--ink, #0f2d4c); border-radius: 14px; padding: 22px; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 10px; }
.webmodal .wm-card b { font-size: 17px; }
.webmodal .wm-card p { margin: 0; color: var(--ink2, #3e5468); font-size: 14px; line-height: 1.5; }
.webmodal .wm-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.webmodal .wm-x { border: 1px solid var(--line, #d9e2ea); background: none; color: inherit; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
