/*
 * 对话框专用样式（对照 legacy/view/*.qml 1:1 还原）
 * 通过 <link> 单独引入，便于与 style.css 解耦。
 */

/* ========== DeviceConfigDialog ========== */
.modal--device-config {
    width: 1350px;
    height: 680px;
    max-width: 95vw;
    max-height: 95vh;
    padding: 0;
}
.modal--device-config .modal__header {
    height: 50px;
    background: #F0F0F0;
    border-bottom: 1px solid #E0E0E0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal--device-config .modal__title {
    font-size: 16px;
    font-weight: bold;
    color: #303133;
}
.modal--device-config .modal__close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 15px;
    font-size: 18px;
    cursor: pointer;
    color: #606266;
}
.modal--device-config .modal__close:hover   { background: #F0F0F0; }
.modal--device-config .modal__close:active  { background: #E0E0E0; }

.modal--device-config .modal__body {
    padding: 10px;
    flex: 1 1 auto;
    overflow: auto;
}
.modal--device-config .modal__footer {
    padding: 10px 20px 20px;
    border-top: none;
    background: transparent;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.dc-top-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}
.dc-field {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
}
.dc-label {
    font-size: 14px;
    color: #303133;
    flex: 0 0 auto;
}
.dc-model-select, .dc-addr-select, .dc-batch-count {
    height: 40px;
    padding: 0 10px;
    border: 1px solid #D0D0D0;
    border-radius: 4px;
    background: #FFFFFF;
    font-size: 14px;
    outline: none;
}
.dc-model-select        { width: 150px; }
.dc-addr-select         { width:  80px; }
.dc-batch-count         { width: 100px; }
.dc-model-select:focus, .dc-addr-select:focus, .dc-batch-count:focus,
.dc-name-input:focus    { border-color: #347CAF; }
.dc-name-input {
    width: 200px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #D0D0D0;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}
.dc-name-wrap           { position: relative; }
.dc-name-error {
    position: absolute;
    top: 44px;
    left: 0;
    color: #E00000;
    font-size: 12px;
}
.dc-name-input.input-invalid {
    border-color: #E00000;
    border-width: 2px;
}
.dc-batch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.dc-batch-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 14px;
}

.dc-config-title {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
    color: #303133;
}
.dc-config-host {
    width: 100%;
    height: 450px;
    background: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    overflow: auto;
    padding: 10px;
}

/* ---- GT5 主机 5 栏 ---- */
.gt5-panel {
    display: flex;
    gap: 10px;
    width: 100%;
    min-width: 1250px;
}
.gt5-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gt5-col__section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gt5-field-row {
    display: flex;
    align-items: center;
    gap: 5px;
}
.gt5-field-label {
    font-size: 12px;
    color: #303133;
    white-space: nowrap;
    flex: 0 0 auto;
}
.gt5-field-input {
    width: 120px;
    height: 25px;
    padding: 0 6px;
    border: 1px solid #D0D0D0;
    border-radius: 3px;
    font-size: 12px;
    outline: none;
}
.gt5-field-input:focus  { border-color: #347CAF; }
.gt5-swap-cb {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ---- G1 / G2 / G3 按键图 ----
 * 对齐 legacy/view/DeviceConfigDialog.qml：TextField 是 Image 的直接子元素，
 * x/y 相对 Image 左上角。Web 这里让 .key-img-panel 宽度自适应图片，
 * 从而保证 absolute 定位的 input 坐标与按键图完全一致（不居中留白）。
 */
.key-img-panel {
    position: relative;
    height: 400px;
    width: fit-content;
    margin: 0 auto;
}
.key-img-bg {
    height: 400px;
    width: auto;
    user-select: none;
    display: block;
}
.key-img-input {
    padding: 0 4px;
    border: 1px solid #D0D0D0;
    border-radius: 3px;
    font-size: 10px;
    outline: none;
    background: rgba(255,255,255,0.95);
}
.key-img-input:focus    { border-color: #347CAF; }

/* ---- GK1 扩展模块（窗帘电机）---- */
.gk1-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
}
.gk1-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.gk1-label {
    font-size: 14px;
    color: #303133;
    width: 120px;
}
.gk1-input {
    width: 120px;
    height: 25px;
    padding: 0 6px;
    border: 1px solid #D0D0D0;
    border-radius: 3px;
    outline: none;
}
.gk1-input:focus        { border-color: #347CAF; }

.empty-config-panel {
    text-align: center;
    font-size: 16px;
    color: #909399;
    padding-top: 180px;
}

/* ---- 底部 3 个按钮 ---- */
.dc-footer .btn {
    height: 35px;
    min-width: 80px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}
.dc-swap-btn {
    background: #EFF1F3;
    color: #303133;
}
.dc-swap-btn--on {
    background: #E86649;
    color: #FFFFFF;
}
.dc-swap-btn--confirm {
    background: #4CAF50;
    color: #FFFFFF;
}
.dc-light-btn {
    background: #686b7d;
    color: #FFFFFF;
}
.dc-ok-btn {
    background: #040C2C;
    color: #FFFFFF;
}
.dc-ok-btn:hover        { background: #050F3C; }

/* ========== AddSchemeDialog ========== */
.modal--add-scheme {
    width: 640px;
    height: 420px;
    padding: 0;
}
.modal--add-scheme .modal__header {
    height: 50px;
    background: #F0F0F0;
    border-bottom: 1px solid #E0E0E0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal--add-scheme .modal__title {
    font-size: 16px;
    font-weight: bold;
}
.modal--add-scheme .modal__close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 15px;
    font-size: 18px;
    cursor: pointer;
}
.modal--add-scheme .modal__close:hover  { background: #F0F0F0; }
.modal--add-scheme .modal__body {
    padding: 10px;
    flex: 1 1 auto;
}
.modal--add-scheme .modal__footer {
    border-top: none;
    padding: 10px 20px 20px;
    justify-content: flex-end;
}

.scheme-type-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 16px;
}
.scheme-type-row__title {
    font-weight: bold;
    color: #303133;
}
.scheme-form-area {
    width: 100%;
    height: 220px;
    background: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
}
.scheme-grid {
    display: grid;
    grid-template-columns: auto 150px;
    row-gap: 15px;
    column-gap: 5px;
    align-items: center;
}
.scheme-grid__label {
    font-size: 14px;
    font-weight: bold;
    color: #303133;
}
.scheme-grid__input {
    width: 150px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #D0D0D0;
    background: #FFFFFF;
    font-size: 14px;
    outline: none;
}
.scheme-grid__input:focus               { border-color: #347CAF; }
.scheme-grid__input.input-invalid       {
    border-color: #E00000;
    border-width: 2px;
}
.scheme-loop-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

.scheme-save-btn {
    width: 80px;
    height: 35px;
    background: #347CAF;
    color: #FFFFFF;
    border: 1px solid #2E6F9C;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.scheme-save-btn:hover      { background: #3D8BBF; }
.scheme-save-btn:active     { background: #2E6F9C; }

/* ========== VoiceBindingDialog ========== */
.modal--voice-binding {
    width: 780px;
    height: 600px;
    padding: 0;
}
.modal--voice-binding .modal__header,
.modal--voice-binding .modal__footer {
    padding: 0 20px;
    border-top: none;
}
.modal--voice-binding .modal__header {
    height: 50px;
    background: #F0F0F0;
    border-bottom: 1px solid #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal--voice-binding .modal__title     { font-size: 16px; font-weight: bold; }
.modal--voice-binding .modal__close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 15px;
    font-size: 18px;
    cursor: pointer;
}
.modal--voice-binding .modal__body {
    flex: 1 1 auto;
    padding: 20px;
    overflow: hidden;
}

.voice-file-list {
    width: 200px;
    max-height: 400px;
    overflow: auto;
    margin: 40px auto;
    border: 1px solid #DBDBDB;
    border-radius: 4px;
    background: #FFFFFF;
}
.voice-file-list__item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #F0F0F0;
    font-size: 14px;
}
.voice-file-list__item:hover    { background: #D0D0D0; }
.voice-file-list__item:last-child { border-bottom: none; }

.voice-binding-row {
    display: flex;
    gap: 20px;
    height: 100%;
}
.voice-info-col {
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.voice-info-card {
    background: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 5px;
    padding: 12px;
}
.voice-info-card__title {
    color: #BD3124;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
}
.voice-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    row-gap: 10px;
    column-gap: 10px;
    font-size: 12px;
}
.voice-info-grid__key   { font-weight: bold; color: #303133; }
.voice-info-grid__val   { color: #606266; word-break: break-all; }

.voice-action-row {
    display: flex;
    gap: 15px;
    margin-top: auto;
}
.voice-action-row .btn {
    flex: 1;
    height: 30px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
}
.voice-action-row .btn--add {
    background: #059BD6;
    color: #FFFFFF;
}
.voice-action-row .btn--add:hover   { background: #1CAEE8; }
.voice-action-row .btn--reselect {
    background: #ECF5FF;
    color: #059BD6;
    border: 1px solid #B3D8FF;
}
.voice-action-row .btn--reselect:hover { background: #E0EEFE; }

.voice-command-col, .voice-selected-col {
    width: 232px;
    border: 1px solid #DBDBDB;
    border-radius: 5px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.voice-search {
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #D0D0D0;
    border-radius: 3px;
    outline: none;
}
.voice-search:focus     { border-color: #347CAF; }
.voice-command-list {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 200px;
    max-height: 450px;
}
.voice-command-list__item {
    height: 30px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.voice-command-list__item:hover { background: #F0F0F0; }
.voice-cmd-cb {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #059BD6;
}
.voice-selected-col__title {
    height: 30px;
    color: #C8C8C8;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.voice-selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    height: 30px;
    cursor: default;
    font-size: 14px;
}
.voice-selected-item:hover      { background: #F0F0F0; border-radius: 4px; }
.voice-selected-item__remove {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #888888;
}
.voice-selected-item__remove:hover  { color: #505050; }

.voice-empty {
    text-align: center;
    color: #909399;
    padding: 40px 0;
    font-size: 14px;
}

/* ========== TimeSelectPopup ========== */
.modal--time-select {
    width: 360px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 16px 4px rgba(0,0,0,0.25);
}
.modal--time-select .modal__body  { padding: 0; }
.modal--time-select .modal__footer {
    border-top: none;
    padding: 15px 0 0;
    justify-content: flex-end;
    gap: 10px;
}
.time-select-row {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.time-select-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.time-select-col__title {
    font-weight: bold;
    font-size: 14px;
}
.time-select-frame {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    gap: 2px;
}
.time-select-wheel {
    width: 50px;
    height: 140px;
    overflow: hidden;
    position: relative;
    text-align: center;
}
.time-select-wheel__viewport {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    scrollbar-width: none;
    scroll-snap-type: y mandatory;
    font-size: 16px;
}
.time-select-wheel__viewport::-webkit-scrollbar { display: none; }
.time-select-wheel__viewport::before,
.time-select-wheel__viewport::after {
    content: "";
    display: block;
    height: 56px;
}
.time-select-wheel__item {
    height: 28px;
    line-height: 28px;
    scroll-snap-align: center;
    color: #606266;
    font-weight: bold;
    transition: color 0.15s;
}
.time-select-wheel__item--active {
    color: #409eff;
    font-size: 18px;
}
.time-select-sep {
    font-size: 17px;
    font-weight: bold;
    color: #303133;
}

.time-select-btn {
    width: 60px;
    height: 32px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #FFFFFF;
}
.time-select-btn--ok    { background: #040C2C; }
.time-select-btn--ok:hover      { background: #080F3F; }
.time-select-btn--cancel { background: #F56C6C; }
.time-select-btn--cancel:hover  { background: #FA7F7F; }

/* ========== ConditionSetDialog ========== */
.modal--condition-set {
    width: 1280px;
    height: 800px;
    max-width: 95vw;
    max-height: 95vh;
    padding: 0;
}
.modal--condition-set .modal__header {
    height: 50px;
    background: #F0F0F0;
    border-bottom: 1px solid #E0E0E0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal--condition-set .modal__title    { font-size: 16px; font-weight: bold; }
.modal--condition-set .modal__close {
    width: 30px; height: 30px;
    border: none; background: transparent;
    border-radius: 15px; font-size: 18px; cursor: pointer;
}
.modal--condition-set .modal__close:hover  { background: #F0F0F0; }

.modal--condition-set .modal__body { padding: 20px; overflow: auto; }
.modal--condition-set .modal__footer {
    padding: 10px 20px 20px;
    border-top: none;
    justify-content: flex-end;
    gap: 20px;
}

.cond-head-row {
    display: flex;
    height: 40px;
    background: #CECECE;
}
.cond-head-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #F0F0F0;
}

.cond-list {
    border: 1px solid #F0F0F0;
    border-top: none;
    max-height: 640px;
    overflow: auto;
}
.cond-row {
    display: flex;
    height: 44px;
    border-bottom: 1px solid #F0F0F0;
}
.cond-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #F0F0F0;
    font-size: 14px;
    padding: 0 8px;
}
.cond-cell:last-child  { border-right: none; }
.cond-content-cell     { justify-content: flex-start; padding: 0 12px; }

.cond-type-select {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #D0D0D0;
    border-radius: 3px;
    background: #FFFFFF;
    font-size: 14px;
    outline: none;
}

.cond-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}
.cond-sub__select, .cond-sub__input {
    height: 30px;
    padding: 0 8px;
    border: 1px solid #D0D0D0;
    border-radius: 3px;
    background: #FFFFFF;
    outline: none;
    font-size: 14px;
}
.cond-sub__select--grow, .cond-sub__input--grow { flex: 1 1 auto; }
.cond-sub__select--device   { min-width: 180px; }
.cond-sub__num {
    height: 30px;
    width: 80px;
    padding: 0 6px;
    border: 1px solid #D0D0D0;
    border-radius: 3px;
    outline: none;
    font-size: 14px;
}
.cond-sub__sep {
    font-size: 14px;
    color: #303133;
}
.cond-sub__time-btn {
    height: 32px;
    padding: 0 15px;
    border: 1px solid #D0D0D0;
    border-radius: 4px;
    background: #FFFFFF;
    cursor: pointer;
    font-size: 14px;
}
.cond-sub__time-btn:hover  { background: #EAEAEA; }

.btn--add-cond, .btn--save-cond {
    min-width: 80px;
    height: 35px;
    padding: 0 14px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    color: #FFFFFF;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-weight: bold;
}
.btn--add-cond    { background: #040C2C; }
.btn--save-cond   { background: #347CAF; }
.btn--delete-cond {
    min-width: 50px;
    height: 25px;
    padding: 0 10px;
    background: #E51400;
    color: #FFFFFF;
    border: none;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

/* 条件设置：设备状态的实体按钮和 GT5 实体 Popup */
.cond-sub__entity-btn {
    min-width: 120px;
    height: 32px;
    padding: 0 15px;
    border: 1px solid #F0F0F0;
    border-radius: 4px;
    background: #FFFFFF;
    cursor: pointer;
    font-size: 14px;
}
.cond-sub__entity-btn:hover { background: #EAEAEA; }

.gt5-entity-modal {
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.gt5-entity-panel {
    width: 400px;
    max-height: 500px;
    background: #FFFFFF;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.gt5-entity-close {
    align-self: flex-end;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    border-radius: 15px;
}
.gt5-entity-close:hover { background: #E0E0E0; }
.gt5-entity-list {
    flex: 1 1 auto;
    overflow: auto;
    padding: 0 8px 12px 8px;
}
.gt5-entity-group__head {
    height: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 4px;
    cursor: pointer;
}
.gt5-entity-group__arrow { color: #666; font-size: 10px; }
.gt5-entity-group__name  { font-size: 14px; }
.gt5-entity-group__sub   { padding-left: 20px; }
.gt5-entity-item {
    display: block;
    width: 100%;
    height: 30px;
    border: none;
    background: #FFFFFF;
    text-align: left;
    padding-left: 26px;
    font-size: 14px;
    cursor: pointer;
}
.gt5-entity-item:hover { background: #F0F0F0; }
.gt5-entity-item--active { background: #E8F4FC; }

/* ========== AddExecuteContentDialog ========== */
.modal--add-execute {
    /* 按内容撑高，窗口尽量用满视口，避免固定 820px 裁切出垂直滑条 */
    width: min(1600px, 98vw);
    height: auto;
    max-width: 98vw;
    max-height: 98vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* GT5/MT8 控制方案弹窗固定尺寸，避免分页切换时窗口大小变化。 */
.modal--add-execute.modal--add-execute-host {
    width: 1960px;
    height: 1200px;
    max-width: 96vw;
    max-height: 96vh;
}
.modal--add-execute .modal__header {
    height: 40px;
    background: #F0F0F0;
    border-bottom: 1px solid #E0E0E0;
    padding: 0 10px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 40px;
}
.modal--add-execute .modal__title {
    font-size: 16px;
    font-weight: bold;
    color: #303133;
}
.modal--add-execute .modal__close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 15px;
    font-size: 18px;
    cursor: pointer;
}
.modal--add-execute .modal__close:hover {
    background: #E0E0E0;
}
.modal--add-execute .modal__body {
    flex: 1 1 auto;
    /* 内容自适应；仅触顶 max-height 时才出现一层垂直滚动 */
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 15px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.modal--add-execute .modal__body > .exec-root {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    overflow: visible;
}
.modal--add-execute .modal__body > .remote-link-panel {
    flex: 0 0 auto;
    margin-top: 8px;
}
.modal--add-execute .exec-gt5-general,
.modal--add-execute .exec-gt5-slider {
    height: auto;
    overflow: visible;
}
.modal--add-execute .modal__footer {
    height: 73px;
    flex: 0 0 73px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-top: 1px solid #ECECEC;
}
.exec-pagenav {
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-sizing: border-box;
    padding: 4px 12px;
    background: #F5F7FA;
    border-bottom: 1px solid #D5DDE5;
}
.exec-pagetab {
    min-width: 100px;
    height: 32px;
    padding: 0 18px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #4B5967;
    font-weight: bold;
    cursor: pointer;
}
.exec-pagetab:hover {
    color: #347CAF;
    background: #F5F9FC;
}
.exec-pagetab--active {
    color: #FFFFFF;
    background: #347CAF;
    box-shadow: 0 1px 4px rgba(31, 69, 96, 0.22);
}
.exec-savebtn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 80px;
    height: 36px;
    padding: 0 16px;
    background: #347CAF;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* ---- 子内容通用控件 ---- */
.exec-root {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    gap: 10px;
    box-sizing: border-box;
}
.exec-col             { display: flex; flex-direction: column; }
.exec-col--quarter    { flex: 0 0 calc(25% - 8px); min-width: 260px; }
.exec-col--third      { flex: 0 0 calc(33.33% - 7px); }
.exec-col--half       { flex: 0 0 calc(50% - 5px); }

.exec-card {
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FAFBFC;
    padding: 8px 12px;
    margin-bottom: 8px;
}
.exec-card__title {
    font-size: 14px;
    font-weight: bold;
    color: #303133;
    padding-bottom: 6px;
    border-bottom: 1px solid #ECEEF1;
    margin-bottom: 8px;
}
.exec-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.exec-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.exec-trunc {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #303133;
}
.exec-keylabel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    min-width: 60px;
    height: 36px;
    padding: 0 4px;
    font-size: 13px;
    color: #303133;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 3px;
}

.exec-delay {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    padding: 0 4px;
    height: 28px;
}
.exec-delay__btn {
    width: 22px;
    height: 22px;
    border: none;
    background: #F4F6F9;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}
.exec-delay__btn:hover { background: #E4E7EB; }
.exec-delay__val {
    min-width: 78px;
    text-align: center;
    font-size: 13px;
    color: #303133;
    cursor: text;
    user-select: none;
}
.exec-delay__edit {
    height: 22px;
    padding: 0 4px;
    border: 1px solid #409EFF;
    border-radius: 3px;
    background: #FFFFFF;
    outline: none;
}

/* 严格对应 QML KeyOperation（Column 布局：下拉在上，颜色色块按钮在下）
 *
 * 颜色按钮采用绝对定位：
 *  - 只在"自定义"时 display: inline-block，否则 display:none
 *  - 不参与父级 flex/grid 的高度计算，避免选中"自定义"后撑开整行、
 *    导致同组其他按键的中心下移（因为外层多处用 align-items:center）
 *  - 显示位置落在下拉下方 4px（与原 QML Column spacing=4 一致） */
.exec-keyop {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 28px;
    vertical-align: top;
}
.exec-keyop__sel {
    width: 100%;
    height: 28px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    padding: 0 4px;
    font-size: 13px;
    box-sizing: border-box;
}
.exec-keyop__sel:disabled {
    background: #F4F4F5;
    color: #C0C4CC;
    cursor: not-allowed;
}
.exec-keyop__color {
    position: absolute;
    left: 14px;                /* (80 - (80-28)) / 2 = 14, 水平居中 */
    top: 32px;                 /* 下拉高 28 + 间距 4 */
    width: calc(100% - 28px);
    height: 22px;
    border: 1px solid #C0C4CC;
    border-radius: 5px;
    padding: 0;
    cursor: pointer;
    box-sizing: border-box;
}

/* ---- G3面板 ----
 * 对应 legacy G3GeneralContent.qml，图片 G3_K6.png 原尺寸 1017x1016 ≈ 1:1。
 * 按原 QML width=450 + PreserveAspectFit，图片实际显示 450 × 450。
 * 下半 2×3 按键 GridLayout：
 *   width = parent.width - 16 = 434
 *   height = parent.height/3 - 22 = 128
 *   verticalCenter=parent.verticalCenter, verticalCenterOffset=(parent.height/4)+11 → 中心 y = 348.5
 *   → top = 348.5 - 64 = 284.5
 *   op  leftMargin=66 ；label leftMargin=6
 */
.exec-g3 {
    justify-content: center;
    align-items: center;
    overflow: auto;
}
.exec-g3__stage {
    position: relative;
    width: 450px;
    height: 450px;
    margin: 0 auto;
    flex-shrink: 0;
}
.exec-panel-help {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}
.exec-panel-help--top-center {
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
}
.exec-panel-help .help-icon {
    width: 18px;
    height: 18px;
    margin-left: 0;
    background: #FFFFFF;
    font-size: 13px;
}
body:not(.show-help-icons) .exec-panel-help {
    display: none;
}
.exec-g3__bg {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    background-image: url("../assets/G3_K6.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 450px 450px;
}
/* 6 按键单一 grid（3 列 × 2 行），每 cell = [label][op] 横排 */
.exec-g3__grid {
    position: absolute;
    left: 6px;
    top: 284.5px;
    width: 438px;
    height: 128px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    column-gap: 0;
    row-gap: 2px;
}
.exec-g3__cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

/* ---- GT5 滑条默认（4 列卡片） ---- */
.exec-slider-default {
    overflow: auto;
}
.exec-slider-default__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.exec-slider-default__grid .exec-col { min-width: 0; }
.exec-label-bold {
    font-weight: bold;
    flex: 1 1 auto;
    color: #303133;
}

/* ---- MT8 默认滑条：全屋调光 + EBUS 延时矩阵 ---- */
.exec-mt8-slider {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}
.exec-mt8-slider__page {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.exec-mt8-slider__house-page {
    align-items: flex-start;
}
.exec-mt8-slider__ebus-page .exec-mt8-ebus__table-wrap {
    max-height: calc(98vh - 155px);
}

.exec-mt8-slider__house {
    width: min(360px, 100%);
    margin-bottom: 8px;
}
.exec-mt8-ebus__table-wrap {
    width: 100%;
    max-height: calc(98vh - 235px);
    overflow: auto;
    border: 1px solid #D9DEE7;
    border-radius: 4px;
    background: #FFFFFF;
    scrollbar-gutter: stable;
}
.exec-mt8-ebus__table {
    width: 100%;
    min-width: 1040px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}
.exec-mt8-ebus__table th,
.exec-mt8-ebus__table td {
    box-sizing: border-box;
    padding: 0;
    border-right: 1px solid #DDE2E9;
    border-bottom: 1px solid #DDE2E9;
}
.exec-mt8-ebus__table thead th {
    position: sticky;
    z-index: 3;
    top: 0;
    height: 28px;
    background: #E7E9EC;
    color: #273748;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.exec-mt8-ebus__address-head,
.exec-mt8-ebus__address {
    position: sticky;
    left: 0;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    text-align: center;
    background: #F0F1F3;
    color: #303744;
}
.exec-mt8-ebus__address-head {
    z-index: 5 !important;
}
.exec-mt8-ebus__address {
    z-index: 2;
    height: 32px;
    font-size: 11px;
    font-weight: 700;
}
.exec-mt8-ebus__bus-head,
.exec-mt8-ebus__cell {
    width: calc((100% - 44px) / 8);
    min-width: 0;
    max-width: none;
}
.exec-mt8-ebus__bus-head--a {
    color: #185CE6 !important;
}
.exec-mt8-ebus__bus-head--b {
    color: #A32121 !important;
}
.exec-mt8-ebus__cell {
    height: 32px;
    padding: 0 3px !important;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    background: #FFFFFF;
}
.exec-mt8-ebus__cell--empty {
    color: #B3BAC4;
    background: #FBFCFD;
}
.exec-mt8-ebus__cell--configured {
    background: #F5FAFF;
    box-shadow: inset 2px 0 0 #347CAF;
}
.exec-mt8-ebus__configured {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    height: 100%;
}
.exec-mt8-ebus__device-name {
    min-width: 0;
    overflow: hidden;
    color: #303744;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.exec-mt8-ebus__configured .exec-delay {
    flex: 0 0 auto;
    gap: 2px;
    height: 100%;
    padding: 0 2px;
    box-sizing: border-box;
}
.exec-mt8-ebus__configured .exec-delay__btn {
    width: 18px;
    height: calc(100% - 4px);
    font-size: 11px;
}
.exec-mt8-ebus__configured .exec-delay__val {
    min-width: 50px;
    font-size: 10px;
}

/* ---- 其他通用控件补充 ---- */
.exec-combo {
    height: 28px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    padding: 0 4px;
    font-size: 13px;
}
.exec-combo:disabled {
    background: #F4F4F5;
    color: #C0C4CC;
}
.exec-labelcombo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.exec-labelcombo__title {
    font-size: 13px;
    color: #303133;
    font-weight: bold;
}
.exec-colorbtn {
    width: 60px;
    height: 30px;
    border: 1px solid #C0C4CC;
    border-radius: 5px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
}
.exec-delay--float .exec-delay__val,
.exec-delay--temp  .exec-delay__val {
    min-width: 52px;
}

/* ---- G1 面板 ----
 * 对应 legacy G1GeneralContent.qml，图片 G1_K8.png 原尺寸 1017x1016 ≈ 1:1。
 * 按原 QML width=450 + PreserveAspectFit，图片实际显示 450 × 450。
 * 所有按键/标签位置均按 QML 公式（parent.height=450）精确换算为像素。
 */
.exec-g1 {
    justify-content: center;
    align-items: center;
    overflow: auto;
}
.exec-g1__bg {
    position: relative;
    width: 450px;
    height: 450px;
    background-image: url("../assets/G1_K8.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 450px 450px;
    margin: 0 auto;
    flex-shrink: 0;
}
/* 上排 3 个标签（key0-2）
 *  QML: verticalCenter=parent.top, verticalCenterOffset=parent.height/6-2  → 中心 y=73
 *       Label height=50 → top = 73 - 25 = 48 */
.exec-g1__toplabels {
    position: absolute;
    left: 5px;
    right: 5px;
    top: 48px;
    height: 50px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    pointer-events: none;
}
/* 上排 3 个按键（key0-2）
 *  QML: top=parent.top, topMargin=parent.height/4-6 → top = 106.5 */
.exec-g1__topops {
    position: absolute;
    left: 5px;
    right: 5px;
    top: 106.5px;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
}
.exec-g1__cell--top,
.exec-g1__labelcell--top {
    width: 80px;
    display: flex;
    justify-content: center;
}
/* key3 标签（左中）
 *  QML: leftMargin=44, verticalCenter=parent.bottom, verticalCenterOffset=-(parent.height/4)-12
 *       中心 y = 450 - 112.5 - 12 = 325.5, Label height=50 → top = 300.5 */
.exec-g1__midlabel {
    position: absolute;
    left: 44px;
    top: 300.5px;
    height: 50px;
    display: flex;
    align-items: center;
    pointer-events: none;
}
/* key3 操作控件（紧接 key3 标签下方 7px）
 *  QML: horizontalCenter=key3.horizontalCenter, top=key3.bottom, topMargin=7
 *       key3 底部 = 300.5 + 50 = 350.5 → top = 357.5 */
.exec-g1__midop {
    position: absolute;
    left: 44px;
    top: 357.5px;
}
/* 右下 2x2 按键（index 4-7）
 *  QML: 两个同 y/height 的 GridLayout (label leftMargin=160, op leftMargin=220)
 *       原设计意图是每个按键 = [label(60)][op(80)]，但两组分离后第二列必与第一列 op 重叠。
 *       Web 端合并为单一 grid，2 列 × 2 行，cell 内 label+op 横排。
 *  垂直位置：与 QML 一致：中心 y=347.5, 高度 131 → top=282 */
.exec-g1__grid {
    position: absolute;
    left: 160px;
    top: 282px;
    width: 290px;
    height: 131px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    column-gap: 0;
    row-gap: 2px;
}
.exec-g1__gridcell {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

/* ---- G2 面板 ----
 * 对应 legacy G2GeneralContent.qml，图片 G2_K17.png 原尺寸 2033x1017 ≈ 2:1。
 * 按原 QML width=900 + PreserveAspectFit，图片实际显示 900 × 450。
 * 下方坐标均基于 parent.width=900, parent.height=450。
 */
.exec-g2 {
    justify-content: center;
    align-items: center;
    overflow: auto;
}
.exec-g2__bg {
    position: relative;
    width: 900px;
    height: 450px;
    background-image: url("../assets/G2_K17.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 900px 450px;
    margin: 0 auto;
    flex-shrink: 0;
}
.exec-g2__help {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}
.exec-g2__help--main {
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
}
.exec-g2__help .help-icon {
    width: 18px;
    height: 18px;
    margin-left: 0;
    background: #FFFFFF;
    font-size: 13px;
}
body:not(.show-help-icons) .exec-g2__help {
    display: none;
}
/* 上排左/右 3 键标签（key0-2 / key3-5）
 *  QML: verticalCenter=parent.top, verticalCenterOffset=parent.height/6-2 → 中心 y=73
 *       Label height=50 → top = 48
 *  左半宽度 parent.width/2-20=430, rightMargin=6；右半同 */
.exec-g2__lbls {
    position: absolute;
    top: 48px;
    height: 50px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    pointer-events: none;
}
.exec-g2__lbls--top-left  { left: 8px;  right: 456px; }     /* 450 - 6 + 右侧向左挪 */
.exec-g2__lbls--top-right { left: 456px; right: 6px; }
/* 上排左/右 3 键操作（key0-2 / key3-5）
 *  QML: top=parent.top, topMargin=parent.height/4-5 → top = 107.5 */
.exec-g2__ops {
    position: absolute;
    top: 107.5px;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
}
.exec-g2__ops--top-left  { left: 8px;   right: 456px; }
.exec-g2__ops--top-right { left: 456px; right: 6px; }
.exec-g2__cell, .exec-g2__labelcell {
    width: 80px;
    display: flex;
    justify-content: center;
}
/* key6 标签（左下独立按键）
 *  QML: leftMargin=44, verticalCenter=parent.bottom, verticalCenterOffset=-(parent.height/4)-7
 *       中心 y = 450 - 112.5 - 7 = 330.5, 高度 50 → top = 305.5 */
.exec-g2__midkey6-label {
    position: absolute;
    left: 44px;
    top: 305.5px;
    height: 50px;
    display: flex;
    align-items: center;
    pointer-events: none;
}
/* key6 操作控件（紧接 key6 标签下方 7px）
 *  QML: horizontalCenter=key6.horizontalCenter, top=key6.bottom, topMargin=7
 *       → top = 305.5 + 50 + 7 = 362.5 */
.exec-g2__midkey6-op {
    position: absolute;
    left: 44px;
    top: 362.5px;
}
/* 中部 / 下部按键组（midA=7-8, midB=9-11, btmA=12-13, btmB=14-16）
 *  每个 cell = [label][op] 横排，避免 label / op 分在两个容器时的重叠。
 *  垂直坐标严格对应原 QML（左半 verticalCenterOffset=parent.height/4-22 → 中心 y=315.5；
 *  下半 verticalCenterOffset=-(parent.height/8+12) → 中心 y=381.75）。
 *  组高度取 op 组件（comboBox 35 + button 24 + spacing 2 + padding ≈ 65），
 *  以 cell 内居中对齐看起来最接近 QML。 */
.exec-g2__kgroup {
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}
.exec-g2__kcell {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}
/* midA（7-8）：左半 */
.exec-g2__kgroup--midA {
    left: 165px;
    top: 298px;
    width: 285px;       /* 450 - 165, 即到 horizontalCenter */
}
/* midB（9-11）：右半 */
.exec-g2__kgroup--midB {
    left: 450px;
    top: 298px;
    width: 438px;       /* 900 - 450 - 12 */
}
/* btmA（12-13）：左半 */
.exec-g2__kgroup--btmA {
    left: 165px;
    top: 364.25px;
    width: 285px;
}
/* btmB（14-16）：右半 */
.exec-g2__kgroup--btmB {
    left: 450px;
    top: 364.25px;
    width: 438px;
}

/* 屏幕输入区 —— 对应 QML G2GeneralContent.qml
 *  - screenField: 115x46，绝对定位
 *  - appendField: 80x25，位于 screenField 右侧
 *  - 颜色按钮一行：位于 screenField 下方并水平居中
 */
/* 屏幕区（screenField / appendField / 颜色按钮行）
 *  QML 坐标（parent 宽 900, 高 450）：
 *   screenField: left=45, 中心 y=225, w=115, h=46 → y=202..248
 *   appendField: left=45+115+5=165, bottom=248+10=258, w=80, h=25 → y=233..258
 *   Row:         水平中心=45+115/2=102.5, top=248+12=260
 *  wrap 原点设为 (left=45, top=202)，内部元素按相对坐标放置。
 */
.exec-g2__screen {
    position: absolute;
    left: 45px;
    top: 202px;
    width: 200px;
    height: 90px;
}
.exec-g2__screen-display {
    position: absolute;
    left: 0;
    top: 0;
    width: 115px;
    height: 46px;
    border-radius: 23px;
    border: none;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    outline: none;
}
.exec-g2__screen-append {
    position: absolute;
    left: 120px;
    top: 31px;
    width: 80px;
    height: 25px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    padding: 0 6px;
    font-size: 13px;
    outline: none;
}
.exec-g2__screen-colors {
    position: absolute;
    left: 57.5px;       /* screenField 水平中心 */
    top: 58px;          /* 260 - 202 */
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    white-space: nowrap;
}

/* ---- GK1 扩展模块 ---- */
.exec-gk1 {
    overflow: auto;
}
.exec-gk1__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.exec-gk1-card--additional .exec-card__title {
    color: #BD3124;
}
.exec-card__title--with-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.exec-card__title--with-checkbox .exec-gk1__addcb {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}
.exec-gk1__airgrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 10px;
    align-items: center;
    justify-items: center;
}
.exec-gk1__v2-title {
    font-weight: bold;
    height: 30px;
    line-height: 30px;
}
.exec-gk1__v2-row {
    gap: 4px;
}
.exec-gk1__v2-label {
    flex: 1 1 auto;
    padding-left: 20px;
    font-size: 13px;
}
.exec-gk1__v2-divider {
    height: 1px;
    background: #E0E0E0;
    margin: 8px 0;
}

/* ---- GT5 主机 普通类型 ---- */
.exec-gt5-general {
    overflow: auto;
    width: 100%;
    height: 100%;
}
/* 执行动作弹窗内改由外层按内容撑开，见 .modal--add-execute .exec-gt5-general */
.exec-gt5-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.exec-gt5-general__primary-page {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.exec-gt5-general__primary-page > .exec-col {
    min-width: 0;
}
.exec-gt5-general__extended-page {
    justify-content: flex-start;
}
.exec-gt5-general__extended-page > .exec-col {
    min-width: 0;
}
.exec-gt5-general__extended-page > .exec-col:nth-child(1) {
    flex: 0 0 22%;
}
.exec-gt5-general__extended-page > .exec-col:nth-child(2) {
    flex: 0 0 21%;
}
.exec-gt5-general__extended-page > .exec-col:nth-child(3) {
    flex: 0 0 56%;
}
.exec-gt5-card--additional .exec-card__title {
    color: #303133;
}
.exec-gt5-blacklist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 8px;
    flex: 1 1 auto;
    max-height: 180px;
    overflow-y: auto;
    padding: 6px 8px;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    background: #FAFAFA;
}
.exec-gt5-blacklist__item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    cursor: pointer;
}
.exec-gt5-countdown {
    width: 120px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    box-sizing: border-box;
}
.exec-gt5-statehint {
    color: #DC3545;
    font-size: 12px;
    font-weight: bold;
    margin-top: 6px;
}
.exec-gt5-rgbtip {
    text-align: center;
    color: #AA3124;
    font-size: 11px;
    font-weight: bold;
    margin: 4px 0;
}
.exec-colorpick {
    width: 36px;
    height: 28px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #909399;
    padding: 0;
}
.exec-colorpick--empty {
    background: repeating-linear-gradient(45deg, #FFFFFF, #FFFFFF 4px, #E0E0E0 4px, #E0E0E0 6px);
}

/* ColorTempButton - 色温色块按钮（对应 QML ColorButton 色温模式） */
.exec-colortemp {
    width: 60px;
    height: 28px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    color: transparent;
}
.exec-colortemp--empty {
    /* 马赛克棋盘格（QML 中未绑定时 ShaderEffect 渲染的效果） */
    background:
        repeating-conic-gradient(#E0E0E0 0 25%, #404040 0 50%) 0 0 / 10px 10px;
}

/* ColorTemperaturePopup - 色温调节弹窗（对应 QML ColorTemperaturePopup.qml） */
.color-temp__panel {
    width: 300px;
    min-height: 150px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.25);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}
.color-temp__title {
    font-size: 16px;
    font-weight: bold;
    color: #333333;
}
.color-temp__slider {
    width: 100%;
    height: 24px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #FFD700, #FFFFFF);
    border-radius: 12px;
    outline: none;
    cursor: pointer;
}
.color-temp__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}
.color-temp__slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}
.color-temp__value {
    font-size: 14px;
    color: #666666;
}

.exec-delay--bright {
    min-width: 110px;
}
.exec-gt5-irlist {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
}
.exec-gt5-irlist__header,
.exec-gt5-irlist__row {
    display: grid;
    grid-template-columns: 50px 1fr 145px;
    gap: 6px;
    align-items: center;
    padding: 4px 6px;
}
.exec-gt5-irlist__header {
    background: #F5F5F5;
    font-weight: bold;
    text-align: center;
    font-size: 13px;
    border-bottom: 1px solid #E0E0E0;
}
.exec-gt5-irlist__row:nth-child(even) {
    background: #FAFAFA;
}
.exec-gt5-irlist__name {
    font-size: 13px;
    cursor: context-menu;
}

.exec-gt5-table {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: auto;
}
.exec-gt5-table__header,
.exec-gt5-table__row {
    display: grid;
    align-items: center;
    min-width: 100%;
}
.exec-gt5-table__header {
    background: #D1D1D1;
    color: #111111;
    font-weight: 700;
    text-align: center;
}
.exec-gt5-table__header > div,
.exec-gt5-table__row > div {
    min-width: 0;
    padding: 5px 8px;
    text-align: center;
}
.exec-gt5-table__header > div + div {
    border-left: 2px solid #EFEFEF;
}
.exec-gt5-table__row {
    background: #FFFFFF;
}
.exec-gt5-table__row:nth-child(even) {
    background: #F6F6F6;
}
.exec-gt5-table__row .exec-combo {
    width: 100%;
}
.exec-gt5-loop-table .exec-gt5-table__header,
.exec-gt5-loop-table .exec-gt5-table__row {
    grid-template-columns: 2fr 6fr 1fr 1fr;
}
.exec-gt5-fe-table .exec-gt5-table__header,
.exec-gt5-fe-table .exec-gt5-table__row {
    grid-template-columns: 1.25fr 1fr 1fr 1fr 0.75fr;
}

/* ---- 颜色选择对话框（对应 QML Qt.labs.platform ColorDialog） ---- */
.color-dialog__overlay {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.color-dialog__panel {
    width: 360px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    font-size: 13px;
}
.color-dialog__title {
    position: relative;
    padding: 10px 16px;
    font-weight: bold;
    font-size: 14px;
    color: #303133;
    background: #F5F7FA;
    border-bottom: 1px solid #E4E7ED;
}
.color-dialog__close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    color: #909399;
    cursor: pointer;
    border-radius: 4px;
}
.color-dialog__close:hover {
    background: #E4E7ED;
    color: #303133;
}
.color-dialog__body {
    padding: 14px 16px;
}
.color-dialog__palette {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.color-dialog__swatch {
    width: 100%;
    height: 32px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
}
.color-dialog__swatch:hover {
    outline: 2px solid #409EFF;
    outline-offset: -1px;
}
.color-dialog__row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.color-dialog__preview {
    width: 36px;
    height: 28px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    flex-shrink: 0;
}
.color-dialog__label {
    color: #606266;
    font-size: 12px;
}
.color-dialog__hex {
    flex: 1;
    min-width: 0;
    height: 28px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    padding: 0 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    text-transform: uppercase;
}
.color-dialog__hex:focus {
    outline: none;
    border-color: #409EFF;
}
.color-dialog__native-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #F5F7FA;
    color: #606266;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}
.color-dialog__native-wrap:hover {
    border-color: #409EFF;
    color: #409EFF;
}
.color-dialog__native {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #DCDFE6;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
}
.color-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #E4E7ED;
    background: #FAFAFA;
}
.color-dialog__btn {
    min-width: 64px;
    height: 30px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    color: #606266;
    font-size: 13px;
    cursor: pointer;
}
.color-dialog__btn:hover {
    border-color: #409EFF;
    color: #409EFF;
}
.color-dialog__btn--ok {
    background: #409EFF;
    border-color: #409EFF;
    color: #FFFFFF;
}
.color-dialog__btn--ok:hover {
    background: #66B1FF;
    border-color: #66B1FF;
    color: #FFFFFF;
}

/* ========== MultiChLightManageDialog ========== */
.modal--mch {
    width: 1280px;
    height: 680px;
    max-width: 95vw;
    max-height: 95vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.mch__header {
    height: 50px;
    flex: 0 0 50px;
    background: #F0F0F0;
    border-bottom: 1px solid #E0E0E0;
    padding: 0 10px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mch__body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 0;
    position: relative;
    background: #FFFFFF;
}
.mch__footer {
    height: 75px;
    flex: 0 0 75px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid #ECECEC;
    background: #FFFFFF;
}
.mch-btn {
    width: 80px;
    height: 35px;
    background: #347CAF;
    color: #FFFFFF;
    border: 1px solid #2C6D9B;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.mch-btn:hover     { background: #4A90C1; }
.mch-btn:active    { background: #2C6894; }

.mch-table          { width: 100%; }
.mch-table__head    {
    display: flex;
    height: 40px;
    background: #BEBEBE;
    border: 1px solid #F0F0F0;
    border-bottom: none;
}
.mch-table__body    {
    display: flex;
    flex-direction: column;
}
.mch-row            {
    display: flex;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid #F0F0F0;
    border-top: none;
}
.mch-row--odd       { background: #FAFAFA; }
.mch-col            {
    border-right: 1px solid #F0F0F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.mch-col:last-child { border-right: none; }
.mch-table__head .mch-col {
    font-weight: bold;
    color: #303133;
}
.mch-col--idx       { width: 4%; }
.mch-col--name      { width: 12%; }
.mch-col--type      { width: 8%; }
.mch-col--bind      { width: 68%; }
.mch-col--op        { width: 8%; }

.mch-cell           { padding: 0 4px; }
.mch-name-input     {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    outline: none;
}
.mch-name-input:focus { background: #EBF5FF; }

.mch-type-select {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    text-align-last: center;
}

.mch-bind {
    padding: 0;
    gap: 0;
}
.mch-bind-btn {
    flex: 1 1 0;
    height: 100%;
    border: none;
    border-right: 1px solid #F0F0F0;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    color: #303133;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 8px;
}
.mch-bind-btn:last-child { border-right: none; }
.mch-bind-btn:hover { background: #EBF5FF; }

.mch-del-btn {
    min-width: 50px;
    width: 50px;
    height: 25px;
    padding: 0;
    background: #E51400;
    border: none;
    border-radius: 3px;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
}
.mch-del-btn:hover  { background: #FF3B20; }
.mch-del-btn:active { background: #B80E00; }

.mch-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: #909399;
    pointer-events: none;
    display: none;
}

/* ---- 射灯/灯带选择弹窗 ---- */
.mch-popup-mask {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.mch-popup {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #FFFFFF;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.24);
}
.mch-popup__col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mch-popup__col--num {
    justify-content: flex-end;
}
.mch-popup__num {
    height: 30px;
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #606266;
}
.mch-popup__title {
    font-weight: bold;
    font-size: 14px;
    color: #303133;
    height: 22px;
    line-height: 22px;
}
.mch-popup__item {
    width: 200px;
    height: 30px;
    border: 1px solid #D3D4D6;
    border-radius: 4px;
    background: #F4F4F5;
    color: #909399;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    padding: 0 8px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mch-popup__item:hover {
    background: #409EFF;
    color: #FFFFFF;
    border-color: #409EFF;
}

/* ========== GT5 跨主机内网联动 ========== */
.remote-link-panel {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FAFBFC;
}
.remote-link-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.remote-link-heading strong {
    margin-right: auto;
    color: #303133;
    font-size: 14px;
}
.remote-link-warning {
    margin-bottom: 8px;
    color: #B26A00;
    font-size: 12px;
}
.remote-link-list,
.remote-catalog-list,
.remote-catalog-schemes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.remote-link-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(180px, auto) 60px;
    gap: 8px;
    align-items: center;
}
.remote-link-select,
.remote-link-input {
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    box-sizing: border-box;
    font-size: 13px;
}
.remote-link-select:focus,
.remote-link-input:focus {
    outline: none;
    border-color: #409EFF;
}
.remote-link-input--number {
    width: 105px;
}
.remote-link-snapshot {
    color: #606266;
    font-size: 12px;
}
.remote-link-button {
    height: 30px;
    padding: 0 10px;
    border: 1px solid #C8CDD4;
    border-radius: 4px;
    background: #FFFFFF;
    color: #303133;
    cursor: pointer;
    white-space: nowrap;
}
.remote-link-button:hover {
    border-color: #409EFF;
    color: #409EFF;
}
.remote-link-button--primary {
    border-color: #347CAF;
    background: #347CAF;
    color: #FFFFFF;
}
.remote-link-button--primary:hover {
    background: #409EFF;
    color: #FFFFFF;
}
.remote-link-button--danger {
    border-color: #E51400;
    background: #E51400;
    color: #FFFFFF;
}
.remote-link-button--danger:hover {
    border-color: #FF3B20;
    background: #FF3B20;
    color: #FFFFFF;
}
.remote-link-button--plain {
    border: none;
    background: transparent;
}
.remote-link-empty {
    padding: 12px;
    color: #909399;
    text-align: center;
    font-size: 13px;
}
.remote-catalog-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    /* #modalHost 为 pointer-events:none，嵌套资料弹窗必须自行恢复可点 */
    pointer-events: auto;
}
.remote-catalog-dialog {
    display: flex;
    flex-direction: column;
    width: 920px;
    max-width: 92vw;
    max-height: 88vh;
    overflow: hidden;
    border-radius: 6px;
    background: #FFFFFF;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.remote-catalog-header,
.remote-catalog-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}
.remote-catalog-header {
    border-bottom: 1px solid #E4E7ED;
}
.remote-catalog-header strong {
    margin-right: auto;
}
.remote-catalog-footer {
    justify-content: flex-end;
    border-top: 1px solid #E4E7ED;
}
.remote-catalog-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    flex: 1 1 auto;
    padding: 12px 16px;
    overflow: hidden;
}
.remote-catalog-layout {
    display: flex;
    gap: 12px;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.remote-catalog-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 220px;
    flex: 0 0 220px;
    overflow: auto;
    padding-right: 4px;
    border-right: 1px solid #E4E7ED;
}
.remote-catalog-tab {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #303133;
    text-align: left;
    cursor: pointer;
}
.remote-catalog-tab:hover {
    background: #F5F7FA;
}
.remote-catalog-tab--active {
    border-color: #409EFF;
    background: #ECF5FF;
}
.remote-catalog-tab-title {
    font-size: 13px;
    font-weight: 600;
}
.remote-catalog-tab-ip {
    font-size: 12px;
    color: #909399;
}
.remote-catalog-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 18px 4px 8px;
    overflow: auto;
    scrollbar-gutter: stable;
}
.remote-catalog-host-editor {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}
.remote-catalog-field-header {
    display: grid;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid #E4E7ED;
    border-radius: 4px;
    background: linear-gradient(180deg, #F7F9FC 0%, #EEF2F7 100%);
    color: #606266;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    box-sizing: border-box;
}
.remote-catalog-field-header span:last-child {
    text-align: center;
}
.remote-catalog-host-header,
.remote-catalog-detail-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.remote-catalog-detail-toolbar .remote-link-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.remote-catalog-host-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.remote-catalog-host-actions .remote-link-button {
    flex: 0 0 auto;
}
.remote-catalog-schemes {
    gap: 4px;
    padding-right: 4px;
}
.remote-catalog-scheme-header,
.remote-catalog-scheme-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px 110px 56px;
    gap: 6px;
    align-items: center;
    padding-right: 8px;
    box-sizing: border-box;
}
.remote-catalog-scheme-header {
    padding: 6px 8px;
    position: sticky;
    top: 0;
    z-index: 1;
}
.remote-catalog-scheme-row .remote-link-input,
.remote-catalog-scheme-row .remote-link-button {
    width: 100%;
    height: 28px;
    box-sizing: border-box;
}
.remote-catalog-scheme-row .remote-link-input--number {
    width: 100%;
}
.remote-catalog-scheme-type {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 28px;
    color: #606266;
    font-size: 12px;
    line-height: 28px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

/* ========== 云端目标主机分类选择 / 导入进度弹层 ========== */
.remote-catalog-cloud-overlay {
    position: absolute;
    inset: 0;
    z-index: 3100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
}
.remote-catalog-cloud-dialog {
    display: flex;
    flex-direction: column;
    width: 560px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    border-radius: 6px;
    background: #FFFFFF;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}
.remote-catalog-cloud-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #E4E7ED;
    font-weight: 600;
    color: #303133;
}
.remote-catalog-cloud-header-title {
    font-weight: 600;
    color: #303133;
}
.remote-catalog-cloud-toolbar-host {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    overflow: visible;
    padding: 8px 12px 0;
}
.remote-catalog-cloud-body {
    flex: 1 1 auto;
    min-height: 120px;
    max-height: 50vh;
    overflow: auto;
    padding: 8px 12px;
}
.remote-catalog-cloud-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #E4E7ED;
}
.remote-catalog-cloud-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.remote-catalog-cloud-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.remote-catalog-cloud-selected-count {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 400;
    color: #606266;
    white-space: nowrap;
}
.remote-catalog-cloud-room-type-filter {
    position: relative;
    min-width: 120px;
}
.remote-catalog-cloud-room-type-button {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.remote-catalog-cloud-room-type-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 20;
    min-width: 160px;
    max-height: 220px;
    overflow: auto;
    padding: 6px 0;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.remote-catalog-cloud-room-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: #303133;
    cursor: pointer;
    user-select: none;
}
.remote-catalog-cloud-room-type-option:hover {
    background: #F5F7FA;
}
.remote-catalog-cloud-loading {
    font-size: 13px;
    color: #909399;
    margin-bottom: 8px;
}
.remote-catalog-cloud-tree {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.remote-catalog-cloud-children {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 16px;
    padding-left: 6px;
    border-left: 1px dashed #DCDFE6;
}
.remote-catalog-cloud-node--category {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    border-radius: 4px;
    cursor: pointer;
}
.remote-catalog-cloud-node--category:hover {
    background: #F5F7FA;
}
.remote-catalog-cloud-node--category .remote-catalog-cloud-checkbox {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.remote-catalog-cloud-node--category .remote-catalog-cloud-node-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #303133;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.remote-catalog-cloud-host-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    margin-bottom: 2px;
}
.remote-catalog-cloud-node--host {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    box-sizing: border-box;
    min-width: 110px;
    max-width: 160px;
    padding: 6px 10px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    cursor: pointer;
}
.remote-catalog-cloud-node--host:hover {
    border-color: #C0C4CC;
    background: #FAFAFA;
}
.remote-catalog-cloud-node--host.is-selected {
    border-color: #409EFF;
    background: #ECF5FF;
}
.remote-catalog-cloud-node--host .remote-catalog-cloud-checkbox {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.remote-catalog-cloud-host-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    width: 100%;
}
.remote-catalog-cloud-node--host .remote-catalog-cloud-node-label {
    flex: none;
    font-size: 12px;
    font-weight: 600;
    color: #303133;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.remote-catalog-cloud-node--host .remote-catalog-cloud-node-ip {
    flex: none;
    font-size: 10px;
    color: #909399;
}
.remote-catalog-cloud-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.remote-catalog-cloud-progress-status {
    font-size: 13px;
    color: #303133;
}
.remote-catalog-cloud-progress-bar-track {
    height: 10px;
    border-radius: 5px;
    background: #EBEEF5;
    overflow: hidden;
}
.remote-catalog-cloud-progress-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: #409EFF;
    transition: width 0.2s ease;
}
.remote-catalog-cloud-progress-current {
    font-size: 12px;
    color: #606266;
}
.remote-catalog-cloud-progress-error {
    font-size: 13px;
    color: #E51400;
    white-space: pre-wrap;
    word-break: break-word;
}
.remote-catalog-cloud-result {
    font-size: 13px;
    color: #67C23A;
    font-weight: 600;
}

/* ========== MT8 EBUS Configuration ========== */
.mt8-config {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.mt8-config__tabs {
    display: flex;
    flex: 0 0 36px;
    gap: 4px;
    margin-bottom: 8px;
    border-bottom: 1px solid #D8DCE3;
}
.mt8-config__tab {
    min-width: 150px;
    height: 36px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: #EEF1F5;
    color: #606266;
    font-size: 14px;
    cursor: pointer;
}
.mt8-config__tab:hover {
    color: #347CAF;
    background: #E6F1FC;
}
.mt8-config__tab--active {
    color: #347CAF;
    background: #FFFFFF;
    border-color: #D8DCE3;
    font-weight: bold;
}
.mt8-config__pane {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}
.mt8-ebus,
.mt8-ebus__table-wrap {
    width: 100%;
    height: 100%;
    min-height: 0;
}
.mt8-ebus__table-wrap {
    overflow: auto;
    border: 1px solid #C9CED6;
    background: #FFFFFF;
}
.mt8-ebus__table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}
.mt8-ebus__table th,
.mt8-ebus__table td {
    box-sizing: border-box;
    border-right: 1px solid #D7DAE0;
    border-bottom: 1px solid #D7DAE0;
    padding: 0;
}
.mt8-ebus__table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 42px;
    background: #E7E8EA;
    font-size: 15px;
    white-space: nowrap;
}
.mt8-ebus__address-head,
.mt8-ebus__address {
    position: sticky;
    left: 0;
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    text-align: center;
    background: #EFEFEF;
    color: #303133;
}
.mt8-ebus__address-head {
    z-index: 5 !important;
}
.mt8-ebus__address {
    z-index: 2;
    height: 52px;
    font-size: 15px;
}
.mt8-ebus__bus-head {
    width: 145px;
    min-width: 145px;
    max-width: 145px;
}
.mt8-ebus__bus-head--a { color: #185CE6; }
.mt8-ebus__bus-head--b { color: #A32121; }
.mt8-ebus__cell {
    width: 145px;
    min-width: 145px;
    max-width: 145px;
    height: 52px;
    background: #FFFFFF;
}
.mt8-ebus__cell-button {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 3px 6px;
    background: transparent;
    color: #A8ADB5;
    cursor: pointer;
    overflow: hidden;
}
.mt8-ebus__cell-button:hover {
    background: #EBF5FF;
    color: #347CAF;
}
.mt8-ebus__cell-button--configured {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #303133;
    background: #F5FAFF;
    box-shadow: inset 3px 0 0 #347CAF;
}
.mt8-ebus__cell-button--configured:hover {
    background: #E1F0FF;
}
.mt8-ebus__add-mark {
    font-size: 20px;
    line-height: 1;
}
.mt8-ebus__device-name,
.mt8-ebus__device-model {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.mt8-ebus__device-name {
    font-size: 13px;
    font-weight: 600;
}
.mt8-ebus__device-model {
    color: #7A8089;
    font-size: 11px;
}
.mt8-ebus-editor {
    width: 460px;
    max-width: 90vw;
    padding: 0;
}
.mt8-ebus-editor .modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mt8-ebus-editor .modal__close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #606266;
    font-size: 18px;
    cursor: pointer;
}
.mt8-ebus-editor .modal__close:hover {
    background: #F0F0F0;
}
.mt8-ebus-editor__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mt8-ebus-editor__row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}
.mt8-ebus-editor__label {
    color: #303133;
    text-align: right;
    white-space: nowrap;
}
.mt8-ebus-editor__position,
.mt8-ebus-editor__control {
    box-sizing: border-box;
    width: 100%;
    min-height: 34px;
    border: 1px solid #D3D7DE;
    border-radius: 4px;
    background: #FFFFFF;
    padding: 6px 10px;
    color: #303133;
    font-size: 14px;
}
.mt8-ebus-editor__position {
    background: #F5F7FA;
    color: #606266;
}
.mt8-ebus-editor__control:focus {
    border-color: #347CAF;
    outline: none;
}
.mt8-ebus-editor__footer {
    align-items: center;
    gap: 10px;
}
.mt8-ebus-editor__spacer {
    flex: 1 1 auto;
}

/* ========== MT8 compact full-view layout ========== */
.modal--device-config.modal--device-config-mt8 {
    width: 94vw;
    height: calc(92vh - 2px);
    max-width: 94vw;
    max-height: calc(92vh - 2px);
}
.modal--device-config-mt8 .modal__body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 4px 8px;
    overflow: hidden;
}
.modal--device-config-mt8 .modal__footer {
    padding: 4px 12px 6px;
}
.modal--device-config-mt8 .dc-top-row {
    flex: 0 0 auto;
}
.modal--device-config-mt8 .dc-config-title {
    display: none;
}
.modal--device-config-mt8 .dc-config-host {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    margin-top: 5px;
    padding: 4px;
    overflow: hidden;
}
.modal--device-config-mt8 .mt8-config__tabs {
    flex-basis: 28px;
    height: 28px;
    margin-bottom: 4px;
}
.modal--device-config-mt8 .mt8-config__tab {
    height: 28px;
    padding: 0 14px;
}
.modal--device-config-mt8 .mt8-config__pane,
.modal--device-config-mt8 .mt8-ebus__table-wrap {
    overflow: auto;
}
.modal--device-config-mt8 .mt8-ebus__table {
    width: 100%;
    min-width: 960px;
}
.modal--device-config-mt8 .mt8-ebus__table thead th {
    height: 28px;
    font-size: 13px;
}
.modal--device-config-mt8 .mt8-ebus__address-head,
.modal--device-config-mt8 .mt8-ebus__address {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
}
.modal--device-config-mt8 .mt8-ebus__address,
.modal--device-config-mt8 .mt8-ebus__cell {
    height: 32px;
}
.modal--device-config-mt8 .mt8-ebus__address {
    font-size: 12px;
    line-height: 1;
}
.modal--device-config-mt8 .mt8-ebus__bus-head,
.modal--device-config-mt8 .mt8-ebus__cell {
    width: calc((100% - 52px) / 8);
    min-width: 110px;
    max-width: none;
}
.modal--device-config-mt8 .mt8-ebus__cell-button {
    padding: 0 4px;
}
.modal--device-config-mt8 .mt8-ebus__cell-button--configured {
    gap: 0;
}
.modal--device-config-mt8 .mt8-ebus__add-mark {
    font-size: 15px;
}
.modal--device-config-mt8 .mt8-ebus__device-name {
    font-size: 12px;
    line-height: 1.1;
}
.modal--device-config-mt8 .mt8-ebus__device-model {
    font-size: 10px;
    line-height: 1.05;
}
@media (max-height: 820px) {
    .modal--device-config-mt8 .modal__header {
        height: 42px;
        padding: 0 12px;
    }
    .modal--device-config-mt8 .modal__body {
        padding-top: 4px;
        padding-bottom: 4px;
    }
    .modal--device-config-mt8 .modal__footer {
        padding-top: 4px;
        padding-bottom: 5px;
    }
    .modal--device-config-mt8 .mt8-ebus__device-model {
        display: none;
    }
}
/* MT8 普通方案需要同时容纳 8 路 EBUS 的名称、亮度和延时控件。 */
.modal--add-execute-mt8-general .modal__body {
    padding-right: 10px;
    padding-left: 10px;
}

/* MT8 普通方案合并页：按功能组横向利用宽屏空间。 */
.exec-mt8-general__combined-page {
    grid-template-columns: 1.08fr 1.12fr 1.12fr 1.05fr;
    align-items: start;
    gap: 8px;
}
.exec-mt8-general__combined-page > .exec-col {
    min-width: 0;
}
@media (max-width: 1800px) {
    .exec-mt8-general__combined-page {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 1200px) {
    .exec-mt8-general__combined-page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- MT8 普通方案：EBUS 亮度 + 延时矩阵 ---- */
.exec-mt8-general__ebus-page {
    flex-direction: column;
    width: 100%;
    min-width: 0;
}
.exec-mt8-general-ebus__table-wrap {
    max-height: calc(98vh - 155px);
}
.exec-mt8-general-ebus__table {
    min-width: 1760px;
}
.exec-mt8-general-ebus__configured {
    display: grid;
    grid-template-columns: minmax(48px, 1fr) auto auto;
    gap: 2px;
}
.exec-mt8-general-ebus__configured .exec-delay {
    min-width: 0;
    gap: 1px;
    height: 100%;
    padding: 0 1px;
}
.exec-mt8-general-ebus__configured .exec-delay__btn {
    width: 17px;
    height: calc(100% - 4px);
    font-size: 10px;
}
.exec-mt8-general-ebus__configured .exec-delay__val {
    min-width: 46px;
    font-size: 10px;
}
.exec-mt8-general-ebus__configured .exec-delay--bright {
    min-width: 0;
}

/* ---- MT8 EBUS 双显示模式：仅设备列表 ---- */
.exec-mt8-ebus-view-toggle {
    position: absolute;
    top: 50%;
    left: 15px;
    display: flex;
    gap: 0;
    transform: translateY(-50%);
}
.exec-mt8-ebus-view-toggle__btn {
    height: 30px;
    padding: 0 16px;
    border: 1px solid #CBD3DD;
    background: #FFFFFF;
    color: #4A5563;
    font-size: 13px;
    cursor: pointer;
}
.exec-mt8-ebus-view-toggle__btn:first-child {
    border-radius: 4px 0 0 4px;
}
.exec-mt8-ebus-view-toggle__btn:last-child {
    margin-left: -1px;
    border-radius: 0 4px 4px 0;
}
.exec-mt8-ebus-view-toggle__btn:hover {
    color: #287DB2;
}
.exec-mt8-ebus-view-toggle__btn--active {
    position: relative;
    z-index: 1;
    border-color: #287DB2;
    background: #287DB2;
    color: #FFFFFF;
}
.exec-mt8-ebus-view-toggle__btn--active:hover {
    color: #FFFFFF;
}
.exec-mt8-ebus-list-wrap {
    width: 100%;
    min-width: 0;
    max-height: calc(98vh - 155px);
    overflow: auto;
    scrollbar-gutter: stable;
}
.exec-mt8-ebus-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(360px, 1fr));
    align-items: start;
    gap: 10px;
    min-width: 1500px;
}
.exec-mt8-ebus-list__group {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #D8DEE7;
    border-radius: 5px;
    background: #FFFFFF;
}
.exec-mt8-ebus-list__group-title {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border-bottom: 1px solid #D8DEE7;
    background: #E7E9EC;
    font-size: 13px;
    font-weight: 700;
}
.exec-mt8-ebus-list__group-title--a {
    color: #185CE6;
}
.exec-mt8-ebus-list__group-title--b {
    color: #A32121;
}
.exec-mt8-ebus-list__row {
    display: grid;
    grid-template-columns: 34px minmax(70px, 1fr) auto;
    align-items: stretch;
    min-width: 0;
    height: 44px;
    border-bottom: 1px solid #E2E6EC;
    background: #F8FBFF;
    box-shadow: inset 3px 0 0 #347CAF;
}
.exec-mt8-ebus-list__row:last-child {
    border-bottom: 0;
}
.exec-mt8-ebus-list__address {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #E2E6EC;
    background: #F0F2F5;
    color: #303744;
    font-size: 13px;
    font-weight: 700;
}
.exec-mt8-ebus-list__name {
    align-self: center;
    min-width: 0;
    padding: 0 8px;
    overflow: hidden;
    color: #273748;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.exec-mt8-ebus-list__controls {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 5px 5px 5px 0;
}
.exec-mt8-ebus-list__controls .exec-delay {
    flex: 0 0 auto;
    height: 34px;
    box-sizing: border-box;
}
.exec-mt8-ebus-list__controls .exec-delay__btn {
    width: 24px;
    height: 28px;
    font-size: 13px;
}
.exec-mt8-ebus-list__controls .exec-delay__val {
    min-width: 66px;
    font-size: 12px;
}
.exec-mt8-ebus-list--general .exec-mt8-ebus-list__controls {
    gap: 3px;
}
.exec-mt8-ebus-list--general .exec-mt8-ebus-list__controls .exec-delay__btn {
    width: 21px;
}
.exec-mt8-ebus-list--general .exec-mt8-ebus-list__controls .exec-delay__val {
    min-width: 58px;
}
.exec-mt8-ebus-list__empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    border: 1px dashed #CBD3DD;
    border-radius: 5px;
    background: #FBFCFD;
    color: #8A95A3;
    font-size: 14px;
}