:root{--bg:#0d0f11;--panel:#111315;--panel2:#181b1e;--line:#3a3d40;--text:#f1f1f1;--muted:#a3a8ad;--accent:#ff6500;--accent2:#ff8a33;--canvas:#101112;--blue:#36a9e1}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--text);font-family:Segoe UI,Arial,sans-serif;font-size:12px}button,input,select{font:inherit}
.app-shell{display:grid;grid-template-rows:64px minmax(0,1fr) 94px 18px;width:100%;height:100%;min-width:900px;background:var(--bg)}
.topbar{display:flex;align-items:center;border-bottom:1px solid #444;background:#101112;padding:6px 8px;gap:7px;overflow:hidden}.brand-mini{position:relative;flex:0 0 46px;width:46px;height:46px;border:1px solid #394047;border-radius:2px;background:#111315;overflow:hidden}.brand-mini img{width:100%;height:100%;object-fit:cover;object-position:20% 50%;display:block}.brand-mini small{position:absolute;right:2px;top:2px;font-size:7px;color:#cbd6df;background:#0008;padding:0 2px;border-radius:2px}.brand-c,.brand-ela{color:inherit}
.top-frame{position:relative;display:flex;align-items:center;gap:4px;border:0;background:transparent;padding:12px 2px 0;min-width:0;height:50px}.top-frame-title{position:absolute;left:2px;top:0;color:#aab0b5;font-size:8px;font-weight:700;letter-spacing:.8px}.toolbar-btn,.mini-btn{height:34px;min-width:34px;border:1px solid #474b4e;border-radius:1px;background:#141618;color:#eee;cursor:pointer}.toolbar-btn:hover,.mini-btn:hover{border-color:#777}.toolbar-btn:active,.toolbar-btn.active{border:2px solid var(--accent)}.toolbar-btn:disabled{opacity:.35}.icon-only{font-size:22px}.compact-text{padding:0 8px;font-size:11px}.edit-frame{flex:0 0 auto}.zoom-frame{flex:0 0 auto;margin-left:auto}.line-frame{flex:0 1 470px;max-width:560px}.perf{margin-left:auto;color:#7e8790;font-family:Consolas,monospace;font-size:9px;white-space:nowrap;padding:0 4px}
.top-control{display:flex;align-items:center;gap:3px;height:34px;color:#b8bdc1;font-size:9px;white-space:nowrap}.top-control input[type=color]{width:31px;height:27px;padding:1px;border:1px solid #4a4e51;background:#0f1011}.top-control select{height:27px;min-width:65px;background:#0f1011;border:1px solid #484c50;color:#fff;padding:0 3px}.top-control.layer-control select{min-width:88px}.top-color-control select{min-width:82px}.top-color-control input[type=color]{width:27px}.prop-color-row{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:4px}.prop-color-row input[type=color]{width:34px!important;padding:2px!important}
.workspace{display:grid;grid-template-columns:62px minmax(0,1fr) 22px;min-height:0}.leftbar{background:#0f1011;border-right:1px solid #4a4a4a;overflow:auto;padding:8px 7px}.tool-group{border:0;margin:0}.group-title,.panel-title,.bottom-title{height:17px;display:flex;align-items:center;padding:0 5px;background:#0f1011;color:#d3d6d8;font-size:8px;font-weight:700;letter-spacing:.55px;border-bottom:1px solid #454545}.group-title{justify-content:center;padding:0 1px;margin-bottom:4px}.tool{width:100%;height:38px;border:1px solid #505050;border-radius:1px;margin-bottom:3px;background:transparent;color:#ddd;display:flex;align-items:center;justify-content:center;cursor:pointer}.tool:hover{background:#181a1c}.tool.active{outline:0;border:2px solid var(--accent);background:#171819}.tool img{width:33px;height:33px;object-fit:contain;display:block}.tool.active img{filter:drop-shadow(0 0 1px rgba(255,101,0,.55))}
.canvas-wrap{position:relative;overflow:hidden;background:var(--canvas);touch-action:none}#glCanvas,#composeCanvas,#cadCanvas,#liveVectorCanvas,#overlayCanvas{position:absolute;inset:0;width:100%;height:100%}#interactionCanvas{position:absolute;left:0;top:0;display:none;pointer-events:none;transform-origin:0 0;will-change:transform;backface-visibility:hidden;contain:strict;z-index:0}#glCanvas{display:none;pointer-events:none;z-index:2;background:#24282d;contain:strict}#composeCanvas{display:none;pointer-events:none;z-index:2;background:#24282d;contain:strict}
#cadCanvas{z-index:1;transform-origin:0 0;backface-visibility:hidden}#liveVectorCanvas{display:none;pointer-events:none;z-index:2;transform-origin:0 0;will-change:transform;backface-visibility:hidden;contain:strict}#overlayCanvas{pointer-events:none;z-index:3}
.rightbar{background:#101112;border-left:1px solid #494949;display:flex;flex-direction:column;min-height:0;overflow:hidden;transition:width .16s ease;width:250px}.rightbar.collapsed{width:22px}.side-head{height:100%;min-height:0;display:flex;align-items:center;justify-content:center;background:#101112;border:0;padding:0}.side-head #sideTitle{display:none}.side-toggle{width:21px;height:92px;border:1px solid #4b4b4b;border-right:0;background:#111315;color:#ddd;cursor:pointer;font-size:16px;padding:0}.rightbar:not(.collapsed) .side-head{height:23px;justify-content:flex-end;border-bottom:1px solid #444}.rightbar:not(.collapsed) #sideTitle{display:block;margin-right:auto;padding-left:6px;font-size:8px}.rightbar:not(.collapsed) .side-toggle{height:22px;border:0;border-left:1px solid #444}.rightbar.collapsed .right-content{display:none}.right-content{display:flex;flex-direction:column;min-height:0;height:100%}.panel{border-bottom:1px solid #333}.panel-title.row{justify-content:space-between}.panel-body{padding:6px;background:#151719;min-height:36px}.layers-panel{flex:0 0 auto}.properties-panel{flex:1 1 auto;overflow:auto}.muted{color:var(--muted)}
.bottom-dock{display:grid;grid-template-columns:1.08fr 1.42fr 1.45fr;gap:8px;padding:5px 8px 4px 73px;background:#0d0f10;border-top:1px solid #494949;min-height:0}.bottom-frame{display:flex;flex-direction:column;border:1px solid #494949;background:#101112;min-width:0;overflow:hidden}.bottom-title{flex:0 0 17px}.bottom-body{flex:1;min-height:0;padding:4px 5px}.tool-options{overflow:auto}.tool-strip,.snap-strip{display:flex;align-items:center;gap:4px;overflow-x:auto;overflow-y:hidden;padding:4px 5px}.compact-tool{flex:0 0 38px;width:38px;height:38px;margin:0;border:1px solid #4d4d4d;border-radius:1px;background:transparent}.compact-tool img{width:32px;height:32px}.compact-tool.active{border:2px solid var(--accent);outline:none;background:#171819}
.status-icon-toggle{flex:0 0 36px;width:36px;height:36px;padding:0;border:1px solid #4d4d4d;border-radius:1px;background:transparent;display:flex;align-items:center;justify-content:center;cursor:pointer}.status-icon-toggle img{width:31px;height:31px;object-fit:contain}.status-icon-toggle:hover{border-color:#787878}.status-icon-toggle.active{border:2px solid var(--accent);background:#171819}
.layer-row{display:grid;grid-template-columns:20px 1fr 24px;gap:4px;align-items:center;padding:3px}.layer-row.active{background:#303337;outline:1px solid #5b6065}.layer-swatch{width:13px;height:13px;border:1px solid #aaa}.layer-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer-vis{background:none;border:0;color:#ddd;cursor:pointer}.prop-grid{display:grid;grid-template-columns:78px 1fr;gap:5px;align-items:center}.prop-grid input,.prop-grid select{min-width:0;width:100%;height:25px;background:#101112;border:1px solid #42464a;color:#fff;padding:0 5px}.prop-grid input[type=color]{padding:2px}.measure-row{display:flex;justify-content:space-between;border-bottom:1px solid #343434;padding:4px 0}.measure-row:last-child{border-bottom:0}.measure-value{font-family:Consolas,monospace;color:#fff}
.statusbar{display:flex;align-items:center;gap:8px;padding:0 6px;background:#0e0f10;border-top:1px solid #393939;color:#c2c6c9;font-size:9px}.status-spacer{flex:1}#coords{font-family:Consolas,monospace;min-width:175px;text-align:right}
.dynamic-input{position:absolute;z-index:4;display:flex;align-items:center;gap:2px;background:#0d0e0f;border:1px solid #555;box-shadow:0 1px 8px #0008;padding:2px;height:27px;pointer-events:auto}.dyn-field{display:flex;align-items:center;height:21px;background:#1b1d20;border:1px solid #3e444b}.dyn-field:focus-within{border-color:var(--accent)}.dynamic-input span{min-width:20px;padding:0 3px;color:#cfd4d8;font-size:9px;font-weight:700;text-align:center}.dynamic-input input{width:72px;height:19px;border:0;border-left:1px solid #393f45;background:#222529;color:#fff;outline:0;padding:0 4px;font-family:Consolas,monospace}.dyn-field.hidden{display:none!important}.hidden{display:none!important}.toast{position:absolute;z-index:5;left:50%;top:8px;transform:translateX(-50%);background:#101112;border:1px solid var(--accent);color:#ff7100;padding:4px 10px;border-radius:2px;box-shadow:0 3px 12px #0008;font-size:11px}.snap-label{position:absolute;pointer-events:none;z-index:3;color:#fff;background:#111d;border:1px solid #777;padding:1px 3px;font-size:9px}
.topbar .tool{width:34px;height:34px;min-width:34px;margin:0;border:1px solid #474b4e;background:#141618;font-size:18px}.topbar .tool.active{outline:none;border:2px solid var(--accent)}
.workspace.right-collapsed{grid-template-columns:62px minmax(0,1fr) 22px}
.option-strip{display:flex;align-items:center;gap:4px;flex-wrap:nowrap;min-height:39px}.option-btn{width:38px;height:38px;padding:1px;border:1px solid #4a4a4a;background:transparent;border-radius:1px;display:flex;align-items:center;justify-content:center;cursor:pointer}.option-btn img{width:32px;height:32px;object-fit:contain}.option-btn:hover{border-color:#777}.option-btn.active{border:2px solid var(--accent);background:#171819}.option-field{display:flex;align-items:center;gap:4px;color:#c6ccd1;font-size:10px}.option-field input,.option-field select{height:25px;background:#0f1011;border:1px solid #464a4e;color:#fff;padding:0 5px;min-width:55px}.option-field input[type=number]{width:62px}.option-hint{color:var(--muted);font-size:10px;margin-left:3px}.option-sep{width:1px;height:31px;background:#3a3f46;margin:0 2px}
@media(max-width:1180px){.app-shell{grid-template-rows:60px minmax(0,1fr) 90px 18px}.workspace,.workspace.right-collapsed{grid-template-columns:58px minmax(0,1fr) 20px}.leftbar{padding:6px}.tool{height:36px}.tool img{width:31px;height:31px}.bottom-dock{padding-left:67px;gap:5px}.line-frame{max-width:430px}.top-control span{display:none}.top-control.layer-control select{min-width:75px}.perf{display:none}}

/* 0.10.1 — ajuste visual tomando CADela autónomo como referencia */
.app-shell{grid-template-rows:64px minmax(0,1fr) 94px 18px}
.workspace{grid-template-columns:62px minmax(0,1fr) 22px}
.leftbar{
  position:fixed;
  left:0;
  top:64px;
  bottom:18px;
  width:62px;
  z-index:20;
  overflow:hidden;
  padding:7px 7px 6px;
  background:#0f1011;
  border-right:1px solid #4a4a4a;
}
.drawing-tools{height:100%;display:flex;flex-direction:column;align-items:stretch}
.drawing-tools .group-title{flex:0 0 17px}
.drawing-tools .tool{flex:0 0 38px}
.canvas-wrap{border-left:0}
.bottom-dock{
  grid-template-columns:1.08fr 1.42fr 1.45fr;
  column-gap:11px;
  padding:5px 8px 4px 73px;
}
.bottom-frame{border-color:#4b4b4b}
.tool,.compact-tool,.status-icon-toggle,.option-btn{background:#101112}
.tool:hover,.compact-tool:hover,.status-icon-toggle:hover,.option-btn:hover{background:#151719}
.tool.active,.compact-tool.active,.status-icon-toggle.active,.option-btn.active{background:#141516}
.tool img,.compact-tool img,.status-icon-toggle img,.option-btn img,.toolbar-btn img{
  object-fit:contain;
  display:block;
  background:transparent!important;
}
.tool img{width:34px;height:34px}
.compact-tool img{width:33px;height:33px}
.status-icon-toggle img{width:32px;height:32px}
.toolbar-btn.icon-only img{width:27px;height:27px}
.toolbar-btn.icon-only{display:flex;align-items:center;justify-content:center;padding:2px}
/* Los SVG originales ya son transparentes: no aplicar fondos/filtros artificiales */
.tool img[src$=".svg"],.compact-tool img[src$=".svg"],.status-icon-toggle img[src$=".svg"],.toolbar-btn img[src$=".svg"]{filter:none}

@media(max-width:1180px){
  .leftbar{top:60px;bottom:18px;width:58px;padding:6px}
  .bottom-dock{padding-left:67px;column-gap:9px}
}


/* 0.10.2 — corrección de grid con barra de dibujo fija */
.workspace{grid-template-columns:62px minmax(0,1fr) 250px!important;position:relative}
.workspace.right-collapsed{grid-template-columns:62px minmax(0,1fr) 22px!important}
.canvas-wrap{grid-column:2!important;min-width:0}
.rightbar{grid-column:3!important;grid-row:1!important;width:auto!important;min-width:0}
.rightbar.collapsed{width:auto!important}
.leftbar{grid-column:1!important}
@media(max-width:1180px){
  .workspace{grid-template-columns:58px minmax(0,1fr) 230px!important}
  .workspace.right-collapsed{grid-template-columns:58px minmax(0,1fr) 20px!important}
}

/* 0.10.2 — corrección de grid con barra de dibujo fija */
.workspace{grid-template-columns:62px minmax(0,1fr) 250px!important;position:relative}
.workspace.right-collapsed{grid-template-columns:62px minmax(0,1fr) 22px!important}
.canvas-wrap{grid-column:2!important;min-width:0}
.rightbar{grid-column:3!important;grid-row:1!important;width:auto!important;min-width:0}
.rightbar.collapsed{width:auto!important}
.leftbar{grid-column:1!important}
@media(max-width:1180px){
  .workspace{grid-template-columns:58px minmax(0,1fr) 230px!important}
  .workspace.right-collapsed{grid-template-columns:58px minmax(0,1fr) 20px!important}
}


/* 0.10.3 — entrada dinámica tipo CADela y fondos homogéneos */
.dynamic-input{background:transparent;border:0;box-shadow:none;padding:0;height:25px;gap:4px;pointer-events:none}
.dyn-field{height:24px;background:#111315;border:1px solid #7a7f84;box-shadow:0 1px 3px #0009;pointer-events:auto}
.dyn-field:focus-within{border:2px solid var(--accent)}
.dynamic-input span{min-width:22px;color:#f2f2f2;background:#181b1e;font-size:9px;padding:0 3px}
.dynamic-input input{height:22px;width:67px;background:#0f1113;color:#fff;border-left:1px solid #4d5256;font-size:11px;padding:0 4px}
.tool img,.compact-tool img,.status-icon-toggle img,.option-btn img{background:transparent!important}

/* 0.10.4 — estructura inferior fiel a CADela */
.leftbar{display:flex;flex-direction:column}
.drawing-tools{flex:0 0 auto;height:auto}
.leftbar-spacer{flex:1 1 auto;min-height:8px}
.leftbar-bottom-tools{display:flex;flex-direction:column;gap:3px;padding-bottom:1px}
.leftbar-bottom-tools .tool{margin:0}
.bottom-dock{grid-template-columns:1.08fr 1.42fr .98fr 76px;column-gap:11px;align-items:stretch}
.snaps-frame{min-width:0}
.snap-strip{gap:3px;padding:4px 5px;overflow-x:auto}
.snap-side-controls{display:flex;align-items:center;justify-content:center;gap:4px;background:#0d0f10;border:0;padding:0 4px}
.snap-side-controls .status-icon-toggle{width:34px;height:34px;flex:0 0 34px}
.snap-side-controls .status-icon-toggle img{width:29px;height:29px}
.rightbar.collapsed .side-head{height:100%}
.rightbar.collapsed .side-toggle{height:92px}
@media(max-width:1180px){.bottom-dock{grid-template-columns:1.08fr 1.35fr .9fr 70px;column-gap:8px}.snap-side-controls{gap:2px;padding:0 2px}.snap-side-controls .status-icon-toggle{width:32px;height:32px;flex-basis:32px}}

/* 0.10.5 — botones de Dibujo cuadrados como en CADela autónomo */
.drawing-tools .tool,
.leftbar-bottom-tools .tool{
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
  align-self:center;
  flex:0 0 38px!important;
  padding:1px;
}
.drawing-tools .tool img,
.leftbar-bottom-tools .tool img{
  width:33px!important;
  height:33px!important;
  max-width:33px!important;
  max-height:33px!important;
  object-fit:contain;
}
@media(max-width:1180px){
  .drawing-tools .tool,
  .leftbar-bottom-tools .tool{
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    flex-basis:36px!important;
  }
  .drawing-tools .tool img,
  .leftbar-bottom-tools .tool img{
    width:31px!important;
    height:31px!important;
  }
}

/* 0.11.2 — snaps apilados como CADela y campo de texto utilizable */
.bottom-dock{grid-template-columns:1.08fr 1.42fr 1.10fr!important;column-gap:11px!important}
.snap-stack{display:grid;grid-template-rows:38px minmax(0,1fr);gap:3px;min-width:0;align-self:stretch}
.snap-side-controls{display:flex;align-items:center;justify-content:flex-start;gap:4px;padding:0 5px;background:#0d0f10}
.snap-side-controls .status-icon-toggle{width:34px;height:34px;flex:0 0 34px}
.snaps-frame{min-width:0}
.snap-strip{overflow-x:visible!important;gap:4px;padding:4px 5px}
.text-content-input{width:190px!important;min-width:190px!important}
@media(max-width:1180px){
  .bottom-dock{grid-template-columns:1.05fr 1.35fr 1fr!important;column-gap:8px!important}
  .snap-stack{grid-template-rows:34px minmax(0,1fr)}
  .snap-side-controls .status-icon-toggle{width:32px;height:32px;flex-basis:32px}
  .text-content-input{width:150px!important;min-width:150px!important}
}
.snap-stack{grid-template-rows:31px minmax(0,1fr)!important;gap:2px!important}
.snap-side-controls .status-icon-toggle{width:30px!important;height:30px!important;flex-basis:30px!important}
.snap-side-controls .status-icon-toggle img{width:26px!important;height:26px!important}
.snaps-frame .status-icon-toggle{width:32px;height:32px;flex-basis:32px}
.snaps-frame .status-icon-toggle img{width:28px;height:28px}
.snaps-frame .snap-strip{padding:2px 4px!important}

/* 0.13.0 — WebGL2 experimental para interacción con dibujos grandes */
#glCanvas,#composeCanvas{image-rendering:auto}


/* 0.15.9 — coordenadas dinámicas: réplica visual y geométrica de CADela original */
.dynamic-input{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;z-index:4!important;display:block!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;pointer-events:none!important}
.dynamic-input.hidden{display:none!important}
.dyn-field{position:absolute!important;display:block!important;box-sizing:border-box!important;width:64px!important;height:22px!important;min-width:64px!important;background:#111111!important;border:1px solid #1f1f1f!important;border-radius:0!important;box-shadow:none!important;padding:0!important;pointer-events:auto!important}
.dyn-field.hidden{display:none!important}
.dyn-field input{box-sizing:border-box!important;width:62px!important;height:20px!important;margin:0!important;padding:0 2px!important;border:0!important;background:#111111!important;color:#ffffff!important;outline:0!important;text-align:center!important;font-family:Arial,sans-serif!important;font-size:10.6667px!important;font-weight:600!important;line-height:20px!important;caret-color:#ffffff!important}
.dyn-field.active{background:#2f73b7!important;border-color:#2f73b7!important}
.dyn-field.active input{background:#2f73b7!important;color:#ffffff!important}
.dyn-angle-suffix{position:absolute!important;box-sizing:border-box!important;width:11px!important;height:22px!important;background:#111111!important;color:#ffffff!important;border:1px solid #1f1f1f!important;border-left:0!important;font-family:Arial,sans-serif!important;font-size:12px!important;font-weight:700!important;line-height:20px!important;text-align:left!important;padding:0!important;pointer-events:none!important}
.dyn-angle-suffix.active{background:#2f73b7!important;color:#fff!important;border-color:#2f73b7!important}

/* 0.16.0 — frames superior/inferiores más fieles a CADela original */
.app-shell{grid-template-rows:60px minmax(0,1fr) 68px 18px!important}
.topbar{position:relative;display:flex!important;align-items:center!important;height:60px!important;padding:0 10px!important;gap:20px!important;background:#0d0f10!important;border-bottom:0!important;overflow:visible!important}
.brand-mini{flex:0 0 41px!important;width:41px!important;height:41px!important;border:0!important;background:#0d0d0d!important;border-radius:0!important}
.brand-mini small{display:none!important}
.top-frame{height:49px!important;display:flex!important;align-items:center!important;gap:4px!important;border:1px solid #34383b!important;background:#0d0d0d!important;padding:6px 8px!important;overflow:visible!important}
.top-frame-title{display:none!important}
.edit-frame{flex:0 0 auto!important}
.zoom-frame{position:absolute!important;left:50%!important;top:5px!important;transform:translateX(-50%)!important;margin:0!important;z-index:3}
.line-frame{margin-left:auto!important;flex:0 0 auto!important;max-width:none!important;gap:7px!important}
.toolbar-btn,.topbar .tool{width:36px!important;min-width:36px!important;height:36px!important;background:#0d0d0d!important;border:0!important;border-radius:1px!important;padding:0!important}
.toolbar-btn.compact-text{width:auto!important;min-width:45px!important;border:1px solid #3f4346!important;padding:0 7px!important;font-size:10px!important}
.toolbar-btn:hover,.topbar .tool:hover{border:1px solid #656a6e!important}
.toolbar-btn.active,.topbar .tool.active{border:1px solid var(--accent)!important}
.toolbar-btn.icon-only img{width:35px!important;height:35px!important}
.top-control{height:36px!important;font-size:9px!important;gap:4px!important}.top-control select{height:30px!important;background:#111315!important}.top-control input[type=color]{height:30px!important}
.perf{position:absolute!important;right:5px!important;bottom:1px!important;font-size:8px!important}

.leftbar{top:60px!important;bottom:18px!important;background:#0d0f10!important;border-right:0!important;padding-top:5px!important}
.group-title{border:0!important;background:transparent!important;color:#cfd2d4!important;height:14px!important;margin-bottom:3px!important}
.drawing-tools .tool,.leftbar-bottom-tools .tool{background:#0d0d0d!important;border:0!important}
.drawing-tools .tool:hover,.leftbar-bottom-tools .tool:hover{border:1px solid #5c6165!important}
.drawing-tools .tool.active,.leftbar-bottom-tools .tool.active{border:1px solid var(--accent)!important}

.bottom-dock{height:68px!important;display:grid!important;grid-template-columns:minmax(270px,1.05fr) minmax(520px,1.7fr) minmax(270px,1.05fr)!important;column-gap:12px!important;align-items:end!important;padding:12px 10px 5px 72px!important;background:#0d0f10!important;border-top:0!important;overflow:visible!important}
.bottom-frame{position:relative!important;height:49px!important;display:flex!important;flex-direction:column!important;border:1px solid #424649!important;background:#0d0d0d!important;overflow:visible!important}
.bottom-title{position:absolute!important;left:5px!important;top:-10px!important;height:12px!important;line-height:12px!important;padding:0 4px!important;background:#0d0f10!important;border:0!important;color:#cfd2d4!important;font-size:8px!important;z-index:2}
.bottom-body{height:47px!important;min-height:47px!important;padding:4px 5px!important;overflow:auto!important}
.tool-options{display:flex!important;align-items:center!important;overflow-x:auto!important;overflow-y:hidden!important}
.tool-strip,.snap-strip{height:47px!important;padding:4px 5px!important;gap:4px!important;overflow-x:auto!important;overflow-y:hidden!important}
.compact-tool{width:36px!important;min-width:36px!important;height:36px!important;flex:0 0 36px!important;border:0!important;background:#0d0d0d!important}
.compact-tool img{width:35px!important;height:35px!important}
.compact-tool:hover{border:1px solid #5c6165!important}.compact-tool.active{border:1px solid var(--accent)!important;background:#0d0d0d!important}
.snap-stack{height:49px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;grid-template-rows:49px!important;gap:6px!important;align-items:stretch!important}
.snap-side-controls{height:49px!important;display:flex!important;align-items:center!important;gap:3px!important;padding:5px 0!important;background:#0d0f10!important}
.snap-side-controls .status-icon-toggle{width:36px!important;height:36px!important;flex:0 0 36px!important}
.snaps-frame{height:49px!important}.snaps-frame .status-icon-toggle{width:34px!important;height:34px!important;flex:0 0 34px!important;border:0!important;background:#0d0d0d!important}.snaps-frame .status-icon-toggle img{width:32px!important;height:32px!important}.snaps-frame .status-icon-toggle.active{border:1px solid var(--accent)!important}
.option-strip{min-height:36px!important;height:36px!important}.option-btn{width:36px!important;height:36px!important;flex:0 0 36px!important;border:0!important;background:#0d0d0d!important}.option-btn img{width:35px!important;height:35px!important}.option-btn.active{border:1px solid var(--accent)!important;background:#0d0d0d!important}
.option-field input,.option-field select{height:27px!important}
.blocks-panel{flex:0 0 auto}.block-row{display:grid;grid-template-columns:1fr 28px 28px;gap:3px;align-items:center;padding:3px 2px;border-bottom:1px solid #2c2f32}.block-row:last-child{border-bottom:0}.block-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.block-action{width:26px;height:24px;border:1px solid #45494d;background:#101214;color:#ddd;cursor:pointer}.block-action:hover{border-color:var(--accent);color:var(--accent)}

@media(max-width:1240px){
  .bottom-dock{grid-template-columns:minmax(240px,.95fr) minmax(430px,1.55fr) minmax(245px,.95fr)!important;column-gap:8px!important}
  .topbar{gap:10px!important}.line-frame .top-control span{display:none!important}.line-frame{gap:4px!important}.toolbar-btn.compact-text{min-width:40px!important;padding:0 5px!important}
}

/* 0.16.1 — ORTO/SNAP sobre SNAPS, más espacio para Opciones y fullscreen aislado */
.app-shell{grid-template-rows:60px minmax(0,1fr) 88px 18px!important}
.topbar{gap:16px!important}
.zoom-frame{display:none!important}
.line-frame{margin-left:auto!important}
.top-fullscreen-btn{
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  height:40px!important;
  margin-left:2px!important;
  margin-right:0!important;
  align-self:center!important;
  font-size:23px!important;
  border:1px solid #3f4346!important;
  background:#0d0d0d!important;
}
.top-fullscreen-btn:hover{border-color:#656a6e!important}
.perf{right:55px!important}

.bottom-dock{
  height:88px!important;
  grid-template-columns:minmax(350px,1.28fr) minmax(500px,1.58fr) minmax(290px,.92fr)!important;
  column-gap:12px!important;
  align-items:end!important;
  padding:31px 10px 5px 72px!important;
}
.options-frame,.modify-frame{height:49px!important}
.snap-stack{
  position:relative!important;
  height:78px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:27px 49px!important;
  gap:2px!important;
  align-self:end!important;
  min-width:0!important;
}
.snap-side-controls{
  height:27px!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-start!important;
  gap:4px!important;
  padding:0 5px 1px!important;
  background:#0d0f10!important;
}
.snap-side-controls .status-icon-toggle{
  width:27px!important;
  height:27px!important;
  flex:0 0 27px!important;
  border:0!important;
  background:#0d0d0d!important;
}
.snap-side-controls .status-icon-toggle img{width:25px!important;height:25px!important}
.snap-side-controls .status-icon-toggle.active{border:1px solid var(--accent)!important}
.snaps-frame{height:49px!important;min-width:0!important}
.snaps-frame .snap-strip{overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important}

@media(max-width:1240px){
  .bottom-dock{grid-template-columns:minmax(300px,1.12fr) minmax(430px,1.48fr) minmax(250px,.9fr)!important;column-gap:8px!important;padding-left:67px!important}
  .topbar{gap:8px!important}
  .top-fullscreen-btn{flex-basis:38px!important;width:38px!important;min-width:38px!important}
  .perf{display:none!important}
}

/* 0.16.2 — zoom recuperado, frame ORTO/SNAP independiente, Modificar más ancho e Imprimir */
.app-shell{grid-template-rows:60px minmax(0,1fr) 88px 18px!important}
.topbar{gap:16px!important}
.zoom-frame{
  display:flex!important;
  position:absolute!important;
  left:50%!important;
  top:5px!important;
  transform:translateX(-50%)!important;
  margin:0!important;
  z-index:3!important;
}
.top-right-actions{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  margin-left:0!important;
}
.top-print-btn,.top-fullscreen-btn{
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  height:40px!important;
  margin:0!important;
  align-self:center!important;
  border:1px solid #3f4346!important;
  background:#0d0d0d!important;
}
.top-print-btn img{width:35px!important;height:35px!important;object-fit:contain!important}
.top-fullscreen-btn{font-size:23px!important}
.top-print-btn:hover,.top-fullscreen-btn:hover{border-color:#656a6e!important}
.perf{right:93px!important}

.bottom-dock{
  height:88px!important;
  grid-template-columns:minmax(290px,.88fr) minmax(550px,1.70fr) minmax(300px,.96fr)!important;
  column-gap:12px!important;
  align-items:end!important;
  padding:31px 10px 5px 72px!important;
}
.options-frame,.modify-frame{height:49px!important}
.modify-frame .tool-strip{
  overflow-x:visible!important;
  overflow-y:hidden!important;
  flex-wrap:nowrap!important;
}
.snap-stack{
  position:relative!important;
  height:78px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:27px 49px!important;
  gap:2px!important;
  align-self:end!important;
  min-width:0!important;
}
.snap-side-controls{
  box-sizing:border-box!important;
  width:max-content!important;
  min-width:66px!important;
  max-width:max-content!important;
  height:29px!important;
  justify-self:start!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:3px!important;
  padding:1px 3px!important;
  border:1px solid #424649!important;
  background:#0d0d0d!important;
  overflow:visible!important;
}
.snap-side-controls .status-icon-toggle{
  width:25px!important;
  height:25px!important;
  flex:0 0 25px!important;
  border:0!important;
  background:#0d0d0d!important;
}
.snap-side-controls .status-icon-toggle img{width:23px!important;height:23px!important;object-fit:contain!important}
.snap-side-controls .status-icon-toggle.active{border:1px solid var(--accent)!important}
.snaps-frame{height:49px!important;min-width:0!important}

@media(max-width:1240px){
  .bottom-dock{grid-template-columns:minmax(250px,.8fr) minmax(525px,1.65fr) minmax(260px,.9fr)!important;column-gap:8px!important;padding-left:67px!important}
  .topbar{gap:8px!important}
  .top-print-btn,.top-fullscreen-btn{flex-basis:38px!important;width:38px!important;min-width:38px!important}
  .perf{display:none!important}
}


/* 0.16.3 — franja inferior replicada del CADela original */
.app-shell{
  grid-template-rows:60px minmax(0,1fr) 74px 18px!important;
}

/* En el original Capa está junto a Opciones, no en las propiedades de línea superiores. */
.line-frame .layer-control{display:none!important}

.bottom-dock{
  position:relative!important;
  box-sizing:border-box!important;
  height:74px!important;
  display:grid!important;
  grid-template-columns:366px minmax(526px,1fr) 300px!important;
  column-gap:10px!important;
  align-items:end!important;
  padding:0 10px 9px 73px!important;
  background:#0d0f10!important;
  border-top:0!important;
  overflow:visible!important;
}

.bottom-frame{
  position:relative!important;
  box-sizing:border-box!important;
  height:64px!important;
  min-height:64px!important;
  border:1px solid #55595d!important;
  border-radius:2px!important;
  background:#0d0d0d!important;
  overflow:visible!important;
}

/* Títulos dentro del marco, como CADela: Opciones a la izquierda, Snaps a la derecha.
   Modificar no lleva título. */
.bottom-title{
  position:absolute!important;
  top:4px!important;
  left:7px!important;
  right:auto!important;
  height:13px!important;
  line-height:13px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  color:#e6e7e8!important;
  font-family:Arial,sans-serif!important;
  font-size:11px!important;
  font-weight:400!important;
  letter-spacing:0!important;
  z-index:3!important;
  pointer-events:none!important;
}
.snaps-title{
  left:auto!important;
  right:6px!important;
  color:#e6e7e8!important;
  text-align:right!important;
  font-weight:600!important;
}
.modify-frame .bottom-title{display:none!important}

/* El contenido queda centrado en el hueco útil del marco. */
.bottom-body{
  box-sizing:border-box!important;
  height:62px!important;
  min-height:62px!important;
  padding:18px 6px 4px!important;
  overflow:hidden!important;
}
.modify-frame .bottom-body{
  padding:5px 8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.tool-options{
  display:flex!important;
  align-items:center!important;
  overflow:hidden!important;
}
.tool-strip{
  height:auto!important;
  min-height:0!important;
  padding:0!important;
  gap:4px!important;
  overflow:visible!important;
  flex-wrap:nowrap!important;
}
.snap-strip{
  height:auto!important;
  min-height:0!important;
  padding:0 5px!important;
  gap:2px!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
}

/* Botones: tamaño visual del original. */
.compact-tool{
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  flex:0 0 38px!important;
  border:1px solid #373b3e!important;
  background:#0d0d0d!important;
}
.compact-tool img{width:35px!important;height:35px!important}
.compact-tool:hover{border-color:#686d71!important}
.compact-tool.active{border:2px solid var(--accent)!important}

.option-strip{
  width:100%!important;
  min-height:38px!important;
  height:38px!important;
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  overflow:hidden!important;
}
.option-btn{
  width:38px!important;
  height:38px!important;
  flex:0 0 38px!important;
  border:1px solid #373b3e!important;
  background:#0d0d0d!important;
}
.option-btn img{width:35px!important;height:35px!important}
.option-btn.active{border:2px solid var(--accent)!important}
.option-field{height:28px!important;white-space:nowrap!important}
.option-field input,.option-field select{height:26px!important}

/* Selector de capa, 4 px por encima de Opciones y alineado con su borde izquierdo. */
.bottom-layer-control{
  position:absolute!important;
  left:0!important;
  top:-31px!important;
  box-sizing:border-box!important;
  width:150px!important;
  height:26px!important;
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  padding:1px 5px!important;
  border:1px solid #55595d!important;
  border-radius:2px!important;
  background:#0d0d0d!important;
  color:#f1f1f1!important;
  font-size:11px!important;
  z-index:5!important;
}
.bottom-layer-control span{flex:0 0 auto!important}
.bottom-layer-control select{
  flex:1 1 auto!important;
  min-width:0!important;
  height:22px!important;
  border:0!important;
  background:#0d0d0d!important;
  color:#fff!important;
  outline:0!important;
}

/* Snaps: marco principal de 300 px y ORTO/SNAP general flotando 5 px por encima,
   alineados a la derecha, igual que en CADela. */
.snap-stack{
  position:relative!important;
  box-sizing:border-box!important;
  height:64px!important;
  min-height:64px!important;
  display:block!important;
  align-self:end!important;
  min-width:0!important;
}
.snaps-frame{
  width:100%!important;
  height:64px!important;
  min-height:64px!important;
}
.snaps-frame .bottom-body{padding:18px 5px 4px!important}
.snaps-frame .status-icon-toggle{
  width:31px!important;
  min-width:31px!important;
  height:36px!important;
  flex:0 0 31px!important;
  border:1px solid #373b3e!important;
  background:#0d0d0d!important;
  padding:0!important;
}
.snaps-frame .status-icon-toggle img{
  width:29px!important;
  height:29px!important;
  object-fit:contain!important;
}
.snaps-frame .status-icon-toggle.active{
  border:2px solid var(--accent)!important;
}

.snap-side-controls{
  position:absolute!important;
  right:0!important;
  top:-41px!important;
  box-sizing:border-box!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:36px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:4px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
  z-index:6!important;
}
.snap-side-controls .status-icon-toggle{
  width:36px!important;
  min-width:36px!important;
  height:36px!important;
  flex:0 0 36px!important;
  border:1px solid #55595d!important;
  background:#0d0d0d!important;
  padding:0!important;
}
.snap-side-controls .status-icon-toggle img{
  width:32px!important;
  height:32px!important;
  object-fit:contain!important;
}
.snap-side-controls .status-icon-toggle.active{
  border:2px solid var(--accent)!important;
}

@media(max-width:1240px){
  .bottom-dock{
    grid-template-columns:330px minmax(470px,1fr) 282px!important;
    column-gap:8px!important;
    padding-left:67px!important;
    padding-right:8px!important;
  }
  .compact-tool{width:35px!important;min-width:35px!important;height:35px!important;flex-basis:35px!important}
  .compact-tool img{width:32px!important;height:32px!important}
  .snaps-frame .status-icon-toggle{width:29px!important;min-width:29px!important;flex-basis:29px!important}
  .snaps-frame .status-icon-toggle img{width:27px!important;height:27px!important}
}

/* 0.16.4 · iconos de capas del CADela original */
.icon-mini{display:flex;align-items:center;justify-content:center;padding:0;background:#0d0d0d!important}
.icon-mini img{width:30px;height:30px;object-fit:contain;display:block}
.layer-row{grid-template-columns:18px minmax(0,1fr) 25px 25px!important;gap:3px!important;padding:3px 2px!important}
.layer-icon{width:24px;height:24px;padding:0;border:0;background:#0d0d0d;display:flex;align-items:center;justify-content:center;cursor:pointer}
.layer-icon:hover{outline:1px solid #5d6266}
.layer-icon img{width:23px;height:23px;object-fit:contain;display:block;background:#0d0d0d}
.layer-swatch{width:12px!important;height:12px!important}


/* 0.16.7 — splash CADela: imagen completa, idioma automático y cierre en cualquier pulsación */
.cadela-splash{
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#07131e;
  opacity:1;
  visibility:visible;
  transition:opacity .22s ease,visibility .22s ease;
  touch-action:manipulation;
  user-select:none;
  -webkit-user-select:none;
}
.cadela-splash img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center center;
  pointer-events:none;
}
.cadela-splash.splash-hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
@media (max-aspect-ratio: 4/3){
  .cadela-splash img{object-fit:cover;}
}

/* 0.16.11 — paridad CADela original: Cotas, Capas y acciones superiores */
.layer-row.simple{
  display:grid!important;
  grid-template-columns:18px minmax(0,1fr) auto!important;
  gap:5px!important;
  align-items:center!important;
  padding:3px 4px!important;
  min-height:25px!important;
  cursor:pointer!important;
}
.layer-row.simple:hover{background:#1b1d1f!important}
.layer-row.simple.active{background:#303337!important;outline:1px solid #5b6065!important}
.layer-row.simple .layer-state-text{
  color:#9ea4a8!important;
  font-size:9px!important;
  white-space:nowrap!important;
  letter-spacing:.1px!important;
}
.dimension-option-strip,.layer-option-strip{
  justify-content:flex-start!important;
  gap:3px!important;
}
.dimension-option-strip .option-btn{
  width:36px!important;
  min-width:36px!important;
  height:36px!important;
  flex:0 0 36px!important;
  border:0!important;
  background:#0d0d0d!important;
  padding:1px!important;
}
.dimension-option-strip .option-btn img{
  width:32px!important;
  height:32px!important;
  object-fit:contain!important;
  background:#0d0d0d!important;
}
.dimension-option-strip .option-btn.active{
  border:1px solid var(--accent)!important;
}
.dimension-option-strip .dimension-settings-blender{display:flex!important;align-items:center!important;justify-content:center!important;color:#f2f2f2!important;font-family:Arial,"Segoe UI Symbol",sans-serif!important;}
.dimension-option-strip .dimension-settings-blender span{display:block!important;font-size:19px!important;font-weight:400!important;line-height:1!important;transform:translateY(-.5px)!important;}
.layer-option-strip .option-btn{
  width:36px!important;
  min-width:36px!important;
  height:36px!important;
  flex:0 0 36px!important;
  border:0!important;
  background:#0d0d0d!important;
  padding:0!important;
}
.layer-option-strip .option-btn img{
  width:35px!important;
  height:35px!important;
  object-fit:contain!important;
  background:#0d0d0d!important;
}
.layer-option-strip .option-btn:hover,
.dimension-option-strip .option-btn:hover{outline:1px solid #656a6e!important}

.floating-settings{
  position:fixed!important;
  inset:0!important;
  z-index:120000!important;
  display:none!important;
  align-items:center!important;
  justify-content:center!important;
  background:rgba(0,0,0,.38)!important;
}
.floating-settings.open{display:flex!important}
.floating-settings-card{
  box-sizing:border-box!important;
  width:268px!important;
  min-width:245px!important;
  background:#202224!important;
  color:#fff!important;
  border:1px solid #55595d!important;
  padding:12px 14px!important;
  box-shadow:0 12px 30px rgba(0,0,0,.55)!important;
  display:grid!important;
  gap:7px!important;
  font-size:12px!important;
}
.floating-settings-title{font-size:13px!important;font-weight:700!important;margin-bottom:2px!important}
.floating-settings-card label{
  display:grid!important;
  grid-template-columns:1fr 122px!important;
  gap:12px!important;
  align-items:center!important;
  color:#fff!important;
}
.floating-settings-card input,.floating-settings-card select{
  box-sizing:border-box!important;
  width:100%!important;
  height:26px!important;
  background:#202020!important;
  color:#fff!important;
  border:1px solid #555!important;
  padding:2px 4px!important;
}
.floating-settings-card button{
  justify-self:end!important;
  width:78px!important;
  height:28px!important;
  background:#4b4b4b!important;
  color:#fff!important;
  border:0!important;
  border-radius:3px!important;
  cursor:pointer!important;
}
.floating-settings-card button:hover{background:#5b5b5b!important}

/* El extremo superior derecho usa exactamente el mismo fondo que los frames. */
.top-right-actions{background:#0d0d0d!important;border:1px solid #34383b!important;padding:4px!important;box-sizing:border-box!important}
.top-right-actions .toolbar-btn,
.top-print-btn,.top-fullscreen-btn{background:#0d0d0d!important;border-color:#3f4346!important}

/* 0.16.12 · Ventanas flotantes de Capas y Hatch como CADela original */
.layers-panel{display:none!important}
.cad-floating-window{
  position:fixed;display:none;z-index:120100;box-sizing:border-box;
  min-width:320px;min-height:220px;max-width:calc(100vw - 18px);max-height:calc(100vh - 18px);
  background:#171717;color:#f2f2f2;border:1px solid #565a5d;border-radius:2px;
  box-shadow:0 14px 34px rgba(0,0,0,.62);overflow:hidden;resize:both;
  font-size:12px
}
.cad-floating-window.open{display:flex;flex-direction:column}
.cad-floating-titlebar{height:32px;min-height:32px;display:flex;align-items:center;gap:8px;padding:0 7px 0 10px;background:#242628;border-bottom:1px solid #4a4e51;cursor:move;user-select:none}
.cad-floating-title{font-weight:600;flex:1;color:#f2f2f2}
.cad-floating-close{width:25px;height:24px;background:#242628;color:#ddd;border:1px solid transparent;font-size:18px;line-height:18px;cursor:pointer}
.cad-floating-close:hover{border-color:var(--accent);color:#fff}
.cad-floating-content{min-height:0;flex:1;overflow:auto;padding:10px;background:#171717}

.layer-manager-table{height:calc(100% - 46px);min-height:220px;border:1px solid #444;background:#171717;display:flex;flex-direction:column}
.layer-manager-head,.layer-manager-row{display:grid;grid-template-columns:54px minmax(150px,1fr) 180px 126px 92px 66px 76px 76px;align-items:center}
.layer-manager-head{min-height:31px;background:#2b2b2b;border-bottom:1px solid #555;font-weight:600}
.layer-manager-head>span{padding:5px;border-right:1px solid #454545;text-align:center}
.layer-manager-rows{overflow:auto;flex:1}
.layer-manager-row{min-height:31px;border-bottom:1px solid #353535;background:#171717}
.layer-manager-row:nth-child(even){background:#202020}.layer-manager-row.active{background:#3a2a12}
.layer-manager-row>*{box-sizing:border-box;min-width:0}
.layer-current{height:28px;border:0;background:transparent;color:var(--accent);font-size:15px;cursor:pointer}
.layer-manager-name{padding:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.layer-manager-color{height:25px;margin:2px 5px;border:1px solid #777;color:#fff;text-shadow:0 1px 2px #000;font-size:9px;cursor:pointer}.layer-manager-color-cell{display:grid;grid-template-columns:minmax(0,1fr) 30px;gap:3px;padding:2px 4px}.layer-manager-color-cell select,.layer-manager-row select{height:25px;min-width:0;background:#101112;border:1px solid #505050;color:#fff;font-size:9px}.layer-manager-color-cell input[type=color]{width:30px;height:25px;padding:1px;border:1px solid #555;background:#111}
.layer-manager-row input[type=checkbox]{width:15px;height:15px;justify-self:center;accent-color:var(--accent)}
.layer-manager-actions{height:38px;display:grid;grid-template-columns:auto auto auto auto 1fr auto;gap:6px;align-items:end;padding-top:8px}
.layer-manager-actions button,.hatch-manager-footer button,.hatch-props-box button,.hatch-edit-actions button{background:#292929;color:#fff;border:1px solid #555;border-radius:3px;padding:6px 12px;cursor:pointer}
.layer-manager-actions button:hover,.hatch-manager-footer button:hover,.hatch-props-box button:hover,.hatch-edit-actions button:hover{border-color:var(--accent);background:#333}

.hatch-window-title{font-size:13px;font-weight:700;margin-bottom:9px;color:#fff}
.hatch-manager-body{display:grid;grid-template-columns:minmax(315px,3fr) minmax(205px,2fr);gap:12px;height:calc(100% - 72px);min-height:335px}
.hatch-gallery-box,.hatch-props-box{min-width:0;border:1px solid #555;border-radius:3px;color:#fff;padding:9px;margin:0}
.hatch-gallery-box legend,.hatch-props-box legend{padding:0 4px;color:#fff}
.hatch-gallery{height:100%;overflow:auto;display:grid;grid-template-columns:repeat(3,104px);grid-auto-rows:76px;gap:5px;align-content:start}
.hatch-pattern-btn{width:104px;height:76px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:#0d0d0d;color:#fff;border:1px solid #555;padding:2px;cursor:pointer}
.hatch-pattern-btn canvas{display:block}.hatch-pattern-btn span{font-size:9px;max-width:98px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hatch-pattern-btn:hover{border-color:#888}.hatch-pattern-btn.active{border-color:var(--accent)}
.hatch-props-box{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.hatch-big-preview{width:190px;height:118px;align-self:center;background:#0d0d0d;border:1px solid #666;display:flex;align-items:center;justify-content:center}
.hatch-current-name{text-align:center;font-weight:600}
.hatch-props-box label,.hatch-edit-form label{display:grid;grid-template-columns:1fr 95px;gap:10px;align-items:center}
.hatch-props-box input,.hatch-edit-form input,.hatch-edit-form select{height:26px;box-sizing:border-box;background:#202020;color:#fff;border:1px solid #555;padding:2px 4px}
.hatch-method{color:#cfcfcf;padding:3px 0}.hatch-manager-footer{display:flex;align-items:center;gap:12px;padding-top:9px;color:#cfcfcf}.hatch-manager-footer span{flex:1}
.hatch-edit-form{display:grid;gap:10px}.hatch-edit-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:8px}
.hatch-option-strip .option-btn{width:36px!important;height:36px!important;background:#0d0d0d!important;border:0!important}
.hatch-option-strip .option-btn.active{border:1px solid var(--accent)!important}

@media(max-width:760px){.cad-floating-window{max-width:calc(100vw - 8px)!important;width:calc(100vw - 8px)!important;left:4px!important;transform:none!important}.layer-manager-head,.layer-manager-row{grid-template-columns:44px minmax(110px,1fr) 76px 55px 62px 62px}.hatch-manager-body{grid-template-columns:1fr}.hatch-gallery-box{min-height:210px}.hatch-gallery{grid-template-columns:repeat(3,92px)}.hatch-pattern-btn{width:92px}}

/* 0.16.13 · Texto e impresión con paridad CADela original */
.text-option-strip{align-items:center;gap:8px}
.text-editor-form{display:flex;flex-direction:column;gap:8px;color:#fff}
.text-editor-label{font-weight:600}
.text-editor-form textarea,
.text-editor-form input,
.text-editor-form select{box-sizing:border-box;background:#111;color:#fff;border:1px solid var(--accent);border-radius:3px;padding:5px;font:inherit}
.text-editor-form textarea{min-height:125px;resize:vertical;padding:7px}
.text-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}
.text-editor-grid>label{display:grid;grid-template-columns:1fr minmax(135px,190px);align-items:center;gap:8px}
.text-check-row{display:flex;gap:14px;align-items:center}
.text-check-row label{display:flex;gap:6px;align-items:center}
.text-editor-hint{color:#d4d4d4;line-height:1.35;padding-top:3px}
.text-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:auto}
.text-editor-actions button,
.print-dialog-actions button,
.print-options button{background:#292929;color:#fff;border:1px solid var(--accent);border-radius:3px;padding:6px 14px;cursor:pointer}
.text-editor-actions button:hover,.print-dialog-actions button:hover,.print-options button:hover{background:#3a3a3a}

.print-dialog-window .cad-floating-content{padding:10px;background:#333;overflow:hidden}
.print-dialog-layout{display:grid;grid-template-columns:340px minmax(0,1fr);gap:10px;height:100%}
.print-options{overflow:auto;padding-right:2px;display:flex;flex-direction:column;gap:7px}
.print-options fieldset{border:1px solid #555;border-radius:4px;margin:0;padding:10px;color:#fff}
.print-options legend{padding:0 4px;color:#fff}
.print-options label{display:grid;grid-template-columns:115px 1fr;align-items:center;gap:8px;margin:5px 0;color:#fff}
.print-options select,.print-options input[type=number]{box-sizing:border-box;width:100%;background:#111;color:#fff;border:1px solid var(--accent);border-radius:3px;padding:4px}
.print-options .print-check{display:flex;grid-template-columns:none;align-items:center;gap:7px}
.print-options input[type=checkbox]{accent-color:var(--accent)}
.print-margin-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px 8px}
.print-margin-grid label{grid-template-columns:36px 1fr;margin:0}
.print-preview-column{display:flex;flex-direction:column;min-width:0;gap:7px}
.print-preview-title{font-size:15px;font-weight:600;color:#fff}
.print-preview-host{flex:1;min-height:0;background:#202020;border:1px solid #555;display:flex;align-items:center;justify-content:center;overflow:auto;padding:12px}
.print-preview-host{position:relative}
.print-preview-host canvas{display:block;max-width:100%;max-height:100%;width:auto;height:auto;box-shadow:0 3px 14px #000}
.print-preview-meta{position:absolute;left:18px;right:18px;bottom:16px;padding:5px 8px;background:rgba(0,0,0,.72);color:#eee;border-radius:3px;font-size:12px;text-align:center;pointer-events:none}
.print-preview-page[data-print-overflow="1"]{outline:2px solid #c56b00}
.print-dialog-actions{display:flex;justify-content:flex-end;gap:8px}
#prWinInfo{color:#bdbdbd;font-size:12px}
#prCustomRow.hidden{display:none}

#printOutputHost{display:none}
@media print{
  body.printing-cadela>*:not(#printOutputHost){display:none!important}
  body.printing-cadela #printOutputHost{display:block!important;position:fixed;inset:0;background:#fff;margin:0;padding:0}
  body.printing-cadela #printOutputHost img{display:block;width:100%;height:100%;object-fit:contain;margin:0;padding:0}
}
@media(max-width:900px){.print-dialog-layout{grid-template-columns:300px minmax(0,1fr)}.text-editor-grid{grid-template-columns:1fr}}


/* 0.16.19 — CALM CAD + cotas lineales X/Y por Tab */
.cadela-splash .splash-tagline{
  position:absolute;
  left:58%;
  top:58.2%;
  transform:translate(-50%,-50%);
  z-index:2;
  min-width:24%;
  padding:.20em 1.2em .26em;
  background:rgba(9,30,46,.985);
  box-shadow:0 0 18px 12px rgba(9,30,46,.96);
  color:#d8d8d6;
  font-family:Arial,sans-serif;
  font-size:clamp(12px,1.32vw,25px);
  font-weight:500;
  letter-spacing:.46em;
  text-align:center;
  white-space:nowrap;
  pointer-events:none;
}
.dynamic-mode-toggle{font-family:Arial,sans-serif!important;color:#e9e9e9!important}
.dynamic-mode-glyph{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;padding:0!important;background:transparent!important;color:inherit!important;font-size:11px!important;font-weight:700!important;letter-spacing:-.3px!important;line-height:1!important}
.dynamic-mode-toggle.active .dynamic-mode-glyph{color:#fff!important}
@media(max-width:1240px){.dynamic-mode-glyph{font-size:10px!important}.cadela-splash .splash-tagline{font-size:clamp(11px,1.25vw,21px)}}


/* 0.16.21 — splash limpio, iconos homogéneos y panel de dibujo sin rótulo */
.brand-mini{
  background:#07131e!important;
  border:1px solid #3d4348!important;
  box-sizing:border-box!important;
}
.brand-mini img{
  object-fit:contain!important;
  object-position:center center!important;
  padding:2px!important;
  background:transparent!important;
}

.drawing-tools{padding-top:0!important}

.toolbar-btn,
.topbar .tool,
.drawing-tools .tool,
.leftbar-bottom-tools .tool,
.compact-tool,
.status-icon-toggle,
.option-btn,
.layer-icon,
.side-toggle{
  box-sizing:border-box!important;
  border:1px solid #464b50!important;
  border-radius:1px!important;
  box-shadow:none!important;
  outline:none!important;
}
.toolbar-btn:hover,
.topbar .tool:hover,
.drawing-tools .tool:hover,
.leftbar-bottom-tools .tool:hover,
.compact-tool:hover,
.status-icon-toggle:hover,
.option-btn:hover,
.layer-icon:hover,
.side-toggle:hover{
  border:1px solid #666c71!important;
  outline:none!important;
  box-shadow:none!important;
}
.toolbar-btn.active,
.topbar .tool.active,
.drawing-tools .tool.active,
.leftbar-bottom-tools .tool.active,
.compact-tool.active,
.status-icon-toggle.active,
.option-btn.active,
.layer-icon.active{
  border:1px solid var(--accent)!important;
  outline:none!important;
  box-shadow:none!important;
}
.layer-icon:hover{outline:none!important}

.cadela-splash .splash-logo{
  position:absolute;
  left:50%;
  top:50.4%;
  transform:translate(-50%,-50%);
  z-index:2;
  min-width:min(780px,72vw);
  max-width:82vw;
  padding:2.3vw 2.8vw 2.0vw;
  background:rgba(7,24,38,.90);
  box-shadow:0 0 34px 18px rgba(7,24,38,.80);
  border-radius:4px;
  pointer-events:none;
}
.cadela-splash .splash-logo-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(18px,1.8vw,34px);
}
.cadela-splash .splash-mark{
  width:clamp(112px,11vw,176px);
  height:auto;
  display:block;
  flex:0 0 auto;
}
.cadela-splash .splash-separator{
  width:3px;
  align-self:stretch;
  min-height:clamp(126px,10.2vw,174px);
  background:linear-gradient(to bottom, rgba(220,221,220,.95), rgba(186,190,192,.94));
  box-shadow:0 0 12px rgba(0,0,0,.22);
}
.cadela-splash .splash-wording{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:clamp(8px,.9vw,15px);
}
.cadela-splash .splash-name{
  color:#dfdfdc;
  font-family:Arial,Helvetica,sans-serif;
  font-size:clamp(70px,7vw,122px);
  font-weight:600;
  line-height:.92;
  letter-spacing:.01em;
  text-shadow:2px 3px 0 rgba(0,0,0,.22);
}
.cadela-splash .splash-tagline{
  position:static!important;
  transform:none!important;
  left:auto!important;
  top:auto!important;
  min-width:0!important;
  padding:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#d8d8d6!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:clamp(17px,1.38vw,28px)!important;
  font-weight:500!important;
  letter-spacing:.48em!important;
  text-align:left!important;
  white-space:nowrap!important;
  text-shadow:2px 2px 0 rgba(0,0,0,.22);
}
@media(max-width:1240px){
  .cadela-splash .splash-logo{min-width:min(700px,78vw);padding:24px 28px 21px}
  .cadela-splash .splash-name{font-size:clamp(58px,6.6vw,102px)}
  .cadela-splash .splash-tagline{font-size:clamp(15px,1.45vw,24px)!important}
}
@media(max-width:860px){
  .cadela-splash .splash-logo{min-width:min(92vw,640px);padding:18px 18px 16px;top:50%}
  .cadela-splash .splash-logo-row{gap:14px}
  .cadela-splash .splash-mark{width:84px}
  .cadela-splash .splash-separator{width:2px;min-height:92px}
  .cadela-splash .splash-name{font-size:48px}
  .cadela-splash .splash-tagline{font-size:14px!important;letter-spacing:.34em!important}
}


/* 0.16.22 — splash raster definitivo */
.cadela-splash .splash-logo{display:none!important}


/* 0.16.23 — homogeneizar todos los iconos: un marco gris y mismo fondo */
:root{
  --cadela-icon-bg:#0d0d0d;
  --cadela-icon-border:#464b50;
  --cadela-icon-border-hover:#666c71;
}

.toolbar-btn,
.mini-btn,
.topbar .tool,
.drawing-tools .tool,
.leftbar-bottom-tools .tool,
.compact-tool,
.option-btn,
.dimension-option-strip .option-btn,
.layer-option-strip .option-btn,
.hatch-option-strip .option-btn,
.snaps-frame .status-icon-toggle,
.snap-side-controls .status-icon-toggle,
.status-icon-toggle,
.layer-icon,
.side-toggle{
  box-sizing:border-box!important;
  background:var(--cadela-icon-bg)!important;
  border:1px solid var(--cadela-icon-border)!important;
  border-radius:1px!important;
  box-shadow:none!important;
  outline:none!important;
}

.toolbar-btn:hover,
.mini-btn:hover,
.topbar .tool:hover,
.drawing-tools .tool:hover,
.leftbar-bottom-tools .tool:hover,
.compact-tool:hover,
.option-btn:hover,
.dimension-option-strip .option-btn:hover,
.layer-option-strip .option-btn:hover,
.hatch-option-strip .option-btn:hover,
.snaps-frame .status-icon-toggle:hover,
.snap-side-controls .status-icon-toggle:hover,
.status-icon-toggle:hover,
.layer-icon:hover,
.side-toggle:hover{
  background:#111213!important;
  border:1px solid var(--cadela-icon-border-hover)!important;
  box-shadow:none!important;
  outline:none!important;
}

.toolbar-btn:focus,
.toolbar-btn:focus-visible,
.mini-btn:focus,
.mini-btn:focus-visible,
.topbar .tool:focus,
.topbar .tool:focus-visible,
.drawing-tools .tool:focus,
.drawing-tools .tool:focus-visible,
.leftbar-bottom-tools .tool:focus,
.leftbar-bottom-tools .tool:focus-visible,
.compact-tool:focus,
.compact-tool:focus-visible,
.option-btn:focus,
.option-btn:focus-visible,
.dimension-option-strip .option-btn:focus,
.dimension-option-strip .option-btn:focus-visible,
.layer-option-strip .option-btn:focus,
.layer-option-strip .option-btn:focus-visible,
.hatch-option-strip .option-btn:focus,
.hatch-option-strip .option-btn:focus-visible,
.snaps-frame .status-icon-toggle:focus,
.snaps-frame .status-icon-toggle:focus-visible,
.snap-side-controls .status-icon-toggle:focus,
.snap-side-controls .status-icon-toggle:focus-visible,
.status-icon-toggle:focus,
.status-icon-toggle:focus-visible,
.layer-icon:focus,
.layer-icon:focus-visible,
.side-toggle:focus,
.side-toggle:focus-visible{
  outline:none!important;
  box-shadow:none!important;
}

.toolbar-btn.active,
.topbar .tool.active,
.drawing-tools .tool.active,
.leftbar-bottom-tools .tool.active,
.compact-tool.active,
.option-btn.active,
.dimension-option-strip .option-btn.active,
.layer-option-strip .option-btn.active,
.hatch-option-strip .option-btn.active,
.snaps-frame .status-icon-toggle.active,
.snap-side-controls .status-icon-toggle.active,
.status-icon-toggle.active,
.layer-icon.active{
  background:var(--cadela-icon-bg)!important;
  border:1px solid var(--accent)!important;
  box-shadow:none!important;
  outline:none!important;
}

.toolbar-btn img,
.mini-btn img,
.topbar .tool img,
.drawing-tools .tool img,
.leftbar-bottom-tools .tool img,
.compact-tool img,
.option-btn img,
.dimension-option-strip .option-btn img,
.layer-option-strip .option-btn img,
.hatch-option-strip .option-btn img,
.snaps-frame .status-icon-toggle img,
.snap-side-controls .status-icon-toggle img,
.status-icon-toggle img,
.layer-icon img{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}


/* 0.16.24 — splash exacto aprobado e iconos raster sin doble marco */
.compact-tool img,
.option-btn img,
.dimension-option-strip .option-btn img,
.layer-option-strip .option-btn img,
.hatch-option-strip .option-btn img,
.snaps-frame .status-icon-toggle img,
.snap-side-controls .status-icon-toggle img,
.status-icon-toggle img{
  object-fit:contain!important;
  object-position:center center!important;
  background:transparent!important;
}
.compact-tool img{width:31px!important;height:31px!important}
.option-btn img,
.dimension-option-strip .option-btn img,
.layer-option-strip .option-btn img,
.hatch-option-strip .option-btn img{width:30px!important;height:30px!important}
.snaps-frame .status-icon-toggle img,
.snap-side-controls .status-icon-toggle img,
.status-icon-toggle img{width:28px!important;height:28px!important}


/* 0.16.26 — versión visible provisional */
#versionBadge{
  flex:0 0 auto;
  color:#ff6500;
  font-family:Consolas,monospace;
  font-size:9px;
  font-weight:700;
  letter-spacing:.2px;
  padding:0 7px;
  border-left:1px solid #3b3f43;
  border-right:1px solid #3b3f43;
  white-space:nowrap;
}


/* 0.16.27 — iconos Modificar restaurados y marco único */
.compact-tool img{
  width:33px!important;
  height:33px!important;
  object-fit:contain!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.drawing-tools .tool img[src$="/cotas.svg"]{
  background:transparent!important;
}


/* 0.16.30 — más espacio para Snaps, Modificar completo y logo superior ampliado */
.bottom-dock{
  grid-template-columns:330px minmax(558px,1fr) 340px!important;
  column-gap:10px!important;
}
.snaps-frame .snap-strip{
  gap:2px!important;
  padding-left:4px!important;
  padding-right:4px!important;
}
.snaps-frame .status-icon-toggle{
  width:31px!important;
  min-width:31px!important;
  flex-basis:31px!important;
}
.modify-frame .bottom-body{
  padding-left:6px!important;
  padding-right:6px!important;
}
.modify-frame .tool-strip{gap:4px!important}
.brand-mini img{
  width:100%!important;
  height:100%!important;
  padding:0!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:scale(1.50)!important;
  transform-origin:center!important;
}
@media(max-width:1240px){
  .bottom-dock{
    grid-template-columns:290px minmax(519px,1fr) 330px!important;
    column-gap:8px!important;
  }
  .options-frame .bottom-body{padding-left:4px!important;padding-right:4px!important}
  .modify-frame .bottom-body{padding-left:3px!important;padding-right:3px!important}
  .modify-frame .tool-strip{gap:3px!important}
  .compact-tool{width:35px!important;min-width:35px!important;flex-basis:35px!important}
  .snaps-frame .status-icon-toggle{width:30px!important;min-width:30px!important;flex-basis:30px!important}
  .snaps-frame .snap-strip{gap:2px!important;padding-left:3px!important;padding-right:3px!important}
}


/* 0.16.32 — snaps cuadrados 34 px, grosor homogéneo y reparto de frames */
.bottom-dock{
  grid-template-columns:minmax(300px,1fr) 520px 370px!important;
  column-gap:10px!important;
}
.modify-frame{min-width:520px!important}
.modify-frame .bottom-body{padding-left:4px!important;padding-right:4px!important}
.modify-frame .tool-strip{gap:3px!important;padding-left:3px!important;padding-right:3px!important}
.compact-tool{width:36px!important;min-width:36px!important;height:36px!important;flex:0 0 36px!important}
.snaps-frame{min-width:370px!important}
.snaps-frame .snap-strip{gap:2px!important;padding-left:5px!important;padding-right:5px!important;overflow:hidden!important}
.snaps-frame .status-icon-toggle{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  flex:0 0 34px!important;
  aspect-ratio:1 / 1!important;
}
.snaps-frame .status-icon-toggle img{width:32px!important;height:32px!important}
@media(max-width:1240px){
  .bottom-dock{grid-template-columns:minmax(250px,1fr) 510px 366px!important;column-gap:7px!important;padding-left:67px!important;padding-right:6px!important}
  .modify-frame{min-width:510px!important}
  .modify-frame .tool-strip{gap:2px!important;padding-left:2px!important;padding-right:2px!important}
  .compact-tool{width:35px!important;min-width:35px!important;height:35px!important;flex-basis:35px!important}
  .snaps-frame{min-width:366px!important}
  .snaps-frame .snap-strip{gap:1px!important;padding-left:4px!important;padding-right:4px!important}
  .snaps-frame .status-icon-toggle{width:34px!important;min-width:34px!important;height:34px!important;flex-basis:34px!important}
  .snaps-frame .status-icon-toggle img{width:32px!important;height:32px!important}
}

/* 0.16.60 — Biblioteca visual de bloques en panel derecho */
.blocks-panel{flex:0 0 auto}
.block-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:6px}
.block-thumb{position:relative;min-width:0;border:1px solid #3f4448;background:#111315;cursor:grab;padding:4px;user-select:none}
.block-thumb:hover{border-color:var(--accent)}
.block-thumb.dragging{opacity:.58;cursor:grabbing}
.block-thumb-preview{height:72px;display:flex;align-items:center;justify-content:center;background:#202428;color:#e9e9e9;overflow:hidden}
.block-thumb-preview svg{width:100%;height:100%;display:block}
.block-thumb-name{font-size:11px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px 19px 0 2px;color:#ddd}
.block-thumb-delete{position:absolute;right:4px;bottom:3px;width:17px;height:17px;line-height:14px;padding:0;border:0;background:#17191b;color:#888;cursor:pointer}
.block-thumb-delete:hover{color:var(--accent)}
.block-empty{padding:7px}

/* 0.16.66 — panel derecho contextual y biblioteca de bloques */
.rightbar[data-context="block"] .layers-panel,
.rightbar[data-context="block"] .properties-panel{display:none!important}
.rightbar[data-context="block"] .blocks-panel{display:flex!important;flex:1 1 auto;min-height:0;flex-direction:column;border-bottom:0}
.rightbar[data-context="block"] #blocks{flex:1 1 auto;min-height:0;overflow:auto;padding:5px}
.rightbar[data-context="block"] .blocks-panel .panel-title{flex:0 0 22px}
.block-gallery{grid-template-columns:repeat(auto-fit,minmax(104px,1fr))!important;gap:8px!important;padding:2px!important;align-content:start}
.block-thumb{min-height:106px;padding:5px!important;border-color:#454a4f!important}
.block-thumb-preview{height:78px!important}
.block-thumb-name{padding:4px 22px 0 2px!important}
.block-thumb-delete{right:4px!important;top:4px!important;bottom:auto!important;width:20px!important;height:20px!important;line-height:18px!important;border:1px solid #555!important;background:#0d0f10!important;color:#d0d0d0!important;font-size:16px!important;z-index:2}
.block-thumb-delete:hover{border-color:var(--accent)!important;color:var(--accent)!important}

/* 0.16.67 — sombreado en panel lateral contextual */
.tool-context-panel{display:none!important}
.rightbar[data-context="hatch"] .layers-panel,
.rightbar[data-context="hatch"] .blocks-panel,
.rightbar[data-context="hatch"] .properties-panel{display:none!important}
.rightbar[data-context="hatch"] .tool-context-panel{display:flex!important;flex:1 1 auto;min-height:0;flex-direction:column;border-bottom:0}
.rightbar[data-context="hatch"] .tool-context-panel .panel-title{flex:0 0 22px}
.rightbar[data-context="hatch"] #toolContextBody{flex:1 1 auto;min-height:0;overflow:auto;padding:7px;background:#151719}
.hatch-side-manager{display:flex;flex-direction:column;gap:8px;min-height:0;color:#ddd}
.hatch-side-section{border:1px solid #4a4f53;background:#111315;padding:7px;display:flex;flex-direction:column;gap:7px}
.hatch-side-section-title{font-size:10px;font-weight:700;letter-spacing:.35px;color:#e4e4e4}
.hatch-side-method{display:flex;gap:5px;align-items:center}
.hatch-side-method .option-btn{width:36px!important;height:36px!important;flex:0 0 36px!important}
.hatch-side-method .option-btn img,
.hatch-option-strip .option-btn img{
  width:35px!important;height:35px!important;object-fit:contain!important;
  filter:brightness(1.28) contrast(1.18) drop-shadow(0 0 .38px rgba(255,255,255,.92))!important;
}
.hatch-side-preview{height:104px;background:#0d0d0d;border:1px solid #5a6064;display:flex;align-items:center;justify-content:center;overflow:hidden}
.hatch-side-preview canvas{max-width:100%;height:auto}
.hatch-side-current{font-size:11px;font-weight:700;color:#f1f1f1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hatch-side-field{display:grid;grid-template-columns:1fr 86px;gap:7px;align-items:center;font-size:10px}
.hatch-side-field input,.hatch-side-field select{height:25px;box-sizing:border-box;background:#0e1011;color:#fff;border:1px solid #4b5054;padding:2px 4px;min-width:0;width:100%}
.hatch-side-hint{font-size:9px;line-height:1.35;color:#aeb5ba}
.hatch-side-actions{display:flex;gap:6px;flex-wrap:wrap}
.hatch-side-actions button{min-height:27px;background:#17191b;color:#e7e7e7;border:1px solid #50565b;padding:4px 7px;cursor:pointer;font-size:10px}
.hatch-side-actions button:hover{border-color:var(--accent)}
.hatch-side-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;align-content:start}
.hatch-side-gallery .hatch-pattern-btn{width:auto!important;min-width:0!important;height:66px!important;padding:3px!important}
.hatch-side-gallery .hatch-pattern-btn canvas{width:100%!important;height:42px!important;object-fit:fill}
.hatch-side-gallery .hatch-pattern-btn span{font-size:9px!important;line-height:13px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.hatch-side-edit-title{color:var(--accent);font-size:10px;font-weight:700;letter-spacing:.3px}


/* 0.16.68 — Texto y Cotas en panel lateral contextual; límite inferior antes del dock ORTO/SNAP */
.workspace{overflow:hidden!important;min-height:0!important}
.rightbar{height:100%!important;max-height:100%!important;align-self:stretch!important;min-height:0!important;overflow:hidden!important}
.rightbar .right-content{flex:1 1 auto!important;height:auto!important;max-height:calc(100% - 23px)!important;min-height:0!important;overflow:hidden!important}
.rightbar.collapsed .right-content{display:none!important}
.rightbar[data-context="text"] .layers-panel,
.rightbar[data-context="text"] .blocks-panel,
.rightbar[data-context="text"] .properties-panel,
.rightbar[data-context="dimension"] .layers-panel,
.rightbar[data-context="dimension"] .blocks-panel,
.rightbar[data-context="dimension"] .properties-panel{display:none!important}
.rightbar[data-context="text"] .tool-context-panel,
.rightbar[data-context="dimension"] .tool-context-panel{display:flex!important;flex:1 1 auto;min-height:0;flex-direction:column;border-bottom:0}
.rightbar[data-context="text"] .tool-context-panel .panel-title,
.rightbar[data-context="dimension"] .tool-context-panel .panel-title{flex:0 0 22px}
.rightbar[data-context="text"] #toolContextBody,
.rightbar[data-context="dimension"] #toolContextBody{flex:1 1 auto;min-height:0;overflow:auto;padding:7px;background:#151719}
.cad-side-form{display:flex;flex-direction:column;gap:7px;color:#ddd;min-height:0}
.cad-side-section-title{font-size:10px;font-weight:700;letter-spacing:.35px;color:#f0f0f0;border-bottom:1px solid #3f4448;padding-bottom:5px}
.cad-side-form>label{display:grid;grid-template-columns:minmax(0,1fr) 98px;gap:7px;align-items:center;font-size:10px}
.cad-side-form>label.cad-side-stack{display:flex;flex-direction:column;align-items:stretch;gap:4px}
.cad-side-form input,.cad-side-form select,.cad-side-form textarea{box-sizing:border-box;background:#0e1011;color:#fff;border:1px solid #50565b;padding:3px 5px;min-width:0;width:100%;font:inherit}
.cad-side-form input,.cad-side-form select{height:26px}
.cad-side-form textarea{min-height:90px;resize:vertical}
.cad-side-checks{display:flex;gap:12px;flex-wrap:wrap;padding:2px 0}.cad-side-checks label{display:flex;align-items:center;gap:5px;font-size:10px}.cad-side-checks input{width:auto;height:auto}
.cad-side-hint{font-size:9px;line-height:1.35;color:#aeb5ba;padding-top:2px}
.cad-side-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap;padding-top:3px}
.cad-side-actions button{min-height:28px;background:#17191b;color:#eee;border:1px solid #555b60;padding:4px 8px;cursor:pointer;font-size:10px}.cad-side-actions button:hover{border-color:var(--accent)}

/* 0.16.69 — panel lateral: termina siempre antes del dock de ORTO/SNAP */
.rightbar{
  position:fixed!important;
  right:0!important;
  top:60px!important;
  bottom:86px!important; /* 68 px del dock inferior + 18 px de barra de estado */
  height:auto!important;
  max-height:none!important;
  align-self:auto!important;
  margin:0!important;
  z-index:19!important;
  width:250px!important;
}
.rightbar.collapsed{width:22px!important}
.rightbar .right-content{height:auto!important;max-height:none!important;flex:1 1 auto!important}
@media(max-width:1180px){.rightbar{width:230px!important}.rightbar.collapsed{width:20px!important}}


/* 0.16.70 — Medir en tres líneas y panel lateral limitado por ORTO/SNAP */
.measure-options-compact{
  width:100%!important;
  height:39px!important;
  min-height:39px!important;
  display:grid!important;
  grid-template-rows:repeat(3,13px)!important;
  align-content:center!important;
  gap:0!important;
  overflow:hidden!important;
  font-size:9px!important;
  line-height:13px!important;
}
.measure-compact-row{
  min-width:0!important;
  height:13px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  column-gap:8px!important;
  border-bottom:1px solid #2c3033!important;
  white-space:nowrap!important;
}
.measure-compact-row:last-child{border-bottom:0!important}
.measure-compact-row>span:first-child{overflow:hidden!important;text-overflow:ellipsis!important;color:#e4e6e8!important}
.measure-compact-row .measure-value{font-size:9px!important;line-height:13px!important;text-align:right!important;color:#fff!important}

/* Fallback inicial. JS recalcula el límite exacto 5 px por encima de ORTO/SNAP. */
.rightbar{bottom:138px!important}
/* 0.16.76 — en Modificar, solo el marco indica la herramienta activa */
.modify-frame .tool.active img{filter:none!important}

/* 0.16.77 · Snap general: conserva la configuración individual, pero oculta su estado activo mientras el maestro está apagado. */
.snaps-frame.snap-master-off .status-icon-toggle.snap-toggle.active{
  border:1px solid var(--cadela-icon-border)!important;
  box-shadow:none!important;
}


/* 0.16.78 · Snaps: título blanco y estado visual subordinado al Snap general. */
.bottom-frame.snaps-frame .bottom-title.snaps-title{
  color:#ffffff!important;
}
.snaps-frame.snap-master-off .status-icon-toggle.snap-toggle,
.snaps-frame.snap-master-off .status-icon-toggle.snap-toggle.active{
  border:1px solid var(--cadela-icon-border)!important;
  box-shadow:none!important;
  outline:none!important;
  pointer-events:none!important;
  cursor:default!important;
  opacity:1!important;
}


/* 0.16.79 · Desplegables CAD con previsualización de color, tipo y grosor. */
.cad-native-select{display:none!important}
.cad-preview-select{position:relative;height:30px;flex:0 0 auto;font-size:10px;color:#f0f0f0}
.cad-preview-select[data-preview-kind="color"]{width:112px}
.cad-preview-select[data-preview-kind="lineType"]{width:140px}
.cad-preview-select[data-preview-kind="lineWidth"]{width:112px}
.cad-preview-trigger{box-sizing:border-box;width:100%;height:30px;display:grid;grid-template-columns:50px minmax(0,1fr) 12px;align-items:center;gap:4px;padding:0 5px;border:1px solid #484c50;border-radius:1px;background:#111315;color:#fff;cursor:pointer;font:inherit;text-align:left}
.cad-preview-trigger:hover,.cad-preview-select.open .cad-preview-trigger{border-color:#70767b}
.cad-preview-trigger-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cad-preview-arrow{font-size:9px;color:#aeb4b9;text-align:right}
.cad-preview-menu{display:none;position:absolute;left:0;top:31px;z-index:1200;min-width:100%;width:max-content;max-width:230px;max-height:325px;overflow:auto;padding:3px;background:#101214;border:1px solid #62676b;box-shadow:0 8px 20px rgba(0,0,0,.55)}
.cad-preview-select.open .cad-preview-menu{display:block}
.cad-preview-option{box-sizing:border-box;width:100%;min-width:172px;height:29px;display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:7px;padding:2px 6px;border:0;background:#101214;color:#eee;cursor:pointer;font:inherit;text-align:left}
.cad-preview-option:hover,.cad-preview-option.selected{background:#25292d}
.cad-style-preview{width:52px;height:18px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.cad-style-preview-color{width:20px;height:16px;justify-self:start;background:var(--cad-sample-color,#f0f0f0);border:1px solid #7a7f83;box-shadow:inset 0 0 0 1px rgba(0,0,0,.25)}
.cad-style-preview-lineType svg{display:block;width:52px;height:16px}
.cad-style-preview-lineWidth i{display:block;width:52px;min-height:1px;max-height:8px;background:#f1f1f1}
@media(max-width:1240px){
  .cad-preview-select[data-preview-kind="color"]{width:104px}
  .cad-preview-select[data-preview-kind="lineType"]{width:126px}
  .cad-preview-select[data-preview-kind="lineWidth"]{width:104px}
  .cad-preview-trigger{grid-template-columns:44px minmax(0,1fr) 10px;padding:0 4px}
  .cad-style-preview{width:46px}
  .cad-style-preview-lineType svg,.cad-style-preview-lineWidth i{width:46px}
}


/* 0.16.81 · Controles de línea compactos, nativos y con título superior. */
.line-frame{
  flex:0 0 auto!important;
  max-width:none!important;
  gap:6px!important;
  align-items:flex-end!important;
  padding-top:9px!important;
}
.line-frame>.top-frame-title{
  display:none!important;
}
.line-frame .top-style-control{
  position:relative!important;
  height:44px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:flex-end!important;
  gap:2px!important;
  min-width:0!important;
}
.line-frame .top-style-label{
  display:block!important;
  height:11px!important;
  line-height:11px!important;
  padding-left:1px!important;
  color:#cfd3d6!important;
  font-size:8px!important;
  font-weight:700!important;
  letter-spacing:.35px!important;
}
.line-frame .cad-native-select{
  display:block!important;
  box-sizing:border-box!important;
  height:27px!important;
  min-width:0!important;
  width:100%!important;
  padding:0 20px 0 5px!important;
  background:#111315!important;
  border:1px solid #484c50!important;
  border-radius:1px!important;
  color:#f4f4f4!important;
  font-size:9px!important;
  line-height:27px!important;
  cursor:pointer!important;
}
.line-frame .top-color-control{width:91px!important}
.line-frame .top-style-control:has(#topLineType){width:116px!important}
.line-frame .top-style-control:has(#topLineWidth){width:91px!important}
.line-frame .top-color-picker-hidden{
  position:absolute!important;
  left:0!important;
  bottom:0!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  border:0!important;
  padding:0!important;
}
.line-frame .cad-preview-select-compat{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
@media(max-width:1180px){
  .line-frame{gap:4px!important}
  .line-frame .top-color-control{width:82px!important}
  .line-frame .top-style-control:has(#topLineType){width:105px!important}
  .line-frame .top-style-control:has(#topLineWidth){width:82px!important}
}


/* 0.16.82 · Tipo de línea ordenado: nombre izquierda, muestra derecha. */
.line-frame{
  gap:4px!important;
}
.line-frame .top-color-control{
  width:76px!important;
}
.line-frame .top-line-type-control{
  width:102px!important;
}
.line-frame .top-style-control:has(#topLineWidth){
  width:76px!important;
}
.line-frame .cad-native-select{
  font-size:8.5px!important;
  padding-left:4px!important;
  padding-right:17px!important;
}
.line-frame .line-type-native-select{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  overflow:hidden!important;
}
.line-type-select{
  position:relative;
  width:100%;
  height:27px;
}
.line-type-trigger{
  box-sizing:border-box;
  width:100%;
  height:27px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 39px 8px;
  align-items:center;
  column-gap:3px;
  padding:0 4px;
  border:1px solid #484c50;
  border-radius:1px;
  background:#111315;
  color:#f4f4f4;
  font-size:8.5px;
  cursor:pointer;
  text-align:left;
}
.line-type-trigger:hover,
.line-type-select.open .line-type-trigger{
  border-color:#70767b;
}
.line-type-trigger-name{
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  text-align:left;
}
.line-type-trigger-sample{
  width:39px;
  height:12px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  color:#f4f4f4;
}
.line-type-trigger-sample svg{
  width:39px;
  height:12px;
  display:block;
}
.line-type-trigger-arrow{
  font-size:7px;
  color:#bec3c7;
  text-align:right;
}
.line-type-menu{
  display:none;
  position:absolute;
  right:0;
  top:28px;
  z-index:1400;
  width:184px;
  padding:3px;
  background:#101214;
  border:1px solid #62676b;
  box-shadow:0 8px 20px rgba(0,0,0,.55);
}
.line-type-select.open .line-type-menu{
  display:block;
}
.line-type-option{
  box-sizing:border-box;
  width:100%;
  height:27px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 60px;
  align-items:center;
  column-gap:10px;
  padding:0 6px;
  border:0;
  background:#101214;
  color:#f2f2f2;
  font-size:9px;
  cursor:pointer;
  text-align:left;
}
.line-type-option:hover,
.line-type-option.selected{
  background:#25292d;
}
.line-type-option-name{
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  text-align:left;
}
.line-type-option-sample{
  width:60px;
  height:12px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  color:#f2f2f2;
}
.line-type-option-sample svg{
  display:block;
  width:60px;
  height:12px;
}
@media(max-width:1180px){
  .line-frame .top-color-control{width:70px!important}
  .line-frame .top-line-type-control{width:94px!important}
  .line-frame .top-style-control:has(#topLineWidth){width:70px!important}
  .line-type-trigger{grid-template-columns:minmax(0,1fr) 34px 8px}
  .line-type-trigger-sample,.line-type-trigger-sample svg{width:34px}
}


/* 0.16.82.4 · Destino de impresión compacto. */
.print-destination-fieldset{
  padding:6px 10px!important;
}
.print-destination-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:24px;
  color:#fff;
}
.print-destination-line strong{
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}
.print-destination-line span{
  color:#c9c9c9;
  font-size:11px;
  white-space:nowrap;
}


/* 0.16.82.5 · Ventana de impresión compacta para pantallas de 768 px. */
.print-dialog-window{
  max-width:calc(100vw - 24px)!important;
  max-height:calc(100vh - 24px)!important;
}
.print-dialog-window .cad-floating-content{
  padding:7px!important;
}
.print-dialog-layout{
  grid-template-columns:315px minmax(0,1fr)!important;
  gap:8px!important;
}
.print-options{
  gap:4px!important;
  padding-right:1px!important;
}
.print-options fieldset{
  padding:6px 8px!important;
}
.print-options legend{
  font-size:11px!important;
}
.print-options label{
  grid-template-columns:108px 1fr!important;
  gap:6px!important;
  margin:3px 0!important;
  font-size:11px!important;
}
.print-options select,
.print-options input[type=number]{
  min-height:27px!important;
  padding:3px 5px!important;
  font-size:11px!important;
}
.print-options button,
.print-dialog-actions button{
  padding:5px 10px!important;
  font-size:11px!important;
}
.print-margin-grid{
  gap:3px 6px!important;
}
.print-margin-grid label{
  grid-template-columns:31px 1fr!important;
  margin:0!important;
}
.print-preview-column{
  gap:5px!important;
}
.print-preview-title{
  font-size:13px!important;
}
.print-preview-host{
  padding:8px!important;
}
.print-preview-meta{
  left:12px!important;
  right:12px!important;
  bottom:10px!important;
  padding:4px 6px!important;
  font-size:10px!important;
}
.print-dialog-actions{
  gap:6px!important;
}
#prWinInfo{
  font-size:10px!important;
}
.print-destination-fieldset{
  padding:4px 8px!important;
}
.print-destination-line{
  min-height:18px!important;
  gap:8px!important;
}
.print-destination-line strong{
  font-size:11px!important;
}
.print-destination-line span{
  font-size:10px!important;
}


/* 0.16.82.6 · Botones de impresión siempre visibles. */
.print-dialog-window .cad-floating-content{
  min-height:0!important;
  overflow:hidden!important;
}
.print-dialog-layout{
  min-height:0!important;
  overflow:hidden!important;
}
.print-preview-column{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  min-height:0!important;
  height:100%!important;
  overflow:hidden!important;
}
.print-preview-host{
  min-height:0!important;
  overflow:hidden!important;
}
.print-preview-host canvas{
  max-width:100%!important;
  max-height:100%!important;
}
.print-dialog-actions{
  min-height:30px!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:flex-end!important;
  padding-top:2px!important;
  background:#333!important;
}


/* 0.16.82.7 · Zoom y pan en la previsualización de impresión. */
.print-preview-title{
  display:flex!important;
  align-items:baseline!important;
  justify-content:space-between!important;
  gap:10px!important;
}
.print-preview-title small{
  color:#aaa!important;
  font-size:9px!important;
  font-weight:400!important;
  white-space:nowrap!important;
}
.print-preview-host{
  cursor:grab!important;
  touch-action:none!important;
  user-select:none!important;
}
.print-preview-host.panning{
  cursor:grabbing!important;
}
.print-preview-host .print-preview-page{
  will-change:transform;
  transition:none!important;
}


/* 0.16.82.9 · Tips de herramienta sobre el lienzo. */
/* La línea de estado inferior queda reservada a versión y coordenadas. */
.statusbar #statusText{
  display:none!important;
}
/* Los tips nunca se muestran dentro de Opciones de herramienta. */
.tool-options .option-hint,
.tool-options > .muted{
  display:none!important;
}
.tool-tip{
  position:absolute;
  z-index:6;
  left:50%;
  top:8px;
  transform:translateX(-50%);
  max-width:calc(100% - 36px);
  box-sizing:border-box;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  pointer-events:none;
  background:#101112;
  border:1px solid var(--accent);
  color:#ff7100;
  padding:4px 10px;
  border-radius:2px;
  box-shadow:0 3px 12px #0008;
  font-size:11px;
  font-weight:500;
}
#toolTip:not(.hidden) + #toast{
  top:38px;
}


/* 0.16.82.10 · Interruptor de tips en la barra inferior. */
.status-tips-toggle{
  display:flex;
  align-items:center;
  gap:4px;
  color:#ff7100;
  font-size:9px;
  font-weight:600;
  white-space:nowrap;
  cursor:pointer;
  user-select:none;
}
.status-tips-toggle input{
  width:12px;
  height:12px;
  margin:0;
  accent-color:var(--accent);
  cursor:pointer;
}
.status-tips-toggle span{
  color:#ff7100;
}


/* 0.16.82.15 · Listas CAD ampliadas: el menú de tipos sigue siendo utilizable
   aun con las familias normal / 1/2 / x2. */
.line-type-menu{
  max-height:min(430px,calc(100vh - 150px));
  overflow-y:auto;
  overscroll-behavior:contain;
}


/* 0.16.82.16 · Características de línea sin flechas de desplegable. */
.line-frame .cad-native-select{
  -webkit-appearance:none!important;
  appearance:none!important;
  background-image:none!important;
  padding-right:4px!important;
}
.line-type-trigger{
  grid-template-columns:minmax(0,1fr) 39px!important;
}
.line-type-trigger-arrow{
  display:none!important;
}
@media(max-width:1180px){
  .line-type-trigger{grid-template-columns:minmax(0,1fr) 34px!important}
}
