/* Icepak 2022 R1 web clone — measured layout.
 * Reference: /data/dev/ansys2202r1-work/shots/icepak-main.png (1736x969 PrintWindow capture,
 *   window frame included). Client area = abs (8,31)-(1728,961) -> 1720x930; every number
 *   below is a CLIENT pixel coordinate measured from that crop.
 *
 * Vertical structure (client px):
 *   0..17   menu bar, white (label ink rows 4..13)
 *   18      #f2f2f2   19  #f0f0f0   20  #ffffff
 *   21..48  toolbar band #d9d9d9 (16x16 icons, two-colour classic Qt toolbuttons)
 *   49      #000000   1px hard rule under the toolbar
 *   50..929 body: left dock (0..217) | icon strip + splitter (218..253) | content (254..1717)
 *                 right edge x1718..1719 #d9d9d9
 *   content: graphics 50..774 (vertical blue->white gradient); sash rows 775..781;
 *            console dock 782..904; property dock 782..929; bottom bar 905..929
 * Horizontal body: tree box interior x3..214, tree text x46; console screen x256..953,
 *   console scrollbar x954..971; black divider x978; property viewport x979..1717.
 *
 * Font: the real app is a classic Win32 app (MS Sans Serif / Tahoma metrics). The metric
 *   closest face available in the headless renderer is Liberation Sans (Arial metrics).
 */
:root {
  --icp-d9: #d9d9d9;
  --icp-f0: #f0f0f0;
  --icp-menu-hover: #d9d9d9;
  --icp-select: #0A246A;
  --fz-menu: 11px;
  --fz-console: 11px;
  --fz-bar: 13px;
  --fz-tree: 10.5px;
  --ct: 2px;
  --mt: 1px;
  --bt: 6px;
  --font-menu: var(--font-classic);
  --font-classic: "Liberation Sans", "Arimo", Arial, "Tahoma", sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  width: 1720px; height: 930px;
  overflow: hidden;
  background: var(--icp-d9);
}
body {
  font-family: var(--font-classic);
  font-size: 11px;
  color: #000;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
img { -webkit-user-drag: none; display: block; }
.win { position: relative; width: 1720px; height: 930px; overflow: hidden; background: #fff; }

/* ------------------------------------------------ top bands */
.menubar { position: absolute; left: 0; top: 0; width: 1720px; height: 18px; background: #fff; }
.menubar .m {
  position: absolute; top: var(--mt); height: 18px; line-height: 18px;
  font-family: var(--font-menu); font-size: var(--fz-menu); letter-spacing: 0.2px; color: #000; white-space: nowrap; cursor: default;
}
.menubar .m:hover, .menubar .m.open { background: var(--icp-menu-hover); }
.menuline1 { position: absolute; left: 0; top: 18px; width: 1720px; height: 1px; background: #f2f2f2; }
.menuline2 { position: absolute; left: 0; top: 19px; width: 1720px; height: 1px; background: #f0f0f0; }
.toolwhite { position: absolute; left: 0; top: 20px; width: 1720px; height: 1px; background: #fff; }
.toolbar { position: absolute; left: 0; top: 21px; width: 1720px; height: 28px; background: var(--icp-d9); }
.toolblack { position: absolute; left: 0; top: 49px; width: 1720px; height: 1px; background: #000; }

/* toolbar buttons: hover box measured from the reference button runs */
.tb-btn { position: absolute; top: -1px; height: 29px; cursor: default; }
.tb-btn:hover { background: #e8f0fa; }
.tb-btn.active { background: #cce4f7; }
.tb-btn img { position: absolute; }
.tb-sep { position: absolute; top: -1px; height: 29px; width: 2px; }
.tb-sep.solid { background: linear-gradient(to right, #000 0 1px, #fff 1px 2px); }
.tb-end { position: absolute; top: -1px; width: 11px; height: 29px; }

/* ------------------------------------------------ left dock */
.leftdock {
  position: absolute; left: 0; top: 50px; width: 218px; height: 880px;
  background: linear-gradient(to right,
    #ffffff 0 1px, #d9d9d9 1px 2px, #f0f0f0 2px 3px, #ffffff 3px 215px,
    #f0f0f0 215px 216px, #d9d9d9 216px 217px, #828282 217px 218px);
}
.tabstrip { position: absolute; left: 0; top: 0; width: 218px; height: 22px; }
.tabstrip .tabhit { position: absolute; top: 0; height: 22px; cursor: default; }
.treebox { position: absolute; left: 0; top: 22px; width: 218px; height: 833px; overflow: hidden; }
.leftbottom {
  position: absolute; left: 0; top: 855px; width: 218px; height: 25px;
  background: linear-gradient(to right, #ffffff 0 1px, #d9d9d9 1px 217px, #828282 217px 218px);
}
/* tree */
.trow { position: absolute; left: 3px; width: 214px; height: 21px; cursor: default; }
.trow .selbg { position: absolute; left: 0; top: 0; width: 100%; height: 21px; background: var(--icp-select); z-index: 0; }
.trow > * { z-index: 1; }
.trow img { position: absolute; }
.trow .lbl { position: absolute; left: 42px; top: 1px; height: 15px; line-height: 15px; font-size: var(--fz-tree); white-space: nowrap; }
.trow.sel .lbl { color: #fff; }
.trow .exp { position: absolute; left: 3px; top: 2px; width: 16px; height: 18px; }
.trow .exp img { position: absolute; }
.trow .exp:hover { background: #cce4f7; }
.tree-lines { position: absolute; left: 0; top: 0; width: 218px; height: 833px; pointer-events: none; }
.tree-lines i { position: absolute; background: #a0a0a0; }
/* tooltip (classic yellow) */
.tip {
  position: absolute; z-index: 50; background: #ffffe1; color: #000;
  border: 1px solid #000; padding: 1px 3px; font-size: 11px; white-space: nowrap;
  pointer-events: none;
}

/* ------------------------------------------------ icon strip dock */
.stripdock {
  position: absolute; left: 218px; top: 50px; width: 36px; height: 880px;
  background: linear-gradient(to right,
    #ffffff 0 1px, #d9d9d9 1px 25px, #000000 25px 26px, #d9d9d9 26px 29px,
    #ffffff 29px 30px, #d9d9d9 30px 31px, #828282 31px 32px, #000000 32px 33px,
    #d9d9d9 33px 36px);
}
.stripdock img { position: absolute; }
.stripdock .st-btn { position: absolute; left: 1px; width: 24px; height: 20px; cursor: default; }
.stripdock .st-btn:hover { background: #cce4f7; }
.stripdock .st-btn img { position: absolute; }
.stripdock .st-sep { position: absolute; left: 1px; width: 24px; height: 2px; background: #828282; }

/* ------------------------------------------------ graphics */
.gfx {
  position: absolute; left: 254px; top: 50px; width: 1464px; height: 725px;
  overflow: hidden;
  background-image: url("../assets/chrome/icp-gfx-gradient.png");
  background-repeat: no-repeat;
  background-size: 100% 725px;
}
.gfx .watermark { position: absolute; left: 1364px; top: 0px; width: 100px; height: 96px; }
.gfx .axis { position: absolute; left: 46px; top: 578px; width: 100px; height: 94px; }
.gfxedge { position: absolute; left: 1718px; top: 50px; width: 2px; height: 880px; background: var(--icp-d9); }

/* solved-result overlay (hidden until the solver runs) */
.solved { position: absolute; right: 18px; bottom: 18px; background: #fff; border: 1px solid #000;
  box-shadow: 2px 2px 6px rgba(0,0,0,.3); padding: 4px; }
.solved .hdr { font-size: 11px; margin-bottom: 3px; }
.solved canvas { display: block; image-rendering: pixelated; }
.solved .legend { display: flex; align-items: center; gap: 4px; font-size: 10px; margin-top: 2px; }
.solved .legend .bar { width: 120px; height: 8px;
  background: linear-gradient(to right, #00007f, #0000ff, #00ffff, #00ff00, #ffff00, #ff0000, #7f0000); border: 1px solid #555; }

/* ------------------------------------------------ sash rows between graphics and bottom docks */
.sash { position: absolute; left: 254px; width: 1464px; }
.sash.a { top: 775px; height: 3px; background: var(--icp-d9); }
.sash.b { top: 778px; height: 1px; background: #ffffff; }
.sash.c { top: 779px; height: 1px; background: var(--icp-d9); }
.sash.d { top: 780px; height: 1px; background: #828282; }
.sash.e { top: 781px; height: 1px; background: #000000; }

/* ------------------------------------------------ console dock */
.consolewrap { position: absolute; left: 254px; top: 785px; width: 725px; height: 120px; background: var(--icp-d9); }
.consolewrap .c-t1 { position: absolute; left: 0; top: 0; width: 721px; height: 1px; background: #999999; }
.consolewrap .c-l1 { position: absolute; left: 0; top: 0; width: 1px; height: 120px; background: #999999; }
.consolewrap .c-t2 { position: absolute; left: 1px; top: 1px; width: 720px; height: 1px; background: #000000; }
.consolewrap .c-l2 { position: absolute; left: 1px; top: 1px; width: 1px; height: 119px; background: #000000; }
.consolewrap .c-screen { position: absolute; left: 2px; top: 2px; width: 698px; height: 117px; background: #ffffff; overflow: hidden; }
.consolewrap .c-text { position: absolute; left: 6px; top: var(--ct); width: 690px; }
.consolewrap .c-text div { height: 16px; line-height: 16px; font-size: var(--fz-console); letter-spacing: 0.5px; color: #000; white-space: pre; }
.consolewrap .c-vsb { position: absolute; left: 699px; top: 0; width: 19px; height: 120px; }
.consolewrap .l-white { position: absolute; left: 720px; top: 0; width: 1px; height: 120px; background: #ffffff; }
.consolewrap .l-d9 { position: absolute; left: 721px; top: 0; width: 1px; height: 120px; background: var(--icp-d9); }
.consolewrap .l-82 { position: absolute; left: 722px; top: 0; width: 1px; height: 120px; background: #828282; }
.consolewrap .l-black { position: absolute; left: 723px; top: 0; width: 1px; height: 120px; background: #000000; }

/* ------------------------------------------------ property dock */
.props { position: absolute; left: 979px; top: 782px; width: 739px; height: 148px; background: var(--icp-d9); overflow: hidden; }
.props .p-vsb { position: absolute; left: 721px; top: 3px; width: 18px; height: 128px; }
.props .p-hsb { position: absolute; left: 2px; top: 131px; width: 720px; height: 17px; }
.props .p-table { position: absolute; left: 6px; top: 6px; width: 700px; height: 88px; overflow: hidden; }
.props .p-row { position: absolute; left: 0; height: 17px; width: 700px; }
.props .p-key { position: absolute; left: 0; top: 2px; width: 200px; font-size: 11px; color: #000; }
.props .p-val { position: absolute; left: 205px; top: 2px; width: 480px; font-size: 11px; color: #000; }
.props .p-head { position: absolute; left: 6px; top: 2px; font-size: 11px; font-weight: 700; }

/* ------------------------------------------------ bottom bar */
.bottombar { position: absolute; left: 254px; top: 905px; width: 725px; height: 25px; background: var(--icp-d9); }
.bottombar .chk { position: absolute; width: 12px; height: 12px; background: #fff; border: 1px solid #828282; cursor: default; }
.bottombar .chk span { position: absolute; left: 2px; top: 0px; font-size: 11px; line-height: 10px; font-weight: 700; }
.bottombar .clbl { position: absolute; top: var(--bt); font-size: var(--fz-bar); cursor: default; }
.bottombar .save {
  position: absolute; left: 135px; top: 1px; width: 46px; height: 23px; font-size: var(--fz-bar);
  background: var(--icp-d9); border: 1px solid;
  border-color: #ffffff #828282 #828282 #ffffff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; cursor: default;
}
.bottombar .save:active { border-color: #828282 #ffffff #ffffff #828282; }

/* ------------------------------------------------ classic Qt menu popup */
.qtmenu { background: var(--icp-d9); border: 1px solid #000; box-shadow: 2px 2px 3px rgba(0,0,0,.3);
  padding: 2px 0; min-width: 120px; font-size: 11px; }
.qtmenu .mi { height: 19px; padding: 0 8px 0 26px; font-size: 11px; color: #000; position: relative; line-height: 19px; white-space: nowrap; }
.qtmenu .mi:hover { background: var(--icp-select); color: #fff; }
.qtmenu .mi .icon { position: absolute; left: 4px; width: 16px; height: 16px; top: 50%; margin-top: -8px; }
.qtmenu .mi .accel { position: absolute; right: 12px; top: 0; line-height: 19px; font-size: 11px; color: #000; }
.qtmenu .mi:hover .accel { color: #fff; }
.qtmenu .mi .arrow { position: absolute; right: 6px; top: 0; line-height: 19px; font-size: 11px; }
.qtmenu .sep { height: 8px; border-top: 1px solid #9a9a9a; margin: 0 3px; }
.qtmenu .mi.disabled { color: #9a9a9a; }

/* modal dialog (About / numeric validation report) */
.dlg-back { position: fixed; inset: 0; background: rgba(0,0,0,.15); z-index: 100; }
.dlg { position: absolute; background: var(--icp-d9); border: 1px solid #000; box-shadow: 2px 2px 6px rgba(0,0,0,.4); z-index: 101; }
.dlg .dlg-title { height: 20px; background: #0A246A; color: #fff; font-size: 11px; line-height: 20px; padding: 0 6px; }
.dlg .dlg-body { padding: 10px; font-size: 11px; max-width: 760px; max-height: 420px; overflow: auto; }
.dlg .dlg-body table { border-collapse: collapse; }
.dlg .dlg-body td, .dlg .dlg-body th { border: 1px solid #a0a0a0; padding: 2px 6px; font-size: 11px; text-align: left; }
.dlg .dlg-body th { background: #c8c8c8; }
.dlg .dlg-foot { text-align: right; padding: 0 10px 10px; }
.dlg button { font-family: var(--font-classic); font-size: 11px; padding: 2px 14px; background: var(--icp-d9);
  border: 1px solid; border-color: #fff #828282 #828282 #fff; cursor: default; }
.dlg button:active { border-color: #828282 #fff #fff #828282; }
.pass { color: #006400; font-weight: 700; }
.fail { color: #b00000; font-weight: 700; }

/* debug */
#boot-error { position: fixed; left: 4px; bottom: 4px; z-index: 99999; background: #fff; color: #b00;
  font: 12px monospace; padding: 4px 8px; border: 1px solid #b00; white-space: pre-wrap; max-width: 1200px; }

