/* It — la cara de Adobe Illustrator 2026 encima del motor de Krea.
   app.css (de Krea) carga antes; aquí se cambia el reparto de la ventana y se
   ponen los cuatro brillos de la interfaz de Illustrator (Preferencias ›
   Interfaz de usuario: Oscuro, Medio oscuro, Medio claro y Claro). Oscuro es el
   de fábrica. */

body[data-brillo="oscuro"], body {
  --bg: #1e1e1e; --panel: #262626; --panel2: #323232; --line: #141414; --line2: #414141;
  --text: #e3e3e3; --text-dim: #9d9d9d; --accent: #2d8ceb; --accent2: #1f6fc4;
  --canvas-bg: #383838; --hover: #3a3a3a; --sel: #464646; --ico: #d6d6d6; --ico-on: #ffffff;
  --tab-on: #323232; --input: #1c1c1c; --naranja: #ff9a00;
}
body[data-brillo="medio-oscuro"] {
  --bg: #2c2c2c; --panel: #353535; --panel2: #434343; --line: #1e1e1e; --line2: #555;
  --text: #e6e6e6; --text-dim: #a8a8a8; --canvas-bg: #4b4b4b; --hover: #4a4a4a; --sel: #575757;
  --ico: #dcdcdc; --tab-on: #434343; --input: #262626;
}
body[data-brillo="medio-claro"] {
  --bg: #a8a8a8; --panel: #b8b8b8; --panel2: #c9c9c9; --line: #8a8a8a; --line2: #a0a0a0;
  --text: #1b1b1b; --text-dim: #444; --canvas-bg: #bdbdbd; --hover: #d3d3d3; --sel: #dcdcdc;
  --ico: #2a2a2a; --ico-on: #000; --tab-on: #c9c9c9; --input: #e2e2e2; --accent: #1473e6;
}
body[data-brillo="claro"] {
  --bg: #dcdcdc; --panel: #ececec; --panel2: #f7f7f7; --line: #b9b9b9; --line2: #cfcfcf;
  --text: #1b1b1b; --text-dim: #5a5a5a; --canvas-bg: #e6e6e6; --hover: #dfe8f5; --sel: #cfe0f6;
  --ico: #2a2a2a; --ico-on: #000; --tab-on: #f7f7f7; --input: #ffffff; --accent: #1473e6;
}
body.lienzoBlanco { --canvas-bg: #f2f2f2; }

body {
  --font: "Segoe UI", "Segoe UI Variable", system-ui, sans-serif;
  --tool-w: 42px; --dock-w: 262px; --radius: 3px;
  font: 12px/1.35 var(--font);
  grid-template-rows: 32px 36px 1fr;
}
body.sin-control { grid-template-rows: 32px 0 1fr; }
body.sin-control #propbar { display: none; }
body.itDoble { --tool-w: 78px; }

/* ------------------------------------------------------------- barra de la aplicación */
#menubar { padding: 0 6px; gap: 0; background: var(--bg); }
#itLogo { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 2px; font-weight: 600; color: var(--naranja); }
#itLogo img { width: 18px; height: 18px; border-radius: 3px; }
#itMenus { display: flex; height: 100%; }
#itMenus > .itM { padding: 0 9px; display: flex; align-items: center; cursor: default; }
#itMenus > .itM:hover, #itMenus > .itM.open { background: var(--panel2); }
#itBuscar { position: relative; margin-right: 8px; }
#itBuscarIn {
  width: 220px; height: 22px; padding: 0 6px 0 22px; font-size: 11.5px;
  background: var(--input); border: 1px solid var(--line2); border-radius: 11px; outline: none; color: var(--text);
}
#itBuscarIn:focus { border-color: var(--accent); }
#itBuscar .lupa { position: absolute; left: 7px; top: 2px; color: var(--text-dim); font-size: 14px; pointer-events: none; }
#itWs { display: flex; align-items: center; gap: 6px; padding: 0 8px; height: 22px; border: 1px solid var(--line2); border-radius: 3px; cursor: default; font-size: 11.5px; margin-right: 8px; }
#itWs:hover { background: var(--panel2); }
#itWs .flecha { font-size: 9px; color: var(--text-dim); }
.itBtnBarra { height: 22px; padding: 0 10px; border-radius: 3px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-size: 11.5px; cursor: pointer; }
.itBtnBarra:hover { background: var(--accent2); }

/* desplegables (menús, submenús, flyouts, listas) */
#itMenuPop { position: fixed; left: 0; top: 0; z-index: 700; pointer-events: none; }
.itPop {
  position: fixed; z-index: 700; min-width: 220px; padding: 4px 0; pointer-events: auto;
  background: var(--panel2); border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0,0,0,.45); border-radius: 3px;
  color: var(--text); font-size: 12px; max-height: calc(100vh - 12px); overflow-y: auto;
}
.itPop::-webkit-scrollbar { width: 8px; }
.itPop::-webkit-scrollbar-thumb { background: var(--line2); }
.itPop .it {
  display: grid; grid-template-columns: 22px 1fr auto 16px; align-items: center; gap: 6px;
  height: 22px; padding: 0 10px 0 6px; white-space: nowrap; cursor: default;
}
.itPop .it:hover { background: var(--accent); color: #fff; }
.itPop .it:hover .k, .itPop .it:hover .sub { color: #e8eefc; }
.itPop .it.dis { opacity: .4; }
.itPop .it.dis:hover { background: transparent; color: inherit; }
.itPop .it .ico { width: 18px; height: 18px; display: grid; place-items: center; }
.itPop .it .ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.itPop .it .chk { font-size: 12px; text-align: center; }
.itPop .it .k { color: var(--text-dim); font-size: 11px; margin-left: 22px; }
.itPop .it .sub { color: var(--text-dim); font-size: 9px; text-align: right; }
.itPop .sep { height: 1px; background: var(--line2); margin: 4px 6px; }
.itPop .grp { padding: 5px 10px 2px 28px; color: var(--text-dim); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }

/* ------------------------------------------------------------- barra de control */
#propbar {
  display: flex; align-items: center; gap: 3px; padding: 0 8px; background: var(--panel);
  border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden;
}
#propbar .plab { font-size: 11px; }
#propbar .num, #propbar select.sel, #propbar input.txt, #propbar .btn {
  height: 22px; padding: 0 5px; border-radius: 3px; font-size: 11.5px; background: var(--input);
}
#propbar .btn { background: transparent; border-color: transparent; color: var(--ico); }
#propbar .btn:hover { background: var(--hover); border-color: var(--line2); }
#propbar .btn.on { background: var(--sel); border-color: var(--line2); color: var(--ico-on, #fff); }
#propbar .btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.it-pgrp { display: flex; align-items: center; gap: 4px; }
.it-pgrp + .pgrp::before, .pgrp + .it-pgrp::before, .it-pgrp + .it-pgrp::before { content: ""; width: 1px; height: 18px; background: var(--line2); margin: 0 5px; }
.it-pgrp input[type=range] { width: 90px; }
.itTb {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 3px;
  border: 1px solid transparent; background: transparent; color: var(--ico); cursor: default; position: relative;
}
.itTb:hover { background: var(--hover); border-color: var(--line2); }
.itTb.on { background: var(--sel); border-color: var(--line2); color: var(--ico-on, #fff); }
.itTb.dis { opacity: .35; pointer-events: none; }
.itTb svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.itLab { color: var(--text-dim); font-size: 11px; padding: 0 3px; white-space: nowrap; }
.itTipo { font-weight: 600; color: var(--text); font-size: 11.5px; padding-right: 4px; }
select.itSel, input.itNum {
  height: 22px; background: var(--input); color: var(--text); border: 1px solid var(--line2);
  border-radius: 3px; padding: 0 4px; font: inherit; font-size: 11.5px; outline: none;
}
select.itSel:focus, input.itNum:focus { border-color: var(--accent); }
input.itNum { width: 58px; text-align: right; }
.itSwMini { width: 20px; height: 20px; border: 1px solid var(--line2); position: relative; cursor: default; flex: none;
  background-image: linear-gradient(45deg,#888 25%,transparent 25%,transparent 75%,#888 75%), linear-gradient(45deg,#888 25%,#ccc 25%,#ccc 75%,#888 75%);
  background-size: 8px 8px; background-position: 0 0, 4px 4px; }
.itSwMini i { position: absolute; inset: 0; display: block; }
.itSwMini.none::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent 45%, #e00 46%, #e00 54%, transparent 55%); }
.itSwMini.trazo i { inset: 3px; border: 4px solid; background: transparent !important; }

/* ------------------------------------------------------------- caja de herramientas */
#itToolCol {
  width: var(--tool-w); background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: stretch; flex: none;
}
#itToolHead { height: 12px; text-align: center; color: var(--text-dim); font-size: 8px; letter-spacing: 2px; line-height: 12px; cursor: pointer; background: var(--bg); }
#itToolHead:hover { color: var(--text); }
#itToolbox { flex: 1; display: flex; flex-flow: row wrap; justify-content: center; align-content: flex-start; padding: 3px 2px; gap: 0; overflow-y: auto; overflow-x: hidden; }
#itToolbox::-webkit-scrollbar { width: 0; }
.itTool {
  position: relative; width: 34px; height: 28px; flex: none; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--ico); cursor: default;
}
body.itDoble .itTool { width: 36px; }
.itTool:hover { background: var(--hover); }
.itTool.on { background: var(--sel); color: var(--ico-on, #fff); border-color: var(--line2); }
.itTool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.itTool .fly { position: absolute; right: 1px; bottom: 1px; border-left: 4px solid transparent; border-bottom: 4px solid currentColor; opacity: .75; }
.itToolSep { width: 24px; height: 1px; background: var(--line2); margin: 3px 0; flex: none; }
body.itDoble .itToolSep { width: 66px; }

/* flyout: se abre a la derecha, con nombre y tecla, como en Illustrator */
.itFly { display: flex; flex-direction: column; padding: 3px 0; min-width: 0; }
.itFly .it { grid-template-columns: 28px 1fr auto; padding-right: 12px; }
.itFly .it .ico svg { width: 17px; height: 17px; }
.itFly .it.on { background: var(--sel); }

/* relleno y trazo al pie de la caja (cuadros superpuestos, como Illustrator) */
#itToolPie { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 8px; border-top: 1px solid var(--line); }
#itFillStroke { position: relative; width: 36px; height: 36px; }
.itSw { position: absolute; width: 22px; height: 22px; border: 1px solid #000; box-shadow: 0 0 0 1px #888; cursor: default;
  background-image: linear-gradient(45deg,#888 25%,transparent 25%,transparent 75%,#888 75%), linear-gradient(45deg,#888 25%,#ccc 25%,#ccc 75%,#888 75%);
  background-size: 8px 8px; background-position: 0 0, 4px 4px; }
.itSw i { position: absolute; inset: 0; display: block; }
#itSwFill { left: 0; top: 0; z-index: 2; }
#itSwStroke { right: 0; bottom: 0; z-index: 1; }
#itSwStroke i { inset: 3px; border: 4px solid; background: transparent !important; }
#itFillStroke.trazo #itSwFill { z-index: 1; }
#itFillStroke.trazo #itSwStroke { z-index: 2; }
.itSw.none::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent 45%, #e00 46%, #e00 54%, transparent 55%); }
#itSwStroke.none i { border: 0; }
#itSwSwap { position: absolute; right: -2px; top: -4px; font-size: 11px; color: var(--text-dim); cursor: default; line-height: 1; }
#itSwSwap:hover { color: var(--text); }
#itSwDef { position: absolute; left: -2px; bottom: -3px; width: 9px; height: 9px; border: 1px solid var(--text-dim); background: #fff; cursor: default; }
#itSwDef::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 6px; height: 6px; border: 1px solid var(--text-dim); background: #000; }
#itSwModos { display: flex; gap: 2px; }
.itSwModo { width: 11px; height: 11px; border: 1px solid var(--line2); cursor: default; }
.itSwModo[data-m="color"] { background: linear-gradient(135deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f); }
.itSwModo[data-m="grad"] { background: linear-gradient(90deg, #fff, #000); }
.itSwModo[data-m="none"] { background: #fff linear-gradient(to top right, transparent 45%, #e00 46%, #e00 54%, transparent 55%); }
.itSwModo.on { outline: 1px solid var(--ico-on, #fff); }
#itDrawMode, #itScreenMode { width: 16px; height: 16px; border: 1px solid var(--text-dim); border-radius: 2px; display: grid; place-items: center; cursor: default; }
#itDrawMode span { width: 8px; height: 8px; border: 1px solid var(--text-dim); }
#itScreenMode span { width: 10px; height: 7px; border: 1px solid var(--text-dim); }
#itToolEditar { color: var(--text-dim); font-size: 12px; cursor: default; line-height: 1; margin-top: 2px; }
#itToolEditar:hover { color: var(--text); }

/* ------------------------------------------------------------- pestañas de documento */
#doctabs { height: 26px; padding: 0 2px; background: var(--bg); gap: 1px; }
.dtab { border-radius: 0; border: 0; margin-top: 0; background: var(--panel); padding: 0 8px 0 12px; }
.dtab.on { background: var(--canvas-bg); color: var(--text); border-top: 2px solid var(--accent); }
.dtadd { border-radius: 0; }

/* ------------------------------------------------------------- lienzo, reglas, estado */
#stage { position: relative; }
#rulerCorner { font-size: 8.5px; }
#itStatus {
  display: flex; align-items: center; gap: 2px; height: 22px; padding: 0 6px; background: var(--panel);
  border-top: 1px solid var(--line); font-size: 11px; color: var(--text-dim); flex: none; white-space: nowrap;
}
#itStatus input { width: 52px; height: 18px; background: var(--input); border: 1px solid transparent; border-radius: 2px; color: var(--text); font: inherit; font-size: 11px; text-align: center; outline: none; }
#itStatus input:focus { border-color: var(--accent); }
#itStatus button { background: transparent; border: 0; color: var(--text-dim); font-size: 9px; width: 18px; height: 18px; cursor: default; border-radius: 2px; padding: 0; }
#itStatus button:hover { background: var(--hover); color: var(--text); }
#itStatus select { height: 18px; background: var(--input); border: 1px solid transparent; color: var(--text); font: inherit; font-size: 11px; max-width: 160px; outline: none; border-radius: 2px; }
.itStSep { width: 1px; height: 14px; background: var(--line2); margin: 0 5px; }
#itStInfo { color: var(--text); }
#itStHint { color: var(--text-dim); font-style: italic; padding-right: 6px; }

/* barra de tareas contextual (Illustrator 2023+): flota bajo la selección */
#itTareas {
  position: absolute; z-index: 20; display: flex; align-items: center; gap: 2px; padding: 3px 4px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
#itTareas[hidden] { display: none; }
#itTareas .itTb { width: 24px; height: 24px; }
#itTareas .itTxt { padding: 0 6px; font-size: 11px; color: var(--text); }

/* ------------------------------------------------------------- pantalla de inicio */
#itInicio {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 30; display: none;
  background: var(--bg); color: var(--text); overflow: auto;
}
#itInicio.show { display: grid; grid-template-columns: 210px 1fr; }
.itIniNav { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 0; display: flex; flex-direction: column; }
.itIniNav .n { padding: 8px 22px; cursor: default; color: var(--text-dim); border-left: 3px solid transparent; display: flex; gap: 8px; align-items: center; }
.itIniNav .n svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.itIniNav .n:hover { color: var(--text); background: var(--hover); }
.itIniNav .n.on { color: var(--text); border-left-color: var(--accent); background: var(--bg); }
.itIniNav .btns { padding: 6px 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.itIniNav .btns .btn { justify-content: center; height: 30px; }
.itIniBody { padding: 28px 40px; max-width: 1200px; }
.itIniBody h1 { margin: 0 0 4px; font-size: 22px; font-weight: 600; }
.itIniBody h2 { margin: 24px 0 8px; font-size: 13px; color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.itIniBody h2 small { color: var(--text-dim); font-weight: 400; }
.itIniBody p { margin: 0 0 10px; color: var(--text-dim); line-height: 1.5; max-width: 720px; }
.itIniPre { display: flex; gap: 12px; flex-wrap: wrap; }
.itIniPreCard {
  width: 140px; padding: 14px 12px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px;
  cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center;
}
.itIniPreCard:hover { border-color: var(--accent); background: var(--hover); }
.itIniPreCard i { display: block; background: #fff; border: 1px solid #999; }
.itIniPreCard b { font-size: 12px; font-weight: 600; }
.itIniPreCard span { color: var(--text-dim); font-size: 11px; }
.itIniCards { display: flex; gap: 12px; flex-wrap: wrap; }
.itIniCard {
  width: 190px; padding: 16px 14px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px;
  cursor: pointer; display: flex; flex-direction: column; gap: 8px;
}
.itIniCard:hover { border-color: var(--accent); }
.itIniCard svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.itIniCard b { font-size: 13px; font-weight: 600; }
.itIniCard span { color: var(--text-dim); font-size: 11px; line-height: 1.4; }
.itIniRec { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.itIniDoc { padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 5px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.itIniDoc:hover { border-color: var(--accent); }
.itIniDoc .mini { width: 38px; height: 48px; background: #fff; border: 1px solid #999; flex: none; }
.itIniDoc b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.itIniDoc span { color: var(--text-dim); font-size: 11px; }
.itIniTips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; max-width: 820px; }
.itIniTip { display: flex; gap: 10px; align-items: flex-start; }
.itIniTip kbd { flex: none; font: 11px/1 Consolas, monospace; padding: 4px 6px; background: var(--panel2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 3px; min-width: 52px; text-align: center; }
.itIniFoot { margin-top: 30px; display: flex; gap: 14px; align-items: center; color: var(--text-dim); font-size: 11px; }
.itIniFoot label { display: flex; gap: 5px; align-items: center; }

/* ------------------------------------------------------------- paneles (dock derecho) */
#itDock { display: flex; flex-direction: row; flex: none; background: var(--bg); border-left: 1px solid var(--line); }
#itDock.oculto { display: none; }
#itDockCols { width: var(--dock-w); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--panel); }
#itDock.sinCol #itDockCols { display: none; }
#itDockIcons { width: 38px; display: flex; flex-direction: column; align-items: center; padding: 4px 0; gap: 1px; background: var(--panel); overflow-y: auto; overflow-x: hidden; }
#itDockIcons::-webkit-scrollbar { width: 0; }
.itDockIco { width: 32px; height: 30px; display: grid; place-items: center; border-radius: 3px; color: var(--ico); cursor: default; position: relative; }
.itDockIco:hover { background: var(--hover); }
.itDockIco.on { background: var(--sel); color: var(--ico-on, #fff); }
.itDockIco svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.itDockIcoSep { width: 24px; height: 1px; background: var(--line2); margin: 3px 0; }
/* grupos de paneles apilados en la columna */
.itGrupo { display: flex; flex-direction: column; min-height: 0; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.itGrupo.abierto { flex: 1 1 0; }
.itGrupo.abierto.alto { flex: 3 1 0; }
.itGrupoTabs { display: flex; align-items: stretch; height: 28px; background: var(--bg); flex: none; overflow: hidden; }
.itGrupoTab {
  padding: 0 12px; display: flex; align-items: center; font-size: 11.5px; color: var(--text-dim); cursor: default; white-space: nowrap;
  border-right: 1px solid var(--line); gap: 6px;
}
.itGrupoTab:hover { color: var(--text); }
.itGrupoTab.on { background: var(--tab-on); color: var(--text); }
.itGrupoTabs .spacer { flex: 1; }
.itGrupoTabs .menu { width: 22px; display: grid; place-items: center; color: var(--text-dim); font-size: 12px; cursor: default; }
.itGrupoTabs .menu:hover { color: var(--text); }
.itGrupoTabs .plegar { width: 18px; display: grid; place-items: center; color: var(--text-dim); font-size: 10px; cursor: default; }
.itGrupoTabs .plegar:hover { color: var(--text); }
.itGrupoBody { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; background: var(--panel2); display: none; }
.itGrupo.abierto .itGrupoBody { display: block; }
.itGrupoBody::-webkit-scrollbar { width: 9px; }
.itGrupoBody::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 5px; }
/* los paneles del motor, sin su cabecera */
.itGrupoBody .panel > h3, .itFlot .panel > h3 { display: none; }
.itGrupoBody .panel, .itFlot .panel { border-bottom: 0; }
.itGrupoBody .panel > .body, .itFlot .panel > .body { padding: 10px 10px 12px; }
.itPanel { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.itPanel .row .lab { width: 72px; }
.itPanel .titulo { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; }
.itPanel .seccion { font-weight: 600; font-size: 11.5px; padding: 4px 0 2px; border-bottom: 1px solid var(--line2); display: flex; align-items: center; gap: 6px; }
.itPanel .seccion .mas { margin-left: auto; color: var(--text-dim); font-size: 12px; cursor: default; }
.itPanel .seccion .mas:hover { color: var(--text); }
.itBtns { display: flex; gap: 4px; flex-wrap: wrap; }
.itBtns .btn { padding: 3px 6px; }
.itBtns .btn.icon { min-width: 26px; }
.itTabs2 { display: flex; border-bottom: 1px solid var(--line); margin: -10px -10px 8px; }
.itTabs2 .t { flex: 1; text-align: center; padding: 6px 2px; font-size: 11px; color: var(--text-dim); cursor: default; border-bottom: 2px solid transparent; }
.itTabs2 .t:hover { color: var(--text); }
.itTabs2 .t.on { color: var(--text); border-bottom-color: var(--accent); }
.itGrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; align-items: center; }
.itGrid2 .row { gap: 4px; }
.itGrid2 .row .lab { width: 14px; text-align: right; }
.itGrid2 .num { width: 100%; min-width: 0; }
.itAncla { display: grid; grid-template-columns: repeat(3, 10px); gap: 2px; }
.itAncla i { width: 10px; height: 10px; border: 1px solid var(--text-dim); display: block; cursor: default; }
.itAncla i.on { background: var(--accent); border-color: var(--accent); }
.itNum4 { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 6px; align-items: center; }
.itNum4 .lab { color: var(--text-dim); font-size: 11px; text-align: right; }
.itNum4 .num { width: 100%; min-width: 0; }
.itHist { display: flex; flex-direction: column; }
.itHist .h { padding: 4px 8px; font-size: 11.5px; cursor: default; display: flex; gap: 6px; }
.itHist .h:hover { background: var(--hover); }
.itHist .h.on { background: var(--sel); }
.itHist .h.futuro { opacity: .45; }
.itHist .h .n { color: var(--text-dim); width: 24px; text-align: right; }
.itLista { display: flex; flex-direction: column; border: 1px solid var(--line2); background: var(--input); max-height: 260px; overflow: auto; }
.itLista .f { display: flex; align-items: center; gap: 8px; padding: 4px 8px; cursor: default; font-size: 11.5px; }
.itLista .f:hover { background: var(--hover); }
.itLista .f.on { background: var(--sel); }
.itLista .f .mini { width: 26px; height: 20px; background: #fff; border: 1px solid #888; flex: none; }
.itLista .f .n { color: var(--text-dim); width: 18px; text-align: right; }
.itLista .f .x { margin-left: auto; color: var(--text-dim); }
.itLista .f .x:hover { color: var(--text); }
/* panel flotante que sale de un icono del dock */
.itFlot {
  position: fixed; z-index: 650; width: var(--dock-w); max-height: 70vh; display: flex; flex-direction: column;
  background: var(--panel2); border: 1px solid var(--line); box-shadow: 0 8px 26px rgba(0,0,0,.5); border-radius: 3px;
}
.itFlot .itGrupoTabs { border-radius: 3px 3px 0 0; }
.itFlot .itFlotBody { overflow-y: auto; min-height: 0; }
.itFlot .itFlotBody::-webkit-scrollbar { width: 9px; }
.itFlot .itFlotBody::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 5px; }

/* muestras */
.itMuestras { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px 0; }
.itMuestra { width: 17px; height: 17px; border: 1px solid rgba(0,0,0,.4); cursor: default; position: relative; flex: none; }
.itMuestra:hover { outline: 2px solid var(--ico-on, #fff); z-index: 2; }
.itMuestra.on { outline: 2px solid var(--accent); }
.itMuestra.none { background: #fff; }
.itMuestra.none::after { content: ""; position: absolute; inset: 1px; background: linear-gradient(to top right, transparent 44%, #e00 45%, #e00 55%, transparent 56%); }
.itMuestra.directo::after { content: ""; position: absolute; right: 0; bottom: 0; width: 0; height: 0; border-left: 6px solid transparent; border-bottom: 6px solid #fff; }
.itMuestra.directo::before { content: ""; position: absolute; right: 1px; bottom: 1px; width: 3px; height: 3px; background: #000; z-index: 1; border-radius: 50%; }
.itMuestra.grupo { width: 100%; height: auto; border: 0; font-size: 10px; color: var(--text-dim); padding: 4px 0 1px; }
.itMuestra.grupo:hover { outline: 0; }
.itMuestras.lista { flex-direction: column; gap: 0; }
.itMuestras.lista .itMuestra { width: 100%; height: 20px; border: 0; display: flex; align-items: center; gap: 8px; }
.itMuestras.lista .itMuestra i { width: 16px; height: 14px; border: 1px solid rgba(0,0,0,.4); display: block; flex: none; }
.itMuestras.lista .itMuestra span { font-size: 11px; color: var(--text); }
.itPanelPie { display: flex; gap: 2px; align-items: center; border-top: 1px solid var(--line2); padding-top: 6px; margin-top: 2px; }
.itPanelPie .spacer { flex: 1; }
.itPanelPie .itTb { width: 22px; height: 22px; }
.itPanelPie select { max-width: 130px; }

/* degradado */
.itGradBar { height: 18px; border: 1px solid var(--line2); position: relative; margin: 6px 0 14px; cursor: crosshair; }
.itGradStop { position: absolute; top: 100%; width: 12px; height: 12px; margin-left: -6px; border: 1px solid #000; box-shadow: 0 0 0 1px #fff; cursor: default; }
.itGradStop.on { outline: 2px solid var(--accent); }
.itGradPrev { width: 40px; height: 40px; border: 1px solid var(--line2); flex: none; }

/* apariencia */
.itApar { display: flex; flex-direction: column; border: 1px solid var(--line2); background: var(--input); }
.itApar .f { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid var(--line2); font-size: 11.5px; }
.itApar .f:last-child { border-bottom: 0; }
.itApar .f .sw { width: 16px; height: 14px; border: 1px solid #888; flex: none; }
.itApar .f .v { margin-left: auto; color: var(--text-dim); }

/* trazo: dibujitos de extremo y vértice */
.itTrazoBtns .btn { padding: 2px 4px; }
.itTrazoPrev { height: 40px; border: 1px solid var(--line2); background: var(--input); }

/* navegador */
.itNavPrev { width: 100%; border: 1px solid var(--line2); background: var(--canvas-bg); display: block; }

/* ------------------------------------------------------------- cuadros de diálogo con cara de Illustrator */
#modal { border-radius: 4px; min-width: 440px; }
#modal h2 { font-size: 13px; font-weight: 600; padding: 10px 16px; background: var(--panel); }
#modal .mbody { padding: 14px 16px; }
#modal .mfoot { padding: 10px 16px; background: var(--panel); }
.btn { border-radius: 3px; background: var(--panel2); }
.btn:hover { background: var(--hover); }
.btn.on { background: var(--sel); border-color: var(--line2); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; min-width: 84px; justify-content: center; border-radius: 14px; }
.btn.primary:hover { background: var(--accent2); }
.btn.redondo { border-radius: 14px; }
.num, select.sel, input.txt { background: var(--input); }
.itForm { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; align-items: center; }
.itForm .lab { color: var(--text); font-size: 12px; }
.itForm .fila { display: flex; gap: 6px; align-items: center; }
.itForm .fila .num, .itForm .fila select { height: 24px; }
.itSecc { font-weight: 600; font-size: 12px; margin: 8px 0 2px; grid-column: 1 / -1; border-bottom: 1px solid var(--line2); padding-bottom: 3px; }
/* Nuevo documento: pestañas de categoría, tarjetas y detalles a la derecha */
.itNuevo { display: grid; grid-template-columns: 1fr 250px; gap: 18px; min-width: 760px; }
.itNuevoTabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line2); margin-bottom: 12px; }
.itNuevoTabs .t { padding: 6px 12px; color: var(--text-dim); cursor: default; border-bottom: 2px solid transparent; font-size: 12px; }
.itNuevoTabs .t:hover { color: var(--text); }
.itNuevoTabs .t.on { color: var(--text); border-bottom-color: var(--accent); }
.itNuevoGrid { display: flex; gap: 10px; flex-wrap: wrap; max-height: 330px; overflow-y: auto; align-content: flex-start; }
.itNuevoCard { width: 118px; padding: 10px 8px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.itNuevoCard:hover { border-color: var(--accent); }
.itNuevoCard.on { border-color: var(--accent); background: var(--hover); }
.itNuevoCard i { display: block; background: #fff; border: 1px solid #999; }
.itNuevoCard b { font-size: 11px; font-weight: 600; }
.itNuevoCard span { font-size: 10px; color: var(--text-dim); }
.itNuevoDet { display: flex; flex-direction: column; gap: 8px; }
.itNuevoDet h4 { margin: 0 0 4px; font-size: 12px; }
.itNuevoDet .num, .itNuevoDet select, .itNuevoDet input.txt { width: 100%; box-sizing: border-box; }
.itNuevoDet .dos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.itNuevoDet .lab { font-size: 10.5px; color: var(--text-dim); }
.itOri { display: inline-flex; gap: 3px; }
.itOri .btn { width: 30px; height: 26px; justify-content: center; padding: 0; }
.itOri .btn i { display: block; border: 1.5px solid currentColor; }
/* Preferencias */
.itPref { display: grid; grid-template-columns: 190px 1fr; min-height: 380px; }
.itPrefNav { border-right: 1px solid var(--line2); padding-right: 8px; margin-right: 14px; }
.itPrefNav .n { padding: 5px 10px; cursor: default; border-radius: 3px; color: var(--text-dim); font-size: 11.5px; }
.itPrefNav .n:hover { background: var(--hover); color: var(--text); }
.itPrefNav .n.on { background: var(--sel); color: var(--text); }
.itPrefPag { display: none; flex-direction: column; gap: 10px; }
.itPrefPag.on { display: flex; }
.itPrefPag h4 { margin: 0 0 4px; font-size: 13px; }
.itBrillos { display: flex; gap: 8px; }
.itBrillo { width: 56px; height: 40px; border: 2px solid var(--line2); border-radius: 4px; cursor: pointer; display: grid; place-items: end center; font-size: 9px; padding-bottom: 2px; }
.itBrillo.on { border-color: var(--accent); }
.itCaracteres { display: grid; grid-template-columns: repeat(12, 28px); gap: 2px; max-height: 260px; overflow: auto; }
.itCaracteres button { width: 28px; height: 28px; font-size: 15px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 3px; cursor: pointer; color: var(--text); }
.itCaracteres button:hover { border-color: var(--accent); background: var(--hover); }
.itAyudaTabla { width: 100%; border-collapse: collapse; }
.itAyudaTabla td { padding: 3px 4px; border-bottom: 1px solid var(--line2); }
.itAyudaTabla td:last-child { text-align: right; color: var(--text-dim); white-space: nowrap; }
.itAcerca { display: flex; gap: 16px; align-items: flex-start; }
.itAcerca img { width: 64px; height: 64px; border-radius: 10px; }
.itGrafDatos { width: 100%; height: 150px; font: 12px Consolas, monospace; background: var(--input); color: var(--text); border: 1px solid var(--line2); }

/* lo de Krea que no pinta en Illustrator (su CSS les pone display:flex, así que
   el atributo hidden no basta) */
#wsswitch, #btnInstalar, #floatbar, #menus, #toolbox, #leftdock, #rightdock, #palette, #docname, #statusbar, #pagebar { display: none !important; }
.vernueva span::before { content: ""; }

/* modos de pantalla (F): pantalla completa con barra de menús / sin nada */
body.itFull { grid-template-rows: 0 0 1fr; }
body.itFull > *:not(#workspace):not(#modalbg):not(#toast):not(#itMenuPop):not(#ctxmenu) { display: none !important; }
body.itFull #itToolCol, body.itFull #itDock, body.itFull #doctabs, body.itFull #itStatus { display: none !important; }
body.itFullMenu { grid-template-rows: 32px 0 1fr; }
body.itFullMenu #propbar, body.itFullMenu #itToolCol, body.itFullMenu #itDock, body.itFullMenu #doctabs { display: none !important; }
body.norulers #rulers { display: none; }
body.norulers #canvasWrap { margin-left: 0; }
body.itSinPaneles #itToolCol, body.itSinPaneles #itDock, body.itSinPaneles #propbar { display: none !important; }
body.itSinPaneles { grid-template-rows: 32px 0 1fr; }
