/* A device workspace: restyle the original React controls and results. */
.hb-device-a-active .hb-device-a-view { padding: 30px 32px 32px; color: #172846; }
.hb-device-a-view > .advance-breadcrumb-title { min-height: 0; height: auto; padding: 0 0 25px; background: none !important; border: 0; }
.hb-device-a-view > .advance-breadcrumb-title .title { margin: 0 0 9px !important; color: #172846; font-size: 29px; font-weight: 650; line-height: 1.4; letter-spacing: -.5px; }
.hb-device-a-view > .advance-breadcrumb-title .paragraph { max-width: 720px; margin: 0; color: #8594ad; font-size: 12px; line-height: 1.9; }
.hb-device-a-view > .ant-card { min-width: 0; margin: 0 0 22px; border: 1px solid #e6ebf5; border-radius: 16px; background: #fff; box-shadow: none; }
.hb-device-a-view > .ant-card > .ant-card-body { min-width: 0; padding: 24px; }
.hb-device-a-filter > .ant-card-body { display: flex; align-items: center; gap: 40px; }
.hb-device-a-filter > .ant-card-body::before, .hb-device-a-filter > .ant-card-body::after { display: none; }
.hb-device-a-filter-heading { display: flex; flex: 0 0 auto; align-items: center; gap: 13px; }
.hb-device-a-search-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; color: var(--hb-primary); background: #f0f3ff; }
.hb-device-a-search-icon svg { width: 21px; height: 21px; }
.hb-device-a-filter-heading h2, .hb-device-a-list-heading h2 { margin: 0; color: #172846; font-size: 16px; font-weight: 600; line-height: 25px; }
.hb-device-a-filter-heading p, .hb-device-a-list-heading p { margin: 4px 0 0; color: #98a6bc; font-size: 11px; line-height: 18px; }
.hb-device-a-filter form { display: flex; flex: 1; flex-wrap: nowrap; gap: 10px; min-width: 0; }
.hb-device-a-filter .ant-form-item { margin: 0 !important; }
.hb-device-a-filter .ant-form-item:first-child { flex: 1; max-width: 420px; min-width: 0; }
.hb-device-a-active .hb-device-a-view .ant-input, .hb-device-a-drawer .ant-input { min-height: 40px; border-color: #e0e7f3; border-radius: 8px; padding: 8px 12px; background: #fff; color: #42516d; font-size: 12px; box-shadow: none; }
.hb-device-a-active .hb-device-a-view .ant-input::placeholder, .hb-device-a-drawer .ant-input::placeholder { color: #a1aec2; }
.hb-device-a-active .hb-device-a-view .ant-input:hover, .hb-device-a-drawer .ant-input:hover { border-color: var(--hb-primary-border); }
.hb-device-a-active .hb-device-a-view .ant-input:focus, .hb-device-a-drawer .ant-input:focus { border-color: var(--hb-primary-muted); box-shadow: 0 0 0 3px var(--hb-primary-a0d); }
.hb-device-a-active .hb-device-a-view .ant-btn, .hb-device-a-drawer .ant-btn { min-height: 40px; height: auto; padding: 8px 17px; border-color: #e0e7f3; border-radius: 8px; color: #6d7e99; background: #fff; font-size: 12px; line-height: 22px; box-shadow: none; }
.hb-device-a-active .hb-device-a-view .ant-btn:not(:disabled):hover, .hb-device-a-drawer .ant-btn:not(:disabled):hover { color: var(--hb-primary); border-color: var(--hb-primary-border); background: #f8faff; }
.hb-device-a-active .hb-device-a-view .ant-btn-primary:not(.ant-btn-background-ghost), .hb-device-a-drawer .ant-btn-primary { color: #fff; background: var(--hb-primary); border-color: var(--hb-primary); }
.hb-device-a-active .hb-device-a-view .ant-btn-primary:not(.ant-btn-background-ghost):not(:disabled):hover, .hb-device-a-drawer .ant-btn-primary:not(:disabled):hover { background: var(--hb-primary-hover); border-color: var(--hb-primary-hover); color: #fff; }
.hb-device-a-active .hb-device-a-view .ant-btn:disabled, .hb-device-a-drawer .ant-btn:disabled { color: #a6b1c3; background: #f3f5f9; border-color: #e6ebf5; cursor: not-allowed; }
.hb-device-a-active .hb-device-a-view .ant-btn:focus-visible, .hb-device-a-drawer .ant-btn:focus-visible, .hb-device-a-drawer [role="button"]:focus-visible { outline: 3px solid var(--hb-primary-focus); outline-offset: 3px; }
.hb-device-a-results > .ant-card-body { min-height: 470px; }
.hb-device-a-results .hb-device-a-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px !important; width: 100%; margin-bottom: 24px; }
.hb-device-a-list-heading { flex: 1; min-width: 200px; }
.hb-device-a-toolbar > .ant-space-item { flex: 0 0 auto; }
.hb-device-a-toolbar .ant-radio-group { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid #edf1f8; border-radius: 9px; background: #f4f6fc; }
.hb-device-a-toolbar .ant-radio-button-wrapper { display: flex; align-items: center; justify-content: center; width: 33px; height: 32px; padding: 0; border: 0 !important; border-radius: 6px !important; color: #98a6bc; background: transparent; line-height: 32px !important; }
.hb-device-a-toolbar .ant-radio-button-wrapper::before { display: none !important; }
.hb-device-a-toolbar .ant-radio-button-wrapper-checked { color: var(--hb-primary) !important; background: #fff !important; box-shadow: 0 1px 4px #1728460a; }
.hb-device-a-toolbar .ant-radio-button-wrapper .anticon { font-size: 16px !important; }
.hb-device-a-toolbar .ant-btn .anticon { font-size: 14px; }
.hb-device-a-toolbar .ant-btn.ml10 { margin-left: 10px; }
.hb-device-a-results .hb-device-a-empty { margin: 0; padding: 42px 16px 55px; }
.hb-device-a-empty > .ant-empty-image, .hb-device-a-empty > .ant-empty-description { display: none; }
.hb-device-a-empty-content { display: flex; align-items: center; justify-content: center; flex-direction: column; min-height: 230px; }
.hb-device-a-empty-art { width: 112px; height: 100px; margin-bottom: 19px; }
.hb-device-a-empty-art svg { display: block; width: 100%; height: 100%; }
.hb-device-a-empty h3 { margin: 0 0 10px; color: #526380; font-size: 16px; font-weight: 500; line-height: 25px; }
.hb-device-a-empty p { max-width: 360px; margin: 0; color: #98a6bc; font-size: 12px; line-height: 1.9; }
.hb-device-a-results .ant-card-hoverable { border-color: #e6ebf5; border-radius: 13px !important; box-shadow: none; }
.hb-device-a-results .ant-card-hoverable:hover { border-color: var(--hb-primary-focus); box-shadow: 0 6px 20px #223c7408; }
.hb-device-a-results .ant-card-hoverable > .ant-card-body { padding: 0; }
.hb-device-a-results .ant-card-hoverable .ant-btn-sm { min-height: 27px; padding: 2px 10px; color: var(--hb-primary-muted); border-color: #dce4ff; border-radius: 6px !important; font-size: 11px !important; line-height: 21px; }
/* Device cards use classes in the React component, including the first render. */
.hb-device-a-results .ant-col:has(> .device-card) { display: flex; min-width: 0; }
.hb-device-a-results .device-card { width: 100%; min-width: 0; overflow: hidden; }
.hb-device-a-results .device-card > .ant-card-body { display: flex; flex-direction: column; width: 100%; min-width: 0; height: 100%; padding: 20px; }
.hb-device-a-card-header { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.hb-device-a-card-icon { display: flex; flex: 0 0 48px; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid #edf1f8; border-radius: 12px; background: #f7f9ff; }
.hb-device-a-card-icon > .anticon { display: block; width: 36px; height: 36px; font-size: 36px; }
.hb-device-a-card-main { flex: 1; min-width: 0; }
.hb-device-a-card-name { display: block; max-width: 100%; margin: 0 0 7px; padding: 0; overflow: hidden; border: 0; color: #172846; background: none; font: inherit; font-size: 16px; font-weight: 600; line-height: 24px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.hb-device-a-card-name:hover { color: var(--hb-primary); }
.hb-device-a-card-product { margin: 0; overflow: hidden; color: #8594ad; font-size: 12px; line-height: 19px; text-overflow: ellipsis; white-space: nowrap; }
.hb-device-a-card-states { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 90px; }
.hb-device-a-card-state { padding: 3px 8px; border-radius: 6px; color: #389e63; background: #eef8f2; font-size: 11px; line-height: 18px; white-space: nowrap; }
.hb-device-a-card-state > div { gap: 5px !important; }
.hb-device-a-card-state > div > div:last-child { color: inherit !important; opacity: 1 !important; }
.hb-device-a-card-state[data-status="离线"], .hb-device-a-card-state[data-status="未知"] { color: #98a6bc; background: #f3f5f9; }
.hb-device-a-card-state[data-status="告警中"] { color: #d65f6a; background: #fff1f2; }
.hb-device-a-card-state[data-status="未知"] > div > div:first-child { background: #a6b1c3 !important; }
.hb-device-a-card-trend { min-width: 0; margin-top: 16px; }
.hb-device-a-card-trend-label { margin-bottom: 4px; color: #98a6bc; font-size: 11px; line-height: 18px; }
.hb-device-a-card-chart { height: 48px; overflow: hidden; }
.hb-device-a-card-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 18px; }
.hb-device-a-card-footer::before { content: ""; flex: 0 0 100%; height: 1px; background: #edf1f8; }
.hb-device-a-card-activity { flex: 1; min-width: 0; color: #98a6bc; font-size: 11px; line-height: 20px; }
.hb-device-a-card-actions { display: flex; flex: 0 0 auto; gap: 8px; margin-left: auto; }
.hb-device-a-card-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; margin: 0; padding: 5px 10px; border: 1px solid #e0e7f3; border-radius: 7px; background: #fff; font: inherit; font-size: 12px; line-height: 20px; white-space: nowrap; cursor: pointer; }
.hb-device-a-card-actions svg { width: 14px; height: 14px; }
.hb-device-a-card-actions .hb-device-a-card-detail { border-color: var(--hb-primary-soft); color: var(--hb-primary); background: var(--hb-primary-soft); }
.hb-device-a-card-actions .hb-device-a-card-detail:hover { border-color: var(--hb-primary-border); background: var(--hb-primary-soft-hover); }
.hb-device-a-card-actions .hb-device-a-card-remove { color: #d65f6a; border-color: #f1dce0; }
.hb-device-a-card-actions .hb-device-a-card-remove:not(:disabled):hover { color: #c64c58; border-color: #e6adb5; background: #fff5f6; }
.hb-device-a-card-actions button:disabled { color: #b2bdcf; border-color: #e6ebf5; background: #f6f8fb; cursor: not-allowed; }
.hb-device-a-results .device-card button:focus-visible { outline: 3px solid var(--hb-primary-focus); outline-offset: 3px; }
.hb-device-a-active .ant-popconfirm:has(.hb-device-a-card-delete-copy) .ant-popover-inner { padding: 20px; border: 1px solid #e6ebf5; border-radius: 13px; box-shadow: 0 12px 36px #1728461a; }
.hb-device-a-active .ant-popconfirm:has(.hb-device-a-card-delete-copy) .ant-popconfirm-title { max-width: min(300px, calc(100vw - 80px)); color: #42516d; font-size: 13px; line-height: 22px; }
.hb-device-a-active .ant-popconfirm:has(.hb-device-a-card-delete-copy) .ant-popconfirm-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.hb-device-a-active .ant-popconfirm:has(.hb-device-a-card-delete-copy) .ant-btn { height: 34px; margin: 0; padding: 5px 14px; border-color: #e0e7f3; border-radius: 7px; color: #6d7e99; background: #fff; font-size: 12px; box-shadow: none; }
.hb-device-a-active .ant-popconfirm:has(.hb-device-a-card-delete-copy) .ant-btn-primary { border-color: #d65f6a; color: #fff; background: #d65f6a; }
.hb-device-a-active .ant-popconfirm:has(.hb-device-a-card-delete-copy) .ant-btn-primary:hover { border-color: #c64c58; color: #fff; background: #c64c58; }
@media (max-width: 760px) {
  .hb-device-a-results .device-card > .ant-card-body { padding: 17px; }
  .hb-device-a-card-header { gap: 11px; }
  .hb-device-a-card-name { font-size: 15px; }
}
.hb-device-a-results .ant-tag { border: 0; border-radius: 5px; padding: 2px 8px; color: var(--hb-primary-muted); background: #f0f3ff; font-size: 10px; }
.hb-device-a-results .ant-switch-checked { background: var(--hb-primary); }
.hb-device-a-results .ant-table-wrapper { min-width: 0; }
.hb-device-a-results .ant-table { color: #526380; font-size: 12px; }
.hb-device-a-results .ant-table-container { overflow: hidden; border: 1px solid #edf1f8 !important; border-radius: 10px; }
.hb-device-a-results .ant-table-thead > tr > th { padding: 14px 16px; color: #8594ad; background: #f7f9ff; border-right: 0 !important; border-bottom-color: #edf1f8; font-size: 11px; font-weight: 500; white-space: nowrap; }
.hb-device-a-results .ant-table-tbody > tr > td { padding: 16px; border-right: 0 !important; border-bottom-color: #edf1f8; }
.hb-device-a-results .ant-table-tbody > tr:hover > td { background: #fafbff; }
.hb-device-a-group-content .hb-device-a-device-row { cursor: pointer; }
.hb-device-a-device-link { color: var(--hb-primary); font-weight: 600; text-decoration: none; }
.hb-device-a-device-link:hover { text-decoration: underline; }
.hb-device-a-results .ant-table-tbody .ant-typography { color: var(--hb-primary); font-size: 12px; }
.hb-device-a-results .ant-table-tbody .ant-typography-disabled { color: #b2bdcf; }
.hb-device-a-results .ant-table-placeholder > td { padding: 8px !important; }
.hb-device-a-results .ant-table-placeholder:hover > td { background: #fff !important; }
.hb-device-a-results .ant-pagination { flex-wrap: wrap; gap: 4px; color: #8594ad; font-size: 11px; }
.hb-device-a-results .ant-pagination-item-active { border-color: var(--hb-primary); border-radius: 6px; }
.hb-device-a-results .ant-pagination-item-active a { color: var(--hb-primary); }
.hb-device-a-results .ant-pagination-options .ant-select-selector { border-radius: 6px; border-color: #e0e7f3; font-size: 11px; }
.hb-device-a-drawer .ant-drawer-mask { background: #17284645; }
.hb-device-a-drawer .ant-drawer-content-wrapper { max-width: 100vw; box-shadow: -12px 0 50px #1728460f; }
.hb-device-a-drawer .ant-drawer-content { color: #42516d; background: #fff; font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
.hb-device-a-drawer .ant-drawer-header { min-height: 78px; padding: 22px 28px; border-bottom: 1px solid #edf1f8; }
.hb-device-a-drawer .ant-drawer-title { color: #172846; font-size: 20px; font-weight: 600; }
.hb-device-a-drawer .ant-drawer-extra .anticon-close { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; color: #98a6bc; font-size: 14px; cursor: pointer; }
.hb-device-a-drawer .ant-drawer-extra .anticon-close:hover { background: #f3f6fd; color: var(--hb-primary); }
.hb-device-a-drawer .ant-drawer-body { padding: 25px 28px; }
.hb-device-a-drawer .ant-form-item { margin-bottom: 23px; }
.hb-device-a-drawer .ant-form-item-label { padding-bottom: 8px; }
.hb-device-a-drawer .ant-form-item-label > label { height: auto; color: #526380; font-size: 12px; }
.hb-device-a-drawer .ant-form-item-required::before { font-size: 11px !important; }
.hb-device-a-drawer .ant-form-item-extra { margin-top: 5px; color: #98a6bc; font-size: 11px; line-height: 1.8; }
.hb-device-a-drawer .ant-form-item-explain { font-size: 11px; }
.hb-device-a-drawer .ant-input-status-error { border-color: #ff7875; }
.hb-device-a-drawer .ant-select { width: 100%; min-height: 40px; font-size: 12px; }
.hb-device-a-drawer .ant-select-selector { min-height: 40px; border-color: #e0e7f3 !important; border-radius: 8px; }
.hb-device-a-drawer .ant-select-status-error .ant-select-selector { border-color: #ff7875 !important; }
.hb-device-a-drawer .ant-select-selection-placeholder { color: #a1aec2; }
.hb-device-a-drawer .ant-radio-wrapper { color: #6d7e99; font-size: 12px; }
.hb-device-a-drawer .ant-radio-checked .ant-radio-inner { border-color: var(--hb-primary); background: var(--hb-primary); }
.hb-device-a-drawer a { color: var(--hb-primary); }
.hb-device-a-drawer .ant-drawer-footer { padding: 16px 28px; border-top: 1px solid #edf1f8; background: #fff; }
.hb-device-a-drawer .ant-drawer-footer > .ant-space { display: flex; justify-content: flex-end; gap: 10px !important; }
@media (max-width: 1300px) {
  .hb-device-a-active .hb-device-a-view { padding: 25px 24px; }
  .hb-device-a-view > .advance-breadcrumb-title .title { font-size: 26px; }
  .hb-device-a-filter > .ant-card-body { gap: 26px; }
  .hb-device-a-view > .ant-card > .ant-card-body { padding: 22px; }
}
@media (max-width: 1100px) {
  .hb-device-a-filter > .ant-card-body { align-items: stretch; flex-direction: column; gap: 20px; }
  .hb-device-a-filter .ant-form-item:first-child { max-width: none; }
  .hb-device-a-toolbar { gap: 12px !important; }
  .hb-device-a-list-heading { flex-basis: 100%; }
  .hb-device-a-toolbar > .ant-space-item:last-child { margin-left: auto; }
}
@media (max-width: 760px) {
  .hb-device-a-active .hb-device-a-view { padding: 22px 16px; }
  .hb-device-a-view > .advance-breadcrumb-title { padding-bottom: 20px; }
  .hb-device-a-view > .advance-breadcrumb-title .title { font-size: 25px; }
  .hb-device-a-view > .advance-breadcrumb-title .paragraph { font-size: 11px; }
  .hb-device-a-view > .ant-card { margin-bottom: 16px; border-radius: 13px; }
  .hb-device-a-view > .ant-card > .ant-card-body { padding: 20px; }
  .hb-device-a-results > .ant-card-body { min-height: 450px; }
  .hb-device-a-filter-heading h2, .hb-device-a-list-heading h2 { font-size: 15px; }
  .hb-device-a-filter form { flex-wrap: wrap; gap: 10px; }
  .hb-device-a-filter .ant-form-item:first-child { flex-basis: 100%; }
  .hb-device-a-filter .ant-form-item:not(:first-child) { flex: 1; }
  .hb-device-a-filter .ant-btn { width: 100%; }
  .hb-device-a-results .hb-device-a-toolbar { gap: 18px 10px !important; margin-bottom: 20px; }
  .hb-device-a-list-heading { min-width: 0; }
  .hb-device-a-toolbar .ant-btn { padding-left: 12px; padding-right: 12px; }
  .hb-device-a-toolbar .ant-radio-button-wrapper { width: 30px; }
  .hb-device-a-toolbar .ant-btn.ml10 { margin-left: 6px; }
  .hb-device-a-results .hb-device-a-empty { padding: 30px 0 35px; }
  .hb-device-a-empty h3 { font-size: 15px; }
  .hb-device-a-empty p { font-size: 11px; }
  .hb-device-a-results .ant-table-cell-fix-left, .hb-device-a-results .ant-table-cell-fix-right { position: static !important; }
  .hb-device-a-results .ant-table-container::before, .hb-device-a-results .ant-table-container::after { display: none; }
  .hb-device-a-drawer .ant-drawer-body { padding: 22px 20px; }
  .hb-device-a-drawer .ant-drawer-header { padding: 20px; min-height: 72px; }
  .hb-device-a-drawer .ant-drawer-footer { padding: 14px 20px; }
  .hb-device-a-drawer .ant-drawer-footer > .ant-space > .ant-space-item { flex: 1; }
  .hb-device-a-drawer .ant-drawer-footer .ant-btn { width: 100%; }
}
@media (max-width: 420px) {
  .hb-device-a-toolbar .ant-btn.ml10 { width: 36px; min-height: 40px; padding: 8px; }
  .hb-device-a-toolbar .ant-btn.ml10 > span:last-child { display: none; }
  .hb-device-a-empty p { max-width: 220px; }
}

/* Device filters use the existing six React form items. */
.hb-device-a-filter > .ant-card-body { align-items: stretch; flex-direction: column; gap: 22px; }
.hb-device-a-filter form { display: grid; grid-template-columns: repeat(3, minmax(125px, 1fr)) minmax(140px, 1.25fr) auto auto; align-items: start; gap: 12px; }
.hb-device-a-filter .ant-form-item:first-child { max-width: none; }
.hb-device-a-filter .ant-form-item, .hb-device-a-filter .ant-form-item-control-input-content { min-width: 0; }
.hb-device-a-filter .ant-select { width: 100% !important; height: 42px; font-size: 12px; }
.hb-device-a-filter .ant-select-selector { height: 42px !important; border: 1px solid #e0e7f3 !important; border-radius: 8px !important; padding: 4px 12px !important; background: #fff; }
.hb-device-a-filter .ant-select-selection-item, .hb-device-a-filter .ant-select-selection-placeholder { line-height: 32px !important; color: #6d7e99; }
.hb-device-a-filter .ant-select-selection-search-input { height: 40px !important; }
.hb-device-a-filter .ant-select-focused .ant-select-selector { border-color: var(--hb-primary-muted) !important; box-shadow: 0 0 0 3px var(--hb-primary-a0d) !important; }
.hb-device-a-filter .ant-select-arrow { color: #a1aec2; }
.hb-device-a-results > .ant-card-body { min-height: 460px; }
.hb-device-a-active .hb-device-a-view .ant-input-affix-wrapper, .hb-device-a-drawer .ant-input-affix-wrapper { min-height: 42px; border-color: #e0e7f3; border-radius: 8px; padding: 0 12px; box-shadow: none; }
.hb-device-a-drawer .ant-input-affix-wrapper > .ant-input { min-height: 40px; padding: 8px 0; border: 0; border-radius: 0; box-shadow: none; }
.hb-device-a-drawer .ant-select-single .ant-select-selection-item, .hb-device-a-drawer .ant-select-single .ant-select-selection-placeholder { line-height: 38px; }
.hb-device-a-drawer .ant-select-selector { padding: 0 12px !important; }
.hb-device-a-drawer select#hb-device-group-select { width: 100% !important; height: 42px !important; border: 1px solid #e0e7f3 !important; border-radius: 8px !important; padding: 0 12px !important; color: #526380; background: #fff; font-size: 12px; }
.hb-device-a-drawer textarea.ant-input { min-height: 104px; }
.hb-device-a-drawer .ant-form-item-extra, .hb-device-a-drawer .ant-typography-secondary { color: #98a6bc; font-size: 11px; line-height: 1.8; }
.hb-device-a-drawer .ant-form-item:has(> .ant-form-item-row input[id="type"]) { margin-bottom: 26px; }
.hb-device-a-drawer .ant-drawer-body > form > .ant-row { flex-wrap: wrap; gap: 8px; }
.hb-device-a-drawer .ant-upload-wrapper { color: var(--hb-primary); }
.hb-device-a-drawer .ant-radio-button-wrapper { height: 36px; line-height: 34px; color: #8594ad; border-color: #e0e7f3; font-size: 12px; }
.hb-device-a-drawer .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) { color: #fff; border-color: var(--hb-primary); background: var(--hb-primary); }
.hb-device-a-drawer .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::before { background: var(--hb-primary); }
.hb-device-a-drawer .ant-input-affix-wrapper-status-error { border-color: #ff7875; }

/* Group selection uses the original React data, editor and action handlers. */
.hb-device-a-group-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0 !important; align-items: start; }
.hb-device-a-group-workspace::before, .hb-device-a-group-workspace::after { display: none; }
.hb-device-a-group-workspace > .ant-col { min-width: 0; max-width: none; width: auto; padding: 0 !important; margin: 0 !important; flex: none !important; }
.hb-device-a-group-workspace .hb-device-a-group-tree > .ant-card { height: auto !important; min-height: 0; max-height: none; margin-bottom: 22px; border: 1px solid #e6ebf5; border-radius: 16px; box-shadow: none; }
.hb-device-a-group-tree .ant-card-head { min-height: 70px; padding: 16px 24px; border-bottom: 1px solid #edf1f8; }
.hb-device-a-group-tree .ant-card-head-title { color: #172846; font-size: 16px; font-weight: 600; }
.hb-device-a-group-tree .ant-card-extra .ant-btn { min-height: 34px; padding: 5px 12px; color: var(--hb-primary); border-color: #e0e7ff; background: #f6f8ff; font-size: 12px; }
.hb-device-a-group-tree .ant-card-body { min-width: 0; padding: 22px 24px; }
.hb-device-a-group-tree .ant-card-body::before, .hb-device-a-group-tree .ant-card-body::after { display: none; }
.hb-device-a-tree-hint { margin: 0 0 16px; color: #98a6bc; font-size: 11px; line-height: 1.8; }
.hb-device-a-group-tree .tree-container { flex: none; overflow: visible; }
.hb-device-a-group-picker { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; min-width: 0; }
.hb-device-a-group-section { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; min-width: 0; }
.hb-device-a-project-section { padding-right: 24px; border-right: 1px solid #edf1f8; }
.hb-device-a-group-picker-field { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 160px; }
.hb-device-a-group-picker-field > .ant-select { flex: 1; min-width: 0; }
.hb-device-a-level-actions, .hb-device-a-disabled-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.hb-device-a-level-actions:has(input) { flex: 1; }
.hb-device-a-actions-inactive { opacity: .5; }
.hb-device-a-group-picker-label { flex: 0 0 auto; margin: 0; color: #8594ad; font-size: 12px; white-space: nowrap; }
.hb-device-a-group-select.ant-select { height: 40px; font-size: 12px; color: #526380; }
.hb-device-a-group-select.ant-select .ant-select-selector { min-height: 40px; padding: 3px 12px; border-color: #e0e7f3; border-radius: 8px; box-shadow: none; }
.hb-device-a-group-select.ant-select-focused .ant-select-selector { border-color: var(--hb-primary-muted) !important; box-shadow: 0 0 0 3px var(--hb-primary-a0d) !important; }
.hb-device-a-group-picker-empty { margin: 0 0 10px; color: #98a6bc; font-size: 12px; }
.hb-device-a-group-actions { flex: 0 1 auto; min-width: 0; }
.hb-device-a-group-actions .ant-tree-indent-unit { display: none; }
.hb-device-a-group-actions .ant-tree-node-content-wrapper { display: block; min-width: 0; padding: 0; }
.hb-device-a-group-tree .tree-container .ant-tree-node-content-wrapper.ant-tree-node-selected,
.hb-device-a-group-tree .tree-container .ant-tree-node-content-wrapper.ant-tree-node-selected:hover { background: transparent !important; }
.hb-device-a-group-actions .tree-node-title { min-height: 40px; }
.hb-device-a-group-actions .tree-node-title > span:first-child { display: none !important; }
.hb-device-a-group-actions .tree-node-actions { flex-wrap: wrap; gap: 8px !important; margin-left: 0 !important; opacity: 1 !important; }
.hb-device-a-group-actions .tree-node-actions .anticon { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 10px; border: 1px solid #e0e7f3; border-radius: 8px; color: #6d7e99 !important; font-size: 13px; }
.hb-device-a-group-actions .tree-node-actions .anticon::after { content: attr(data-hb-action-label); font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; font-size: 12px; }
.hb-device-a-group-actions .tree-node-actions > .ant-space-item:has(.anticon-plus), .hb-device-a-group-actions .hb-sg-add-btn { display: none !important; }
.hb-device-a-group-actions .tree-node-actions > .ant-space-item { order: 1; }
.hb-device-a-group-actions .tree-node-actions .anticon:hover { color: var(--hb-primary) !important; border-color: var(--hb-primary-border); background: #f8faff; }
.hb-device-a-group-actions .tree-node-actions .anticon-delete { color: #d65f6a !important; }
.hb-device-a-group-actions .hb-sg-share-btn { order: 2; margin: 0 !important; height: 40px !important; padding: 8px 12px !important; line-height: 22px !important; border-color: #e0e7f3 !important; color: var(--hb-primary-muted) !important; border-radius: 8px !important; font-size: 12px !important; }
.hb-device-a-group-actions:has(input) { flex: 1; min-width: 240px; }
.hb-device-a-group-actions .tree-node-title input.ant-input { min-height: 40px; height: 40px; padding: 8px 12px; }
.hb-device-a-group-actions .tree-node-title:has(input) .anticon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 6px; color: var(--hb-primary-muted) !important; cursor: pointer; }
.hb-device-a-group-actions .tree-node-title:has(input) .hb-sg-share-btn { display: none !important; }
.hb-device-a-group-actions [role="button"]:focus-visible { outline: 2px solid var(--hb-primary-border); outline-offset: 2px; }
.hb-device-a-group-active .ant-select-dropdown { padding: 5px; border: 1px solid #e6ebf5; border-radius: 9px; box-shadow: 0 8px 28px #17284614; }
.hb-device-a-group-active .ant-select-item { font-size: 12px; }
.hb-device-a-group-active .ant-select-item-option-selected:not(.ant-select-item-option-disabled) { color: var(--hb-primary); background: #f0f3ff; }
.hb-device-a-group-content > .ant-card { min-width: 0; margin: 0 0 22px !important; border: 1px solid #e6ebf5; border-radius: 16px; box-shadow: none; }
.hb-device-a-group-content > .ant-card > .ant-card-body { min-width: 0; padding: 24px; }
.hb-device-a-group-content .hb-device-a-filter > .ant-card-body { gap: 20px; }
.hb-device-a-group-workspace .hb-device-a-group-tree > .ant-card { margin-bottom: 0; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.hb-device-a-group-content > .hb-device-a-filter { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.hb-device-a-group-content .hb-device-a-filter > .ant-card-body { align-items: center; flex-direction: row; padding-top: 4px; }
.hb-device-a-group-content .hb-device-a-filter-heading .hb-device-a-search-icon, .hb-device-a-group-content .hb-device-a-filter-heading p { display: none; }
.hb-device-a-group-content .hb-device-a-filter-heading h2 { color: #8594ad; font-size: 12px; font-weight: 400; }
.hb-device-a-group-content .device-group-form { display: grid !important; grid-template-columns: minmax(120px, 1fr) auto auto; gap: 12px; width: 100%; min-width: 0; overflow: visible !important; }
.hb-device-a-group-content .device-group-form .ant-form-item { width: auto !important; min-width: 0 !important; flex: none !important; }
.hb-device-a-group-content .device-group-form .ant-form-item-control { min-width: 0 !important; }
.hb-device-a-selected-group { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; color: var(--hb-primary-muted); }
.hb-device-a-group-content .hb-device-a-results > .ant-card-body { min-height: 420px; }
.hb-device-a-group-content .hb-device-a-toolbar .hb-device-a-list-heading { min-width: 120px; }
.hb-device-a-group-content .hb-device-a-empty { padding: 20px 8px 30px; }
.hb-device-a-group-active .ant-table-content, .hb-device-a-group-active .ant-table-body, .hb-device-a-group-editor-modal textarea { scrollbar-width: none; }
.hb-device-a-group-active .ant-table-content::-webkit-scrollbar, .hb-device-a-group-active .ant-table-body::-webkit-scrollbar, .hb-device-a-group-editor-modal textarea::-webkit-scrollbar { display: none; }

/* Project/group editors use a portal immediately; fields always keep labels inline. */
.hb-device-a-group-editor-modal { max-width: calc(100vw - 32px); font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
.hb-device-a-group-editor-modal .ant-modal-content { overflow: hidden; padding: 0; border-radius: 16px; box-shadow: 0 18px 70px #17284626; }
.hb-device-a-group-editor-modal .ant-modal-header { margin: 0; padding: 23px 28px; border-bottom: 1px solid #edf1f8; }
.hb-device-a-group-editor-modal .ant-modal-title { color: #172846; font-size: 19px; font-weight: 600; }
.hb-device-a-group-editor-modal .ant-modal-close { top: 22px; right: 24px; color: #98a6bc; }
.hb-device-a-group-editor-modal .ant-modal-body { padding: 28px; }
.hb-device-a-group-editor-context { margin: 0 0 22px; color: #8594ad; font-size: 12px; overflow-wrap: anywhere; }
.hb-device-a-group-editor-row { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.hb-device-a-group-editor-row > label { box-sizing: border-box; flex: 0 0 88px; color: #526380; font-size: 12px; white-space: nowrap; }
.hb-device-a-group-name-row > label::before { content: "*"; margin-right: 5px; color: #d65f6a; }
.hb-device-a-group-description-row { align-items: flex-start; margin-top: 22px; }
.hb-device-a-group-description-row > label { padding: 10px 0 0 10px; }
.hb-device-a-group-editor-field textarea.ant-input { box-sizing: border-box; display: block; max-width: 100%; resize: vertical; min-height: 92px; }
.hb-device-a-group-description-hint { margin: 8px 0 0; color: #98a6bc; font-size: 11px; line-height: 1.7; }
.hb-device-a-group-editor-field { flex: 1; min-width: 0; }
.hb-device-a-group-editor-field .ant-input { width: 100%; min-height: 40px; padding: 8px 12px; border-color: #e0e7f3; border-radius: 8px; color: #42516d; font-size: 12px; box-shadow: none; }
.hb-device-a-group-editor-field .ant-input:focus { border-color: var(--hb-primary-muted); box-shadow: 0 0 0 3px var(--hb-primary-a0d); }
.hb-device-a-group-editor-field .ant-input-status-error { border-color: #d65f6a; }
.hb-device-a-group-editor-field [role="alert"] { margin: 7px 0 0; color: #d65f6a; font-size: 12px; }
.hb-device-a-group-editor-modal .ant-modal-footer { margin: 0; padding: 17px 28px; border-top: 1px solid #edf1f8; }
.hb-device-a-group-editor-modal .ant-btn { min-height: 40px; padding: 8px 17px; border-color: #e0e7f3; border-radius: 8px; color: #6d7e99; background: #fff; font-size: 12px; line-height: 22px; box-shadow: none; }
.hb-device-a-group-editor-modal .ant-btn-primary { color: #fff; border-color: var(--hb-primary); background: var(--hb-primary); }
.hb-device-a-group-editor-modal .ant-btn-primary:not(:disabled):hover { color: #fff; border-color: var(--hb-primary-hover); background: var(--hb-primary-hover); }
.hb-device-a-group-editor-modal .ant-btn:focus-visible { outline: 3px solid var(--hb-primary-focus); outline-offset: 2px; }
@media (max-width: 760px) {
  .hb-device-a-group-editor-modal .ant-modal-header { padding: 20px; }
  .hb-device-a-group-editor-modal .ant-modal-body { padding: 24px 20px; }
  .hb-device-a-group-editor-modal .ant-modal-footer { padding: 16px 20px; }
  .hb-device-a-group-editor-modal .ant-modal-close { top: 18px; right: 16px; }
  .hb-device-a-group-editor-row { gap: 12px; }
}

/* Match the native binding portal on insertion, before the observer adds decoration classes. */
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) { top: 45px; max-width: calc(100vw - 48px); padding-bottom: 35px; font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
body.hb-device-a-group-active .ant-modal-wrap:has(.bind-device-modal) { scrollbar-width: none; }
body.hb-device-a-group-active .ant-modal-wrap:has(.bind-device-modal)::-webkit-scrollbar { display: none; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-content { padding: 0; overflow: hidden; border-radius: 16px; box-shadow: 0 18px 70px #17284626; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-header { margin: 0; padding: 24px 28px; border-bottom: 1px solid #edf1f8; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-title { color: #172846; font-size: 20px; font-weight: 600; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-close { top: 23px; right: 24px; color: #98a6bc; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-body { padding: 24px 28px; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-body > .ant-row { flex-wrap: nowrap; align-items: stretch; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-card { min-width: 0; overflow: hidden; border-color: #e6ebf5; border-radius: 11px; box-shadow: none; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-card-head { min-height: 54px; padding: 12px 18px; border-bottom-color: #edf1f8; color: #526380; font-size: 13px; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-card-body { height: auto !important; min-height: 470px; padding: 18px !important; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-card-body > .ant-space, body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-card-body > .ant-space > .ant-space-item { width: 100%; min-width: 0; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .bind-device-modal { display: flex; gap: 8px !important; width: 100%; min-width: 0; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .bind-device-modal > .ant-space-item:first-child { flex: 0 0 106px; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .bind-device-modal > .ant-space-item:last-child { flex: 1; min-width: 0; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .bind-device-modal .ant-select { width: 100% !important; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-input-affix-wrapper, body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-select-selector { height: 38px !important; border-color: #e0e7f3 !important; border-radius: 7px !important; color: #6d7e99; font-size: 12px; box-shadow: none; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-input-affix-wrapper { width: 100% !important; padding: 6px 10px; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-input { min-width: 0; color: #526380; font-size: 12px; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-select-selection-item { line-height: 36px !important; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) select#hb-device-group-select { min-height: 38px; max-width: 100%; border: 1px solid #e0e7f3 !important; border-radius: 7px !important; padding: 5px 10px !important; color: #526380; background: #fff; }
/* The binding group field and its popup share the page's A-theme select styles. */
.hb-device-a-binding-group-field > .ant-form-item-row { display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 16px; }
.hb-device-a-binding-group-field .ant-form-item-label { margin: 0 !important; padding: 0; line-height: 38px; }
.hb-device-a-binding-group-field .ant-form-item-label > label { height: auto; color: #526380; font-size: 12px; }
.hb-device-a-binding-group-field .ant-form-item-control { min-width: 0; }
.hb-device-a-binding-group-field select[hidden] { display: none !important; }
.hb-device-a-binding-group-field .ant-form-item-control > div:last-child:not(.hb-device-a-binding-select) { margin-top: 7px !important; color: #98a6bc !important; font-size: 11px !important; line-height: 1.7; }
.hb-device-a-binding-select { position: relative; width: 100%; min-width: 0; }
.hb-device-a-binding-select-trigger { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 38px; padding: 6px 12px; border: 1px solid #e0e7f3; border-radius: 8px; color: #526380; background: #fff; font: 12px/24px "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; text-align: left; cursor: pointer; }
.hb-device-a-binding-select-trigger:hover { border-color: var(--hb-primary-border); }
.hb-device-a-binding-select-trigger:focus-visible, .hb-device-a-binding-select-trigger[aria-expanded="true"] { outline: 0; border-color: var(--hb-primary-muted); box-shadow: 0 0 0 3px var(--hb-primary-a0d); }
.hb-device-a-binding-select-trigger:disabled { color: #b3bdcd; border-color: #e6ebf5; background: #f4f6fc; cursor: not-allowed; }
.hb-device-a-binding-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-device-a-binding-select-arrow { flex: 0 0 12px; width: 12px; height: 12px; color: #98a6bc; transition: transform .15s; }
.hb-device-a-binding-select-trigger[aria-expanded="true"] .hb-device-a-binding-select-arrow { transform: rotate(180deg); }
.hb-device-a-binding-select-list { box-sizing: border-box; position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; width: 100%; max-height: 240px; overflow: auto; overscroll-behavior: contain; padding: 5px; border: 1px solid #e6ebf5; border-radius: 9px; color: #526380; background: #fff; box-shadow: 0 8px 28px #17284614; scrollbar-width: none; }
.hb-device-a-binding-select-list::-webkit-scrollbar { display: none; }
.hb-device-a-binding-select-list[hidden] { display: none !important; }
.hb-device-a-binding-select[data-placement="top"] .hb-device-a-binding-select-list { top: auto; bottom: calc(100% + 5px); }
.hb-device-a-binding-select-option { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; padding: 7px 10px; border-radius: 5px; color: #526380; font-size: 12px; line-height: 20px; cursor: pointer; }
.hb-device-a-binding-select-option > span { min-width: 0; overflow-wrap: anywhere; }
.hb-device-a-binding-select-option[data-active="true"] { background: #f5f7fc; }
.hb-device-a-binding-select-option[aria-selected="true"] { color: var(--hb-primary); background: #f0f3ff; font-weight: 600; }
.hb-device-a-binding-select-option[aria-disabled="true"] { color: #b3bdcd; background: #fff; cursor: not-allowed; }
.hb-device-a-binding-select-option svg { flex: 0 0 14px; width: 14px; height: 14px; visibility: hidden; }
.hb-device-a-binding-select-option[aria-selected="true"] svg { visibility: visible; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-table { color: #6d7e99; font-size: 11px; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-table-thead > tr > th { padding: 12px 10px; color: #8594ad; background: #f7f9ff; border-color: #edf1f8; font-weight: 500; white-space: nowrap; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-table-tbody > tr > td { border-color: #edf1f8; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-empty-description { color: #98a6bc; font-size: 12px; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-btn { height: auto; min-height: 38px; padding: 7px 17px; border-color: #e0e7f3; border-radius: 8px; color: #6d7e99; font-size: 12px; box-shadow: none; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-btn-primary { color: #fff; border-color: var(--hb-primary); background: var(--hb-primary); }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-btn:disabled { color: #b3bdcd; border-color: #e6ebf5; background: #f4f6fc; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-col-2 { display: flex; align-items: center; justify-content: center; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-col-2 > .ant-space { margin: 0 !important; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-col-2 .ant-btn { width: 34px; min-height: 34px; padding: 5px; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-pagination { flex-wrap: wrap; font-size: 11px; color: #98a6bc; }
body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-footer { margin: 0; padding: 17px 28px; border-top: 1px solid #edf1f8; }

@media (max-width: 1300px) {
  .hb-device-a-filter form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hb-device-a-filter form .ant-form-item:nth-last-child(-n+2) .ant-btn { width: 100%; }
  .hb-device-a-group-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hb-device-a-group-content > .ant-card > .ant-card-body { padding: 22px; }
  .hb-device-a-group-content .hb-device-a-toolbar .hb-device-a-list-heading { flex-basis: 100%; }
}
@media (max-width: 1100px) {
  .hb-device-a-group-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hb-device-a-group-picker { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hb-device-a-project-section { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid #edf1f8; }
  .hb-device-a-group-tree .ant-card-head { padding: 14px; }
  .hb-device-a-group-tree .ant-card-body { padding: 16px 8px; }
  .hb-device-a-group-content .device-group-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-device-a-group-content .device-group-form .ant-form-item:first-child { grid-column: 1 / -1; }
  .hb-device-a-group-content .device-group-form .ant-btn { width: 100%; }
}
@media (max-width: 760px) {
  .hb-device-a-filter form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hb-device-a-filter .ant-form-item:first-child { flex-basis: auto; }
  .hb-device-a-filter .ant-select-selector { padding-left: 9px !important; }
  .hb-device-a-filter .ant-select-selection-item { font-size: 11px; }
  .hb-device-a-filter .ant-form-item:nth-child(3), .hb-device-a-filter .ant-form-item:nth-child(4) { grid-column: 1 / -1; }
  .hb-device-a-filter .ant-btn { width: 100%; }
  .hb-device-a-group-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hb-device-a-group-workspace .hb-device-a-group-tree > .ant-card { min-height: 0; max-height: none; margin-bottom: 0; border-radius: 13px 13px 0 0; }
  .hb-device-a-group-tree .ant-card-head { min-height: 68px; padding: 14px 18px; }
  .hb-device-a-group-tree .ant-card-body { padding: 20px; }
  .hb-device-a-group-picker { gap: 16px; }
  .hb-device-a-group-section { align-items: stretch; flex-direction: column; }
  .hb-device-a-group-picker-field { flex: none; min-width: 0; }
  .hb-device-a-group-actions:has(input) { min-width: 0; }
  .hb-device-a-group-content .hb-device-a-filter > .ant-card-body { flex-direction: row; align-items: center; gap: 12px; }
  .hb-device-a-tree-hint { margin-bottom: 10px; }
  .hb-device-a-group-content > .ant-card { margin-bottom: 16px !important; border-radius: 13px; }
  .hb-device-a-group-content > .hb-device-a-filter { border-top-left-radius: 0; border-top-right-radius: 0; }
  .hb-device-a-group-content > .ant-card > .ant-card-body { padding: 20px; }
  .hb-device-a-group-content .device-group-form .ant-form-item:nth-child(3) { grid-column: auto; }
  .hb-device-a-group-content .hb-device-a-toolbar { gap: 16px 10px !important; }
  .hb-device-a-group-content .hb-device-a-results > .ant-card-body { min-height: 410px; }
  .hb-device-a-selected-group { max-width: 180px; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) { top: 16px; max-width: calc(100vw - 24px); margin: 0 auto; padding-bottom: 16px; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-header, body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-body { padding: 20px 16px; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-title { font-size: 18px; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-close { top: 18px; right: 14px; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-body > .ant-row { display: flex; flex-direction: column; gap: 14px; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-body > .ant-row > .ant-col { flex: none !important; width: 100%; max-width: 100%; padding: 0 !important; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-card-body { min-height: 310px; padding: 14px !important; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-table-wrapper { min-height: 170px !important; max-width: 100%; overflow-x: auto; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-col-2 > .ant-space { flex-direction: row; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-col-2 .ant-btn .anticon { transform: rotate(90deg); }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-footer { padding: 16px; display: flex; gap: 10px; }
  body.hb-device-a-group-active .ant-modal:has(.bind-device-modal) .ant-modal-footer .ant-btn { flex: 1; margin: 0; }
  .hb-device-a-drawer .ant-drawer-body > form > .ant-row > .ant-col { max-width: 100%; flex: 1 1 100%; }
}
@media (max-width: 360px) {
  .hb-device-a-filter form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-device-a-filter form:not(.device-group-form) .ant-form-item:nth-child(-n+4) { grid-column: 1 / -1; }
  .hb-device-a-group-tree .ant-card-body { padding: 18px 16px; }
  .hb-device-a-group-tree .tree-node-actions .anticon { width: 22px; }
}

/* Group portals use the A theme on their first frame. */
.hb-device-a-group-active .ant-popconfirm { max-width: calc(100vw - 24px); --antd-arrow-background-color: #fff; font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif; }
.hb-device-a-group-active .ant-popconfirm .ant-popover-inner { box-sizing: border-box; width: 326px; max-width: calc(100vw - 24px); padding: 18px; border: 1px solid #e6ebf5; border-radius: 12px; background: #fff; box-shadow: 0 10px 32px #1728461a, 0 2px 6px #17284606; }
.hb-device-a-group-active .ant-popconfirm .ant-popconfirm-message { display: flex; align-items: flex-start; gap: 12px; margin: 0; }
.hb-device-a-group-active .ant-popconfirm .ant-popconfirm-message-icon { position: static; display: inline-flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0; border-radius: 9px; background: #fff4e8; }
.hb-device-a-group-active .ant-popconfirm .ant-popconfirm-message-icon > .anticon { position: static; margin: 0; color: #d9983d; font-size: 16px; }
.hb-device-a-group-active .ant-popconfirm .ant-popconfirm-message-text { flex: 1; min-width: 0; padding: 3px 0 0; }
.hb-device-a-group-active .ant-popconfirm .ant-popconfirm-title { margin: 0; color: #172846; font-size: 15px; font-weight: 600; line-height: 24px; overflow-wrap: anywhere; }
.hb-device-a-group-active .ant-popconfirm .ant-popconfirm-description { margin: 8px 0 0; }
.hb-device-a-group-active .ant-popconfirm .hb-device-a-group-delete-question { color: #42516d; font-size: 13px; font-weight: 400; line-height: 23px; overflow-wrap: anywhere; }
.hb-device-a-group-active .ant-popconfirm .hb-device-a-group-delete-description { margin-top: 6px; color: #7e8ca5; font-size: 12px; font-weight: 400; line-height: 20px; }
.hb-device-a-group-active .ant-popconfirm .ant-popconfirm-buttons { display: flex; justify-content: flex-end; gap: 8px; margin: 17px 0 0; }
.hb-device-a-group-active .ant-popconfirm .ant-btn { height: 36px; min-width: 66px; margin: 0; padding: 6px 14px; border: 1px solid #e0e7f3; border-radius: 8px; color: #6d7e99; background: #fff; box-shadow: none; font-size: 12px; line-height: 22px; }
.hb-device-a-group-active .ant-popconfirm .ant-btn-default:not(:disabled):hover { color: var(--hb-primary); border-color: var(--hb-primary-border); background: #f8faff; }
.hb-device-a-group-active .ant-popconfirm .ant-btn-primary { border-color: #d65f6a; background: #d65f6a; color: #fff; }
.hb-device-a-group-active .ant-popconfirm .ant-btn-primary:not(:disabled):hover { border-color: #c64c58; background: #c64c58; color: #fff; }
.hb-device-a-group-active .ant-popconfirm .ant-btn:focus-visible { outline: 3px solid var(--hb-primary-focus); outline-offset: 3px; }

.hb-device-a-group-active #hb-share-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; background: #17284645; color: #42516d; font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif; }
#hb-share-modal, #hb-share-modal * { box-sizing: border-box; }
.hb-device-a-group-active .hb-share-panel { display: flex; flex-direction: column; width: 560px; max-width: 100%; min-width: 0; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: hidden; border: 1px solid #e6ebf5; border-radius: 16px; background: #fff; box-shadow: 0 18px 70px #17284626; }
.hb-device-a-group-active .hb-share-header { display: flex; flex: 0 0 auto; align-items: center; gap: 13px; padding: 24px 28px; border-bottom: 1px solid #edf1f8; }
.hb-device-a-group-active .hb-share-heading-icon { display: flex; flex: 0 0 42px; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; color: var(--hb-primary); background: #eff3ff; }
.hb-device-a-group-active .hb-share-heading-icon svg { width: 21px; height: 21px; }
.hb-device-a-group-active .hb-share-header > div { flex: 1; min-width: 0; }
.hb-device-a-group-active #hb-share-title { margin: 0; color: #172846; font-size: 20px; font-weight: 600; line-height: 28px; }
.hb-device-a-group-active #hb-share-project { margin: 4px 0 0; color: #8594ad; font-size: 12px; line-height: 19px; overflow-wrap: anywhere; }
.hb-device-a-group-active #hb-share-close { display: flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 7px; border: 0; border-radius: 8px; color: #98a6bc; background: transparent; cursor: pointer; }
.hb-device-a-group-active #hb-share-close svg { width: 18px; height: 18px; }
.hb-device-a-group-active #hb-share-close:hover { color: var(--hb-primary); background: #f3f6fd; }
.hb-device-a-group-active .hb-share-body { flex: 1 1 auto; min-height: 0; padding: 24px 28px; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; }
.hb-device-a-group-active .hb-share-body::-webkit-scrollbar { display: none; }
.hb-device-a-group-active .hb-share-notice { margin-bottom: 24px; padding: 13px 15px; border: 1px solid #e5ebff; border-radius: 10px; color: #7586a3; background: #f6f8ff; font-size: 12px; line-height: 1.9; }
.hb-device-a-group-active .hb-share-label { display: block; margin-bottom: 9px; color: #526380; font-size: 12px; line-height: 20px; }
.hb-device-a-group-active .hb-share-add-row { display: flex; align-items: stretch; gap: 10px; }
.hb-device-a-group-active #hb-share-user { flex: 1; width: 100%; min-width: 0; height: 42px; padding: 9px 12px; border: 1px solid #e0e7f3; border-radius: 8px; color: #42516d; background: #fff; font: inherit; font-size: 13px; line-height: 22px; outline: none; }
.hb-device-a-group-active #hb-share-user::placeholder { color: #a1aec2; }
.hb-device-a-group-active #hb-share-user:hover { border-color: var(--hb-primary-border); }
.hb-device-a-group-active #hb-share-user:focus { border-color: var(--hb-primary-muted); box-shadow: 0 0 0 3px var(--hb-primary-a0d); }
.hb-device-a-group-active #hb-share-user[aria-invalid="true"] { border-color: #d65f6a; box-shadow: 0 0 0 3px #d65f6a0d; }
.hb-device-a-group-active :is(#hb-share-add, #hb-share-done) { flex: 0 0 auto; min-height: 42px; padding: 9px 18px; border: 1px solid var(--hb-primary); border-radius: 8px; color: #fff; background: var(--hb-primary); box-shadow: none; font: inherit; font-size: 12px; line-height: 22px; white-space: nowrap; cursor: pointer; }
.hb-device-a-group-active #hb-share-add:not(:disabled):hover { border-color: var(--hb-primary-hover); background: var(--hb-primary-hover); }
.hb-device-a-group-active #hb-share-add:disabled { color: #a6b1c3; border-color: #e6ebf5; background: #f3f5f9; cursor: not-allowed; }
.hb-device-a-group-active .hb-share-error { margin-top: 8px; color: #d65f6a; font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.hb-device-a-group-active .hb-share-members-title { margin: 26px 0 12px; color: #526380; font-size: 13px; font-weight: 600; line-height: 22px; }
.hb-device-a-group-active #hb-share-list { min-width: 0; overflow: hidden; border: 1px solid #edf1f8; border-radius: 10px; }
.hb-device-a-group-active .hb-share-state { display: flex; align-items: center; justify-content: center; flex-direction: column; min-height: 166px; padding: 24px 16px; color: #98a6bc; font-size: 12px; line-height: 20px; text-align: center; }
.hb-device-a-group-active .hb-share-empty-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 13px; color: #9bade5; background: #f1f4ff; }
.hb-device-a-group-active .hb-share-empty-icon svg { width: 24px; height: 24px; }
.hb-device-a-group-active .hb-share-empty strong { color: #7586a3; font-size: 13px; font-weight: 500; }
.hb-device-a-group-active .hb-share-empty p { margin: 5px 0 0; color: #98a6bc; font-size: 11px; }
.hb-device-a-group-active #hb-share-list > .hb-share-error { margin: 0; padding: 20px 16px; }
.hb-device-a-group-active #hb-share-list table { width: 100%; table-layout: fixed; border-collapse: collapse; color: #526380; font-size: 12px; }
.hb-device-a-group-active #hb-share-list th { padding: 12px; border-bottom: 1px solid #edf1f8; color: #8594ad; background: #f7f9ff; font-size: 11px; font-weight: 500; text-align: left; }
.hb-device-a-group-active #hb-share-list td { padding: 13px 12px; border-bottom: 1px solid #edf1f8; line-height: 20px; overflow-wrap: anywhere; }
.hb-device-a-group-active #hb-share-list tr:last-child td { border-bottom: 0; }
.hb-device-a-group-active #hb-share-list :is(th, td):last-child { width: 64px; text-align: right; }
.hb-device-a-group-active .hb-share-role { display: inline-block; max-width: 100%; padding: 2px 7px; border-radius: 5px; color: var(--hb-primary-muted); background: #f0f3ff; font-size: 10px; }
.hb-device-a-group-active .hb-share-remove { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; color: #d65f6a; text-decoration: none; }
.hb-device-a-group-active .hb-share-remove:hover { color: #c64c58; }
.hb-device-a-group-active .hb-share-footer { display: flex; flex: 0 0 auto; justify-content: flex-end; padding: 16px 28px; border-top: 1px solid #edf1f8; }
.hb-device-a-group-active #hb-share-done { min-height: 38px; padding: 7px 20px; border-color: #e0e7f3; color: #6d7e99; background: #fff; }
.hb-device-a-group-active #hb-share-done:hover { border-color: var(--hb-primary-border); color: var(--hb-primary); background: #f8faff; }
.hb-device-a-group-active #hb-share-modal :is(button, a):focus-visible { outline: 3px solid var(--hb-primary-focus); outline-offset: 3px; }
@media (max-width: 760px) {
  .hb-device-a-group-active #hb-share-modal { padding: 16px; }
  .hb-device-a-group-active .hb-share-panel { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); border-radius: 14px; }
  .hb-device-a-group-active .hb-share-header { gap: 11px; padding: 20px; }
  .hb-device-a-group-active #hb-share-title { font-size: 18px; }
  .hb-device-a-group-active .hb-share-body { padding: 20px; }
  .hb-device-a-group-active .hb-share-notice { margin-bottom: 20px; }
  .hb-device-a-group-active .hb-share-footer { padding: 14px 20px; }
  .hb-device-a-group-active #hb-share-list :is(th, td) { padding: 11px 8px; }
  .hb-device-a-group-active #hb-share-list :is(th, td):last-child { width: 50px; }
}
@media (max-width: 360px) {
  .hb-device-a-group-active #hb-share-modal { padding: 12px; }
  .hb-device-a-group-active .hb-share-panel { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .hb-device-a-group-active .hb-share-header, .hb-device-a-group-active .hb-share-body { padding: 18px 16px; }
  .hb-device-a-group-active #hb-share-add { padding-inline: 12px; }
}
.hb-device-a-group-load-state { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; color: #8594ad; font-size: 14px; }
