/* 数制云工单 v7 — geometry corrections only.
 * Preserve business schemas, v-show, events and permission behavior.
 * #htmlRoot specificity also protects these rules from lazy-loaded component CSS.
 */
html#htmlRoot { --szy-ui-geometry-version: 7; }

/* 1. UserDropdown is the control; __header/__info/__name are NOT controls.
 * Keep image geometry independent of intrinsic image dimensions and flex pressure.
 */
html#htmlRoot .jeecg-layout-header .jeecg-header-user-dropdown {
  display: inline-flex; align-items: center; flex: 0 0 auto; gap: 9px;
  min-width: 0; max-width: 240px; box-sizing: border-box;
}
html#htmlRoot .jeecg-layout-header .jeecg-header-user-dropdown > span:first-child {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; flex: 0 0 32px; width: 32px; height: 32px;
  padding: 0; margin: 0; line-height: 0;
}
html#htmlRoot .jeecg-layout-header .jeecg-header-user-dropdown img.jeecg-header-user-dropdown__header {
  display: block; flex: 0 0 32px;
  width: 32px !important; min-width: 32px; max-width: 32px;
  height: 32px !important; min-height: 32px; max-height: 32px;
  aspect-ratio: 1; object-fit: cover; object-position: center;
  box-sizing: border-box; border-radius: 50%; padding: 0; margin: 0;
}
html#htmlRoot .jeecg-layout-header .jeecg-header-user-dropdown > span:first-child > img:not(.jeecg-header-user-dropdown__header) {
  display: block; position: absolute; flex: none; width: 18px !important; height: 18px !important;
  min-width: 18px; max-width: 18px; min-height: 18px; max-height: 18px;
  margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: contain;
  top: -6px !important; right: -6px !important;
}
html#htmlRoot .jeecg-layout-header .jeecg-header-user-dropdown__info {
  flex: 0 1 auto; min-width: 0; max-width: 160px; height: auto; padding: 0; line-height: 20px;
}
html#htmlRoot .jeecg-layout-header .jeecg-header-user-dropdown__name {
  display: block; height: auto; padding: 0; line-height: 20px;
}
html#htmlRoot .jeecg-layout-header .jeecg-header-user-dropdown > .anticon {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 12px;
  width: 12px; height: 12px; line-height: 1;
}

/* 2. Horizontal labels must use their content width, not 4/24 of a small field.
 * Entry forms already opted into v6 remain label-above-control grids.
 * Existing field visibility is untouched: never force display on hidden columns.
 */
html#htmlRoot .ant-form-horizontal:not(.szy-v6-form-grid):not(.szy-v6-form-stack):not(.szy-v6-plan-form):not(.szy-v11-plan-fields):not(.szy-v11-config-form) .ant-form-item {
  min-width: 0; flex-wrap: wrap;
}
html#htmlRoot .ant-form-horizontal:not(.szy-v6-form-grid):not(.szy-v6-form-stack):not(.szy-v6-plan-form):not(.szy-v11-plan-fields):not(.szy-v11-config-form) .ant-form-item-label {
  flex: 0 0 auto !important; width: auto !important; max-width: 100% !important;
  min-width: 0; padding-right: 8px; white-space: normal; overflow: visible;
}
html#htmlRoot .ant-form-horizontal:not(.szy-v6-form-grid):not(.szy-v6-form-stack):not(.szy-v6-plan-form):not(.szy-v11-plan-fields):not(.szy-v11-config-form) .ant-form-item-label > label {
  width: auto; max-width: 100%; height: auto; min-height: 32px;
  white-space: normal; word-break: normal; overflow-wrap: break-word;
  align-items: center; line-height: 20px;
}
html#htmlRoot .ant-form-horizontal:not(.szy-v6-form-grid):not(.szy-v6-form-stack):not(.szy-v6-plan-form):not(.szy-v11-plan-fields):not(.szy-v11-config-form) .ant-form-item-control {
  flex: 1 1 120px !important; width: auto !important; min-width: 0 !important; max-width: 100% !important;
}
/* Search rows are sized to the actual dialog/table, not the viewport's 24-column tier. */
html#htmlRoot :is(.ant-modal,.ant-drawer:not(.jeecg-layout-sider-wrapper)) .jeecg-basic-table > .jeecg-basic-form > .ant-row > .ant-col {
  flex: 1 1 240px !important; min-width: 0; max-width: 100% !important; width: auto !important;
}
html#htmlRoot .jeecg-basic-form:not(.szy-v6-form-grid):not(.szy-v6-form-stack):not(.szy-v6-plan-form) .ant-form-item-label > label::after {
  flex: 0 0 auto;
}
/* Long entry captions and validation messages may wrap, but are never ellipsized. */
html#htmlRoot form:is(.szy-v6-form-grid,.szy-v6-form-stack) .ant-form-item-label > label {
  max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}
html#htmlRoot form:is(.szy-v6-form-grid,.szy-v6-form-stack) .ant-form-item-explain {
  max-width: 100%; overflow-wrap: anywhere;
}

/* 3. Ant DirectoryTree forwards width to .ant-tree-list, not just the tree root.
 * Scope auto-height rows to the business non-virtual directory panels.
 */
html#htmlRoot .szy-business-v5 .ant-tree-directory,
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-list,
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-list-holder,
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-list-holder-inner {
  box-sizing: border-box; width: 100% !important; min-width: 0; max-width: 100%;
}
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-list { padding: 0 !important; }
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-treenode:not([aria-hidden="true"]) {
  display: flex; align-items: center; width: 100%; min-width: 0; max-width: 100%;
  min-height: 38px; height: auto; padding: 3px 0;
}
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-indent { flex: 0 0 auto; }
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-indent-unit { width: 16px; }
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-switcher {
  display: inline-flex; align-items: center; justify-content: center; align-self: center;
  flex: 0 0 24px; width: 24px; height: 24px; margin: 0; padding: 0; line-height: 1;
}
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-node-content-wrapper {
  display: flex; align-items: center; flex: 1 1 0; min-width: 0; max-width: 100%;
  min-height: 32px; height: auto; padding: 5px 4px; line-height: 22px;
  white-space: normal;
}
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-iconEle {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 20px; width: 20px; height: 22px; margin: 0 6px 0 0; line-height: 1;
}
html#htmlRoot .szy-business-v5 .ant-tree-directory :is(.ant-tree-switcher,.ant-tree-iconEle) > .anticon {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-title {
  display: block; flex: 1 1 0; min-width: 0; max-width: 100%; height: auto;
  white-space: normal; word-break: normal; overflow-wrap: anywhere;
  overflow: visible; text-overflow: clip; line-height: 22px;
}
/* The paid-feature title contains an inline-flex span around an anonymous text node. */
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-title > span[style*="inline-flex"] {
  display: inline !important; max-width: 100%; white-space: normal; line-height: inherit;
}
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-title img {
  display: inline-block; width: 18px !important; height: 18px !important;
  min-width: 18px; max-width: 18px; margin: 0 4px !important;
  object-fit: contain; vertical-align: middle;
}

/* 4. Center the SVG viewport and the text line box, not an icon font's baseline. */
html#htmlRoot .jeecg-layout-sideBar :is(.jeecg-menu-submenu-title,.jeecg-menu-item) {
  align-items: center; line-height: 20px !important;
}
html#htmlRoot .jeecg-layout-sideBar .jeecg-simple-menu-sub-title {
  line-height: 20px !important; white-space: normal; word-break: normal;
  overflow-wrap: anywhere; overflow: visible;
}
html#htmlRoot .jeecg-layout-sideBar .jeecg-simple-menu__parent > .jeecg-menu-submenu-title > .anticon,
html#htmlRoot .jeecg-layout-sideBar .jeecg-menu-item.jeecg-simple-menu__parent > .anticon {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
html#htmlRoot .jeecg-layout-sideBar .jeecg-simple-menu__parent > .jeecg-menu-submenu-title > .anticon > svg,
html#htmlRoot .jeecg-layout-sideBar .jeecg-menu-item.jeecg-simple-menu__parent > .anticon > svg {
  display: block; width: 18px; height: 18px; flex: none;
}
/* Arrow geometry is owned by shuzhiyun-sidebar-v3.css, corrected in v9. */

@media (max-width: 760px) {
  html#htmlRoot .ant-form-horizontal:not(.szy-v6-form-grid):not(.szy-v6-form-stack):not(.szy-v6-plan-form):not(.szy-v11-plan-fields):not(.szy-v11-config-form) .ant-form-item-label {
    text-align: left; padding-bottom: 0;
  }
  html#htmlRoot :is(.ant-modal,.ant-drawer:not(.jeecg-layout-sider-wrapper)) .jeecg-basic-table > .jeecg-basic-form > .ant-row > .ant-col {
    flex-basis: 100% !important;
  }
}

/* User selector: the original six data columns were 20–40px and became ellipses.
 * Keep every column and its native horizontal scrollbar; do not squeeze the data to fit.
 */
html#htmlRoot .j-user-select-modal .ant-col-18 > .jeecg-basic-table .ant-table-content,
html#htmlRoot .j-user-select-modal .ant-col-24 > .jeecg-basic-table .ant-table-content {
  max-width: 100%; overflow-x: auto !important;
}
html#htmlRoot .j-user-select-modal :is(.ant-col-18,.ant-col-24) > .jeecg-basic-table .ant-table-content > table {
  min-width: 960px !important;
}
html#htmlRoot .j-user-select-modal :is(.ant-col-18,.ant-col-24) > .jeecg-basic-table .ant-table-content col.ant-table-selection-col { width: 44px !important; }
html#htmlRoot .j-user-select-modal :is(.ant-col-18,.ant-col-24) > .jeecg-basic-table .ant-table-content col.ant-table-selection-col + col { width: 56px !important; }
html#htmlRoot .j-user-select-modal .jeecg-basic-form > .ant-row > .ant-col { padding-inline: 8px; }
@media (max-width: 760px) {
  html#htmlRoot .j-user-select-modal .ant-row > :is(.ant-col-18,.ant-col-6):has(> .jeecg-basic-table) {
    flex: 0 0 100%; width: 100%; max-width: 100%; min-width: 0;
  }
}

/* Header descendants inherited the original action's span padding. Do not let an
 * icon's transparent padding enlarge its flex box or crop the membership badge. */
html#htmlRoot .jeecg-layout-header .jeecg-header-user-dropdown { overflow: visible; }
html#htmlRoot .jeecg-layout-header .jeecg-layout-header-action__item {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 32px; width: 32px; min-width: 32px; padding: 0 !important;
}
html#htmlRoot .jeecg-layout-header .jeecg-layout-header-action .anticon {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 !important; line-height: 1;
}
@media (max-width: 760px) {
  html#htmlRoot header.jeecg-layout-header { padding: 0 12px !important; gap: 6px; }
  html#htmlRoot header.jeecg-layout-header > .jeecg-layout-header-left { flex: 0 0 auto; gap: 4px; }
  html#htmlRoot header.jeecg-layout-header .jeecg-layout-header-logo {
    width: 58px !important; min-width: 0; max-width: 58px; padding: 0 !important;
  }
  html#htmlRoot header.jeecg-layout-header .jeecg-layout-header-logo img {
    width: 58px !important; max-width: 100%; height: auto !important; max-height: 32px;
    margin: 0; object-fit: contain;
  }
  html#htmlRoot header.jeecg-layout-header .jeecg-layout-header-trigger { padding: 0 4px !important; }
  html#htmlRoot header.jeecg-layout-header .jeecg-layout-header-action { gap: 4px; flex: 0 0 auto; }
  html#htmlRoot header.jeecg-layout-header .jeecg-header-user-dropdown { gap: 4px; padding: 0 2px; }
  html#htmlRoot header.jeecg-layout-header .jeecg-layout-header-action > img { flex: 0 0 20px; margin: 0 4px !important; object-fit: contain; }
}
@media (max-width: 760px) {
  /* Decorative welcome sentence has no action and competes with real controls. */
  html#htmlRoot header.jeecg-layout-header .headerIntroductionClass { display: none !important; }
}
/* Avatar preview only; do not affect Cropper's movable canvas image. */
html#htmlRoot .jeecg-cropper-avatar-image-wrapper > img { display: block; width: 100%; height: 100%; object-fit: cover; }
html#htmlRoot .szy-business-v5 .ant-tree-directory .ant-tree-treenode[aria-hidden="true"] { min-height: 0 !important; height: 0 !important; padding: 0 !important; }

/* Inspection wizard: keep the three real steps; only rearrange their navigation.
 * Buttons outside the form must also remain inside the available column. */
html#htmlRoot .page-check-add:has(.szy-v6-plan-form) .page-check-add-right { min-width: 0; }
html#htmlRoot .szy-v6-plan-form + div {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
html#htmlRoot .szy-v6-plan-form + div > .ant-btn { flex: 0 0 auto; margin-left: 0 !important; }
@media (max-width: 760px) {
  html#htmlRoot .page-check-add:has(.szy-v6-plan-form) {
    flex-direction: column; width: 100%; min-width: 0; min-height: 0;
  }
  html#htmlRoot .page-check-add:has(.szy-v6-plan-form) > .page-check-add-left {
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px;
    width: 100%; height: auto; flex: 0 0 auto; padding: 8px 0;
  }
  html#htmlRoot .page-check-add:has(.szy-v6-plan-form) .page-check-add-left-tab {
    min-width: 0; padding: 8px; border-top: 0 !important;
  }
  html#htmlRoot .page-check-add:has(.szy-v6-plan-form) .page-check-add-title { font-size: 12px; line-height: 20px; }
  html#htmlRoot .page-check-add:has(.szy-v6-plan-form) .page-check-add-sub-title {
    gap: 4px; padding: 4px 0; min-height: 40px; line-height: 20px;
    white-space: normal; overflow-wrap: anywhere;
  }
  html#htmlRoot .page-check-add:has(.szy-v6-plan-form) .page-check-add-sub-title > .anticon { flex: 0 0 16px; }
  html#htmlRoot .page-check-add:has(.szy-v6-plan-form) > .page-check-add-right {
    width: 100%; min-height: 0; flex: 1 1 auto; padding: 12px;
  }
  html#htmlRoot .page-check-add:has(.szy-v6-plan-form) .title-plan { padding: 0 16px; }
  html#htmlRoot .szy-v6-plan-form + div { justify-content: flex-start; }
}

/* Department navigation is a label, not a truncated table cell. Let long names
 * grow vertically while retaining the people count and the existing action menu. */
html#htmlRoot .szy-business--contacts .deptClass { gap: 8px; align-items: center; }
html#htmlRoot .szy-business--contacts .deptClass > .title {
  flex: 1 1 0; min-width: 0; max-width: 100%; height: auto;
  white-space: normal; overflow-wrap: anywhere; word-break: normal;
  overflow: visible; text-overflow: clip; line-height: 20px;
}
html#htmlRoot .szy-business--contacts .deptClass > .title + div { flex: 0 0 auto; }
html#htmlRoot .szy-business--contacts .deptClass > .title + div .anticon {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
/* A long contacts-table header previously painted under the fixed action column.
 * Wrap header text inside its own cell; retain native body ellipsis and scrolling. */
html#htmlRoot .szy-business--contacts .ant-table-thead > tr > th {
  white-space: normal; overflow-wrap: anywhere; word-break: normal; line-height: 20px;
}
html#htmlRoot .szy-business--contacts .ant-table-thead > tr > th > span { white-space: inherit; }
html#htmlRoot .szy-business--contacts .ant-table-thead > tr > th > span {
  display: inline-block; min-width: 2em; max-width: 100%; vertical-align: middle;
}
