/* ANSYS TurboGrid 2022 R1 Launcher — web replica (measured pixel layout).
 *
 * Reference: /data/dev/ansys2202r1-work/shots/turbogrid-launcher.png
 *   PrintWindow capture 528x339; the captured window client area is (8,31)-(520,331) = 512x300.
 *   This page renders the CLIENT area only at its true size and centers it on a desktop
 *   background (the OS title bar / window frame are non-client and not reproduced).
 *
 * Measured client bands (px, row by row on the reference):
 *    0..17   menu bar (white; items File/Edit/CFX/Show/Tools/User/Help in #A0A0A0)
 *   18..19   1px #F2F2F2 + 1px white
 *   20..76   launch band #F0F0F0 (4 product icons 32x32 at y=24, labels below)
 *   77..78   1px #B9B9B9 + 1px white
 *   79..105  working-directory band #F0F0F0 (label x=10, combo x=126..441, 2 icon buttons)
 *  106      1px #B9B9B9
 *  107..299  lower band #F0F0F0: list box x=3..491 y=110..278 (white viewport),
 *            scrollbar x=493..511, Qt size-grip dots bottom right (x501..508,y290..297).
 * Left edge of both bands carries a 2px dotted rule (x=4..5, 2px dots every 4px, #B8B8B8).
 */
:root {
  /* Typography calibrated against the capture: Windows renders the launcher with a
     Segoe-UI-class face; Liberation Sans at 11.5px + the horizontal scale below is the
     closest available match in this container (width/height within ~1px of the capture). */
  --menu-fz: 11.5px; --menu-sx: 0.80; --menu-top: 1px; --menu-pad: 6px;
  --label-fz: 11.5px; --label-sx: 0.88; --label-top: 36px;
  --wd-fz: 11.5px; --wd-sx: 0.92; --wd-top: 6px;
  --combo-fz: 11.5px; --combo-sx: 0.92; --combo-pt: 1px;
  --tg-bg: #F0F0F0;
  --tg-line: #B9B9B9;
  --tg-menu-text: #A0A0A0;
  --tg-menu-text-hot: #303030;
  --tg-ink: #000000;
  --tg-edit-bg: #FEFEFE;
  --tg-edit-border: #ECECEC;
  --tg-edit-border-bottom: #838383;
  --tg-sb-arrow: #A4A4A4;
  --tg-grip: #BFBFBF;
  --tg-font: "Liberation Sans", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: #000; }
body {
  font-family: var(--tg-font);
  font-size: 11px;
  color: var(--tg-ink);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
img { -webkit-user-drag: none; }
button { font-family: inherit; font-size: inherit; color: inherit; }
.hidden { display: none !important; }

/* ============================================================ desktop + window */
#desktop {
  position: fixed; inset: 0; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.tgwin {
  position: relative; width: 512px; height: 300px; overflow: hidden;
  background: var(--tg-bg);
}

/* ================================================================= menu bar */
.menubar { position: absolute; left: 0; top: 0; width: 512px; height: 18px; background: #FFFFFF; }
.menubar .m {
  position: absolute; top: var(--menu-top); height: 17px; line-height: 17px; padding: 0 var(--menu-pad);
  color: var(--tg-menu-text); white-space: nowrap; cursor: default; font-size: var(--menu-fz);
}
.menubar .m .mtxt { display: inline-block; transform: scaleX(var(--menu-sx)); transform-origin: left center; }
.menubar .m:hover, .menubar .m.open { color: var(--tg-menu-text-hot); }
.menuline { position: absolute; left: 0; top: 18px; width: 512px; height: 1px; background: #F2F2F2; }
.menuline2 { position: absolute; left: 0; top: 19px; width: 512px; height: 1px; background: #FFFFFF; }

/* ============================================================= launch band */
.launchband { position: absolute; left: 0; top: 20px; width: 512px; height: 57px; background: var(--tg-bg); }
.dotline {
  position: absolute; left: 4px; width: 2px;
  background-image: linear-gradient(to bottom, #B8B8B8 0 2px, transparent 2px 4px);
  background-size: 2px 4px;
}
.launchband .dotline { top: 3px; height: 50px; }
.prodbtn {
  position: absolute; top: 4px; width: 32px; height: 32px; padding: 0; border: 0;
  background: transparent; cursor: default;
}
.prodbtn img { position: absolute; left: 0; top: 0; display: block; width: 32px; height: 32px; }
.prodbtn .plabel {
  position: absolute; left: 50%; top: var(--label-top); height: 14px; line-height: 14px; font-size: var(--label-fz);
  white-space: nowrap; color: #000; transform: translateX(-50%) scaleX(var(--label-sx)); transform-origin: center top;
}
.prodbtn:hover .plabel { background: #DDEBF7; }
.prodbtn:active .plabel { background: #B8D8F0; }

/* ============================================================ separators */
.sepline { position: absolute; left: 0; top: 77px; width: 512px; height: 1px; background: var(--tg-line); }
.sepline2 { position: absolute; left: 0; top: 78px; width: 512px; height: 1px; background: #FFFFFF; }
.line106 { position: absolute; left: 0; top: 106px; width: 512px; height: 1px; background: var(--tg-line); }

/* ====================================================== working directory row */
.wdband { position: absolute; left: 0; top: 79px; width: 512px; height: 27px; background: var(--tg-bg); }
.wdband .dotline { top: 3px; height: 21px; }
.wdlbl {
  position: absolute; left: 10px; top: var(--wd-top); height: 17px; line-height: 17px;
  font-size: var(--wd-fz); color: #000; white-space: nowrap; cursor: default;
  transform: scaleX(var(--wd-sx)); transform-origin: left center;
}
.combo {
  position: absolute; left: 126px; top: 3px; width: 316px; height: 20px;
  background: var(--tg-edit-bg); border: 1px solid var(--tg-edit-border);
  border-bottom-color: var(--tg-edit-border-bottom);
}
.comboedit {
  position: absolute; left: 0; top: 0; width: 320px; height: 18px; border: 0; outline: none;
  background: transparent; font-family: inherit; font-size: var(--combo-fz); color: #000; padding: var(--combo-pt) 0 0 3px;
  transform: scaleX(var(--combo-sx)); transform-origin: left center;
}
.comboarrow {
  position: absolute; left: 302px; top: 8px; width: 8px; height: 4px; cursor: default;
  background: url("../assets/tg-combo-arrow.png") no-repeat 0 0; background-size: 8px 4px;
  border: 0; transform: none;
}
.combo.open { border-color: #7A9CC6; }
.iconbtn {
  position: absolute; top: 2px; width: 26px; height: 23px; padding: 0; border: 0;
  background: transparent; cursor: default;
}
.iconbtn img { display: block; width: 26px; height: 23px; }
.iconbtn:hover img { filter: brightness(0.97) saturate(1.05); }
.iconbtn:active img { filter: brightness(0.9); }
.folderbtn { left: 449px; }
.helpbtn { left: 483px; }

/* ================================================================ lower band */
.lowband { position: absolute; left: 0; top: 107px; width: 512px; height: 193px; background: var(--tg-bg); }
.listframe {
  position: absolute; left: 3px; top: 3px; width: 489px; height: 169px;
  background: #FFFFFF;
  border-top: 1px solid #ECECEC; border-left: 1px solid #ECECEC;
  border-right: 1px solid #E6E6E6; border-bottom: 1px solid #838383;
}
.listview {
  position: absolute; left: 0; top: 0; width: 487px; height: 167px;
  overflow-y: auto; overflow-x: hidden; background: #FFFFFF; outline: none;
}
.listview::-webkit-scrollbar { width: 0; height: 0; }
.lrow { position: relative; height: 17px; line-height: 17px; font-size: 12px; white-space: nowrap; overflow: hidden; }
.lrow:hover { background: #E5F1FB; }
.lrow.sel { background: #C9DAEB; }
.lrow .cico { position: absolute; left: 3px; top: 1px; width: 14px; height: 14px; }
.lrow .cname { position: absolute; left: 22px; right: 150px; overflow: hidden; text-overflow: ellipsis; }
.lrow .csize { position: absolute; right: 76px; width: 70px; text-align: right; color: #444; }
.lrow .cmod { position: absolute; right: 4px; width: 70px; text-align: left; color: #444; }
.lrow.logrow { color: #202020; }
.lrow.logrow .cname { right: 4px; }
.lrow .ftime { color: #666; }
.listempty {
  position: absolute; left: 6px; top: 4px; color: #B0B0B0; font-size: 11px; font-style: italic; pointer-events: none;
}
.lrow .badge { display: inline-block; margin-left: 6px; padding: 0 4px; height: 13px; line-height: 13px;
  border-radius: 2px; font-size: 10px; background: #E8E8E8; color: #444; }
.lrow .badge.ok { background: #D8EFD8; color: #1B5E20; }
.lrow .badge.fail { background: #F8D8D8; color: #8B1A1A; }

/* custom vertical scrollbar (reference: 18px column, arrow glyphs top/bottom) */
.vscroll { position: absolute; left: 493px; top: 3px; width: 19px; height: 169px; background: var(--tg-bg); }
.vscroll .sbtn { position: absolute; left: 0; width: 19px; height: 16px; }
.vscroll .sbtn.up { top: 0; }
.vscroll .sbtn.down { bottom: 0; }
.vscroll .sbtn::after {
  content: ""; position: absolute; width: 10px; height: 8px;
}
.vscroll .sbtn.up::after { left: 3px; top: 5px; background: url("../assets/tg-sb-up.png") no-repeat 0 0; }
.vscroll .sbtn.down::after { left: 3px; top: 4px; background: url("../assets/tg-sb-down.png") no-repeat 0 0; }
.vscroll .sthumb {
  position: absolute; left: 2px; width: 15px; background: #DCDCDC; border: 1px solid #B4B4B4;
}
.vscroll.disabled .sbtn::after { opacity: .5; }

/* Qt size grip (bottom-right of the client area) */
.grip { position: absolute; left: 501px; top: 183px; width: 8px; height: 8px; }
.grip i { position: absolute; width: 2px; height: 2px; background: var(--tg-grip); }

/* ================================================================== menus */
.tgmenu {
  position: absolute; min-width: 132px; background: #FFFFFF;
  border: 1px solid #B8B8B8; box-shadow: 2px 2px 3px rgba(0,0,0,.28);
  padding: 2px 0; z-index: 500;
}
.tgmenu .mi { position: relative; height: 20px; line-height: 20px; padding: 0 24px 0 26px; font-size: 12px; color: #1B1B1B; white-space: nowrap; cursor: default; }
.tgmenu .mi:hover { background: #C9DAEB; }
.tgmenu .mi.checked::before { content: "✓"; position: absolute; left: 8px; top: 0; font-size: 11px; }
.tgmenu .mi.disabled { color: #9A9A9A; }
.tgmenu .mi .sc { position: absolute; right: 8px; color: #6A6A6A; font-size: 11px; }
.tgmenu .mi.haschild::after { content: "›"; position: absolute; right: 7px; top: 0; }
.tgmenu .sep { height: 1px; margin: 2px 3px; background: #D8D8D8; }
.tgmenu .mi .mk { position: absolute; left: 7px; top: 0; color: #1B1B1B; font-size: 11px; }

/* ================================================================ dialogs */
.dlg {
  position: absolute; background: var(--tg-bg); z-index: 800;
  border: 1px solid #7A8A99; box-shadow: 3px 3px 6px rgba(0,0,0,.35);
}
.dlg .dtitle {
  position: absolute; left: 0; top: 0; width: 100%; height: 24px;
  background: linear-gradient(to bottom, #E9F1FA, #CBDBEC); border-bottom: 1px solid #7A8A99;
  line-height: 24px; font-size: 12px; color: #12283F; padding-left: 8px; white-space: nowrap;
}
.dlg .dclose { position: absolute; right: 3px; top: 4px; width: 16px; height: 16px; padding: 0; border: 1px solid #7A8A99; background: #E6EEF7; line-height: 13px; font-size: 12px; cursor: default; }
.dlg .dclose:hover { background: #F2C4C4; }
.dlg .dbody { position: absolute; left: 8px; top: 30px; right: 8px; bottom: 38px; overflow: auto; font-size: 12px; }
.dlg .dfoot { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; }
.dlg .dbtn {
  position: absolute; top: 5px; min-width: 72px; height: 23px; padding: 0 10px;
  border: 1px solid #ADADAD; background: #FDFDFD; border-radius: 2px; cursor: default; font-size: 12px;
}
.dlg .dbtn:hover { background: #E5F1FB; border-color: #7A9CC6; }
.dlg .dbtn.primary { border-color: #7A9CC6; }
.dlg pre { margin: 0; font-family: var(--tg-font); font-size: 12px; }
.dlg .line { line-height: 16px; white-space: pre; }
.dlg .hline { height: 1px; background: #C8C8C8; margin: 5px 0; }
.mono { font-family: "Liberation Mono", "Consolas", monospace; font-size: 11px; }

/* numeric benchmark table */
table.bench { border-collapse: collapse; width: 100%; font-size: 11px; }
table.bench th { text-align: left; background: #E4ECF5; border: 1px solid #B8C8DA; padding: 1px 4px; font-weight: 700; }
table.bench td { border: 1px solid #D0D0D0; padding: 1px 4px; white-space: nowrap; }
table.bench tr:hover td { background: #EEF6FF; }
table.bench tr.sel td { background: #C9DAEB; }
td.verdict-PASS { color: #1B5E20; font-weight: 700; }
td.verdict-FAIL { color: #8B1A1A; font-weight: 700; }
.nsummary { margin-top: 4px; line-height: 16px; }
.nsummary b.pass { color: #1B5E20; }
.nsummary b.fail { color: #8B1A1A; }
.ndetail { margin-top: 3px; padding: 3px 4px; background: #FFFFFF; border: 1px solid #D8D8D8; height: 76px; overflow: auto; }
.ndetail .line { font-size: 11px; line-height: 14px; white-space: pre-wrap; font-family: "Liberation Mono", monospace; }
.ntoolbar { position: absolute; left: 8px; right: 8px; bottom: 5px; height: 22px; display: flex; gap: 5px; }
.ntoolbar .nbtn { height: 22px; padding: 0 9px; border: 1px solid #ADADAD; background: #FDFDFD; border-radius: 2px; font-size: 11px; cursor: default; white-space: nowrap; }
.ntoolbar .nbtn:hover { background: #E5F1FB; border-color: #7A9CC6; }
.fig { display: block; background: #FFFFFF; border: 1px solid #C8C8C8; }
