/* Qt5-style widget chrome reproduced for ANSYS 2022 R1 web clone.
 * Geometry/colors trace to tokens.css (extracted from cxdisplay_light.qss + pixel measurements).
 */
@font-face { font-family: "Rubik"; src: url("../assets/fonts/rubik/rubik-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Rubik"; src: url("../assets/fonts/rubik/rubik-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: block; }
@font-face { font-family: "Rubik"; src: url("../assets/fonts/rubik/rubik-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: block; }
@font-face { font-family: "Rubik"; src: url("../assets/fonts/rubik/rubik-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: block; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font-ui);
  font-size: var(--fz-body);
  color: var(--c-text);
  background: var(--c-window);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ---------- faux Windows title bar ---------- */
.win-titlebar {
  height: var(--h-window-titlebar);
  display: flex; align-items: center;
  background: #F3F3F3;
  border-bottom: 1px solid #E1E1E1;
  font-size: 12px; color: #1B1B1B;
  padding-left: 8px;
}
.win-titlebar .appicon { width: 16px; height: 16px; margin-right: 8px; }
.win-titlebar .title { flex: 0 0 auto; }
.win-titlebar .spacer { flex: 1; }
.win-titlebar .sysbtn { width: 46px; height: 22px; display: grid; place-items: center; color: #1B1B1B; }
.win-titlebar .sysbtn.close:hover { background: #C42B1C; color: #fff; }

/* ---------- ribbon tab strip ---------- */
.tabbar {
  height: var(--h-tabbar);
  background: var(--c-tabbar);
  display: flex; align-items: stretch;
  padding-left: 22px;
}
.tabbar .tab {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 22px;
  color: #B9C4D0;
  font-size: 13px; font-weight: 500;
  cursor: default;
  position: relative;
  letter-spacing: .2px;
}
.tabbar .tab.file { padding: 0 18px; margin-left: 6px; }
.tabbar .tab:hover { color: #E4EBF2; }
.tabbar .tab.active { background: #F9F9F9; color: #334960; }
.tabbar .tab.active:hover { color: #334960; }
.tabbar .collapse { width: 26px; display: grid; place-items: center; color: #C7D2DE; font-size: 11px; }
.tabbar .quick { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-right: 10px; }
.tabbar .quick .searchbox {
  width: 218px; height: 22px; display: flex; align-items: center; gap: 6px;
  background: #F9F9F9; border-radius: 2px; color: #4B5B6B; font-size: 11px; padding: 0 8px;
}
.tabbar .quick .icon { width: 16px; height: 16px; display: grid; place-items: center; color: #E8E8E8; }

/* ---------- ribbon ---------- */
.ribbon {
  height: var(--h-ribbon);
  background: var(--c-ribbon);
  border-bottom: 1px solid var(--c-ribbon-border);
  display: flex; align-items: stretch;
  padding: 0 2px;
  overflow: hidden;
}
.ribbon .group {
  display: flex; flex-direction: column;
  justify-content: flex-start;
  padding: 2px 6px 0;
  border-right: 1px solid var(--c-ribbon-border);
  position: relative;
  min-width: 0;
}
.ribbon .group:last-child { border-right: 0; }
.ribbon .group .items { display: flex; align-items: flex-start; gap: 2px; flex: 1; padding-top: 2px; }
.ribbon .group .grouplabel {
  font-size: var(--fz-ribbon-group);
  color: #1F1F1F;
  font-weight: 600;
  text-align: center;
  line-height: 15px;
  height: 15px;
  flex: 0 0 15px;
  padding-top: 3px;
  order: -1;
}
.ribbon .group .col { display: flex; flex-direction: column; gap: 1px; }
.ribbon .btn {
  display: flex; flex-direction: column; align-items: center;
  min-width: 34px; padding: 1px 3px 0;
  border: 1px solid transparent; border-radius: 2px;
  cursor: default;
}
.ribbon .btn:hover { background: var(--c-btn-hover); border-color: #BFD7EE; }
.ribbon .btn:active { background: var(--c-btn-active); }
.ribbon .btn .ico { width: 22px; height: 22px; object-fit: contain; }
.ribbon .btn .lbl { font-size: var(--fz-ribbon-label); color: #1F1F1F; line-height: 13px; margin-top: 1px; white-space: nowrap; }
.ribbon .btn.big .ico { width: 26px; height: 26px; }
.ribbon .btn.big .lbl { margin-top: 2px; white-space: pre-line; text-align: center; line-height: 13px; }
.ribbon .btn.dd .lbl::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 3px;
  border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 3px solid #6B7684; vertical-align: 1px; }
.ribbon .col { display: flex; flex-direction: column; gap: 1px; }
.ribbon .btn.sm { flex-direction: row; align-items: center; gap: 5px; padding: 1px 4px; min-width: 0; }
.ribbon .btn.sm .ico { width: 16px; height: 16px; }
.ribbon .btn.sm .lbl { margin-top: 0; white-space: nowrap; }
.ribbon .btn.sm:not(.dd) .lbl::after { display: none; }
.ribbon .btn.chk { flex-direction: row; align-items: center; gap: 5px; padding: 1px 4px; }
.ribbon .btn.chk .ico { width: 15px; height: 15px; }
.ribbon .btn.chk .lbl { margin-top: 0; }
.ribbon .vvsep { width: 1px; background: #E2E6EA; margin: 4px 3px; }

/* ---------- panel headers ---------- */
.pane-header {
  height: 30px;
  display: flex; align-items: center; gap: 6px;
  background: #D9DDE1;
  border-bottom: 1px solid #C3C8CE;
  border-right: 1px solid #C3C8CE;
  font-size: 13px; font-weight: 600; color: #606F84;
  padding: 0 8px;
}
.pane-header .closer { margin-left: auto; color: #4C5866; }
.pane-header.tabbed { padding: 0; background: #CBD2DB; }
.pane-header .ptab { padding: 0 16px; height: 100%; display: flex; align-items: center; }
.pane-header .ptab.active { background: #D9DDE1; }

/* ---------- tree ---------- */
.tree { font-size: var(--fz-tree); color: #10395E; }
.tree .row {
  display: flex; align-items: center; gap: 3px;
  height: 19px; white-space: nowrap;
}
.tree .row:hover { background: #E4F0FA; }
.tree .row.selected { background: #BFDDF5; }
.tree .twisty { width: 15px; height: 15px; display: grid; place-items: center; color: #6C7C8C; font-size: 13px; line-height: 1; }
.tree .ico { width: 18px; height: 18px; object-fit: contain; }
.tree .label { font-size: 12px; color: #10395E; }
.tree .row.lvl0 .label { font-weight: 700; }
.tree .ts { width: 0; }
.tree .ts { width: 0; }
.tree .row.lvl0 .label { font-weight: 700; }
.tree .ts { width: 0; }
.tree .ts { width: 0; }
.tree .children { margin-left: 12px; }

/* ---------- property grid / task page ---------- */
.taskpage { padding: 4px 6px; font-size: 12px; }
.propgroup { margin-bottom: 6px; }
.propgroup > .hd { font-weight: 700; font-size: 12px; color: #1F1F1F; margin: 2px 0 3px; }
.proprow { display: flex; align-items: center; gap: 6px; margin: 2px 0; min-height: 20px; }
.proprow > .k { width: 118px; color: #1F1F1F; }
.proprow > .v { flex: 1; display: flex; align-items: center; gap: 6px; }
fieldset.qtgroup { border: 1px solid #C7CCD1; margin: 2px 0 6px; padding: 4px 6px 6px; }
fieldset.qtgroup > legend { font-size: 11px; color: #3C4650; padding: 0 3px; }

/* ---------- controls ---------- */
button.qt, .qtbtn {
  font-family: var(--font-ui); font-size: 12px;
  background: var(--c-btn);
  border: 1px solid var(--c-btn-border);
  border-radius: 2px;
  padding: 2px 10px; min-width: 62px; height: 22px;
  color: #1F1F1F; cursor: default;
}
button.qt:hover, .qtbtn:hover { background: var(--c-btn-hover); border-color: #7EB4EA; }
button.qt:active, .qtbtn:active { background: var(--c-btn-active); }
select.qt, input.qt {
  font-family: var(--font-ui); font-size: 12px;
  height: 22px; padding: 0 4px;
  background: var(--c-input-bg);
  border: 1px solid var(--c-input-border); border-radius: 1px;
  color: #1F1F1F;
}
input.qt[type="text"] { width: 90px; }
input[type="checkbox"].qt, input[type="radio"].qt { margin: 0 4px 0 0; vertical-align: -2px; }
.qtab { display: flex; align-items: center; gap: 4px; font-size: 12px; }

/* ---------- console ---------- */
.console { background: var(--c-console); font-family: var(--font-mono); font-size: var(--fz-console); color: #1F1F1F; overflow: auto; }
.console .line { white-space: pre; line-height: 15px; }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #F0F0F0; }
::-webkit-scrollbar-thumb { background: #CDCDCD; border: 3px solid #F0F0F0; border-radius: 1px; }
::-webkit-scrollbar-thumb:hover { background: #A6A6A6; }
::-webkit-scrollbar-button { background: #F0F0F0; height: 14px; width: 14px; }

/* ---------- menu ---------- */
.qtmenu {
  position: fixed; z-index: 9000;
  background: var(--c-menu);
  border: 1px solid var(--c-menu-border);
  box-shadow: 2px 2px 3px rgba(0,0,0,.18);
  padding: 2px 0; min-width: 180px;
  font-size: var(--fz-menu);
}
.qtmenu .mi { display: flex; align-items: center; height: 22px; padding: 0 24px 0 26px; position: relative; white-space: nowrap; }
.qtmenu .mi:hover { background: var(--c-menu-hover); }
.qtmenu .mi .icon { position: absolute; left: 6px; width: 16px; height: 16px; object-fit: contain; }
.qtmenu .mi .arrow { margin-left: auto; padding-left: 20px; color: #6B7684; }
.qtmenu .sep { height: 1px; background: #DFE3E7; margin: 3px 2px; }
.qtmenu .mi.disabled { color: var(--c-text-disabled); }

/* ---------- modal dialogs ---------- */
.modal-backdrop { position: fixed; inset: 0; background: transparent; z-index: 9500; }
.qt-dialog {
  position: fixed; z-index: 9600;
  background: #F0F0F0;
  border: 1px solid #9AA4AE;
  box-shadow: var(--shadow-dialog);
  min-width: 240px;
  font-size: 12px;
  display: flex; flex-direction: column;
}
.qt-dialog .tbar { height: 26px; display: flex; align-items: center; padding: 0 8px; background: #F0F0F0; border-bottom: 1px solid #D7DBDF; font-size: 12px; }
.qt-dialog .tbar .ttl { font-weight: 600; }
.qt-dialog .tbar .x { margin-left: auto; width: 22px; height: 18px; display: grid; place-items: center; }
.qt-dialog .tbar .x:hover { background: #E5E5E5; }
.qt-dialog .body { padding: 10px 12px; overflow: auto; }
.qt-dialog .foot { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px; border-top: 1px solid #E1E5E9; }

/* ---------- File menu (lead-owned section; css-polish: do not edit below this marker) ---------- */
/* LEAD-OWNED-FILEMENU-BEGIN */
.ribbon .filemenu-panel {
  width: 168px; height: 100%;
  background: #F2F2F2; border-right: 1px solid #C7CCD1;
  display: flex; flex-direction: column; padding: 2px 0;
  box-shadow: 1px 0 2px rgba(0,0,0,.06);
}
.ribbon .filemenu-panel .mi {
  height: 22px; display: flex; align-items: center;
  padding: 0 8px 0 10px; font-size: 12px; color: #1F1F1F;
  cursor: default; position: relative; white-space: nowrap;
}
.ribbon .filemenu-panel .mi:hover { background: #CCE4F7; }
.ribbon .filemenu-panel .mi.has-sub::after {
  content: ""; margin-left: auto; width: 0; height: 0;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  border-left: 5px solid #445;
}
.ribbon .filemenu-panel .sep { height: 1px; background: #DDE1E5; margin: 3px 6px; }
/* LEAD-OWNED-FILEMENU-END */
