/**
 * V2 管理页公共样式（客户 / 方案 / 设备）
 * 表格列宽：table-layout: fixed + colgroup 内 col 明确宽度，避免被其他样式覆盖
 */
@import url('site-beian.css');

:root {
    --mgmt-primary: #4a90e2;
    --mgmt-primary-dark: #357abd;
    --mgmt-title: #2f6fae;
    --mgmt-text: #333;
    --mgmt-muted: #6b7c93;
    --mgmt-border: #dbe7f8;
    --mgmt-bg: #f6f9ff;
    --mgmt-card: #ffffff;
    --mgmt-radius: 10px;
    --mgmt-shadow: 0 4px 18px rgba(47, 111, 174, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100%;
    font-family: var(--dwt-font-body);
    font-size: 14px;
    color: var(--mgmt-text);
    background: linear-gradient(180deg, #f6f9ff 0%, #edf3fd 100%);
}

a {
    color: var(--mgmt-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========== 顶栏 ========== */
.mgmtPage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 22px;
}

.mgmtTopBar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: linear-gradient(180deg, #eef4ff 0%, #e7f0ff 100%);
    border-bottom: 1px solid var(--mgmt-border);
}

.mgmtBrand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.mgmtBrandMark {
    width: 40px;
    height: 40px;
}

.mgmtBrandTitle {
    font-size: 20px;
    font-weight: bold;
    color: var(--mgmt-title);
    white-space: nowrap;
}

.mgmtNav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mgmtNavLink {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #3768a6;
    border: 1px solid transparent;
    text-decoration: none;
}

.mgmtNavLink:hover {
    background: rgba(74, 144, 226, 0.1);
    text-decoration: none;
}

.mgmtNavLink.is-active {
    background: var(--mgmt-primary);
    color: #fff;
    border-color: var(--mgmt-primary);
}

.mgmtTopBarRight {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--mgmt-muted);
}

.mgmtBackHomeBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--mgmt-border);
    background: #fff;
    color: var(--mgmt-title);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.mgmtBackHomeBtn:hover {
    border-color: var(--mgmt-primary);
    color: var(--mgmt-primary);
    text-decoration: none;
}

/* ========== 主内容区 ========== */
.mgmtMain {
    flex: 1;
    padding: 16px 20px 24px;
    min-width: 0;
}

.mgmtPageHead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.mgmtPageTitle {
    font-size: 22px;
    font-weight: bold;
    color: var(--mgmt-title);
    line-height: 1.3;
}

.mgmtPageDesc {
    font-size: 13px;
    color: var(--mgmt-muted);
    margin-top: 4px;
}

.mgmtStatsRow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mgmtStatChip {
    padding: 6px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--mgmt-border);
    font-size: 12px;
    color: var(--mgmt-muted);
}

.mgmtStatChip strong {
    color: var(--mgmt-title);
    margin-right: 4px;
}

/* ========== 工具条 ========== */
.mgmtToolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--mgmt-card);
    border: 1px solid var(--mgmt-border);
    border-radius: var(--mgmt-radius);
    margin-bottom: 12px;
    box-shadow: var(--mgmt-shadow);
}

.mgmtSearchInput {
    width: 220px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #cfd8e6;
    border-radius: 8px;
    font-size: 14px;
    flex-shrink: 0;
}

.mgmtSearchInput:focus {
    outline: none;
    border-color: var(--mgmt-primary);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.mgmtSelect {
    height: 36px;
    padding: 0 10px;
    border: 1px solid #cfd8e6;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    flex-shrink: 0;
}

.mgmtToolbarSpacer {
    flex: 1;
    min-width: 8px;
}

/* ========== 按钮（与首页 functionBtn / canvasBtn 统一） ========== */
.mgmtBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.mgmtBtnPrimary {
    background-color: var(--mgmt-primary);
    color: #fff;
}

.mgmtBtnPrimary:hover {
    background-color: var(--mgmt-primary-dark);
}

.mgmtBtnSecondary {
    background: #fff;
    color: var(--mgmt-title);
    border-color: var(--mgmt-border);
}

.mgmtBtnSecondary:hover {
    border-color: var(--mgmt-primary);
    color: var(--mgmt-primary);
}

.mgmtBtnDanger {
    background: #fff5f5;
    color: #c62828;
    border-color: #ffcdd2;
}

.mgmtBtnDanger:hover {
    background: #ffebee;
}

.mgmtBtnGhost {
    background: transparent;
    color: var(--mgmt-muted);
    border-color: #e0e6ef;
}

.mgmtBtnGhost:hover {
    color: var(--mgmt-primary);
    border-color: var(--mgmt-primary);
}

.mgmtBtnSm {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
}

/* ========== 表格容器 ========== */
.mgmtTableCard {
    background: var(--mgmt-card);
    border: 1px solid var(--mgmt-border);
    border-radius: var(--mgmt-radius);
    box-shadow: var(--mgmt-shadow);
    overflow: hidden;
}

.mgmtTableScroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

/* 固定布局 + 总最小宽度由各页 colgroup 合计决定 */
.mgmtDataTable {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 13px;
}

.mgmtDataTable col {
    /* 列宽仅由下方各页 .mgmtDataTable--xxx col.col-* 定义 */
}

.mgmtDataTable thead {
    background: linear-gradient(180deg, #f2f7ff 0%, #eaf2ff 100%);
}

.mgmtDataTable th,
.mgmtDataTable td {
    border: 1px solid var(--mgmt-border);
    text-align: center;
    vertical-align: middle;
}

.mgmtDataTable th {
    height: 42px;
    padding: 0 10px;
    font-weight: 700;
    color: var(--mgmt-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mgmtDataTable td {
    height: 44px;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mgmt-text);
    font-variant-numeric: tabular-nums;
}

.mgmtDataTable tbody tr:hover td {
    background: rgba(74, 144, 226, 0.04);
}

.mgmtDataTable .colActions {
    overflow: visible;
    white-space: nowrap;
}

/* ========== 客户表列宽（合计 1280px） ========== */
.mgmtDataTable--customer {
    min-width: 1280px;
}

.mgmtDataTable--customer col.col-id { width: 72px; }
.mgmtDataTable--customer col.col-name { width: 100px; }
.mgmtDataTable--customer col.col-phone { width: 120px; }
.mgmtDataTable--customer col.col-source { width: 96px; }
.mgmtDataTable--customer col.col-community { width: 160px; }
.mgmtDataTable--customer col.col-room { width: 88px; }
.mgmtDataTable--customer col.col-remark { width: 200px; }
.mgmtDataTable--customer col.col-created { width: 150px; }
.mgmtDataTable--customer col.col-updated { width: 150px; }
.mgmtDataTable--customer col.col-actions { width: 144px; }

/* ========== 方案表列宽（对齐老版列顺序；合计约 2140px） ========== */
.mgmtDataTable--solution {
    min-width: 2140px;
}

.mgmtDataTable--solution col.col-seq { width: 48px; }
.mgmtDataTable--solution col.col-id { width: 72px; }
.mgmtDataTable--solution col.col-name { width: 168px; }
.mgmtDataTable--solution col.col-progress { width: 80px; }
.mgmtDataTable--solution col.col-remark { width: 108px; }
.mgmtDataTable--solution col.col-final { width: 80px; }
.mgmtDataTable--solution col.col-deposit { width: 72px; }
.mgmtDataTable--solution col.col-size { width: 80px; }
.mgmtDataTable--solution col.col-created { width: 132px; }
.mgmtDataTable--solution col.col-updated { width: 132px; }
.mgmtDataTable--solution col.col-cust-id { width: 64px; }
.mgmtDataTable--solution col.col-cust-name { width: 88px; }
.mgmtDataTable--solution col.col-phone { width: 108px; }
.mgmtDataTable--solution col.col-source { width: 72px; }
.mgmtDataTable--solution col.col-community { width: 112px; }
.mgmtDataTable--solution col.col-room { width: 72px; }
.mgmtDataTable--solution col.col-actions { width: 300px; }
.mgmtDataTable--solution col.col-owner { width: 88px; }
.mgmtDataTable--solution col.col-slot-price { width: 96px; }

.colSeq {
    color: var(--mgmt-muted);
    font-weight: 600;
}

.solutionNameCell {
    text-align: left !important;
    font-weight: 600;
}

.solutionTplBadge {
    margin-right: 4px;
    vertical-align: middle;
}

.solutionRemarkCell {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.solutionActionsCell {
    overflow: visible !important;
    white-space: nowrap;
    text-align: left !important;
}

.mgmtSelect--rowSlot {
    min-width: 108px;
    max-width: 130px;
    height: 28px;
    padding: 2px 6px;
    font-size: 12px;
    vertical-align: middle;
}

/* 中文注释：定稿按钮颜色区分 */
.mgmtBtnFinalOk {
    background: #52c41a;
    border-color: #52c41a;
    color: #fff;
}

.mgmtBtnFinalOk:hover {
    background: #49ad17;
    border-color: #49ad17;
}

.mgmtBtnFinalPending {
    background: #fa8c16;
    border-color: #fa8c16;
    color: #fff;
}

.mgmtBtnFinalPending:hover {
    background: #e07b12;
    border-color: #e07b12;
}

.solutionSlotPriceVal {
    font-weight: 600;
    color: var(--mgmt-title);
}

.solutionSlotPriceHint {
    font-size: 11px;
    color: var(--mgmt-muted);
    margin-top: 2px;
}

.mgmtEmptyRow {
    text-align: center;
    color: var(--mgmt-muted);
    padding: 24px !important;
}

/* ========== 纯图片表列宽：窄列压紧，名称列吃剩余宽度 ========== */
.mgmtDataTable--image {
    min-width: 1080px;
}

.mgmtDataTable--image col.col-drag { width: 44px; }
.mgmtDataTable--image col.col-id { width: 44px; }
.mgmtDataTable--image col.col-icon1 { width: 48px; }
.mgmtDataTable--image col.col-name { width: 420px; }
.mgmtDataTable--image col.col-short { width: 64px; }
.mgmtDataTable--image col.col-flag { width: 40px; }
.mgmtDataTable--image col.col-linked { width: 112px; }
.mgmtDataTable--image col.col-link { width: 48px; }
.mgmtDataTable--image col.col-actions { width: 118px; }

.mgmtDataTable--image th.col-drag,
.mgmtDataTable--image td.col-drag,
.mgmtDataTable--image th.col-id,
.mgmtDataTable--image td.col-id,
.mgmtDataTable--image th.col-icon1,
.mgmtDataTable--image td.col-icon1,
.mgmtDataTable--image th.col-flag,
.mgmtDataTable--image td.col-flag,
.mgmtDataTable--image th.col-link,
.mgmtDataTable--image td.col-link,
.mgmtDataTable--image th.col-short,
.mgmtDataTable--image td.col-short {
    padding-left: 2px;
    padding-right: 2px;
}

.mgmtDataTable--image th.col-flag {
    white-space: normal;
    line-height: 1.15;
    font-size: 12px;
}

/* 中文注释：名称列左对齐、可换行，避免长物理文件名被省略号裁掉 */
.mgmtDataTable--image th.col-name,
.mgmtDataTable--image td.col-name {
    text-align: left;
    white-space: normal;
    word-break: break-all;
    overflow: visible;
    text-overflow: clip;
    padding-left: 8px;
    padding-right: 8px;
    line-height: 1.35;
    height: auto;
    min-height: 44px;
}

.mgmtDataTable--image td.colActions,
.mgmtDataTable--image th.colActions {
    overflow: visible;
    text-overflow: clip;
    padding-left: 4px;
    padding-right: 4px;
}

/* ========== 设备表列宽（树形分类 + 全字段；横向滚动） ========== */
.mgmtDataTable--device {
    min-width: 1954px;
}

.mgmtDataTable--device col.col-id { width: 50px; }
.mgmtDataTable--device col.col-icon1 { width: 52px; }
.mgmtDataTable--device col.col-icon2 { width: 52px; }
.mgmtDataTable--device col.col-name { width: 168px; }
.mgmtDataTable--device col.col-sort { width: 50px; }
.mgmtDataTable--device col.col-enabled { width: 64px; }
.mgmtDataTable--device col.col-peer { width: 117px; }
.mgmtDataTable--device col.col-cost { width: 117px; }
.mgmtDataTable--device col.col-q-slot { width: 132px; }
.mgmtDataTable--device col.col-white { width: 50px; }
.mgmtDataTable--device col.col-unit { width: 56px; }
.mgmtDataTable--device col.col-auto { width: 56px; }
.mgmtDataTable--device col.col-cmp-plat { width: 72px; }
.mgmtDataTable--device col.col-cmp-price { width: 72px; }
.mgmtDataTable--device col.col-cmp-badge { width: 50px; }
.mgmtDataTable--device col.col-cmp-url { width: 64px; }
.mgmtDataTable--device col.col-warranty { width: 96px; }
.mgmtDataTable--device col.col-remarks { width: 96px; }
.mgmtDataTable--device col.col-desc { width: 96px; }
.mgmtDataTable--device col.col-install { width: 96px; }
.mgmtDataTable--device col.col-internal { width: 96px; }
.mgmtDataTable--device col.col-updated { width: 130px; }
.mgmtDataTable--device col.col-actions { width: 148px; }

/* 中文注释：操作列含编辑/复制/删除三按钮，禁止裁切 */
.mgmtDataTable--device td.colActions,
.mgmtDataTable--device th.colActions {
    overflow: visible;
    text-overflow: clip;
    padding-left: 6px;
    padding-right: 6px;
}

/* 中文注释：一级分类标题栏（整行合并，非数据列占位） */
.deviceCatRow {
    background: #e8f2fc !important;
    cursor: pointer;
}

.deviceCatRow:hover td {
    background: #d6e9fa !important;
}

.deviceCatRow.is-collapsed {
    background: #f0f3f7 !important;
}

.deviceCatRow.is-collapsed:hover td {
    background: #e8ebf0 !important;
}

.deviceCatRow.is-collapsed .deviceCatName {
    font-style: italic;
    color: #6b7785;
}

.deviceCatBarCell {
    padding: 10px 12px !important;
    border-bottom: 1px solid #c5d8ee !important;
}

.deviceCatBar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.deviceCatBarMain {
    display: inline-flex;
    align-items: center;
    flex: 1 1 200px;
    min-width: 0;
}

.deviceCatToggle {
    display: inline-flex;
    flex-shrink: 0;
    margin-right: 8px;
}

.deviceCatName {
    font-size: 16px;
    font-weight: 700;
    color: var(--mgmt-title);
    text-decoration: underline;
}

.deviceCatCount {
    font-size: 13px;
    color: var(--mgmt-muted);
    margin-left: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.deviceCatBarMetaGroup {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.deviceCatBarMeta {
    font-size: 13px;
    color: var(--mgmt-text);
    white-space: nowrap;
}

.deviceCatBarMetaLabel {
    color: var(--mgmt-muted);
    margin-right: 4px;
}

.deviceCatBarMetaLabel::after {
    content: '：';
}

.deviceCatBarActions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* 中文注释：设备管理页滑块开关（分类栏外置与表格内共用） */
.deviceCatBarSwitches {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.mgmtSwitchGroup {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mgmtSwitchGroup--form {
    margin-bottom: 12px;
}

.mgmtSwitchGroupTitle {
    font-size: 13px;
    color: var(--mgmt-muted);
    margin-right: 2px;
    white-space: nowrap;
}

.mgmtSwitchLabel {
    font-size: 12px;
    font-weight: 600;
    color: #2f6fae;
    min-width: 28px;
    line-height: 1;
    text-align: center;
}

.mgmtSwitchTrack {
    position: relative;
    width: 36px;
    height: 18px;
    padding: 0;
    background: #d7e6fb;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(74, 144, 226, 0.2);
    flex-shrink: 0;
}

.mgmtSwitchTrack.is-on .mgmtSwitchThumb {
    left: 20px;
}

.mgmtSwitchThumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: left 0.2s ease;
    pointer-events: none;
}

.mgmtSwitchTrack:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.deviceCatNameCell {
    text-align: left !important;
    overflow: visible !important;
    white-space: nowrap;
}

.deviceCatMetaMuted {
    text-align: left !important;
    color: var(--mgmt-muted);
    font-size: 12px;
}

.deviceCatHide {
    display: none;
}

.deviceItemRow .deviceItemName {
    text-align: left !important;
    font-weight: 600;
}

.deviceIconThumb {
    width: 32px;
    height: 32px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 4px;
    background: #f5f8fc;
    border: 1px solid var(--mgmt-border);
}

.deviceIconPlaceholder {
    color: #c5d0e0;
}

.mgmtBadgeMuted {
    background: #eef2f7;
    color: #6b7c93;
    border: 1px solid #dbe7f8;
}

/* 中文注释：设备管理页可点击状态徽标（启用/白底/自动添加/显示比价） */
.deviceToggleBadge {
    cursor: pointer;
    border-width: 1px;
    border-style: solid;
    font: inherit;
    line-height: 1;
}

.deviceToggleBadge:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* 中文注释：长文本单元格按钮 */
.mgmtTextCellBtn {
    display: inline-block;
    max-width: 100%;
    padding: 0;
    border: none;
    background: none;
    color: var(--mgmt-primary);
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    text-decoration: underline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mgmtTextCellBtn:hover {
    color: var(--mgmt-primary-dark);
}

/* 中文注释：长文本弹窗 */
.mgmtModalOverlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(30, 50, 80, 0.45);
}

.mgmtModalOverlay[hidden] {
    display: none !important;
}

.mgmtModal {
    width: min(640px, 100%);
    max-height: min(80vh, 560px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--mgmt-radius);
    border: 1px solid var(--mgmt-border);
    box-shadow: 0 12px 40px rgba(47, 111, 174, 0.2);
}

.mgmtModalHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--mgmt-border);
    flex-shrink: 0;
}

.mgmtModalTitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--mgmt-title);
}

.mgmtModalClose {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #f0f5fc;
    color: var(--mgmt-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.mgmtModalClose:hover {
    background: #e3eefc;
    color: var(--mgmt-title);
}

.mgmtModalBody {
    padding: 16px;
    overflow: auto;
    flex: 1;
}

.mgmtModalPre {
    margin: 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--mgmt-text);
}

.mgmtModal--sm {
    max-width: 420px;
}

.mgmtModalFoot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--mgmt-border);
    flex-shrink: 0;
}

.deviceSlotModalLabel {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mgmt-muted);
}

.deviceSlotModalHint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--mgmt-muted);
}

.mgmtToolbarLabel {
    font-size: 13px;
    font-weight: 600;
    color: #5b78a6;
    white-space: nowrap;
    flex-shrink: 0;
}

.mgmtSelect--slot {
    min-width: 140px;
}

/* 中文注释：系统默认槽位下拉—已启用绿色、未启用黑色 */
#deviceQuoteSlotSelect {
    color: #1a1a1a;
}
#deviceQuoteSlotSelect.is-slot-finalized {
    color: #1f8a4c;
    font-weight: 600;
}
#deviceQuoteSlotSelect option.deviceSlotSelectOption--finalized {
    color: #1f8a4c;
    font-weight: 600;
}
#deviceQuoteSlotSelect option.deviceSlotSelectOption--idle {
    color: #1a1a1a;
}

/* ========== 会员配置表列宽（合计 1200px） ========== */
.mgmtDataTable--member {
    min-width: 1200px;
}

.mgmtDataTable--member col.col-type { width: 120px; }
.mgmtDataTable--member col.col-title { width: 100px; }
.mgmtDataTable--member col.col-slots { width: 88px; }
.mgmtDataTable--member col.col-solutions { width: 100px; }
.mgmtDataTable--member col.col-export-q { width: 88px; }
.mgmtDataTable--member col.col-export-l { width: 88px; }
.mgmtDataTable--member col.col-export-s { width: 88px; }
.mgmtDataTable--member col.col-export-i { width: 88px; }
.mgmtDataTable--member col.col-locked-cat { width: 100px; }
.mgmtDataTable--member col.col-watermark { width: 100px; }

/* ========== 系统设置：会员权限表（双行表头 + 横向滚动） ========== */
.mgmtDataTable.mgmtDataTable--memberSettings {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
}

.mgmtDataTable--memberSettings col.col-ms-enabled { width: 72px; }
.mgmtDataTable--memberSettings col.col-ms-type { width: 108px; }
.mgmtDataTable--memberSettings col.col-ms-title { width: 96px; }
.mgmtDataTable--memberSettings col.col-ms-price { width: 88px; }
.mgmtDataTable--memberSettings col.col-ms-slots { width: 80px; }
.mgmtDataTable--memberSettings col.col-ms-data { width: 92px; }

/* 中文注释：会员表分组列底色（仅表头 th，表体保持默认） */
.mgmtDataTable--memberSettings th.memberMsGroup--price {
    background: #eef5fc;
}
.mgmtDataTable--memberSettings th.memberMsGroup--canvas {
    background: #f0f8ee;
}
.mgmtDataTable--memberSettings th.memberMsGroup--file {
    background: #fff6ec;
}
.mgmtDataTable--memberSettings th.memberMsGroup--faq {
    background: #f6f0fc;
}
.mgmtDataTable--memberSettings th.memberMsGroup--manage {
    background: #f2f4f8;
}
.mgmtDataTable--memberSettings th.memberMsGroup--watermark {
    background: #f8f8f8;
}

.mgmtDataTable--memberSettings th,
.mgmtDataTable--memberSettings td {
    height: auto;
    min-height: 42px;
    overflow: visible;
}

.mgmtDataTable--memberSettings th {
    white-space: nowrap;
    text-overflow: clip;
}

.mgmtDataTable--memberSettings th.memberPermThTip {
    white-space: normal;
    word-break: keep-all;
    min-width: 84px;
    max-width: 104px;
    line-height: 1.3;
    font-size: 11px;
    padding: 6px 4px;
    vertical-align: middle;
}

/* 中文注释：系统设置 — admin 档只读行（配额无限、权限全开） */
.mgmtDataTable--memberSettings tr.memberTierRow--locked {
    background: #f8fafc;
}
.mgmtDataTable--memberSettings tr.memberTierRow--locked td {
    color: var(--mgmt-text);
}
.memberLockedCell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.3;
}
.memberLockedCell--on {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}
.memberLockedCell--quota {
    background: #eef4fb;
    color: var(--mgmt-primary);
    font-weight: 600;
}
.memberLockedCell--yes {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}

.mgmtDataTable--memberSettings th {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    line-height: 1.35;
    vertical-align: middle;
    padding: 8px 6px;
    font-size: 12px;
}

.mgmtDataTable--memberSettings th.memberPermThTip {
    white-space: normal;
    word-break: keep-all;
}

.mgmtDataTable--memberSettings td .memberNumInput {
    width: 100%;
    max-width: 72px;
    height: 32px;
    padding: 0 6px;
    font-size: 13px;
    text-align: center;
}

.mgmtDataTable--memberSettings td .memberTitleInput {
    width: 100%;
    min-width: 72px;
    max-width: 120px;
    height: 32px;
    padding: 0 6px;
    font-size: 13px;
}

.settingsMain .memberFlagToggle.is-disabled,
.settingsMain .memberFlagToggle:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.mgmtDataTable--memberSettings tr.memberTierRow--disabled td {
    color: #b8bcc4;
    background: #f3f4f6;
}

.mgmtDataTable--memberSettings tr.memberTierRow--disabled td:first-child {
    background: #eceef1;
}

.mgmtDataTable--memberSettings tr.memberTierRow--disabled .memberNumInput {
    color: #b0b4bc;
    background: #e9ebef;
    border-color: #dcdfe4;
    cursor: not-allowed;
}

.settingsMain .memberEnableToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 28px;
    padding: 0 8px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    border: 1px solid transparent;
}

.settingsMain .memberEnableToggle.is-on {
    color: #fff;
    background: #52c41a;
    border-color: #52c41a;
}

.settingsMain .memberEnableToggle.is-off {
    color: #8c8c8c;
    background: #e8e8e8;
    border-color: #d9d9d9;
}

.mgmtDataTable--memberSettings td .memberFlagToggle,
.settingsMain .memberFlagToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 28px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    border-width: 1px;
    border-style: solid;
    box-sizing: border-box;
}

/* 中文注释：是/无=浅绿优态；有/否=浅红劣态；强制系统水印列 invertColors：无=绿、有=红 */
.memberFlagToggle.is-yes {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.memberFlagToggle.is-yes:hover {
    background: #dcedc8;
}

.memberFlagToggle.is-no {
    background: #fff5f5;
    color: #c62828;
    border-color: #ffcdd2;
}

.memberFlagToggle.is-no:hover {
    background: #ffebee;
    color: #b71c1c;
}

.settingsMain .mgmtFormField--compact .memberFlagToggle {
    width: auto;
}

.settingsMain .mgmtFormSelect--compact {
    width: auto;
    max-width: 280px;
}

.settingsMain .mgmtFormField--compact {
    max-width: 320px;
}

.settingsTableScroll {
    overflow-x: auto;
    overflow-y: visible;
}

.settingsTableCard {
    width: 100%;
}

/* ========== 个人资料开关表（合计 640px） ========== */
.mgmtDataTable--switches {
    min-width: 640px;
}

.mgmtDataTable--switches col.col-label { width: 220px; }
.mgmtDataTable--switches col.col-desc { width: 280px; }
.mgmtDataTable--switches col.col-value { width: 140px; }

/* ========== 表单卡片（个人资料 / 系统设置） ========== */
.mgmtFormCard {
    background: var(--mgmt-card);
    border: 1px solid var(--mgmt-border);
    border-radius: var(--mgmt-radius);
    box-shadow: var(--mgmt-shadow);
    padding: 16px 18px;
    margin-bottom: 14px;
}

.mgmtFormSectionTitle {
    font-size: 15px;
    font-weight: 700;
    color: var(--mgmt-title);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--mgmt-border);
}

.mgmtFormGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
}

.mgmtFormField {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mgmtFormField--full {
    grid-column: 1 / -1;
}

.mgmtFormLabel {
    font-size: 12px;
    font-weight: 600;
    color: var(--mgmt-muted);
}

.mgmtFormInput,
.mgmtFormTextarea,
.mgmtFormSelect {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #cfd8e6;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.mgmtFormTextarea {
    height: auto;
    min-height: 72px;
    padding: 8px 12px;
    resize: vertical;
}

.mgmtFormInput:focus,
.mgmtFormTextarea:focus,
.mgmtFormSelect:focus {
    outline: none;
    border-color: var(--mgmt-primary);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.mgmtFormInput:read-only {
    background: #f5f8fc;
    color: var(--mgmt-muted);
}

.mgmtFormActions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--mgmt-border);
}

/* ========== 个人资料页：顶栏通栏 + 栏目两列并排（每栏内仍一行两字段） ========== */
.profileMain {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 32px;
}

.profileShell {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.profilePageTitle {
    margin-bottom: 14px;
}

.profilePageTitle h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--mgmt-title);
}

.profilePageTitle p {
    margin-top: 6px;
    font-size: 13px;
    color: var(--mgmt-muted);
    line-height: 1.5;
}

.profileHero {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    padding: 18px 28px;
    margin-bottom: 14px;
    background: var(--mgmt-card);
    border: 1px solid var(--mgmt-border);
    border-radius: 12px;
    box-shadow: var(--mgmt-shadow);
}

.profileHeroAside {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profileHeroAvatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(145deg, #c5daf5 0%, #e8f2fc 100%);
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(47, 111, 174, 0.18);
    object-fit: cover;
}

.profileHeroAvatarWrap {
    position: relative;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
}

.profileHeroAvatarWrap .profileHeroAvatarPh {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #2f6fae;
    background: linear-gradient(145deg, #c5daf5 0%, #e8f2fc 100%);
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(47, 111, 174, 0.18);
}

.profileHeroAvatarWrap .profileHeroAvatarImg {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(47, 111, 174, 0.18);
    display: none;
}

.profileHeroAvatarWrap.has-image .profileHeroAvatarImg {
    display: block;
}

.profileHeroAvatarWrap.has-image .profileHeroAvatarPh {
    display: none;
}

.profileHeroMeta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--mgmt-muted);
}

.profileAvatarChangeBtn {
    min-width: 76px;
    padding: 0 10px;
}

.profileHeroBody {
    flex: 1;
    min-width: 0;
}

.profileHeroName {
    font-size: 20px;
    font-weight: 700;
    color: var(--mgmt-title);
}

.profileHeroSub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--mgmt-muted);
}

.profileHeroTags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.profileHeroTagRow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.profileHeroTagRow .profileHeroTags {
    margin-top: 0;
}

.profileHeroLogoutBtn {
    height: 24px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 1;
    color: #8a4a4a;
    background: #faf5f5;
    border-color: #e0c0c0;
}

.profileHeroLogoutBtn:hover {
    color: #6b3030;
    background: #f5eaea;
    border-color: #d4aaaa;
}

.profileHeroTag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #2f6fae;
    background: #e8f0fe;
    border: 1px solid #c5d9f5;
}

.profileHeroActions {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

/* 个人资料：左右分栏（左：基础设置，右：会员权益） */
.profileMainSplit {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 14px;
    align-items: stretch;
}

.profileMainCol {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.profileMainCol--left .profileSection--settings,
.profileMainCol--right .profileSection--member {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profileSection--compact .profileSectionHead {
    padding: 10px 16px;
}

.profileFieldGrid--compact {
    padding: 10px 16px 8px;
    gap: 10px 12px;
}

.profileSection--compact .profileSectionLead {
    padding: 8px 16px 0;
}

.profileSection--compact .profileWatermarkDisabledHint.profileSectionLead {
    margin: 10px 16px 0;
}

.profileSettingsFeeBlock {
    margin-top: 0;
    padding: 4px 16px 12px;
}

.profileSettingsFeeLead {
    padding: 0;
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.45;
}

.profileFeePanel--inSettings {
    padding: 0;
    gap: 10px;
}

.profileFeePanel--inSettings .profileFeeCard {
    padding: 10px 12px;
    gap: 8px;
}

.profileSection--member.profileSection--compact .profileMemberPanel {
    flex: 1;
    padding: 10px 16px 12px;
}

/* 画面级：一行并排两个栏目（其它页复用） */
.profileSectionMatrix {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profileSectionRow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
}

.profileSectionRow--full {
    grid-template-columns: 1fr;
}

.profileSectionNote {
    padding: 10px 20px 0;
    font-size: 12px;
    color: var(--mgmt-muted);
    line-height: 1.45;
}

/* 报价槽位表（名称 + 服务费） */
.mgmtDataTable--quoteSlots {
    min-width: 680px;
}

.mgmtDataTable--quoteSlots col.col-slot-no { width: 56px; }
.mgmtDataTable--quoteSlots col.col-slot-title { width: 160px; }
.mgmtDataTable--quoteSlots col.col-slot-lock { width: 72px; }
.mgmtDataTable--quoteSlots col.col-slot-mode { width: 132px; }
.mgmtDataTable--quoteSlots col.col-slot-value { width: 108px; }

.profileSlotTableScroll {
    max-height: 400px;
    overflow-y: auto;
}

.profileSlotTitleInput {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #cfd8e6;
    border-radius: 6px;
    font-size: 12px;
    box-sizing: border-box;
}

.profileSlotValueInput {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #cfd8e6;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    box-sizing: border-box;
}

.profileSlotModeSwitch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 0 auto;
}

.profileSlotModeSwitch .slotModeLabel {
    font-size: 10px;
    font-weight: 600;
    color: #2f6fae;
    min-width: 22px;
}

.profileSlotModeSwitch .slotModeTrack {
    position: relative;
    width: 40px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: #d7e6fb;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(74, 144, 226, 0.2);
}

.profileSlotModeSwitch .slotModeThumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: left 0.2s ease;
}

.profileSlotModeSwitch .slotModeTrack.is-fixed .slotModeThumb {
    left: 22px;
}

.profileSlotLockCheck {
    width: 16px;
    height: 16px;
    accent-color: var(--mgmt-primary);
    cursor: pointer;
}

.profileSection {
    margin-bottom: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--mgmt-card);
    border: 1px solid var(--mgmt-border);
    border-radius: 12px;
    box-shadow: var(--mgmt-shadow);
}

.profileSection .profileFieldGrid {
    flex: 1;
}

.profileSectionHead {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--mgmt-title);
    background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
    border-bottom: 1px solid var(--mgmt-border);
    position: relative;
}

.profileSectionHead::after {
    content: '';
    position: absolute;
    left: 20px;
    bottom: -1px;
    width: 52px;
    height: 2px;
    background: linear-gradient(90deg, #4a90e2 0%, #7eb6ef 100%);
    border-radius: 1px;
}

.profileSectionLead {
    margin: 0;
    padding: 12px 20px 0;
    font-size: 12px;
    color: var(--mgmt-muted);
    line-height: 1.5;
}

.profileSection--member .profileMemberPanel,
.profileSection--fee .profileFeePanel {
    padding: 14px 20px 18px;
}

.profileWatermarkDisabledHint.profileSectionLead {
    margin: 12px 20px 0;
    padding: 8px 10px;
    color: #856404;
    background: #fff8e6;
    border: 1px solid #ffe8a3;
    border-radius: 8px;
}

.profileFieldItem.is-disabled .mgmtFormInput {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.profileWholeFeeSwitch .slotModeLabel.is-active {
    color: #1565c0;
    font-weight: 700;
}

/* 分区内：一行两个表单项（标签在上、输入框在下） */
.profileFieldGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    padding: 16px 20px;
}

.profileFieldItem {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.profileFieldItem--full {
    grid-column: 1 / -1;
}

.profileFieldItemLabel {
    font-size: 12px;
    font-weight: 600;
    color: #5b78a6;
    line-height: 1.3;
}

.profileFieldItemHint {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 400;
    color: var(--mgmt-muted);
}

.profileFieldItem .mgmtFormInput,
.profileFieldItem .mgmtFormSelect {
    width: 100%;
    height: 34px;
    font-size: 13px;
}

/* 个人资料：输入框与按钮同一行（如水印图片上传） */
.profileFieldInputRow {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.profileFieldInputRow .mgmtFormInput {
    flex: 1;
    min-width: 0;
    width: auto;
}

.profileFieldInputRow .mgmtBtn {
    flex-shrink: 0;
    white-space: nowrap;
    height: 34px;
    padding: 0 12px;
}

.profileFieldItem.is-disabled .profileFieldInputRow .mgmtBtn {
    opacity: 0.55;
    cursor: not-allowed;
}

.profileFieldItem--readonly .mgmtFormInput {
    background: #f5f8fc;
    border-color: #e4ebf5;
    color: #5a6d85;
}

.profileSection--table {
    padding-bottom: 0;
}

.profileSection--table .mgmtTableCard {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.profileSection--table .mgmtTableScroll {
    flex: 1;
}

.profileSection--table .mgmtDataTable--switches {
    width: 100%;
    min-width: 0;
}

.profileSection--table .mgmtDataTable th,
.profileSection--table .mgmtDataTable td {
    height: 38px;
    padding: 0 8px;
    font-size: 12px;
}

@media (max-width: 960px) {
    .profileMainSplit {
        grid-template-columns: 1fr;
    }

    .profileSectionRow {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .profileHero {
        flex-wrap: wrap;
        padding: 16px;
    }

    .profileHero {
        flex-wrap: wrap;
    }

    .profileHeroActions {
        width: 100%;
        margin-left: 0;
        flex-direction: row;
        justify-content: flex-end;
    }

    .profileFieldGrid {
        grid-template-columns: 1fr;
    }

    .profileFieldItem--full {
        grid-column: auto;
    }
}

/* 个人资料：会员权益（通用权限卡片 + 配额对比表） */
.profileMemberPanel {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
}

.profileMemberQuotaBlock {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e3e8ef;
}

.profileMemberCommonBlock {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 2px;
}

.profileMemberBlockTitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--mgmt-title);
}

.profileMemberBlockDesc {
    margin: 0;
    font-size: 11px;
    color: var(--mgmt-muted);
    line-height: 1.45;
}

.profileMemberPermGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 6px;
}

.profilePermCard {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.profilePermCard.is-yes {
    color: #2e7d32;
    background: #f3faf4;
    border-color: #c8e6c9;
}

.profilePermCard.is-no {
    color: #9aa0a9;
    background: #f5f6f8;
    border-color: #e6e8ec;
}

.profilePermCardIcon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.profilePermCard.is-yes .profilePermCardIcon {
    color: #fff;
    background: #43a047;
}

.profilePermCard.is-no .profilePermCardIcon {
    color: #b0b4bc;
    background: #e9ebef;
}

.profilePermCardText {
    flex: 1;
    min-width: 0;
}

.profileMemberTableHost {
    min-width: 0;
}

.profileMemberTableScroll {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e3e8ef;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 35, 60, 0.04);
}

.profileMemberTable {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    table-layout: fixed;
}

.profileMemberTable th,
.profileMemberTable td {
    padding-left: 10px;
    padding-right: 10px;
    vertical-align: middle;
    border-bottom: 1px solid #eef2f7;
}

.profileMemberTable thead th {
    padding-top: 8px;
    padding-bottom: 8px;
    background: linear-gradient(180deg, #f7f9fc 0%, #f1f5fa 100%);
    font-size: 12px;
    font-weight: 700;
    color: #5a6f8c;
    text-align: center;
}

/* 配额对比 tbody：行高约 +20%，底部留白略增 */
.profileMemberTable tbody td {
    padding-top: 11px;
    padding-bottom: 13px;
}

.profileMemberTable tbody tr:last-child td {
    border-bottom: none;
}

.profileMemberTableMetric {
    width: 88px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mgmt-title);
    background: #fafbfd;
    text-align: left;
    white-space: nowrap;
}

.profileMemberTableTier {
    text-align: center;
}

.profileMemberTableTier.is-current {
    background: linear-gradient(180deg, #edf7ed 0%, #f5fbf5 100%);
    box-shadow: inset 0 0 0 1px rgba(46, 125, 50, 0.18);
}

.profileMemberTableTierName {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #4a6078;
    line-height: 1.3;
}

.profileMemberTableTier.is-current .profileMemberTableTierName {
    color: #2e7d32;
}

.profileMemberTableTierBadge {
    display: inline-flex;
    align-items: center;
    height: 18px;
    margin-top: 4px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, #66bb6a 0%, #43a047 100%);
    line-height: 1;
}

.profileMemberTableCell {
    text-align: center;
}

.profileMemberTableCell.is-current {
    background: rgba(46, 125, 50, 0.04);
}

.profileMemberCellData {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    max-width: 120px;
    margin: 0 auto;
}

.profileMemberCellNum {
    font-size: 16px;
    font-weight: 800;
    color: #3d5266;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.profileMemberTableCell.is-current .profileMemberCellNum {
    color: #2e7d32;
}

.profileMemberCellBar {
    height: 8px;
    border-radius: 999px;
    background: #e9edf3;
    overflow: hidden;
}

.profileMemberCellBarFill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #7eb6ef 0%, #4a90e2 100%);
    min-width: 0;
    transition: width 0.35s ease;
}

.profileMemberCellBarFill.is-current {
    background: linear-gradient(90deg, #81c784 0%, #388e3c 100%);
}

/* 整单服务费：双卡片对齐布局 */
.profileFeePanel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profileFeeCard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 14px 12px;
    border-radius: 10px;
    border: 1px solid #e3e8ef;
    background: linear-gradient(180deg, #fafbfd 0%, #ffffff 100%);
}

.profileFeeCardTitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--mgmt-title);
    padding-bottom: 6px;
    border-bottom: 1px dashed #e3e8ef;
}

.profileFeeCardRow {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: center;
}

.profileFeeCardLabel {
    font-size: 12px;
    font-weight: 600;
    color: var(--mgmt-muted);
    line-height: 1.3;
}

.profileFeeCardControl {
    min-width: 0;
}

.profileFeeCardControl--value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profileFeeValueInput {
    width: 100%;
    max-width: 120px;
    height: 36px;
}

.profileFeeUnit {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--mgmt-muted);
    white-space: nowrap;
}

.profileTierBoolRow {
    display: grid;
    grid-template-columns: 108px repeat(6, 1fr);
    gap: 4px;
    align-items: center;
    margin-bottom: 4px;
}

.profileTierBoolDot {
    width: 22px;
    height: 22px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: #f0f2f5;
    color: #b0b8c4;
    border: 1px solid #e2e6ec;
}

.profileTierBoolDot.is-yes {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.profileTierBoolCell.is-current {
    background: rgba(46, 125, 50, 0.06);
    border-radius: 6px;
}

@media (max-width: 900px) {
    .profileMemberPermGrid {
        grid-template-columns: 1fr;
    }

    .profileFeePanel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .profileHeroActions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-left: 0;
    }

    .profileHeroActions .mgmtBtn {
        width: 100%;
    }
}

.mgmtAdminOnlyTag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    margin-left: 8px;
    border-radius: 6px;
    background: #fff3e0;
    color: #e65100;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #ffcc80;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .mgmtFormGrid {
        grid-template-columns: 1fr;
    }
}

/* ========== 徽标 ========== */
.mgmtBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.mgmtBadgeOk {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.mgmtBadgeOff {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

.mgmtBadgeWarn {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}

.mgmtBadgeInfo {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.mgmtBadgeProgress {
    background: #e8f0fe;
    color: #2f6fae;
    border: 1px solid #c5d9f5;
}

/* ========== 底部分页 ========== */
.mgmtTableFooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid var(--mgmt-border);
    background: #fafcff;
    font-size: 13px;
    color: var(--mgmt-muted);
    flex-wrap: wrap;
}

.mgmtPagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mgmtPageNum {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--mgmt-border);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}

.mgmtPageNum.is-active {
    background: var(--mgmt-primary);
    color: #fff;
    border-color: var(--mgmt-primary);
}

@media (max-width: 900px) {
    .mgmtTopBar {
        flex-wrap: wrap;
    }
    .mgmtSearchInput {
        width: 100%;
    }
}

/* 设备管理：关联方案标签云 */
.deviceLinkedSolutions {
    margin: 0 0 12px;
    background: var(--mgmt-card);
    border: 1px solid var(--mgmt-border);
    border-radius: 12px;
    box-shadow: var(--mgmt-shadow);
    overflow: hidden;
}

.deviceLinkedSolutionsToggle {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: var(--mgmt-text);
}

.deviceLinkedSolutionsToggle:hover {
    background: #f8fbff;
}

.deviceLinkedSolutionsToggleLabel {
    font-size: 13px;
    font-weight: 600;
}

.deviceLinkedSolutionsCount {
    font-size: 13px;
    font-weight: 700;
    color: #2f6fae;
}

.deviceLinkedSolutionsToggleHint {
    flex: 1;
    min-width: 120px;
    font-size: 12px;
    color: var(--mgmt-muted);
}

.deviceLinkedSolutionsArrow {
    font-size: 12px;
    color: var(--mgmt-muted);
}

.deviceLinkedSolutionsBody {
    padding: 0 14px 12px;
}

.deviceLinkedSolutionsBody.is-collapsed {
    display: none;
}

.deviceLinkedSolutionsTags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

.deviceSolutionTag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px;
    background: #eef4fb;
    border: 1px solid #d5e3f3;
    color: var(--mgmt-text);
    font-size: 13px;
    line-height: 1.35;
    max-width: 100%;
    word-break: break-all;
}

.deviceSolutionTag--empty {
    background: transparent;
    border: none;
    color: var(--mgmt-muted);
    padding: 0;
}

a.deviceSolutionTag--link {
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

a.deviceSolutionTag--link:hover {
    background: #dceafb;
    border-color: #b8d4f5;
    color: var(--mgmt-primary);
}

.deviceSlotStatusBadge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #eef2f7;
    color: #6b7785;
}

.deviceSlotStatusBadge.is-configured {
    background: #e8f4fd;
    color: #2f6fae;
}

.deviceSlotStatusBadge.is-finalized {
    background: #e7f6ee;
    color: #1f8a4c;
}

.deviceCategoryEditForm {
    display: grid;
    gap: 10px;
}

.deviceCategoryEditCheck {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
}

.deviceCategoryEditCheck input {
    margin-top: 3px;
}

#deviceSlotEnableBtn {
    background: #fff;
    border-color: var(--mgmt-border);
    color: var(--mgmt-title);
}

#deviceSlotEnableBtn:hover {
    border-color: var(--mgmt-primary);
    color: var(--mgmt-primary);
}

#deviceSlotEnableBtn.is-enabled {
    background: #1f8a4c;
    border-color: #1f8a4c;
    color: #fff;
}

#deviceSlotEnableBtn.is-enabled:hover {
    background: #187341;
    border-color: #187341;
    color: #fff;
}

#deviceSlotEnableBtn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* 中文注释：启用按钮旁配额标注（可启用/已配置/未配置 + title 升级提示） */
.deviceSlotQuotaHint {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #5b6b7c;
    white-space: nowrap;
    margin-right: 4px;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deviceSlotQuotaHint.is-at-quota {
    color: #b45309;
    font-weight: 600;
}

.mgmtToolbar--slotRack {
    align-items: center;
}

.deviceSlotServiceFeeBar {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 4px 10px;
    border: 1px solid var(--mgmt-border);
    border-radius: 8px;
    background: #f8fbff;
    flex-shrink: 0;
}

.deviceSlotServiceFeeLabel {
    font-size: 13px;
    color: var(--mgmt-muted);
    font-weight: 600;
    white-space: nowrap;
}

/* 中文注释：复用 profileSlotModeSwitch 轨道样式，设备管理顶栏内微调 */
.deviceSlotFeeModeSwitch {
    margin: 0;
    gap: 6px;
    flex-shrink: 0;
}

.deviceSlotFeeModeSwitch .slotModeTrack {
    position: relative;
    display: block;
    flex-shrink: 0;
    min-width: 40px;
    width: 40px;
    height: 20px;
    padding: 0;
    line-height: 0;
    font-size: 0;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-radius: 999px;
    background: #d7e6fb;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(74, 144, 226, 0.2);
}

.deviceSlotFeeModeSwitch .slotModeThumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: left 0.2s ease;
    pointer-events: none;
}

.deviceSlotFeeModeSwitch .slotModeTrack.is-fixed .slotModeThumb {
    left: 22px;
    transform: none;
}

.deviceSlotFeeModeSwitch .slotModeLabel.is-active {
    color: #2f6fae;
    font-weight: 700;
}

.deviceSlotFeeValueInput {
    width: 64px;
    min-width: 64px;
    padding: 4px 8px;
    border: 1px solid var(--mgmt-border);
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.deviceSlotFeeUnit {
    font-size: 12px;
    font-weight: 600;
    color: #2f6fae;
    min-width: 14px;
    white-space: nowrap;
}

#deviceSlotLockBtn.is-locked {
    background: #e7f6ee;
    border-color: #1f8a4c;
    color: #1f8a4c;
}

#deviceSlotLockBtn.is-locked:hover {
    background: #d4f0e0;
}

#deviceSlotEditBtn.is-active {
    background: #e8f4fd;
    border-color: #4a90e2;
    color: #2f6fae;
}

.deviceQuotePriceInput {
    width: 88px;
    padding: 4px 6px;
    border: 1px solid #cfd8e6;
    border-radius: 6px;
    font-size: 13px;
    text-align: right;
}

.profileFieldHint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--mgmt-muted);
}

.mgmtDataTable--quoteSlots col.col-slot-lock {
    display: none;
}

/* 管理页/画布轻提示 Toast（屏幕正中，自动消失，不阻断操作） */
.mgmtToast,
.deviceSlotToast {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10050;
    min-width: 220px;
    max-width: min(520px, calc(100vw - 48px));
    padding: 16px 28px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    background: rgba(40, 44, 52, 0.92);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.96);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.mgmtToast.is-show,
.deviceSlotToast.is-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.mgmtToast.is-ok,
.deviceSlotToast.is-ok {
    background: rgba(31, 138, 76, 0.95);
}

.mgmtToast.is-err,
.deviceSlotToast.is-err {
    background: rgba(220, 53, 69, 0.95);
}

.mgmtToast.is-info,
.deviceSlotToast.is-info {
    background: rgba(74, 144, 226, 0.95);
}

/* ========== 管理页表格表头排序 ========== */
.mgmtDataTable thead th.is-sortable {
    cursor: pointer;
    user-select: none;
}

.mgmtDataTable thead th.is-sortable:hover {
    color: #2563eb;
    background: #f0f6ff;
}

.mgmtDataTable thead th.is-sort-active {
    color: #1d4ed8;
}

.mgmtDataTable thead th .mgmtSortMark {
    margin-left: 4px;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
}

.mgmtDataTable thead th.is-sort-active .mgmtSortMark {
    color: #2563eb;
}

/* ========== 管理页会员只读（无「可改」权限） ========== */
.mgmtMemberReadonlyBanner {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff4e5;
    border: 1px solid #ffd8a8;
    color: #8a4b00;
    font-size: 13px;
    line-height: 1.5;
}

body.mgmt-member-readonly .is-mgmt-readonly-root > .mgmtCard,
body.mgmt-member-readonly .is-mgmt-readonly-root > .mgmtTableCard,
body.mgmt-member-readonly .is-mgmt-readonly-root > section.mgmtCard {
    opacity: 0.72;
}

body.mgmt-member-readonly .is-mgmt-readonly-root input:not(.mgmtReadonlyAllow),
body.mgmt-member-readonly .is-mgmt-readonly-root select:not(.mgmtReadonlyAllow),
body.mgmt-member-readonly .is-mgmt-readonly-root textarea:not(.mgmtReadonlyAllow),
body.mgmt-member-readonly .is-mgmt-readonly-root button:not(.mgmtReadonlyAllow) {
    pointer-events: none !important;
    cursor: not-allowed !important;
}

body.mgmt-member-readonly .is-mgmt-readonly-root .mgmt-readonly-disabled {
    pointer-events: none !important;
    cursor: not-allowed !important;
}

body.mgmt-member-readonly .is-mgmt-readonly-root .deviceDragHandle,
body.mgmt-member-readonly .is-mgmt-readonly-root .imageDragHandle,
body.mgmt-member-readonly .is-mgmt-readonly-root .regionTplDragHandle {
    opacity: 0.35;
    pointer-events: none !important;
}

