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

/* ===== 内部应用详情 ===== */
.internal-app-detail-open .layout { display:none; }
/* 详情页铺满顶部导航以下区域，并随文档一起横向滚动：窄屏时按 1024px 最小宽度
   保持桌面布局，超出部分由外层横向滚动条查看，不再降级为堆叠布局。 */
body.internal-app-detail-open { min-width:1024px; }
/* 详情内容区是整页滚动容器：滚动区域铺满顶栏以下、窗口右侧到底部的整个内容区，
   白色内容卡片随内容一起滚动，只有左侧导航保持固定；卡片右侧和底部的 16px
   留白由滚动容器的 padding 提供，滚动条因此贴在窗口右侧，与原型一致。 */
.internal-app-detail-view { position:absolute; z-index:20; inset:56px 0 0; display:flex; min-width:1024px; min-height:0; gap:0; padding:0 0 0 16px; overflow:hidden; background:var(--proto-shell,#f2f2f6); }
.internal-app-detail-sidebar { display:flex; width:260px; flex:0 0 260px; min-height:0; margin:0 0 16px; flex-direction:column; background:#fff; border-radius:8px; overflow:hidden; }
.internal-app-detail-sidebar-header { display:flex; min-height:80px; align-items:center; gap:12px; padding:0 16px; border-bottom:1px solid rgba(31,31,31,.06); }
.internal-app-detail-back { display:inline-flex; width:27px; height:27px; flex:0 0 27px; align-items:center; justify-content:center; padding:1px 6px; border:0; border-radius:4px; background:transparent; color:#595959; cursor:pointer; }
.internal-app-detail-back:hover { background:#f5f5f5; color:#1f1f1f; }
.internal-app-detail-back svg { width:14px; height:14px; fill:currentColor; }
.internal-app-detail-summary { display:flex; min-width:0; flex:1; gap:10px; align-items:center; }
.internal-app-detail-summary > div { display:flex; min-width:0; flex-direction:column; gap:5px; }
.internal-app-detail-summary strong { overflow:hidden; color:#1f1f1f; font-size:14px; font-weight:600; line-height:21px; text-overflow:ellipsis; white-space:nowrap; }
.internal-app-detail-icon { display:inline-flex; width:37px; height:37px; flex:0 0 37px; align-items:center; justify-content:center; overflow:hidden; border-radius:9px; background:#AEB7C2; }
.internal-app-detail-icon svg { display:block; width:100%; height:100%; }
.internal-app-detail-icon img { width:100%; height:100%; object-fit:cover; }
.internal-app-detail-icon-large { width:52px; height:52px; flex-basis:52px; border-radius:12px; }
.internal-app-detail-nav { min-height:0; padding:12px 12px 22px; overflow-x:hidden; overflow-y:auto; }
.internal-app-detail-nav-label { display:block; margin:20px 10px 8px; color:#8c8c8c; font-size:12px; line-height:18.84px; }
.internal-app-detail-nav-label:first-child { margin-top:0; }
.internal-app-detail-nav-item { display:flex; width:100%; height:36px; min-height:0; align-items:center; gap:9px; border:0; border-radius:4px; background:transparent; color:#595959; cursor:pointer; font-size:14px; line-height:36px; padding:0 11px; text-align:left; }
.internal-app-detail-nav-item svg { width:16px; height:16px; flex:0 0 16px; fill:currentColor; }
.internal-app-detail-nav-item:hover { background:#f5f7fa; color:#1f1f1f; }
.internal-app-detail-nav-item.active { background:rgba(126,134,142,.16); color:#1f1f1f; font-weight:500; }
.internal-app-detail-nav-item.is-disabled { color:#595959; }
.internal-app-permission-toolbar { display:flex; justify-content:flex-end; margin-bottom:16px; }
.internal-app-permission-table { border:1px solid #e5e7eb; border-radius:6px; overflow:hidden; }
.internal-app-permission-head, .internal-app-permission-row { display:grid; grid-template-columns:1.1fr 1.8fr 1.3fr .8fr; gap:16px; align-items:start; padding:12px 16px; }
.internal-app-permission-head { background:#f7f8fa; color:#6b7280; font-size:13px; }
.internal-app-permission-row { border-top:1px solid #eef0f2; font-size:14px; }
.internal-app-permission-api { display:block; color:#1677ff; margin-bottom:4px; }
.internal-app-event-list { margin-top:24px; border-top:1px solid #eef0f2; padding-top:16px; }
.internal-app-event-row { display:grid; grid-template-columns:1.4fr 2fr auto; gap:16px; align-items:center; padding:12px 0; border-bottom:1px solid #f0f1f3; }
.internal-app-event-switch { min-width:72px; border:1px solid #d9dce1; background:#fff; border-radius:14px; padding:4px 12px; cursor:pointer; color:#555; }
.internal-app-event-switch[aria-checked="true"] { border-color:#1677ff; background:#1677ff; color:#fff; }
.internal-app-secret-input { display:flex; gap:8px; align-items:center; }
.internal-app-secret-input input { flex:1; }
.internal-app-detail-main { min-width:0; min-height:0; flex:1; padding:0 16px 16px; overflow-x:hidden; overflow-y:auto; background:transparent; }
/* 详情卡片由标题行与当前面板拼成：滚动的是整个内容区，卡片不再自成一个滚动窗口。 */
.workspace-module-title.internal-app-detail-title-row { min-height:79px; margin:0; padding:21px 24px; border-radius:8px 8px 0 0; background:#fff; border-bottom:1px solid #edf0f4; }
.internal-app-detail-title-row h2 { margin:0; color:#252b36; font-size:24px; }
.internal-app-detail-loading { display:flex; align-items:center; justify-content:center; min-height:180px; border-radius:0 0 8px 8px; color:#8d97a5; background:#fff; font-size:14px; }
.internal-app-detail-error { margin:0; padding:0 24px; border-radius:0 0 8px 8px; background:#fff; }
.internal-app-detail-panel { padding:0 24px; border-radius:0 0 8px 8px; background:#fff; }
.internal-app-detail-section { padding:28px 0; border-bottom:1px solid #edf0f4; }
.internal-app-detail-section:last-child { border-bottom:0; }
.internal-app-detail-section h3 { margin:0 0 24px; color:#2b3340; font-size:16px; }
.internal-app-detail-section-heading { display:flex; align-items:center; gap:10px; margin-bottom:24px; }
.internal-app-detail-section-heading h3 { margin:0; }
.internal-app-icon-button { display:inline-flex; width:26px; height:26px; align-items:center; justify-content:center; border:0; border-radius:4px; background:transparent; color:#3886fb; cursor:pointer; }
.internal-app-icon-button:hover { background:#f0f6ff; }
.internal-app-icon-button svg { width:17px; height:17px; fill:currentColor; }
.internal-app-credential-grid { display:grid; grid-template-columns:185px minmax(330px,1fr); gap:61px; }
.internal-app-credential-item { min-width:0; overflow:visible; }
.internal-app-detail-label { display:flex; align-items:center; gap:6px; margin-bottom:13px; color:#7c8795; font-size:13px; }
.internal-app-info-dot { display:inline-flex; width:15px; height:15px; align-items:center; justify-content:center; border:1px solid #aab4c0; border-radius:50%; color:#97a1ae; font-size:10px; }
.internal-app-credential-help { position:relative; display:inline-flex; align-items:center; justify-content:center; color:#97a1ae; cursor:default; outline:none; }
.internal-app-credential-help:hover, .internal-app-credential-help:focus-visible { color:#595959; }
.internal-app-credential-help:hover .internal-app-info-dot, .internal-app-credential-help:focus-visible .internal-app-info-dot { border-color:#8c8c8c; color:#595959; }
.internal-app-credential-tooltip { position:absolute; bottom:calc(100% + 10px); left:50%; z-index:1200; width:max-content; max-width:min(600px,calc(100vw - 24px)); padding:10px 14px; color:#fff; background:#1f1f1f; border-radius:8px; box-shadow:0 8px 24px #1f1f1f2e; opacity:0; pointer-events:none; transform:translate(-50%,4px); transition:opacity .16s ease,transform .16s ease; white-space:normal; font-size:14px; font-weight:400; line-height:22px; }
.internal-app-credential-tooltip:after { position:absolute; bottom:-5px; left:50%; width:10px; height:10px; background:#1f1f1f; content:""; transform:translate(-50%) rotate(45deg); }
.internal-app-credential-help:hover .internal-app-credential-tooltip, .internal-app-credential-help:focus-visible .internal-app-credential-tooltip { opacity:1; transform:translate(-50%); }
.internal-app-credential-value { display:flex; align-items:center; gap:14px; min-width:0; }
.internal-app-credential-value code { overflow:hidden; color:#313b49; font-family:"Courier New",Courier,monospace; font-size:14px; letter-spacing:0.3px; text-overflow:ellipsis; white-space:nowrap; }
.internal-app-link-button { display:inline-flex; align-items:center; gap:4px; padding:0; border:0; background:transparent; color:#3886fb; cursor:pointer; font-size:13px; white-space:nowrap; }
.internal-app-link-button svg { width:14px; height:14px; fill:currentColor; }
.internal-app-link-button:hover { color:#2d66ad; text-decoration:underline; }
.internal-app-info-readonly { display:flex; align-items:center; gap:16px; }
.internal-app-info-readonly strong { display:block; color:#303947; font-size:15px; }
.internal-app-info-readonly p { margin:8px 0 0; color:#84909e; font-size:13px; }
.internal-app-info-editor { max-width:640px; }
.internal-app-detail-editor-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:8px; }
.internal-app-lifecycle-section p { margin:-10px 0 18px; color:#85909e; font-size:13px; line-height:1.7; }
.internal-app-lifecycle-actions { display:flex; gap:12px; }
.internal-app-lifecycle-actions .btn { display:inline-flex; align-items:center; gap:6px; }
.internal-app-action-icon { width:15px; height:15px; fill:currentColor; }
.btn.btn-danger-outline { border:1px solid #ff4d4f; color:#ff4d4f; background:#fff; border-radius:4px; }
.btn.btn-danger-outline:hover { border-color:#ff7875; color:#cf1322; background:#fff; }
.btn.btn-danger-outline:disabled { border-color:#d9d9d9; color:#bfbfbf; background:#fff; cursor:not-allowed; opacity:1; }
.internal-app-members-table { overflow-x:auto; }
.internal-app-members-head, .internal-app-members-row { display:grid; min-width:660px; grid-template-columns:minmax(220px,1.45fr) minmax(170px,1.1fr) 130px 100px; align-items:center; gap:18px; padding:0 24px; }
.internal-app-members-head { min-height:44px; color:#8c8c8c; background:#fafafa; border-bottom:1px solid #d9d9d9; font-size:14px; }
.internal-app-members-row { min-height:64px; color:#595959; border-bottom:1px solid #d9d9d9; font-size:14px; }
.internal-app-members-row:last-child { border-bottom:0; }
.internal-app-members-row:hover { background:#fafafa; }
.internal-app-member-identity { display:flex; min-width:0; align-items:center; gap:12px; }
.internal-app-member-identity > div:last-child { display:flex; min-width:0; flex-direction:column; gap:4px; }
.internal-app-member-identity strong { overflow:hidden; color:#1f1f1f; font-size:14px; font-weight:400; text-overflow:ellipsis; white-space:nowrap; }
.internal-app-member-avatar { display:inline-flex; width:32px; height:32px; flex:0 0 32px; align-items:center; justify-content:center; overflow:hidden; border-radius:8px; background:#e5efff; color:#3886fb; font-size:14px; font-weight:700; }
.internal-app-member-avatar img { width:100%; height:100%; border-radius:inherit; object-fit:cover; }
.internal-app-member-account { overflow:hidden; color:#8c8c8c; font-size:14px; text-overflow:ellipsis; white-space:nowrap; }
.internal-app-member-role { color:#1f1f1f; }
.internal-app-member-transfer { display:inline-flex; justify-content:flex-start; padding:0; border:0; background:transparent; color:#3886fb; cursor:pointer; font-size:14px; font-weight:400; }
.internal-app-member-transfer:hover { color:#174a9b; }
.internal-app-member-transfer:disabled { color:#bfbfbf; cursor:not-allowed; }
.internal-app-members-loading { padding:24px; color:#8c8c8c; text-align:center; }
.internal-app-members-error { margin-top:16px; }
.internal-app-confirm-layer, .internal-app-transfer-layer { position:fixed; z-index:1000; inset:0; display:none; align-items:center; justify-content:center; background:rgba(20,29,45,.38); }
.internal-app-confirm-layer.show, .internal-app-transfer-layer.show { display:flex; }
.internal-app-confirm, .internal-app-transfer { width:min(440px,calc(100vw - 36px)); border-radius:12px; background:#fff; box-shadow:0 18px 54px rgba(18,29,49,.2); }
.internal-app-confirm { position:relative; padding:28px; }
.internal-app-confirm h2, .internal-app-transfer h2 { margin:0 0 16px; color:#242d3a; font-size:20px; }
.internal-app-confirm p, .internal-app-transfer-header p { margin:0; color:#707c8a; font-size:14px; line-height:1.75; }
.internal-app-confirm-close { position:absolute; top:14px; right:16px; border:0; background:transparent; color:#9aa4b0; cursor:pointer; font-size:22px; line-height:1; }
.internal-app-confirm footer, .internal-app-transfer footer { display:flex; gap:10px; justify-content:flex-end; margin-top:26px; }
.internal-app-transfer { position:relative; padding:28px; }
.internal-app-transfer-header { position:relative; padding-right:24px; }
.internal-app-transfer-candidates { display:flex; max-height:320px; flex-direction:column; gap:8px; margin-top:22px; overflow:auto; }
.internal-app-transfer-candidate { display:flex; align-items:center; gap:12px; padding:11px 12px; border:1px solid #e8edf3; border-radius:8px; cursor:pointer; }
.internal-app-transfer-candidate:has(input:checked) { border-color:#74a1dc; background:#f2f7ff; }
.internal-app-transfer-candidate input { accent-color:#4f88d0; }
.internal-app-transfer-candidate > span:last-child { display:flex; flex-direction:column; gap:3px; }
.internal-app-transfer-candidate strong { color:#344052; font-size:14px; }
.internal-app-transfer-candidate small { color:#8a95a3; font-size:12px; }
.internal-app-transfer-empty { margin:24px 0 0; color:#909aa7; text-align:center; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    background: #f0f2f5;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
}

/* ===== 顶部导航 ===== */
.top-nav {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e8e8ed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.nav-title {
    font-size: 14px;
    color: #8c8c9a;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    position: relative;
    display: flex;
    align-items: center;
    width: 24px;
    height: 24px;
    font-size: 13px;
    z-index: 30;
}

.lang-trigger {
    width: 24px;
    height: 24px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #181c29;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-menu {
    position: absolute;
    top: 28px;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 114px;
    padding: 4px 0;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    background: #fff;
}

.lang-switch.open .lang-menu {
    display: flex;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 32px;
    border: 0;
    padding: 4px 12px;
    background: transparent;
    color: #333;
    font-size: 13px;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 0;
    text-align: left;
}

.lang-option span {
    flex: 1 1 auto;
    min-width: 0;
}

.lang-option:hover,
.lang-option.active {
    background: rgba(0, 0, 0, 0.03);
}

.lang-option.active {
    color: #000;
    font-weight: 600;
}

.lang-check {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: #181c29;
    visibility: hidden;
}

.lang-option.active .lang-check {
    visibility: visible;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.user-menu:hover {
    background: #f5f5f7;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.user-name {
    font-size: 14px;
    color: #1a1a2e;
}

.user-arrow {
    transition: transform 0.2s;
}

.user-menu.open .user-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 200px;
    z-index: 200;
    padding: 0;
    overflow: hidden;
    cursor: default;
}

.user-dropdown.show {
    display: block;
}

.dropdown-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    overflow: hidden;
}

.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.dropdown-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dropdown-tag {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 3px;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: var(--proto-divider);
    margin: 0 16px;
}

.dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #1a1a2e;
    text-align: center;
    cursor: default;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: #f5f5f7;
}

.dropdown-logout {
    color: #e53e3e;
    text-align: center;
}

/* ===== 整体布局 ===== */
.layout {
    display: flex;
    height: calc(100vh - 56px);
}

/* ===== 左侧菜单 ===== */
.left-menu {
    width: 200px;
    background: #fff;
    border-right: 1px solid #e8e8ed;
    padding: 12px 8px;
    flex-shrink: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}

.menu-item:hover {
    background: #f5f5f7;
}

.menu-item.active {
    background: #eef0ff;
    color: #667eea;
}

.registration-menu-dot {
    display: block;
    align-self: flex-start;
    margin-left: -6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f5576c;
}

/* ===== 主区域 ===== */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===== 页签 ===== */
.tab-bar {
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #e8e8ed;
    padding: 0 24px;
    flex-shrink: 0;
}

.tab-item {
    padding: 14px 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-item:hover {
    color: #667eea;
}

.tab-item.active {
    color: #667eea;
    font-weight: 600;
    border-bottom-color: #667eea;
}

.tab-panel {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-panel.active {
    display: flex;
    flex-direction: column;
}

/* ===== 成员页签布局 ===== */
.member-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ===== 左侧部门树 ===== */
.sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e8e8ed;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 14px 10px;
}

.sidebar-header .btn {
    flex: 1;
}

.sidebar-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.dept-tree {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.dept-node {
    position: relative;
}

.dept-item {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
    border-radius: 6px;
    margin: 1px 6px;
    position: relative;
}

.dept-item:hover {
    background: #f5f5f7;
}

.dept-item.active {
    background: #eef0ff;
}

.dept-toggle {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #8c8c9a;
    font-size: 10px;
    border-radius: 3px;
}

.dept-toggle:hover {
    background: rgba(0,0,0,0.05);
}

.dept-toggle svg {
    transition: transform 0.2s;
}

.dept-toggle.expanded svg {
    transform: rotate(90deg);
}

.dept-toggle.hidden {
    visibility: hidden;
}

.dept-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 2px;
}

.dept-icon-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef0ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dept-icon-avatar {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dept-icon-logo {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
}

.dept-name {
    flex: 1;
    font-size: 13px;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: 6px;
}

.dept-item.active .dept-name {
    color: #667eea;
    font-weight: 500;
}

.dept-count {
    font-size: 12px;
    color: #8c8c9a;
    margin-left: 2px;
    flex-shrink: 0;
}

.dept-more-btn {
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 4px;
    cursor: pointer;
    color: #8c8c9a;
    font-size: 18px;
    line-height: 1;
    margin-left: 2px;
}

.dept-more-btn:hover {
    background: rgba(0,0,0,0.06);
    color: #667eea;
}

.dept-item:hover .dept-more-btn,
.dept-more-btn.active {
    display: flex;
}

.dept-children {
    padding-left: 20px;
}

/* ===== 右侧主内容 ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    overflow: hidden;
}

.dept-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    overflow: hidden;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input {
    width: 220px;
    height: 34px;
    border: 1.5px solid #e2e2ea;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #667eea;
}

/* ===== 按钮 ===== */
.btn {
    height: 34px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

.btn-search {
    background: #667eea;
    color: #fff;
}

.btn-search:hover {
    background: #5a67d8;
}

.btn-primary {
    background: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-outline {
    background: #fff;
    color: #667eea;
    border: 1.5px solid #667eea;
}

.btn-outline:hover {
    background: #f0f2ff;
}

.btn-cancel {
    background: #f5f5f7;
    color: #666;
}

.btn-cancel:hover {
    background: #e8e8ed;
}

.btn-danger {
    background: #f5576c;
    color: #fff;
}

.btn-danger:hover {
    background: #e04458;
}

.btn-text {
    background: none;
    border: none;
    color: #667eea;
    padding: 0 6px;
    height: auto;
    font-size: 13px;
    cursor: pointer;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-text.danger {
    color: #f5576c;
}

/* ===== 表格 ===== */
.table-wrapper {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table th {
    background: #fafafa;
    padding: 10px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #8c8c9a;
    border-bottom: 1px solid #f0f0f5;
}

.data-table td {
    padding: 10px 14px;
    font-size: 13px;
    color: #1a1a2e;
    border-bottom: 1px solid #f5f5f7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table tbody tr:hover {
    background: #fafbff;
}

#memberTable th:last-child,
#memberTable td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #fff;
    box-shadow: -8px 0 12px -12px rgba(0,0,0,0.35);
}

#memberTable th:last-child {
    z-index: 3;
    background: #fafafa;
}

#memberTable td.op-menu-active {
    z-index: 1200;
    overflow: visible;
}

#memberTable tbody tr:hover td:last-child {
    background: #fafbff;
}

.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-normal {
    background: #e6f7ee;
    color: #52c41a;
}

.status-disabled {
    background: #fff1f0;
    color: #f5576c;
}

.empty-state {
    text-align: center;
    padding: 60px 0;
    color: #8c8c9a;
    font-size: 14px;
}

.dept-tag-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dept-tag {
    display: inline-block;
    padding: 1px 6px;
    background: #f0f2ff;
    color: #667eea;
    border-radius: 4px;
    font-size: 12px;
}

.role-tag-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.role-tag {
    display: inline-block;
    padding: 1px 8px;
    background: #f0f2ff;
    color: #667eea;
    border-radius: 4px;
    font-size: 12px;
}

.role-tag.role-super {
    background: #fff7e6;
    color: #fa8c16;
}

.op-cell {
    display: flex;
    gap: 4px;
    align-items: center;
}

.op-divider {
    color: #e2e2ea;
    font-size: 12px;
}

/* ===== 操作列三点下拉菜单 ===== */
.op-more-wrap {
    position: relative;
    display: inline-block;
}

.op-more-btn {
    background: none;
    border: 1px solid #e2e2ea;
    border-radius: 6px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
    line-height: 1;
    color: #8c8c9a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.op-more-btn:hover {
    background: #f5f5f7;
    border-color: #667eea;
    color: #667eea;
}

.op-more-dropdown {
    display: none;
    position: fixed;
    z-index: 1200;
    min-width: 120px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 4px 0;
}

.op-more-dropdown.show {
    display: block;
}

.op-more-dropdown .op-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13px;
    color: #1a1a2e;
    cursor: pointer;
    white-space: nowrap;
}

.op-more-dropdown .op-dropdown-item:hover {
    background: #f5f5f7;
}

.op-more-dropdown .op-dropdown-item.danger {
    color: #f5576c;
}

.op-more-dropdown .op-dropdown-item.danger:hover {
    background: #fff1f0;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 0;
    gap: 4px;
}

.page-btn {
    min-width: 30px;
    height: 30px;
    border: 1px solid #e2e2ea;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.page-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    font-size: 13px;
    color: #8c8c9a;
    margin-right: 8px;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    width: 420px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
}

.modal-sm { width: 360px; }
.modal-lg { width: 520px; }
.modal-member { width: 620px; }
.modal-logo-crop {
    width: 520px;
    max-width: calc(100vw - 40px);
    border-radius: 8px;
    overflow: hidden;
}

.modal-logo-crop .modal-header {
    padding: 20px;
}

.modal-logo-crop .modal-body {
    padding: 20px;
}

.modal-logo-crop .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f5;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f5;
}

.modal-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.modal-close {
    font-size: 20px;
    color: #8c8c9a;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover { color: #1a1a2e; }

.modal-body {
    padding: 18px 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body p {
    font-size: 14px;
    color: #666;
}

#confirmMsg {
    white-space: pre-line;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 20px 16px;
}

/* ===== 确认对话框 ===== */
.confirm-dialog {
    width: 340px;
    border-radius: 14px;
    overflow: hidden;
    animation: confirmSlideIn 0.2s ease-out;
}

@keyframes confirmSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-dialog-body {
    padding: 28px 24px 20px;
    text-align: center;
}

.confirm-dialog-icon {
    margin-bottom: 14px;
    color: #faad14;
}

.confirm-dialog-icon.danger {
    color: #f5576c;
}

.confirm-dialog-icon svg {
    width: 40px;
    height: 40px;
}

.confirm-dialog-text {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.confirm-dialog-footer {
    display: flex;
    border-top: 1px solid #f0f0f5;
}

.confirm-dialog-footer .btn {
    flex: 1;
    height: auto;
    border: none;
    border-radius: 0;
    padding: 13px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

.confirm-dialog-footer .btn-cancel {
    background: #fff;
    color: #666;
    border-right: 1px solid #f0f0f5;
}

.confirm-dialog-footer .btn-cancel:hover {
    background: #f9f9fb;
}

.confirm-dialog-footer .btn-confirm-ok {
    background: #fff;
    color: #667eea;
}

.confirm-dialog-footer .btn-confirm-ok:hover {
    background: #f0f2ff;
}

.confirm-dialog-footer .btn-confirm-danger {
    background: #fff;
    color: #f5576c;
}

.confirm-dialog-footer .btn-confirm-danger:hover {
    background: #fff5f6;
}

/* ===== 表单 ===== */
.form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f5;
}

.form-section-title + .form-section-title {
    margin-top: 6px;
}

.form-item + .form-section-title {
    margin-top: 18px;
}

.form-hint {
    font-size: 12px;
    color: #8c8c9a;
    margin-bottom: 6px;
}

.form-item {
    margin-bottom: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-item label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.form-item input[type="text"],
.form-item input[type="number"],
.form-item input[type="password"] {
    width: 100%;
    height: 36px;
    border: 1.5px solid #e2e2ea;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.form-item input:focus {
    border-color: #667eea;
}

.password-field {
    position: relative;
}

.password-field input[type="password"],
.password-field input[type="text"] {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #8c8c9a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
}

.password-toggle-icon {
    display: block;
    width: 20px;
    height: 20px;
}

.password-toggle .icon-eye {
    display: none;
}

.password-toggle.is-visible .icon-eye {
    display: block;
}

.password-toggle.is-visible .icon-eye-off {
    display: none;
}

.password-toggle:hover {
    background: #f5f5f7;
    color: #667eea;
}

.form-error {
    min-height: 18px;
    margin-top: 4px;
    font-size: 12px;
    line-height: 18px;
    color: #e53e3e;
}

.form-select {
    width: 100%;
    height: 36px;
    border: 1.5px solid #e2e2ea;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    background: #fff;
    cursor: pointer;
}

.form-select:focus {
    border-color: #667eea;
}

.required {
    color: #f5576c;
    margin-right: 2px;
}

.form-hint {
    font-size: 12px;
    color: #8c8c9a;
    margin-top: 4px;
}

/* ===== 复选框组 ===== */
.checkbox-group {
    display: flex;
    gap: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #1a1a2e;
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #1a1a2e;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    accent-color: #667eea;
    cursor: pointer;
}

/* ===== 开关 ===== */
.switch-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.switch-label {
    font-size: 13px;
    color: #1a1a2e;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 22px;
    transition: 0.3s;
}

.switch-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .switch-slider {
    background: #667eea;
}

.switch input:checked + .switch-slider:before {
    transform: translateX(18px);
}

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

.switch-disabled .switch-slider {
    cursor: not-allowed;
}

/* ===== 部门选择字段 ===== */
.dept-field-box {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 36px;
    border: 1.5px solid #e2e2ea;
    border-radius: 8px;
    padding: 4px 8px 4px 10px;
    cursor: pointer;
    transition: border-color 0.2s;
    background: #fff;
}

.dept-field-box:hover {
    border-color: #667eea;
}

.dept-field-tags {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    min-height: 26px;
}

.dept-field-placeholder {
    color: #c0c0c8;
    font-size: 13px;
}

.dept-field-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px 2px 8px;
    background: #f0f2ff;
    color: #667eea;
    border-radius: 4px;
    font-size: 12px;
    line-height: 20px;
}

.dept-field-tag .tag-remove {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #667eea;
    opacity: 0.6;
    margin-left: 2px;
}

.dept-field-tag .tag-remove:hover {
    opacity: 1;
}

.dept-field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-left: 4px;
}

/* ===== 部门选择器弹窗 ===== */
#deptPickerModal {
    z-index: 1100;
}

.modal-dept-picker {
    display: flex;
    flex-direction: column;
    width: min(640px, calc(100vw - 48px));
    max-width: min(96vw, 980px);
    max-height: calc(100vh - 48px);
}

/* 自动审核单选弹窗对齐原型：更宽、单栏，并随窗口缩放。 */
.modal-dept-picker-single {
    width: min(860px, calc(100vw - 48px));
}

.dept-picker-body {
    display: flex;
    padding: 0 !important;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    height: min(400px, calc(100vh - 180px));
}

.modal-dept-picker-single .dept-picker-body {
    height: min(520px, calc(100vh - 180px));
}

.dept-picker-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f0f0f5;
    overflow: hidden;
    min-width: 0;
}

.modal-dept-picker-single .dept-picker-left {
    border-right: 0;
}

.dept-picker-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    margin: 12px 14px 8px;
    padding: 0 11px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--proto-border, #d9d9d9);
    border-radius: 6px;
}

.dept-picker-search:focus-within {
    border-color: var(--proto-blue, #3886fb);
    box-shadow: 0 0 0 2px rgba(56, 134, 251, 0.12);
}

.dept-picker-search-icon {
    display: block;
    flex: 0 0 14px;
    pointer-events: none;
}

.dept-picker-search-input {
    width: 100%;
    min-width: 0;
    height: 100%;
    flex: 1;
    padding: 0;
    border: 0;
    border-radius: 0;
    font-size: 13px;
    outline: none;
    background: transparent;
    box-shadow: none;
}

.dept-picker-search-input:focus {
    border-color: transparent;
    box-shadow: none;
}

.modal-dept-picker .modal-header,
.modal-dept-picker .modal-footer {
    flex-shrink: 0;
}

.dept-picker-tree {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 6px 8px;
}

.dept-picker-node {
    user-select: none;
}

.dept-picker-item {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.dept-picker-item:hover {
    background: #f5f5f7;
}

.dept-picker-toggle {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #8c8c9a;
    border-radius: 3px;
}

.dept-picker-toggle:hover {
    background: rgba(0,0,0,0.05);
}

.dept-picker-toggle svg {
    transition: transform 0.2s;
}

.dept-picker-toggle.expanded svg {
    transform: rotate(90deg);
}

.dept-picker-toggle.leaf {
    visibility: hidden;
}

.dept-picker-item input[type="checkbox"],
.dept-picker-item input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0 4px 0 2px;
}

.dept-picker-item .dept-icon {
    margin-left: 2px;
}

.dept-picker-item .dept-name {
    margin-left: 6px;
    font-size: 13px;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dept-picker-children {
    padding-left: 20px;
}

/* ===== 部门选择器右侧面板 ===== */
.dept-picker-right {
    width: 210px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: #fafbfc;
    min-width: 0;
}

.modal-dept-picker-single .dept-picker-right {
    display: none;
}

.dept-picker-right-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 8px;
    font-size: 13px;
    color: #666;
    flex-shrink: 0;
}

.dept-picker-clear {
    color: #667eea;
    cursor: pointer;
    font-size: 12px;
}

.dept-picker-clear:hover {
    text-decoration: underline;
}

.dept-picker-right-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 8px;
}

.dept-picker-sel-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.dept-picker-sel-item:hover {
    background: #eef0ff;
}

.dept-picker-sel-item .dept-icon {
    flex-shrink: 0;
}

.dept-picker-sel-name {
    flex: 1;
    font-size: 13px;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dept-picker-sel-remove {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #8c8c9a;
    cursor: pointer;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
}

.dept-picker-sel-remove:hover {
    background: rgba(0,0,0,0.06);
    color: #f5576c;
}

.dept-picker-empty {
    text-align: center;
    padding: 40px 0;
    color: #c0c0c8;
    font-size: 13px;
}

/* 窄屏下双栏选择器改为上下结构，避免右侧已选区挤压部门树。 */
@media (max-width: 720px) {
    .modal-dept-picker:not(.modal-dept-picker-single) .dept-picker-body {
        flex-direction: column;
        height: min(520px, calc(100vh - 180px));
    }

    .modal-dept-picker:not(.modal-dept-picker-single) .dept-picker-left {
        border-right: 0;
    }

    .modal-dept-picker:not(.modal-dept-picker-single) .dept-picker-right {
        width: 100%;
        max-height: 38%;
        border-top: 1px solid #f0f0f5;
    }
}

/* ===== 数据导入 ===== */
.import-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 6px;
}

.import-download-link {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
}

.import-download-link:hover {
    text-decoration: underline;
}

.import-file-list {
    margin-top: 12px;
}

.import-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fafbfc;
    border: 1px solid #f0f0f5;
    border-radius: 8px;
}

.import-file-icon {
    flex-shrink: 0;
}

.import-file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.import-file-name {
    font-size: 13px;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-file-size {
    font-size: 12px;
    color: #8c8c9a;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
    background: #f5576c;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 9999;
}

.toast.success {
    background: #52c41a;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== 部门表格拖拽 ===== */
#deptTable {
    table-layout: fixed;
}

#deptTable th,
#deptTable td {
    padding: 13px 14px;
    line-height: 19.5px;
}

#deptTable th:nth-child(1) { width: 3.75%; }
#deptTable th:nth-child(2) { width: 37.56%; }
#deptTable th:nth-child(3) { width: 15.51%; }
#deptTable th:nth-child(4) { width: 25.21%; }
#deptTable th:nth-child(5) { width: 17.97%; }

.dept-table-name {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 24px;
    box-sizing: border-box;
    user-select: none;
}

.dept-table-name strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.dept-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    color: #a0a4b8;
    font-size: 17px;
    line-height: 1;
}

.dept-drag-handle.is-disabled {
    opacity: 0.35;
}

.dept-name-cell.dept-drag-source {
    cursor: grab;
}

.dept-name-cell.dept-drag-source:hover .dept-drag-handle {
    color: #667eea;
}

.dept-name-cell.dept-drag-source:active {
    cursor: grabbing;
}

.dept-drag-preview {
    position: fixed;
    top: -10000px;
    left: 0;
    table-layout: fixed;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 0 0 1px #e1e4ef, 0 16px 36px rgba(31, 37, 60, 0.2), 0 4px 12px rgba(31, 37, 60, 0.12);
    opacity: 0.98;
    overflow: hidden;
    pointer-events: none;
}

.dept-drag-preview td {
    height: 51px;
    padding: 13px 14px;
    border-bottom: 0;
    background: #fff;
    line-height: 19.5px;
}

.dept-drag-preview .dept-name-cell {
    cursor: grabbing;
}

#deptBody.dept-move-pending .dept-drag-source {
    pointer-events: none;
}

#deptBody.dept-move-pending .dept-drag-handle {
    opacity: 0.45;
}

#deptBody tr td {
    transition: background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.18s ease;
}

#deptBody tr.dept-table-sort-move {
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

#deptBody tr.dept-dragging td {
    opacity: 0.48;
    transform: scale(1.004);
}

#deptBody tr.dept-dragging .dept-name-cell {
    cursor: grabbing;
}

#deptBody tr.dept-drop-before td,
#deptBody tr.dept-drop-after td {
    background: #f7f8ff;
}

#deptBody tr.dept-drop-before td {
    box-shadow: inset 0 2px 0 #667eea;
}

#deptBody tr.dept-drop-after td {
    box-shadow: inset 0 -2px 0 #667eea;
}

#deptBody tr.dept-drop-inside td {
    background: #eef2ff;
    box-shadow: inset 0 2px 0 #667eea, inset 0 -2px 0 #667eea;
}

#deptBody tr.dept-drop-inside td:first-child {
    box-shadow: inset 2px 0 0 #667eea, inset 0 2px 0 #667eea, inset 0 -2px 0 #667eea;
}

#deptBody tr.dept-drop-inside td:last-child {
    box-shadow: inset -2px 0 0 #667eea, inset 0 2px 0 #667eea, inset 0 -2px 0 #667eea;
}

#deptBody tr.dept-row-settled td {
    animation: dept-sort-settle-bg 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

#deptBody tr.dept-row-settled td:first-child {
    animation: dept-sort-settle-marker 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dept-sort-settle-bg {
    0% { background: #667eea2e; }
    55% { background: #667eea1a; }
    100% { background: transparent; }
}

@keyframes dept-sort-settle-marker {
    0% { background: #667eea2e; box-shadow: inset 3px 0 #667eea; }
    55% { background: #667eea1a; box-shadow: inset 3px 0 #667eeab8; }
    100% { background: transparent; box-shadow: inset 3px 0 #667eea00; }
}

.dept-row-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    transition: transform 0.2s;
    vertical-align: middle;
}

.dept-row-toggle.expanded {
    transform: rotate(90deg);
}

.dept-row-toggle.hidden {
    visibility: hidden;
}

/* ===== 右键菜单 ===== */
.context-menu {
    display: none;
    position: fixed;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 130px;
    z-index: 500;
    padding: 4px 0;
}

.context-menu.show {
    display: block;
}

.context-menu-item {
    padding: 8px 16px;
    font-size: 13px;
    color: #1a1a2e;
    cursor: pointer;
    transition: background 0.15s;
}

.context-menu-item:hover {
    background: #f5f5f7;
}

.context-menu-item.danger {
    color: #f5576c;
}

/* ===== 成员头像 ===== */
.member-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.member-name-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.member-name-text {
    font-size: 13px;
    color: #1a1a2e;
    white-space: nowrap;
}

/* ===== 表格内开关 ===== */
.table-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    vertical-align: middle;
}

.table-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.table-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 20px;
    transition: 0.3s;
}

.table-switch-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.table-switch input:checked + .table-switch-slider {
    background: #52c41a;
}

.table-switch input:checked + .table-switch-slider:before {
    transform: translateX(16px);
}

/* ===== 菜单面板 ===== */
.menu-panel {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ===== 注册管理 ===== */
.registration-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    overflow: hidden;
}

.registration-header {
    margin-bottom: 14px;
}

.registration-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.registration-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.registration-tab {
    height: 34px;
    padding: 0 14px;
    border: 1px solid #e2e2ea;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.registration-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.registration-tab.active {
    background: #eef0ff;
    border-color: #667eea;
    color: #667eea;
    font-weight: 600;
}

.registration-tab-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #f5576c;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

.registration-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.registration-search {
    width: 260px;
}

.registration-table-wrapper {
    min-height: 0;
}

#registrationTable th:last-child,
#registrationTable td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #fff;
    box-shadow: -8px 0 12px -12px rgba(0,0,0,0.35);
}

#registrationTable th:last-child {
    z-index: 3;
    background: #fafafa;
}

#registrationTable tbody tr:hover td:last-child {
    background: #fafbff;
}

.registration-table-rejected {
    table-layout: fixed;
    min-width: 1110px;
}

.registration-table-rejected .registration-col-applicant {
    width: 140px;
}

.registration-table-rejected .registration-col-account {
    width: 190px;
}

.registration-table-rejected .registration-col-apply-time {
    width: 168px;
}

.registration-table-rejected .registration-col-status {
    width: 126px;
}

.registration-table-rejected .registration-col-reviewer {
    width: 74px;
}

.registration-table-rejected .registration-col-reject-reason {
    width: 180px;
}

.registration-table-rejected .registration-col-review-time {
    width: 168px;
}

.registration-table-rejected .registration-col-operation {
    width: 76px;
}

.registration-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 21px;
    white-space: nowrap;
}

.registration-status.pending {
    background: #fff7e6;
    color: #fa8c16;
}

.registration-status.approved {
    background: #e6f7ee;
    color: #52c41a;
}

.registration-status.rejected {
    background: #fff1f0;
    color: #f5576c;
}

.modal-registration {
    width: 560px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    row-gap: 12px;
    column-gap: 16px;
}

.detail-label {
    color: #8c8c9a;
    font-size: 13px;
}

.detail-value {
    color: #1a1a2e;
    font-size: 13px;
    word-break: break-word;
}

.audit-target {
    padding: 10px 12px;
    margin-bottom: 14px;
    background: #fafbff;
    border: 1px solid #eef0ff;
    border-radius: 8px;
    color: #1a1a2e;
    font-size: 13px;
}

textarea {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    border: 1.5px solid #e2e2ea;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

textarea:focus {
    border-color: #667eea;
}

/* ===== 成员信息管理 ===== */
.member-info-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    overflow: auto;
}

.member-info-layout {
    display: flex;
    gap: 32px;
    flex: 1;
}

.member-info-left {
    flex: 1;
    min-width: 0;
}

.member-info-header {
    margin-bottom: 20px;
}

.member-info-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.member-info-desc {
    font-size: 13px;
    color: #8c8c9a;
    margin-bottom: 4px;
}

.member-info-note {
    font-size: 12px;
    color: #b0b0ba;
}

/* 字段卡片网格 */
.field-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #e2e2ea;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.field-card:hover {
    border-color: #667eea;
    background: #f8f8ff;
}

.field-card.checked {
    border-color: #667eea;
    background: #f0f2ff;
}

.field-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.field-card-required {
    cursor: default;
}

.field-card-required input[type="checkbox"] {
    cursor: default;
    opacity: 0.6;
}

.field-card-name {
    font-size: 14px;
    color: #1a1a2e;
}

/* 预览面板 */
.member-info-right {
    width: 300px;
    flex-shrink: 0;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.preview-card {
    background: #fff;
    border: 1px solid #e2e2ea;
    border-radius: 12px;
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-avatar {
    margin-bottom: 10px;
}

.preview-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 18px;
}

.preview-fields {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.preview-field-row {
    display: flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.6;
}

.preview-field-label {
    color: #8c8c9a;
    width: 100px;
    flex-shrink: 0;
}

.preview-field-value {
    color: #1a1a2e;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-field-copy {
    flex-shrink: 0;
    margin-left: 6px;
    color: #8c8c9a;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.preview-field-copy:hover {
    color: #667eea;
}

.preview-msg-btn {
    width: 100%;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: #667eea;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.preview-msg-btn:hover {
    background: #5a6fd6;
}

/* ===== 权限管理页面 ===== */
.permission-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    overflow: auto;
}

.permission-header {
    margin-bottom: 4px;
}

.permission-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.permission-toolbar {
    margin-bottom: 16px;
}

/* 权限组表格单元格 */
.perm-member-avatars {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.perm-member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.perm-member-more {
    font-size: 12px;
    color: #8c8c9a;
    margin-left: 2px;
}

.perm-menu-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.perm-menu-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f2ff;
    color: #667eea;
    border-radius: 4px;
    font-size: 12px;
}

/* 权限组弹窗 */
.modal-perm-group {
    width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-perm-group .modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 权限组弹窗内页签 */
.perm-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e8e8ed;
    margin-top: 12px;
    flex-shrink: 0;
}

.perm-tab {
    padding: 10px 16px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.perm-tab:hover {
    color: #667eea;
}

.perm-tab.active {
    color: #667eea;
    font-weight: 600;
    border-bottom-color: #667eea;
}

.perm-tab-panel {
    display: none;
    flex: 1;
    overflow: hidden;
    margin-top: 12px;
}

.perm-tab-panel.active {
    display: flex;
    flex-direction: column;
}

/* 管理员工具栏 */
.perm-admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.perm-admin-search {
    flex: 1;
    height: 34px;
    border: 1px solid #e2e2ea;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
}

.perm-admin-search:focus {
    border-color: #667eea;
}

/* 选择联系人弹窗 */
.modal-contact-picker {
    width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.contact-picker-body {
    display: flex;
    gap: 0;
    flex: 1;
    overflow: hidden;
    min-height: 320px;
}

.contact-picker-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e8e8ed;
    overflow: hidden;
}

.contact-picker-search {
    padding: 10px 12px;
    border-bottom: 1px solid #e8e8ed;
    flex-shrink: 0;
}

.contact-picker-search input {
    width: 100%;
    height: 34px;
    border: 1px solid #e2e2ea;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
}

.contact-picker-search input:focus {
    border-color: #667eea;
}

.contact-picker-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.contact-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.contact-picker-item:hover {
    background: #f5f5f7;
}

.contact-picker-item.is-disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.contact-picker-item.is-disabled:hover {
    background: transparent;
}

.contact-picker-item.is-disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.contact-picker-item-hint {
    margin-left: auto;
    font-size: 12px;
    color: #8c8c9a;
    flex-shrink: 0;
}

.contact-picker-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.contact-picker-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.contact-picker-item-name {
    font-size: 13px;
    color: #1a1a2e;
}

.contact-picker-right {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.contact-picker-right-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #e8e8ed;
    font-size: 13px;
    color: #8c8c9a;
    flex-shrink: 0;
}

.contact-picker-clear {
    color: #667eea;
    cursor: pointer;
    font-size: 13px;
}

.contact-picker-clear:hover {
    text-decoration: underline;
}

.contact-picker-selected {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
}

.contact-selected-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 13px;
    color: #1a1a2e;
    background: #f5f5f7;
    border-radius: 4px;
}

.contact-selected-item .contact-picker-avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.contact-selected-remove {
    margin-left: auto;
    cursor: pointer;
    color: #8c8c9a;
    font-size: 16px;
    line-height: 1;
}

.contact-selected-remove:hover {
    color: #f5576c;
}

.perm-admin-table-wrap {
    flex: 1;
    overflow-y: auto;
}

.perm-admin-table-wrap .data-table td .perm-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.perm-name-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

/* 输入框字数计数器 */
.input-with-counter {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-counter input {
    flex: 1;
    padding-right: 36px;
}

.input-counter {
    position: absolute;
    right: 10px;
    font-size: 12px;
    color: #8c8c9a;
    pointer-events: none;
}

/* 权限菜单树 */
.perm-menu-list {
    overflow-y: auto;
    max-height: 300px;
    padding: 4px 0;
}

.perm-tree-node {
    user-select: none;
}

.perm-tree-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.perm-tree-item:hover {
    background: #f5f5f7;
}

.perm-tree-toggle {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #8c8c9a;
    border-radius: 3px;
}

.perm-tree-toggle:hover {
    background: rgba(0,0,0,0.05);
}

.perm-tree-toggle svg {
    transition: transform 0.2s;
}

.perm-tree-toggle.expanded svg {
    transform: rotate(90deg);
}

.perm-tree-toggle.leaf {
    visibility: hidden;
}

.perm-tree-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 6px 0 2px;
}

.perm-tree-name {
    font-size: 13px;
    color: #1a1a2e;
    margin-left: 4px;
}

.perm-tree-children {
    padding-left: 24px;
}

.perm-tree-children.collapsed {
    display: none;
}

/* ===== 企业设置页面 ===== */
.enterprise-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    overflow: auto;
}

.enterprise-header {
    margin-bottom: 20px;
}

.enterprise-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.enterprise-info-list {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8ed;
}

.enterprise-info-item {
    display: flex;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f5;
}

.enterprise-info-item:last-child {
    border-bottom: none;
}

.enterprise-info-label {
    width: 100px;
    font-size: 14px;
    color: #8c8c9a;
    flex-shrink: 0;
    line-height: 22px;
}

.enterprise-info-value {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #1a1a2e;
    line-height: 22px;
}

.enterprise-logo-value {
    align-items: center;
}

.enterprise-edit-link {
    color: #667eea;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}

.enterprise-edit-link:hover {
    text-decoration: underline;
}

.enterprise-logo-wrap {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e8eaff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enterprise-logo-placeholder {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.enterprise-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.enterprise-logo-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.enterprise-logo-hint {
    font-size: 12px;
    color: #8c8c9a;
}

.enterprise-logo-crop-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.enterprise-logo-crop-meta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 22px;
}

.enterprise-logo-crop-meta strong {
    min-width: 0;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1a1a2e;
    font-weight: 600;
}

.enterprise-logo-crop-meta span {
    flex-shrink: 0;
    color: #666;
}

.enterprise-logo-crop-preview {
    position: relative;
    width: min(256px, 100%);
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.enterprise-logo-crop-preview.dragging {
    cursor: grabbing;
}

.enterprise-logo-crop-img {
    position: absolute;
    max-width: none;
    user-select: none;
    pointer-events: none;
}

.enterprise-logo-crop-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #cfd3df;
    border-radius: 8px;
    box-sizing: border-box;
    pointer-events: none;
}

.enterprise-logo-zoom-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.enterprise-logo-zoom-row span {
    flex-shrink: 0;
    font-size: 13px;
    color: #1a1a2e;
}

.enterprise-logo-zoom-row input[type="range"] {
    flex: 1;
}

.enterprise-logo-zoom-row em {
    flex-shrink: 0;
    min-width: 42px;
    text-align: right;
    color: #666;
    font-size: 13px;
    font-style: normal;
}

.enterprise-logo-reselect {
    margin-top: 14px;
}

.enterprise-section-title {
    margin: 20px 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.enterprise-register-list {
    margin-bottom: 20px;
}

.enterprise-setting-item {
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.enterprise-setting-copy {
    min-width: 0;
    padding-right: 24px;
}

.enterprise-setting-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 22px;
}

.enterprise-setting-desc {
    margin-top: 4px;
    font-size: 12px;
    color: #8c8c9a;
    line-height: 18px;
}

.enterprise-setting-switch {
    flex-shrink: 0;
}

.enterprise-auto-audit-item {
    background: #fff;
}

/* 自动审核部门行按设置项样式展示，右侧使用整块选择器承载部门名称。 */
.enterprise-dept-setting-item {
    min-height: 68px;
}

.enterprise-dept-selector {
    width: 240px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid #e1e4ef;
    border-radius: 8px;
    background: #fff;
    color: #1a1a2e;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.enterprise-dept-selector:hover {
    border-color: #c6cbed;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

.enterprise-dept-selector:focus-visible {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
    outline: none;
}

.enterprise-dept-selector.is-disabled {
    color: #a3a6b5;
    cursor: not-allowed;
    background: #f7f8fc;
}

.enterprise-dept-selector span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enterprise-dept-selector-arrow {
    display: inline-flex;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    align-items: center;
    justify-content: center;
    color: #8c8c9a;
}

.enterprise-dept-selector-arrow svg {
    display: block;
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.enterprise-dept-selector.is-disabled .enterprise-dept-selector-arrow {
    color: #a3a6b5;
}

/* 小屏下部门设置行上下排列，避免右侧选择器压缩左侧说明文案。 */
@media (max-width: 768px) {
    .enterprise-dept-setting-item {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .enterprise-dept-setting-item .enterprise-setting-copy {
        padding-right: 0;
    }

    .enterprise-dept-selector {
        width: 100%;
    }
}

/* ============================================================================
   Prototype visual system
   The rules below only change presentation. Existing IDs, event hooks and
   request-driven state remain untouched so the current feature set behaves as
   before while matching the customer-admin prototype shell.
   ============================================================================ */
:root {
    --proto-blue: #3886fb;
    --proto-blue-hover: #0d4ed6;
    --proto-text: #1f1f1f;
    --proto-text-secondary: #595959;
    --proto-text-tertiary: #8c8c8c;
    --proto-border: #d9d9d9;
    --proto-divider: rgba(31, 31, 31, 0.06);
    --proto-shell: #f2f2f6;
    --proto-sidebar-width: 224px;
    --admin-textarea-max-height: 240px;
}

html {
    min-width: 980px;
    color: var(--proto-text);
    background: var(--proto-shell);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

body {
    min-width: 980px;
    color: var(--proto-text);
    background: var(--proto-shell);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    overflow-x: auto;
    overflow-y: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

textarea {
    max-height: var(--admin-textarea-max-height);
    overflow-y: auto;
}

/* 顶部导航与壳层 */
.top-nav {
    height: 56px;
    padding: 0 20px;
    color: var(--proto-text);
    background: transparent;
    border-bottom: 0;
}

.tab-context {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-right: 0;
    color: var(--proto-text-tertiary);
    font-size: 14px;
    line-height: 22px;
}

.tab-context-chevron {
    color: #bfbfbf;
    font-size: 18px;
    line-height: 1;
}

.nav-left {
    gap: 10px;
}

.nav-brand-logo {
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    object-fit: contain;
}

.nav-logo {
    color: var(--proto-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.nav-right {
    gap: 10px;
}

.lang-trigger {
    color: #181c29;
    border-radius: 8px;
    transition: background 0.18s ease;
}

.lang-trigger:hover,
.lang-trigger:focus-visible {
    background: rgba(0, 0, 0, 0.03);
    outline: none;
}

.lang-menu,
.user-dropdown {
    border: 1px solid var(--proto-border);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.user-menu {
    gap: 8px;
    padding: 4px 8px;
    color: var(--proto-text);
    background: transparent;
    border-radius: 8px;
}

.user-menu:hover {
    background: #f6f7ff;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--proto-blue), #6fa5ff);
    font-weight: 700;
}

.user-name {
    color: var(--proto-text);
    font-size: 14px;
    font-weight: 500;
}

.user-arrow {
    color: var(--proto-text-tertiary);
}

.dropdown-profile {
    padding: 14px 16px 12px;
}

.dropdown-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--proto-blue), #6fa5ff);
}

.dropdown-name {
    color: var(--proto-text);
    font-size: 14px;
}

.dropdown-item {
    height: 42px;
    padding: 0 16px;
    color: var(--proto-text);
    line-height: 42px;
}

.dropdown-item:hover {
    background: #f6f7ff;
}

.dropdown-logout {
    color: #e53e3e;
}

.layout {
    display: grid;
    grid-template-columns: var(--proto-sidebar-width) minmax(0, 1fr);
    height: calc(100vh - 56px);
    background: var(--proto-shell);
}

.left-menu {
    display: flex;
    width: auto;
    min-height: 0;
    flex-direction: column;
    padding: 0 8px 16px;
    overflow: hidden;
    background: transparent;
    border-right: 0;
}

.enterprise-sidebar-card {
    display: flex;
    align-items: center;
    flex: 0 0 70px;
    gap: 12px;
    height: 70px;
    margin: 0 0 4px;
    padding: 0 8px;
    border-bottom: 1px solid var(--proto-divider);
}

.enterprise-sidebar-logo {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--proto-blue);
    background: #e6f7ff;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
}

.enterprise-sidebar-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.enterprise-sidebar-info {
    display: block;
    min-width: 0;
    flex: 1;
}

.enterprise-sidebar-info strong {
    display: block;
    overflow: hidden;
    margin-bottom: 2px;
    color: var(--proto-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enterprise-sidebar-info span {
    display: block;
    width: max-content;
    color: rgba(23, 26, 29, 0.6);
    font-size: 12px;
    line-height: 16px;
}

.sidebar-section-title {
    height: 34px;
    overflow: hidden;
    margin: 6px 0 0;
    padding: 0 12px;
    color: var(--proto-text-tertiary);
    font-size: 12px;
    font-weight: 400;
    line-height: 34px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.left-menu > .menu-item {
    width: 100%;
    height: 34px;
    flex: 0 0 34px;
    margin-top: 10px;
    padding: 0 12px;
    gap: 10px;
    color: var(--proto-text);
    background: transparent;
    border: 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 34px;
    text-align: left;
}

.left-menu > .menu-item svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.left-menu > .menu-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.left-menu > .menu-item.active {
    color: var(--proto-text);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-weight: 500;
}

/* 原型中的一级菜单父项使用 parent-active，叶子菜单项使用 active。 */
.left-menu > .menu-item.active[data-menu="memberDept"],
.left-menu > .menu-item.active[data-menu="registrationAudit"],
.left-menu > .menu-item.active[data-menu="settings"] {
    color: var(--proto-blue);
    background: transparent;
    font-weight: 400;
}

.registration-menu-dot {
    width: 6px;
    height: 6px;
    margin-left: auto;
    align-self: center;
    background: #3886fb;
}

/* 主区域：浅灰壳层 + 白色模块 */
.main-area {
    min-width: 0;
    overflow: hidden;
    background: var(--proto-shell);
}

.tab-bar {
    display: flex;
    height: 48px;
    align-items: center;
    gap: 0;
    padding: 0 24px;
    background: transparent;
    border-bottom: 0;
}

.tab-item {
    position: relative;
    min-width: 72px;
    height: 34px;
    padding: 0 12px;
    color: var(--proto-text-secondary);
    background: transparent;
    border: 0;
    font-size: 14px;
    line-height: 34px;
}

.tab-item:hover {
    color: var(--proto-blue);
}

.tab-item.active {
    color: var(--proto-text);
    font-weight: 500;
}

.tab-item.active::after {
    position: absolute;
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 2px;
    background: var(--proto-blue);
    content: "";
}

.tab-panel.active,
.menu-panel[style=""] {
    display: flex;
    min-height: 0;
    flex-direction: column;
    margin: 0 12px 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ececf1;
    border-radius: 8px;
}

.workspace-module-title {
    display: flex;
    min-height: 48px;
    flex: 0 0 48px;
    align-items: center;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid var(--proto-divider);
    border-radius: 8px 8px 0 0;
}

.workspace-module-title h1 {
    margin: 0;
    color: var(--proto-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

/* 原型的标题区域由 24px 行高 + 24px 垂直内边距 + 1px 分隔线组成，
   让其按内容自然计算为 49px，避免列表整体向上偏移 1px。 */
.workspace-module-title {
    flex: 0 1 auto;
}

.member-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 0;
    height: 100%;
    flex: 1;
    overflow: hidden;
    background: #fff;
}

.sidebar {
    width: auto;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border-right: 1px solid var(--proto-divider);
}

.sidebar-header {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
}

.sidebar-header .btn {
    min-width: 0;
    height: 32px;
    flex: 1 1 0;
}

.dept-tree {
    height: calc(100% - 64px);
    padding: 0 12px 16px;
    overflow: auto;
}

.dept-item {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0 0 0 12px;
    border-radius: 8px;
    transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.dept-item:hover,
.dept-item.active {
    background: rgba(56, 134, 251, 0.1);
}

.dept-children {
    padding-left: 18px;
}

.dept-toggle {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--proto-text-secondary);
    border-radius: 4px;
}

.dept-toggle svg {
    width: 10px;
    height: 10px;
}

.dept-toggle.expanded svg {
    transform: rotate(90deg);
}

.dept-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.dept-icon-circle,
.dept-icon-avatar {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.dept-icon-circle {
    background: #e6f7ff;
}

.dept-icon-circle svg {
    width: 13px;
    height: 13px;
    stroke: var(--proto-blue);
}

.dept-icon-avatar {
    background: linear-gradient(135deg, var(--proto-blue), #6fa5ff);
    font-size: 11px;
}

.dept-icon-logo {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.dept-name {
    min-width: 0;
    flex: 1;
    margin-left: 0;
    overflow: hidden;
    color: var(--proto-text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dept-item.active .dept-name {
    color: var(--proto-text);
    font-weight: 500;
}

.dept-count {
    margin-left: auto;
    color: var(--proto-text-tertiary);
    font-size: 12px;
}

.dept-more-btn {
    width: 28px;
    height: 28px;
    margin: 0 8px 0 0;
    color: var(--proto-text-tertiary);
    border-radius: 6px;
}

.dept-more-btn:hover {
    color: var(--proto-blue);
    background: #fff;
}

.main-content,
.dept-panel-content {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.main-content {
    display: flex;
    flex-direction: column;
}

.member-layout .table-wrapper {
    flex: 0 0 calc(100% - 38px);
}

/* 多语言文案长度不同，但原型中的部门操作仍保持同一行双列布局。 */
#panelMember .sidebar-header {
    align-items: center;
    flex-wrap: nowrap;
}

#panelMember .sidebar-header .btn {
    flex: 1 1 0;
}

.toolbar {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 16px 24px;
    background: #fff;
    border: 0;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-left .btn {
    flex: 0 0 auto;
}

.btn {
    display: inline-flex;
    width: max-content;
    min-width: max-content;
    height: 32px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    color: var(--proto-text);
    background: #fff;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

.btn:hover {
    filter: none;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.btn-primary,
.btn-search {
    color: #fff;
    background: var(--proto-blue);
    border-color: var(--proto-blue);
}

.btn-primary:hover,
.btn-search:hover {
    color: #fff;
    background: var(--proto-blue-hover);
    border-color: var(--proto-blue-hover);
}

.btn-outline {
    color: var(--proto-text);
    background: #fff;
    border-color: var(--proto-border);
}

.btn-outline:hover {
    color: var(--proto-text);
    background: #f7f8ff;
    border-color: #bfbfbf;
}

.btn-danger {
    color: var(--proto-text);
    background: #fff;
    border-color: var(--proto-border);
}

.btn-danger:hover {
    color: #e53e3e;
    background: #fff7f7;
    border-color: #ffccc7;
}

.search-input,
.perm-admin-search,
.form-item input[type="text"],
.form-item input[type="number"],
.form-item input[type="password"],
textarea,
.form-select {
    height: 34px;
    padding: 0 11px;
    color: var(--proto-text);
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 6px;
    outline: 0;
}

.search-input {
    width: 220px;
    height: 32px;
}

.search-input:focus,
.perm-admin-search:focus,
.form-item input:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--proto-blue);
    box-shadow: 0 0 0 2px rgba(56, 134, 251, 0.12);
}

.table-wrapper {
    min-height: 0;
    flex: 1;
    margin: 0 24px 24px;
    overflow: auto;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.data-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
    color: var(--proto-text);
    font-size: 14px;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f8fa;
}

.data-table th,
.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--proto-divider);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--proto-text);
    background: #f7f8fa;
    font-weight: 500;
}

.data-table td {
    color: var(--proto-text);
}

.data-table tbody tr:hover {
    background: #f7f8fa;
}

#memberTable,
#deptTable,
#registrationTable,
#permGroupTable {
    min-width: 0;
}

#memberTable {
    min-width: 0;
    table-layout: fixed;
}

#memberTable th:first-child,
#memberTable td:first-child {
    width: 48px;
}

#memberTable th:nth-child(2),
#memberTable td:nth-child(2) { width: 180px; }
#memberTable th:nth-child(3),
#memberTable td:nth-child(3) { width: 92px; }
#memberTable th:nth-child(4),
#memberTable td:nth-child(4) { width: 112px; }
#memberTable th:nth-child(5),
#memberTable td:nth-child(5) { width: 92px; }
#memberTable th:nth-child(6),
#memberTable td:nth-child(6) { width: 132px; }
#memberTable th:nth-child(7),
#memberTable td:nth-child(7) { width: 210px; }
#memberTable th:nth-child(8),
#memberTable td:nth-child(8) { width: 88px; }

#memberTable th:last-child,
#memberTable td:last-child,
#registrationTable th:last-child,
#registrationTable td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #fff;
    box-shadow: -12px 0 16px -16px rgba(31, 31, 31, 0.4);
}

#memberTable th:last-child,
#registrationTable th:last-child {
    z-index: 3;
    background: #f7f8fa;
}

/* 权限管理列表：横向滚动时操作列固定在最右侧，避免操作按钮被滚出可视区域。 */
#permGroupTable th:last-child,
#permGroupTable td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #fff;
    box-shadow: -12px 0 16px -16px rgba(31, 31, 31, 0.4);
}

#permGroupTable th:last-child {
    z-index: 3;
    background: #f7f8fa;
}

#permGroupTable tbody tr:hover td:last-child {
    background: #f7f8fa;
}

.member-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.member-name-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.member-name-text {
    overflow: hidden;
    color: var(--proto-text);
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-tag,
.role-tag.role-super {
    display: block;
    padding: 0;
    color: var(--proto-text-tertiary);
    background: transparent;
    border-radius: 0;
    font-size: 12px;
    line-height: 18px;
}

.table-switch {
    display: inline-flex;
    width: 38px;
    height: 22px;
    cursor: pointer;
}

.table-switch-slider {
    background: #d9d9e3;
    border-radius: 999px;
}

.table-switch-slider::before {
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.table-switch input:checked + .table-switch-slider {
    background: var(--proto-blue);
}

.table-switch input:checked + .table-switch-slider::before {
    transform: translateX(16px);
}

.table-switch:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.55;
}

.op-more-btn,
.dept-more-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--proto-text-tertiary);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 16px;
}

.op-more-btn:hover,
.dept-more-btn:hover {
    color: var(--proto-blue);
    background: #f7f8ff;
}

.op-more-dropdown,
.context-menu {
    padding: 6px;
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 8px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.14);
}

.op-more-dropdown .op-dropdown-item,
.context-menu-item {
    min-height: 32px;
    padding: 0 10px;
    color: var(--proto-text);
    border-radius: 6px;
    line-height: 32px;
}

.op-more-dropdown .op-dropdown-item:hover,
.context-menu-item:hover {
    background: #f7f8ff;
}

.pagination {
    display: flex;
    min-height: 60px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 24px;
    color: var(--proto-text-secondary);
}

.page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    color: var(--proto-text-secondary);
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 6px;
    font-size: 14px;
}

.page-btn:hover {
    color: var(--proto-blue);
    border-color: var(--proto-blue);
}

.page-btn.active {
    color: #fff;
    background: var(--proto-blue);
    border-color: var(--proto-blue);
}

.app-page-size {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.app-page-size-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}

.app-page-size-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 112px;
    height: 32px;
    padding: 0 10px 0 12px;
    color: var(--proto-text-secondary);
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    white-space: nowrap;
    cursor: pointer;
}

.app-page-size-trigger:hover {
    border-color: var(--proto-blue);
}

.app-page-size-trigger:focus-visible,
.app-page-size.is-open .app-page-size-trigger {
    border-color: var(--proto-blue);
    box-shadow: 0 0 0 2px rgba(56, 134, 251, 0.12);
    outline: 0;
}

.app-page-size-value {
    min-width: 0;
}

.app-page-size-trigger svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-right: 0;
    fill: currentColor;
    transition: transform .15s ease;
}

.app-page-size.is-open .app-page-size-trigger svg {
    transform: rotate(180deg);
}

.app-page-size-menu {
    display: none;
    position: fixed;
    z-index: 1200;
    min-width: 120px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 8px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.14);
}

.app-page-size-menu.show {
    display: block;
}

.app-page-size-option {
    display: block;
    width: 100%;
    min-height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--proto-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 32px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.app-page-size-option:hover,
.app-page-size-option.is-selected {
    background: #f7f8ff;
}

/* 部门管理页 */
#panelDepartment .dept-panel-content {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

#deptTable {
    table-layout: fixed;
}

#deptTable th,
#deptTable td {
    padding: 13px 16px;
    line-height: 21px;
}

#deptTable th:nth-child(1) { width: 48px; }
#deptTable th:nth-child(2) { width: 38%; }
#deptTable th:nth-child(3) { width: 16%; }
#deptTable th:nth-child(4) { width: 25%; }
#deptTable th:nth-child(5) { width: 17%; }

.dept-table-name {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.dept-table-name strong {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
}

/* 注册管理、成员信息、企业设置、权限管理共用白色模块内页。 */
.menu-panel {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--proto-shell);
}

.registration-page,
.member-info-page,
.enterprise-page,
.permission-page {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 20px 24px 24px;
}

.registration-header,
.enterprise-header,
.permission-header {
    display: none;
}

.registration-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 14px;
}

.registration-tab {
    height: 32px;
    padding: 0 14px;
    color: var(--proto-text-secondary);
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 6px;
    font-size: 14px;
}

.registration-tab:hover,
.registration-tab.active {
    color: var(--proto-blue);
    background: rgba(56, 134, 251, 0.1);
    border-color: var(--proto-blue);
}

.registration-tab.active {
    font-weight: 600;
}

.registration-toolbar {
    display: flex;
    min-height: 32px;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 14px;
}

.registration-search {
    width: 220px;
}

.registration-table-wrapper {
    margin: 0;
}

#registrationTable th:nth-child(4),
#registrationTable td:nth-child(4) {
    width: 126px;
    min-width: 126px;
    white-space: nowrap;
}

.registration-status.pending {
    color: #ad6800;
    background: #fff7e6;
}

.registration-status.approved {
    color: #237804;
    background: #f6ffed;
}

.registration-status.rejected {
    color: #cf1322;
    background: #fff1f0;
}

/* 成员信息管理 */
.member-info-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    min-height: 0;
    padding: 0;
}

.member-info-left {
    min-width: 0;
}

.member-info-header {
    margin-bottom: 20px;
}

.member-info-header h3 {
    display: none;
}

.member-info-desc {
    margin: 0;
    color: var(--proto-text);
    font-size: 14px;
    font-weight: 600;
}

.member-info-note {
    display: none;
}

.field-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.field-card {
    min-height: 52px;
    padding: 0 16px;
    color: var(--proto-text);
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 8px;
}

.field-card:hover,
.field-card.checked {
    background: #f0f2ff;
    border-color: var(--proto-blue);
}

.field-card-name {
    color: var(--proto-text);
    font-size: 14px;
}

.field-card input[type="checkbox"] {
    accent-color: var(--proto-blue);
}

.member-info-right {
    width: auto;
    min-width: 0;
}

.preview-title {
    margin: 0 0 12px;
    color: var(--proto-text);
    font-size: 14px;
    font-weight: 600;
}

.preview-card {
    min-height: 393px;
    padding: 28px 20px 20px;
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 12px;
}

.preview-avatar {
    margin-bottom: 10px;
}

.preview-name {
    margin-bottom: 18px;
    color: var(--proto-text);
    font-size: 16px;
    font-weight: 600;
}

.preview-fields {
    gap: 10px;
    margin-bottom: 20px;
}

.preview-field-row {
    font-size: 14px;
}

.preview-field-label {
    width: 100px;
    color: var(--proto-text-tertiary);
}

.preview-field-value {
    color: var(--proto-text);
}

.preview-field-copy:hover {
    color: var(--proto-blue);
}

.preview-msg-btn {
    height: 36px;
    color: #fff;
    background: var(--proto-blue);
    border-radius: 6px;
}

.preview-msg-btn:hover {
    background: var(--proto-blue-hover);
}

/* 企业设置与权限管理 */
.enterprise-page,
.permission-page {
    padding-top: 20px;
}

.enterprise-info-list {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 8px;
}

.enterprise-info-item {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 20px;
    min-height: 72px;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--proto-divider);
}

.enterprise-info-item:last-child {
    border-bottom: 0;
}

.enterprise-info-label {
    width: auto;
    color: var(--proto-text-tertiary);
    font-size: 14px;
}

.enterprise-info-value {
    min-width: 0;
    color: var(--proto-text);
    font-size: 14px;
}

.enterprise-info-value > span {
    font-weight: 600;
}

.enterprise-edit-link {
    color: var(--proto-blue);
    font-size: 14px;
}

.enterprise-logo-value {
    align-items: center;
}

.enterprise-logo-wrap {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #e6f7ff;
}

.enterprise-logo-placeholder {
    color: var(--proto-blue);
}

.enterprise-logo-right {
    align-items: center;
}

.enterprise-logo-hint,
.enterprise-setting-desc {
    color: var(--proto-text-tertiary);
    font-size: 12px;
    line-height: 18px;
}

.enterprise-section-title {
    margin: 20px 0 10px;
    color: var(--proto-text);
    font-size: 16px;
    font-weight: 600;
}

.enterprise-setting-item {
    min-height: 78px;
    align-items: center;
}

.enterprise-setting-title {
    color: var(--proto-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 22px;
}

.enterprise-dept-selector {
    width: 240px;
    min-height: 48px;
    border-color: var(--proto-border);
    border-radius: 8px;
}

.permission-title-row,
#panelPermission .workspace-module-title {
    justify-content: space-between;
}

#panelPermission .permission-page {
    padding: 16px 24px 24px;
}

.permission-page > .table-wrapper {
    margin: 0;
}

.perm-menu-tag,
.role-tag {
    color: var(--proto-blue);
    background: rgba(56, 134, 251, 0.1);
}

/* 弹窗沿用原型的 8px 卡片、24px 遮罩和蓝色操作按钮。 */
.modal-overlay {
    padding: 24px;
    background: rgba(15, 23, 42, 0.38);
}

.modal {
    max-height: calc(100vh - 48px);
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.modal-header,
.modal-footer {
    padding: 16px 20px;
}

.modal-header {
    border-bottom: 1px solid var(--proto-divider);
}

.modal-header h4 {
    color: var(--proto-text);
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    color: var(--proto-text-tertiary);
}

.modal-close:hover {
    color: var(--proto-text);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    gap: 10px;
    border-top: 1px solid var(--proto-divider);
}

#confirmModal .modal-header {
    border-bottom: none;
}

#confirmModal .modal-footer {
    border-top: none;
}

.btn-cancel {
    color: var(--proto-text-secondary);
    background: #f5f5f7;
    border-color: #bfbfbf;
}

.btn-cancel:hover {
    background: #ececf4;
}

.form-item {
    gap: 8px;
    margin-bottom: 14px;
    color: var(--proto-text);
    font-size: 14px;
}

.form-item label,
.radio-label,
.checkbox-label {
    color: var(--proto-text);
    font-size: 14px;
}

.form-hint,
.form-error {
    font-size: 12px;
}

.dept-field-box {
    min-height: 36px;
    border: 1px solid var(--proto-border);
    border-radius: 6px;
}

.switch-slider {
    background: #d9d9e3;
}

.switch input:checked + .switch-slider {
    background: var(--proto-blue);
}

@media (max-width: 1180px) {
    .layout {
        grid-template-columns: 208px minmax(0, 1fr);
    }

    .member-layout {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .member-info-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

@media (max-width: 860px) {
    .member-info-layout {
        grid-template-columns: 1fr;
    }

    .member-info-right {
        max-width: 360px;
    }

    .field-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 原型侧栏二级菜单与图标。二级项只映射到现有页面状态，不引入新业务入口。 */
.left-menu {
    overflow-y: auto;
}

.left-menu > .menu-item {
    position: relative;
}

.left-menu > .menu-item > .menu-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: currentColor;
    stroke: none;
}

.menu-expand-icon {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    margin-left: auto;
    fill: currentColor;
    transition: transform 0.18s ease;
}

.menu-expand-icon.open {
    transform: rotate(180deg);
}

.left-menu > .menu-item[data-menu="settings"] > svg:not(.menu-icon):not(.menu-expand-icon) {
    display: none;
}

.registration-menu-dot {
    display: none !important;
}

.sub-menu {
    display: none;
    margin: -2px 0 4px;
    padding: 0 8px 0 34px;
}

.sub-menu.is-expanded {
    display: block;
}

.sub-menu-item {
    display: flex;
    width: 100%;
    height: 34px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: var(--proto-text);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    line-height: 34px;
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease;
}

.sub-menu-item:hover {
    background: rgba(255, 255, 255, 0.56);
}

.sub-menu-item.active {
    color: var(--proto-text);
    background: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}

.sub-menu-item-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sub-menu-badge {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 5px;
    color: var(--proto-blue);
    background: #e8f1ff;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
}

/* 主区顶部保留原有 tab 事件，但以原型面包屑形式呈现，切换由侧栏二级项完成。 */
.tab-bar {
    gap: 9px;
}

.tab-item {
    display: none;
    min-width: 0;
    height: 22px;
    padding: 0;
    line-height: 22px;
}

.tab-item.active {
    display: block;
    color: var(--proto-text);
    font-weight: 600;
}

.tab-item.active::after {
    display: none;
}

/* 注册审核页：原型将检索栏放在 57px 页头内，表格从卡片内容区起始处展开。 */
#panelRegistrationAudit .workspace-module-title {
    min-height: 57px;
    flex: 0 0 57px;
}

#panelRegistrationAudit .registration-page {
    position: relative;
    overflow: hidden;
    padding: 16px 24px 0;
}

#panelRegistrationAudit .registration-toolbar {
    position: absolute;
    top: -45px;
    right: 24px;
    margin: 0;
}

#panelRegistrationAudit .registration-table-wrapper {
    min-height: 0;
    flex: 1;
    margin: 0;
    overflow: auto;
}

.registration-pagination {
    display: flex;
    min-height: 68px;
    flex: 0 0 68px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 0;
    color: var(--proto-text-secondary);
    border-top: 1px solid transparent;
    font-size: 14px;
}

.registration-page-numbers {
    display: flex;
    gap: 6px;
}

.registration-page-nav {
    width: auto;
}

.registration-page-nav:disabled,
.registration-page-numbers .page-btn:disabled {
    color: #c3c6ce;
    border-color: #ebecef;
    cursor: not-allowed;
}

/* 企业设置页：原型信息列表与模块等宽，注册设置卡片与页头保持 14px 节奏。 */
#panelSettings .workspace-module-title {
    min-height: 49px;
    flex: 0 0 49px;
}

#panelSettings .enterprise-page {
    padding: 0;
}

#panelSettings .enterprise-info-list {
    border: 0;
    border-radius: 0 0 8px 8px;
}

#panelSettings .enterprise-info-item {
    min-height: 0;
    padding: 22px 24px;
}

#panelSettings .enterprise-info-label,
#panelSettings .enterprise-info-value {
    line-height: 21px;
}

#panelSettings .enterprise-page[data-settings-section="registrationAccount"] .enterprise-section-title {
    display: none;
}

#panelSettings .enterprise-page[data-settings-section="registrationAccount"] #enterpriseRegisterSection {
    margin-top: 14px;
    border: 0;
    border-radius: 8px;
}

#panelSettings .enterprise-page[data-settings-section="registrationAccount"] #enterpriseRegisterSection .enterprise-info-item {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 72px;
    padding: 13px 24px;
}

#panelSettings .enterprise-page[data-settings-section="registrationAccount"] #enterpriseRegisterSection .enterprise-dept-setting-item {
    min-height: 75px;
}

.registration-tabs {
    display: none;
}

.registration-toolbar {
    margin-top: 0;
}

/* 企业设置二级项分别展示既有的企业信息和注册账号权限区域。 */
.enterprise-page[data-settings-section="enterpriseInfo"] .enterprise-section-title,
.enterprise-page[data-settings-section="enterpriseInfo"] #enterpriseRegisterSection {
    display: none;
}

.enterprise-page[data-settings-section="registrationAccount"] #enterpriseInfoSection {
    display: none;
}

.enterprise-page[data-settings-section="registrationAccount"] .enterprise-section-title {
    margin-top: 0;
}

/* 原型侧栏采用 197px 的可用菜单轨道，二级项与父级同宽并以 10px 节奏分隔。 */
.sidebar-section-title,
.left-menu > .menu-item,
.sub-menu {
    width: 197px;
}

.sidebar-section-title {
    flex: 0 0 34px;
}

.sub-menu {
    margin: 0;
    padding: 0;
}

.sub-menu-item {
    width: 197px;
    margin: 10px 0 0;
    padding: 0 12px 0 38px;
    border-radius: 8px;
}

.sub-menu-item.active {
    background: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.left-menu > .menu-item > .menu-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

.left-menu > .menu-item > .menu-expand-icon {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
    fill: #595959;
}

.btn-icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
}

/* 注册管理与企业设置的原型页在卡片上方保留 48px 面包屑区域。 */
#panelRegistrationAudit[style=""],
#panelSettings[style=""] {
    position: relative;
    margin: 48px 12px 12px;
    overflow: visible;
}

.panel-page-breadcrumb {
    position: absolute;
    top: -49px;
    left: -13px;
    display: flex;
    width: calc(100% + 26px);
    height: 48px;
    box-sizing: border-box;
    align-items: center;
    gap: 9px;
    padding: 0 24px;
    color: var(--proto-text-tertiary);
    background: var(--proto-shell);
    font-size: 14px;
    line-height: 22px;
}

.panel-page-breadcrumb .current {
    color: var(--proto-text);
    font-weight: 500;
}

.panel-page-breadcrumb .panel-breadcrumb-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.panel-page-breadcrumb .panel-breadcrumb-link:hover {
    color: var(--proto-text);
}

.panel-page-breadcrumb .panel-breadcrumb-link.current {
    pointer-events: none;
    cursor: default;
}

.panel-breadcrumb-chevron,
.tab-context-chevron {
    display: inline-flex;
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    align-items: center;
    justify-content: center;
    color: #bfbfbf;
    font-size: 0;
    line-height: 0;
}

.panel-breadcrumb-chevron svg,
.tab-context-chevron svg {
    display: block;
    width: 11px;
    height: 11px;
    fill: currentColor;
}

.tab-item.active {
    font-weight: 500;
}

.tab-item.active::after {
    display: none;
}

.left-menu > .menu-item.active {
    border-radius: 6px;
}

.sub-menu-item {
    gap: 0;
}

.sub-menu-item-label {
    flex: 1 1 0%;
}

.sub-menu-badge {
    min-width: 20px;
    height: 20px;
    margin-left: 0;
    padding: 0 6px;
    background: rgba(56, 134, 251, 0.12);
    font-weight: 600;
    line-height: 20px;
}

.btn-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: currentColor;
    stroke: none;
}

/* 原型底部侧栏收起控制。折叠只改变导航轨道宽度，当前页面与 hash 保持不变。 */
.left-menu {
    position: relative;
    overflow-y: overlay;
    scrollbar-width: none;
}

.left-menu::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.sidebar-collapse-control {
    position: absolute;
    bottom: 16px;
    left: 8px;
    display: flex;
    width: 208px;
    height: 40px;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 12px;
    color: rgba(23, 26, 29, 0.6);
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    line-height: 40px;
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-collapse-control:hover {
    color: var(--proto-text);
    background: rgba(255, 255, 255, 0.5);
}

.sidebar-collapse-control-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: currentColor;
    transition: transform 0.18s ease;
}

.sidebar-collapse-control-icon .collapse-icon-collapsed {
    display: none;
}

.sidebar-collapse-control-icon.is-collapsed .collapse-icon-expanded {
    display: none;
}

.sidebar-collapse-control-icon.is-collapsed .collapse-icon-collapsed {
    display: block;
}

.layout.layout-sidebar-collapsed {
    grid-template-columns: 58px minmax(0, 1fr);
}

.left-menu.left-menu-collapsed {
    width: auto;
    overflow: hidden;
}

.left-menu.left-menu-collapsed .enterprise-sidebar-card {
    width: 42px;
    justify-content: center;
    padding: 0;
}

.left-menu.left-menu-collapsed .enterprise-sidebar-info,
.left-menu.left-menu-collapsed .menu-item-label,
.left-menu.left-menu-collapsed .menu-expand-icon,
.left-menu.left-menu-collapsed .registration-menu-dot,
.left-menu.left-menu-collapsed .sub-menu {
    display: none !important;
}

.left-menu.left-menu-collapsed .sidebar-section-title {
    width: 42px;
    padding: 0 4px;
    color: var(--proto-text-tertiary);
}

.left-menu.left-menu-collapsed > .menu-item {
    width: 42px;
    flex-shrink: 0;
    justify-content: center;
    gap: 0;
    padding: 0;
}

.left-menu.left-menu-collapsed > .menu-item > .menu-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
}

.left-menu.left-menu-collapsed > .menu-item.active[data-menu="memberDept"],
.left-menu.left-menu-collapsed > .menu-item.active[data-menu="registrationAudit"],
.left-menu.left-menu-collapsed > .menu-item.active[data-menu="settings"] {
    color: var(--proto-blue);
    background: rgba(255, 255, 255, 0.5);
}

.left-menu.left-menu-collapsed > .menu-item.parent-active {
    color: var(--proto-blue);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.left-menu.left-menu-collapsed .sidebar-collapse-control {
    width: 42px;
    justify-content: center;
    gap: 0;
    padding: 0;
}

.left-menu.left-menu-collapsed .sidebar-collapse-control span {
    display: none;
}

/* 收起状态下，对被隐藏文字的一级菜单与分组标题显示原型同款提示层。 */
.collapsed-menu-tooltip {
    position: fixed;
    z-index: 1200;
    max-width: calc(100vw - 82px);
    padding: 7px 12px;
    color: var(--proto-text);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.16);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    pointer-events: none;
    white-space: nowrap;
    overflow-wrap: normal;
    transform: translateY(-50%);
}

/* 组织管理标题沿用原型通用的深色提示层（标题本身是省略文本）。 */
.sidebar-default-tooltip {
    position: fixed;
    z-index: 1200;
    max-width: min(360px, calc(100vw - 24px));
    padding: 7px 10px;
    color: #fff;
    background: var(--proto-text);
    border-radius: 5px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    pointer-events: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* 收起状态下悬浮父级菜单时，按原型在右侧展开浮层二级菜单。 */
.left-menu.left-menu-collapsed > .sub-menu.sub-menu-collapsed-flyout {
    position: fixed;
    z-index: 1100;
    display: flex !important;
    width: 160px;
    height: auto;
    min-height: 0;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 7px;
    overflow: visible;
    background: #fff;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(31, 31, 31, 0.12);
}

.left-menu.left-menu-collapsed > .sub-menu.sub-menu-collapsed-flyout .sub-menu-item {
    width: 146px;
    height: 34px;
    flex: 0 0 34px;
    margin: 0;
    padding: 0 12px;
    gap: normal;
    color: var(--proto-text);
    background: transparent;
    border-radius: 6px;
    font-weight: 400;
    line-height: 34px;
}

.left-menu.left-menu-collapsed > .sub-menu.sub-menu-collapsed-flyout .sub-menu-item:hover,
.left-menu.left-menu-collapsed > .sub-menu.sub-menu-collapsed-flyout .sub-menu-item.active {
    color: var(--proto-blue);
    background: rgba(56, 134, 251, 0.08);
    font-weight: 500;
}

.left-menu.left-menu-collapsed > .sub-menu.sub-menu-collapsed-flyout .sub-menu-badge {
    margin-left: 12px;
}

/* 侧栏内容滚动与底部控制按原型拆分，避免长菜单覆盖收起按钮。 */
.left-menu {
    position: relative;
    overflow: hidden;
}

.left-menu-navigation {
    min-height: 0;
    flex: 1 1 auto;
    padding: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 31, 31, 0.2) transparent;
}

.left-menu-navigation::-webkit-scrollbar {
    width: 4px;
}

.left-menu-navigation::-webkit-scrollbar-track {
    background: transparent;
}

.left-menu-navigation::-webkit-scrollbar-thumb {
    background: rgba(31, 31, 31, 0.2);
    border-radius: 999px;
}

.left-menu-navigation .sidebar-section {
    width: 100%;
    padding: 6px 0;
}

/* 原型用相邻分组的顶部分隔线，颜色与间距都沿用通用 divider，而不是加厚的独立间距。 */
.left-menu-navigation .sidebar-section + .sidebar-section {
    border-top: 1px solid var(--proto-divider);
}

.left-menu-navigation .sidebar-section-title {
    width: 100%;
    margin: 0;
}

.left-menu-navigation .menu-group {
    width: 100%;
    margin-top: 10px;
}

.left-menu-navigation .menu-item {
    display: flex;
    width: 100%;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 12px;
    color: var(--proto-text);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    line-height: 34px;
    text-align: left;
}

.left-menu-navigation .menu-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.left-menu-navigation .menu-item.active {
    color: var(--proto-text);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-weight: 500;
}

.left-menu-navigation .menu-item.parent-active {
    color: var(--proto-blue);
    background: transparent;
    font-weight: 400;
}

.left-menu-navigation .menu-item.active[data-menu="memberDept"],
.left-menu-navigation .menu-item.active[data-menu="registrationAudit"],
.left-menu-navigation .menu-item.active[data-menu="settings"] {
    color: var(--proto-blue);
    background: transparent;
    font-weight: 400;
}

.left-menu-navigation .menu-item > .menu-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: currentColor;
    font-size: 16px;
    stroke: none;
}

.left-menu-navigation .menu-item[data-menu="settings"] > svg:not(.menu-icon):not(.menu-expand-icon) {
    display: none;
}

.left-menu-navigation .menu-item.active[data-menu="memberDept"],
.left-menu-navigation .menu-item.active[data-menu="registrationAudit"],
.left-menu-navigation .menu-item.active[data-menu="settings"] {
    border-radius: 6px;
}

.left-menu-navigation .menu-item > .menu-expand-icon {
    color: #595959;
    fill: #595959;
}

.left-menu-navigation .menu-item.active[data-menu="memberDept"]:hover,
.left-menu-navigation .menu-item.active[data-menu="registrationAudit"]:hover,
.left-menu-navigation .menu-item.active[data-menu="settings"]:hover {
    background: rgba(255, 255, 255, 0.5);
}

.left-menu-navigation .sub-menu {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.left-menu-navigation .sub-menu.is-expanded {
    display: block;
}

.left-menu-navigation .sub-menu-item {
    display: flex;
    width: 100%;
    height: 34px;
    align-items: center;
    margin-top: 10px;
    padding: 0 12px 0 38px;
    color: var(--proto-text);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    line-height: 34px;
    text-align: left;
}

.left-menu-navigation .sub-menu-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.left-menu-navigation .sub-menu-item.active {
    color: var(--proto-text);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-weight: 500;
}

.left-menu.left-menu-collapsed .menu-item {
    width: 42px;
    flex: 0 0 42px;
    justify-content: center;
    gap: 0;
    padding: 0;
}

.left-menu.left-menu-collapsed .menu-item > .menu-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    font-size: 18px;
}

.left-menu.left-menu-collapsed .menu-item.active,
.left-menu.left-menu-collapsed .menu-item.active[data-menu="memberDept"],
.left-menu.left-menu-collapsed .menu-item.active[data-menu="registrationAudit"],
.left-menu.left-menu-collapsed .menu-item.active[data-menu="settings"] {
    color: var(--proto-blue);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.left-menu.left-menu-collapsed .sub-menu.sub-menu-collapsed-flyout {
    position: fixed;
    z-index: 1100;
    display: flex !important;
    width: max-content;
    min-width: 160px;
    max-width: min(320px, calc(100vw - 82px));
    height: auto;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 6px;
    overflow: visible;
    background: #fff;
    border: 1px solid var(--proto-divider);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(31, 31, 31, 0.12);
}

.left-menu.left-menu-collapsed .sub-menu-collapsed-flyout .sub-menu-item {
    width: 100%;
    height: 34px;
    flex: 0 0 34px;
    margin: 0;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 34px;
    white-space: nowrap;
}

.left-menu.left-menu-collapsed .sub-menu-collapsed-flyout .sub-menu-item:hover {
    background: rgba(31, 31, 31, 0.04);
}

.left-menu.left-menu-collapsed .sub-menu-collapsed-flyout .sub-menu-item.active {
    color: var(--proto-blue);
    background: rgba(56, 134, 251, 0.08);
    font-weight: 500;
}

.left-menu.left-menu-collapsed .sub-menu-collapsed-flyout .sub-menu-badge {
    flex: 0 0 auto;
    margin-left: 12px;
}

.sidebar-collapse-control {
    position: static;
    bottom: auto;
    left: auto;
    display: flex;
    width: 100%;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    gap: 12px;
    margin: 4px 0 0;
    padding: 0 12px;
    color: rgba(23, 26, 29, 0.6);
    background: transparent;
    border: 0;
    border-top: 1px solid var(--proto-divider);
    border-radius: 4px;
    font-size: 12px;
    line-height: 40px;
    text-align: left;
}

.sidebar-collapse-control:hover,
.sidebar-collapse-control:focus-visible {
    background: rgba(255, 255, 255, 0.5);
    outline: 0;
}

.sidebar-collapse-control-icon {
    display: inline-flex;
}

.left-menu.left-menu-collapsed .sidebar-collapse-control {
    width: 100%;
    justify-content: center;
    gap: 0;
    padding: 0;
}

.left-menu.left-menu-collapsed .enterprise-sidebar-card {
    padding: 0 8px;
}

/* 成员列表工具栏与原型保持一致：搜索图标与输入框合并，保留原搜索按钮事件作为隐藏兼容入口。 */
.member-toolbar-search {
    width: 220px;
    min-width: 160px;
    flex: 0 1 220px;
}

.member-toolbar-search .admin-search-field {
    display: flex;
    width: 100%;
    height: 32px;
    box-sizing: border-box;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    color: var(--proto-text-tertiary);
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 6px;
}

.member-toolbar-search .admin-search-field:focus-within {
    border-color: var(--proto-blue);
    box-shadow: 0 0 0 2px rgba(56, 134, 251, 0.12);
}

.member-toolbar-search .member-search-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: currentColor;
}

.member-toolbar-search .admin-search-field input {
    width: 100%;
    min-width: 0;
    height: auto;
    flex: 1 1 0%;
    padding: 0;
    color: var(--proto-text);
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: 0;
    font-size: 14px;
    line-height: 21px;
}

.member-toolbar-search .admin-search-field input::placeholder {
    color: var(--proto-text-tertiary);
}

.member-toolbar-search > #btnSearch {
    display: none;
}

/* 成员表格保留现有接口字段，视觉样式按原型对齐。 */
#memberTable.member-data-table {
    min-width: 920px;
    table-layout: fixed;
}

#memberTable.member-data-table td {
    box-sizing: border-box;
    font-size: 14px;
    line-height: 21px;
    white-space: normal;
}

#memberTable.member-data-table th {
    height: auto;
    font-size: 14px;
    line-height: 21px;
}

#memberTable.member-data-table th:first-child,
#memberTable.member-data-table td:first-child {
    width: 48px;
    min-width: 48px;
}

#memberTable.member-data-table th:nth-child(2),
#memberTable.member-data-table td:nth-child(2) { width: 180px; }
#memberTable.member-data-table th:nth-child(3),
#memberTable.member-data-table td:nth-child(3) { width: 92px; }
#memberTable.member-data-table th:nth-child(4),
#memberTable.member-data-table td:nth-child(4) { width: 112px; }
#memberTable.member-data-table th:nth-child(5),
#memberTable.member-data-table td:nth-child(5) { width: 92px; }
#memberTable.member-data-table th:nth-child(6),
#memberTable.member-data-table td:nth-child(6) { width: 132px; }
#memberTable.member-data-table th:nth-child(7),
#memberTable.member-data-table td:nth-child(7) { width: 210px; }
#memberTable.member-data-table th:nth-child(8),
#memberTable.member-data-table td:nth-child(8) { width: 88px; }

#memberTable.member-data-table th:first-child input,
#memberTable.member-data-table td:first-child input {
    display: block;
    margin: 0;
}

#memberTable.member-data-table td:nth-child(4),
#memberTable.member-data-table td:nth-child(5),
#memberTable.member-data-table td:nth-child(6),
#memberTable.member-data-table td:nth-child(7) {
    white-space: normal;
    word-break: break-word;
}

#memberTable.member-data-table td.op-col {
    overflow: visible;
    white-space: nowrap;
}

#memberTable.member-data-table td.op-col.op-menu-active {
    z-index: 10;
}

#memberTable.member-data-table .op-more-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

#memberTable.member-data-table .member-name-info {
    display: block;
}

#memberTable.member-data-table .member-avatar {
    line-height: 18px;
}

#memberTable.member-data-table .member-name-text {
    font-weight: 700;
}

#memberTable.member-data-table .member-name-info .role-tag {
    margin-top: 4px;
}

#memberTable.member-data-table .op-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    line-height: 24px;
}

#memberTable.member-data-table .op-more-btn:hover {
    color: var(--proto-blue);
    background: #fff;
}

#memberTable.member-data-table tbody tr:hover > td.op-col {
    background: #f7f8fa;
}

#memberTable.member-data-table .op-more-dropdown {
    min-width: 116px;
}

#memberTable.member-data-table .op-more-dropdown.show {
    display: grid;
}

#memberTable.member-data-table .op-more-dropdown .op-dropdown-item {
    font-size: 14px;
    line-height: 21px;
}

#memberTable.member-data-table .op-more-dropdown .op-dropdown-item.danger {
    color: #e53e3e;
}

#memberTable.member-data-table .op-more-dropdown .op-dropdown-item.danger:hover {
    background: #f7f8ff;
}

#memberTable.member-data-table .more-action-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: currentColor;
}

/* 表头必须位于 sticky 操作单元格之上，否则垂直滚动时行内三点按钮会覆盖“操作”表头。 */
#memberTable.member-data-table thead {
    z-index: 5;
}

/* 操作列表头与行内三点菜单使用不同的语义和层级。 */
#memberTable.member-data-table th.member-operation-header {
    z-index: 4;
    min-width: 88px;
    width: 88px;
    color: var(--proto-text);
    background: #f7f8fa;
    text-align: center;
    white-space: nowrap;
}

#memberTable.member-data-table .member-operation-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#memberTable.member-data-table td.op-col {
    text-align: center;
}

/* 注册管理操作列沿用成员管理的 sticky 层级：表头必须高于行内操作单元格，避免垂直滚动时覆盖“操作”表头。 */
#registrationTable thead {
    z-index: 5;
}

#registrationTable th:last-child {
    z-index: 4;
    color: var(--proto-text);
    background: #f7f8fa;
    white-space: nowrap;
}

#registrationTable tbody tr:hover > td:last-child {
    background: #f7f8fa;
}

/* ===== 工作台应用管理 ===== */
.left-menu-navigation .menu-item[data-menu="workbenchApps"] > .menu-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.left-menu-navigation .menu-item.active[data-menu="workbenchApps"] {
    color: var(--proto-blue, #4f7ff0);
    background: transparent;
}

.workbench-app-panel {
    min-width: 0;
    overflow: auto;
}

#panelWorkbenchApps[style=""] {
    position: relative;
    margin: 48px 12px 12px;
    overflow: visible;
}

.workbench-app-list-view {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.workbench-app-settings-view {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 0 0 24px;
}

.workbench-app-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.workbench-app-search,
.workbench-picker-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 220px;
    height: 32px;
    padding: 0 11px;
    border: 1px solid #d9dce5;
    border-radius: 6px;
    color: #8d93a1;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.workbench-app-search:focus-within,
.workbench-picker-search:focus-within {
    border-color: #5a8df6;
    box-shadow: 0 0 0 3px rgba(79, 127, 240, .1);
}

.workbench-app-search svg,
.workbench-picker-search svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    flex: 0 0 17px;
}

.workbench-app-search input,
.workbench-picker-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #292d3a;
    background: transparent;
    font: inherit;
}

.workbench-app-table-card {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    border: 0;
    border-radius: 0 0 8px 8px;
    background: #fff;
}

.workbench-settings-card {
    min-height: calc(100vh - 226px);
    border: 1px solid #e8eaf0;
    border-radius: 8px;
    background: #fff;
}

.workbench-app-table-wrapper {
    min-height: 0;
    flex: 1;
    margin-top: 16px;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    overflow: auto;
}

.workbench-app-pagination {
    display: flex;
    min-height: 68px;
    flex: 0 0 68px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    color: var(--proto-text-secondary);
    border-top: 1px solid transparent;
    font-size: 14px;
}


.workbench-app-page-numbers {
    display: flex;
    gap: 6px;
}

.workbench-app-page-nav {
    width: auto;
}

.workbench-app-page-nav:disabled,
.workbench-app-page-numbers .page-btn:disabled {
    color: #c3c6ce;
    border-color: #ebecef;
    cursor: not-allowed;
}

.workbench-app-table {
    min-width: 860px;
}

.workbench-app-table td {
    height: 81px;
    padding: 16px;
    font-size: 14px;
    line-height: 21px;
    vertical-align: middle;
}

.workbench-app-table th {
    height: 48px;
    padding: 13px 16px;
    color: var(--proto-text);
    background: #f7f8fa;
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
}

.workbench-app-table th:nth-child(3),
.workbench-app-table td:nth-child(3) {
    width: 126px;
    white-space: nowrap;
}

.workbench-app-table th:nth-child(4),
.workbench-app-table td:nth-child(4) {
    width: 126px;
    text-align: center;
    white-space: nowrap;
}

.workbench-app-table th:nth-child(5),
.workbench-app-table td:nth-child(5) {
    width: 1%;
    white-space: nowrap;
}

.workbench-app-name-cell {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 205px;
}

.workbench-app-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    overflow: hidden;
    border-radius: 8px;
    color: #4f7ff0;
    background: linear-gradient(145deg, #e9f1ff, #f5f8ff);
}

.workbench-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workbench-app-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.workbench-app-icon-large {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 10px;
}

.workbench-app-name-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.workbench-app-name-copy strong,
.workbench-app-name-copy span,
.workbench-app-developer {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workbench-app-name-copy strong {
    color: var(--proto-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

.workbench-app-name-copy span {
    color: var(--proto-text-tertiary);
    font-size: 12px;
    line-height: 18px;
}

.workbench-app-developer { color: var(--proto-text-secondary); }

.workbench-visibility-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--proto-blue);
    background: #eaf2ff;
    font-size: 14px;
    line-height: 21px;
}

.workbench-app-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    white-space: nowrap;
}

.workbench-link-button {
    border: 0;
    padding: 0;
    color: var(--proto-blue);
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.workbench-link-button:hover { color: var(--proto-blue-hover); }
.workbench-link-button:disabled { color: var(--proto-blue); cursor: not-allowed; opacity: .45; }

.workbench-display-switch {
    position: relative;
    width: 36px;
    height: 20px;
    border: 0;
    border-radius: 999px;
    background: #c8d1dc;
    cursor: pointer;
    transition: background .18s ease;
}

.workbench-display-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(24, 31, 46, .25);
    transition: transform .18s ease;
}

.workbench-display-switch[aria-checked="true"] { background: var(--proto-blue); }
.workbench-display-switch[aria-checked="true"]::after { transform: translateX(16px); }
.workbench-display-switch:disabled { opacity: .55; cursor: wait; }

.workbench-app-empty {
    padding-top: 96px;
    color: #9aa0ad;
}

.workbench-back-button {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    color: #5e6472;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.workbench-back-button:hover { color: #315fca; }
.workbench-back-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.workbench-settings-card {
    min-height: calc(100vh - 122px);
    border: 0;
    border-radius: 0;
    padding: 0;
}

.workbench-settings-header {
    display: flex;
    min-height: 65px;
    align-items: center;
    gap: 18px;
    padding: 0 24px;
    border-bottom: 1px solid var(--proto-divider);
}

.workbench-settings-header h1 {
    margin: 0;
    color: var(--proto-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.workbench-settings-content {
    min-height: 480px;
    padding: 38px 24px 52px;
}

.workbench-settings-app {
    display: flex;
    align-items: center;
    gap: 14px;
}

.workbench-settings-app > div:last-child {
    display: grid;
    gap: 7px;
}

.workbench-settings-label { color: var(--proto-text-tertiary); font-size: 12px; }
.workbench-settings-app strong { color: var(--proto-text); font-size: 14px; font-weight: 500; }

.workbench-visibility-section {
    max-width: 690px;
    margin-top: 42px;
}

.workbench-visibility-section h2 {
    margin: 0;
    color: var(--proto-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.workbench-visibility-fieldset {
    border: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px 38px;
    margin: 24px 0 0;
    padding: 0;
}

.workbench-visibility-fieldset legend {
    position: absolute;
}

.workbench-radio-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: var(--proto-text);
    font-size: 14px;
    cursor: pointer;
}

.workbench-radio-row input {
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    accent-color: var(--proto-blue);
}

.workbench-radio-row span { line-height: 22px; }

.workbench-selected-tags,
.workbench-picker-selected {
    display: flex;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.workbench-selected-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    min-height: 38px;
    margin-top: 12px;
    padding: 4px 8px;
    border: 1px solid var(--proto-border);
    border-radius: 4px;
    background: #fff;
}

.workbench-selection-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 220px;
    min-height: 28px;
    padding: 2px 7px 2px 3px;
    border-radius: 6px;
    color: var(--proto-text-secondary);
    background: #f7f8fa;
    font-size: 14px;
}

.workbench-selection-tag .tag-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    color: var(--proto-blue);
    background: #eaf2ff;
    font-size: 11px;
}

.workbench-selection-tag .tag-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workbench-selection-tag button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 0;
    color: var(--proto-text-tertiary);
    background: transparent;
    cursor: pointer;
}

.workbench-add-selection {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0 4px;
    color: var(--proto-text-tertiary);
    background: transparent;
    font-size: 14px;
    cursor: pointer;
}

.workbench-add-selection:hover { color: var(--proto-blue); }

.workbench-settings-actions {
    display: flex;
    gap: 10px;
    max-width: 690px;
    margin-top: 32px;
}

.workbench-settings-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: inherit;
}

.workbench-organization-modal {
    width: min(760px, calc(100vw - 40px));
    max-width: 760px;
    height: min(570px, calc(100vh - 60px));
    display: flex;
    flex-direction: column;
}

.workbench-modal-close {
    border: 0;
    background: transparent;
    font: inherit;
}

.workbench-organization-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1 1 auto;
    min-height: 0;
}

.workbench-organization-left,
.workbench-organization-right {
    min-width: 0;
    min-height: 0;
    padding: 16px;
}

.workbench-organization-left {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eceef3;
}

.workbench-picker-search { width: 100%; flex: 0 0 34px; }

.workbench-picker-categories {
    display: flex;
    gap: 4px;
    margin-top: 12px;
}

.workbench-picker-categories button {
    border: 0;
    border-radius: 5px;
    padding: 5px 10px;
    color: #687080;
    background: transparent;
    cursor: pointer;
}

.workbench-picker-categories button.active {
    color: #3568d5;
    background: #edf3ff;
}

.workbench-picker-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 38px;
    overflow: hidden;
    color: #343947;
    white-space: nowrap;
}

.workbench-picker-breadcrumbs button {
    overflow: hidden;
    border: 0;
    padding: 0;
    color: #4f7ff0;
    background: transparent;
    text-overflow: ellipsis;
    cursor: pointer;
}

.workbench-picker-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.workbench-picker-row {
    display: grid;
    grid-template-columns: 28px 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    border-bottom: 1px solid #f0f1f4;
}

.workbench-picker-row input { accent-color: #4f7ff0; }

.workbench-picker-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    color: #4f7ff0;
    background: #edf3ff;
    font-size: 12px;
}

.workbench-picker-row-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.workbench-picker-row-copy strong,
.workbench-picker-row-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workbench-picker-row-copy strong { color: #303541; font-size: 13px; }
.workbench-picker-row-copy span { color: #9aa0ad; font-size: 12px; }

.workbench-picker-descend {
    border: 0;
    color: #4f7ff0;
    background: transparent;
    cursor: pointer;
}

.workbench-picker-descend:disabled { color: #c5c9d2; cursor: not-allowed; }

.workbench-picker-empty {
    padding: 72px 12px;
    color: #9aa0ad;
    text-align: center;
}

.workbench-organization-right {
    display: flex;
    flex-direction: column;
}

.workbench-selected-header {
    display: flex;
    align-items: center;
    min-height: 34px;
    color: #343947;
}

.workbench-selected-header strong { font-weight: 400; }

.workbench-picker-selected {
    overflow: auto;
    padding-top: 14px;
}

.workbench-display-popover {
    position: fixed;
    z-index: 1200;
    width: 280px;
    padding: 14px;
    border: 1px solid #e0e3ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(32, 39, 55, .18);
}

.workbench-display-popover p {
    color: #3e4452;
    font-size: 13px;
    line-height: 1.6;
}

.workbench-display-popover > div {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

@media (max-width: 1050px) {
    .workbench-app-table { min-width: 860px; }
    .workbench-app-title-row { align-items: flex-start; }
}

@media (max-width: 760px) {
    .workbench-app-title-row { flex-direction: column; }
    .workbench-app-search { width: 100%; }
    .workbench-organization-body { grid-template-columns: 1fr; overflow: auto; }
    .workbench-organization-left { min-height: 300px; border-right: 0; border-bottom: 1px solid #eceef3; }
    .workbench-organization-right { min-height: 180px; }
}

/* ===== 开发者中心：内部应用开发 ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.left-menu-navigation .menu-item[data-menu="developerPlatform"] > .menu-icon {
    fill: currentColor;
    stroke: none;
}

.internal-app-panel {
    min-width: 0;
    overflow: auto;
}

#panelDeveloperPlatform[style=""] {
    position: relative;
    margin: 48px 12px 12px;
    overflow: visible;
}

.internal-app-list-view {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

.internal-app-title-row {
    justify-content: space-between;
    gap: 24px;
}

.internal-app-title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.internal-app-search {
    display: flex;
    width: 220px;
    height: 32px;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    color: #8d93a1;
    background: #fff;
    border: 1px solid #d9dce5;
    border-radius: 6px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.internal-app-search:focus-within {
    border-color: #5a8df6;
    box-shadow: 0 0 0 3px rgba(79, 127, 240, .1);
}

.internal-app-search svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.internal-app-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--proto-text);
    background: transparent;
    font: inherit;
}

.internal-app-content {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 0 24px;
}

.internal-app-list {
    min-width: 860px;
}

.internal-app-row {
    display: grid;
    min-height: 90px;
    grid-template-columns: minmax(280px, 1.3fr) minmax(220px, .9fr) 126px 112px;
    align-items: center;
    gap: 24px;
    padding: 16px;
    border-bottom: 1px solid var(--proto-divider);
}

.internal-app-row:last-child {
    border-bottom: 0;
}

.internal-app-identity {
    display: flex;
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    gap: 12px;
}

.internal-app-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #AEB7C2;
    border-radius: 8px;
}

.internal-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.internal-app-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.internal-app-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.internal-app-name {
    min-width: 0;
    overflow: hidden;
    color: var(--proto-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    text-overflow: ellipsis;
    white-space: nowrap;
    outline: none;
}

.internal-app-name:focus-visible {
    border-radius: 3px;
    box-shadow: 0 0 0 2px rgba(79, 127, 240, .25);
}

.internal-app-description {
    min-width: 0;
    overflow: hidden;
    color: var(--proto-text-tertiary);
    font-size: 12px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.internal-app-meta {
    display: grid;
    min-width: 0;
    grid-column: 2;
    grid-row: 1;
    gap: 4px;
    color: var(--proto-text-secondary);
    font-size: 13px;
    line-height: 20px;
}

.internal-app-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.internal-app-status {
    display: inline-flex;
    width: max-content;
    grid-column: 3;
    grid-row: 1;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    white-space: nowrap;
}

.internal-app-status-published {
    color: #087443;
    background: #e8f8ef;
}

.internal-app-status-developing {
    color: #6d4abd;
    background: #f0eafd;
}

.internal-app-status-disabled {
    color: #595959;
    background: #d9d9d9;
}

/* 横向滚动时「去开发」固定在右侧，避免操作入口被滚出可视区域。 */
.internal-app-development-wrap {
    position: sticky;
    right: 24px;
    z-index: 2;
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    width: 112px;
    justify-self: end;
    align-items: center;
    align-self: stretch;
    justify-content: flex-end;
    margin: -16px -16px -17px 0;
    padding-right: 16px;
    background: #fff;
}

.internal-app-development-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 12px;
    transform: translateX(-100%);
    pointer-events: none;
    background: linear-gradient(90deg, rgba(31, 31, 31, 0), rgba(31, 31, 31, .12));
}

.internal-app-row:last-child .internal-app-development-wrap {
    margin-bottom: -16px;
}

.internal-app-development-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    color: var(--proto-blue);
    background: transparent;
    border: 0;
    font-size: 14px;
    line-height: 21px;
}

.internal-app-development-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.internal-app-development-action:hover {
    color: var(--proto-blue-hover);
}

.internal-app-development-target {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.internal-app-development-action[aria-disabled="true"] {
    color: #bfc2ca;
    cursor: not-allowed;
}

.internal-app-permission-tip {
    position: absolute;
    right: 0;
    bottom: calc(100% + 7px);
    z-index: 10;
    display: none;
    width: max-content;
    max-width: 220px;
    padding: 6px 10px;
    color: #fff;
    background: #31343d;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
    font-size: 12px;
    line-height: 18px;
}

.internal-app-development-target:hover .internal-app-permission-tip,
.internal-app-development-action:focus-visible + .internal-app-permission-tip {
    display: block;
}

.internal-app-loading,
.internal-app-empty,
.internal-app-error {
    min-height: 240px;
    align-items: center;
    justify-content: center;
    color: var(--proto-text-tertiary);
    font-size: 14px;
}

.internal-app-loading,
.internal-app-empty {
    display: flex;
}

.internal-app-error {
    flex-direction: column;
    gap: 12px;
}

.internal-app-pagination {
    display: flex;
    min-height: 68px;
    flex: 0 0 68px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    color: var(--proto-text-secondary);
    border-top: 1px solid transparent;
    font-size: 14px;
}


.internal-app-page-numbers {
    display: flex;
    gap: 6px;
}

.internal-app-page-nav {
    width: auto;
}

.internal-app-page-nav:disabled,
.internal-app-page-numbers .page-btn:disabled {
    color: #c3c6ce;
    border-color: #ebecef;
    cursor: not-allowed;
}

.internal-app-drawer-layer {
    position: fixed;
    inset: 0;
    z-index: 1300;
    visibility: hidden;
    pointer-events: none;
}

.internal-app-drawer-layer.show {
    visibility: visible;
    pointer-events: auto;
}

.internal-app-drawer-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(18, 26, 39, .48);
    border: 0;
    opacity: 0;
    transition: opacity .2s ease;
}

.internal-app-drawer-layer.show .internal-app-drawer-backdrop {
    opacity: 1;
}

.internal-app-drawer {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: min(550px, 100vw);
    height: 100%;
    flex-direction: column;
    color: var(--proto-text);
    background: #fff;
    box-shadow: -12px 0 32px rgba(22, 31, 48, .12);
    transform: translateX(100%);
    transition: transform .22s ease;
}

.internal-app-drawer-layer.show .internal-app-drawer {
    transform: translateX(0);
}

.internal-app-drawer-header {
    display: flex;
    min-height: 92px;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--proto-divider);
}

.internal-app-drawer-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 27px;
}

.internal-app-drawer-header p {
    margin-top: 4px;
    color: var(--proto-text-tertiary);
    font-size: 12px;
    line-height: 18px;
}

.internal-app-drawer-close {
    width: 30px;
    height: 30px;
    color: #777d89;
    background: transparent;
    border: 0;
    border-radius: 5px;
    font-size: 24px;
    line-height: 28px;
}

.internal-app-drawer-close:hover {
    color: var(--proto-text);
    background: #f6f7f9;
}

.internal-app-drawer-body {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 24px 28px;
}

.internal-app-form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    position: relative;
    margin-bottom: 24px;
}

.internal-app-form-field > label {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
}

.internal-app-form-field input[type="text"],
.internal-app-form-field input[type="url"],
.internal-app-form-field textarea {
    width: 100%;
    color: var(--proto-text);
    background: #fff;
    border: 1px solid var(--proto-border);
    border-radius: 6px;
    outline: 0;
    font: inherit;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.internal-app-form-field input[type="text"] {
    height: 37px;
    padding: 9px 11px;
}

.internal-app-form-field input[type="url"] {
    height: 37px;
    padding: 9px 11px;
}

.internal-app-form-field textarea {
    min-height: 96px;
    padding: 10px 12px 26px;
    max-height: var(--admin-textarea-max-height);
    overflow-y: auto;
    resize: vertical;
}

.internal-app-form-field input[type="text"]:focus,
.internal-app-form-field input[type="url"]:focus,
.internal-app-form-field textarea:focus {
    border-color: #5a8df6;
    box-shadow: 0 0 0 3px rgba(79, 127, 240, .1);
}

.internal-app-form-field.has-error input[type="text"],
.internal-app-form-field.has-error input[type="url"],
.internal-app-form-field.has-error textarea {
    border-color: #e45d65;
}

.internal-app-counter {
    align-self: flex-end;
    color: #8c8c8c;
    font-size: 12px;
    line-height: 20px;
    margin: -4px 0 0;
}

.internal-app-field-error {
    margin-top: 4px;
    color: #d84f57;
    font-size: 12px;
    line-height: 18px;
}

.internal-app-field-error:empty {
    display: none;
}

.internal-app-name-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.internal-app-name-field > label {
    grid-column: 1 / -1;
    grid-row: 1;
}

.internal-app-name-field > input[type="text"] {
    grid-column: 1 / -1;
    grid-row: 2;
}

.internal-app-name-field .internal-app-field-error {
    grid-column: 1;
    grid-row: 3;
    margin-top: -4px;
    line-height: 20px;
}

.internal-app-name-field .internal-app-counter {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
}

/* ===== 内部应用能力配置 ===== */
.internal-app-capability-intro {
    margin-top: 24px;
    padding: 22px 24px;
    border: 1px solid #e8edf4;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fbff 0%, #f7f9fc 100%);
}
.internal-app-capability-intro h2 {
    margin: 0 0 8px;
    color: #253247;
    font-size: 20px;
    line-height: 28px;
}
.internal-app-capability-intro p {
    margin: 0;
    color: #738096;
    font-size: 13px;
    line-height: 22px;
}
.internal-app-doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 14px;
}
.internal-app-doc-links a,
.internal-app-inline-link {
    color: #3886fb;
    text-decoration: none;
}
.internal-app-doc-links a:hover,
.internal-app-inline-link:hover {
    text-decoration: underline;
}
.internal-app-capability-readonly {
    display: grid;
    gap: 0;
    max-width: 820px;
    overflow: hidden;
    border: 1px solid #edf0f4;
    border-radius: 8px;
}
.internal-app-capability-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    min-height: 52px;
    padding: 15px 18px;
    border-bottom: 1px solid #edf0f4;
    font-size: 13px;
}
.internal-app-capability-row:last-child { border-bottom: 0; }
.internal-app-capability-row > span { color: #84909e; }
.internal-app-capability-row > strong { min-width: 0; color: #303947; font-weight: 500; overflow-wrap: anywhere; }
.internal-app-capability-editor {
    max-width: 720px;
    padding: 22px 20px 4px;
    border: 1px solid #edf0f4;
    border-radius: 8px;
    background: #fbfcfe;
}
.internal-app-capability-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 4px 0 18px;
}
.internal-app-platform-fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin: 0 0 24px;
    padding: 0 14px 14px;
    border: 1px solid #e5eaf1;
    border-radius: 7px;
}
.internal-app-platform-fieldset legend {
    padding: 0 6px;
    color: #3a4657;
    font-size: 14px;
    font-weight: 500;
}
.internal-app-platform-fieldset label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4f5b6b;
    font-size: 13px;
}
.internal-app-platform-fieldset input { accent-color: #3886fb; }
.internal-app-platform-fieldset .internal-app-field-hint { flex-basis: 100%; }
.internal-app-field-hint {
    margin: 0;
    color: #8b96a4;
    font-size: 12px;
    line-height: 18px;
}
.internal-app-form-field > label small { color: #99a3af; font-size: 12px; font-weight: 400; }
.internal-app-robot-summary-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 56px;
    padding: 12px 16px;
    border-bottom: 1px solid #edf0f4;
    color: #84909e;
    font-size: 13px;
}
.internal-app-robot-summary-row > strong,
.internal-app-robot-summary-row > div { min-width: 0; color: #303947; font-weight: 500; overflow-wrap: anywhere; }
.internal-app-robot-summary-row > div { display: flex; align-items: center; gap: 12px; }
.internal-app-robot-avatar {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: #edf3ff;
}
.internal-app-robot-avatar img { width: 100%; height: 100%; object-fit: cover; }
.internal-app-robot-avatar svg { width: 27px; height: 27px; }
.internal-app-robot-section .internal-app-capability-readonly > .btn { margin: 16px; }
.internal-app-switch {
    position: relative;
    width: 42px;
    height: 24px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 13px;
    background: #cbd3de;
    cursor: pointer;
    transition: background .18s ease;
}
.internal-app-switch span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(25, 45, 75, .24);
    transition: transform .18s ease;
}
.internal-app-switch.on { background: #3886fb; }
.internal-app-switch.on span { transform: translateX(18px); }
.internal-app-inline-link {
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
}

/* 与开发者中心原型一致的能力详情布局。样式按具体能力页限定，
   不改变凭证和安全设置等其他详情模块。 */
.internal-app-detail-main.capability-detail {
    background: transparent;
}

.internal-app-detail-main.capability-detail > .workspace-module-title {
    display: none;
}

/* 能力详情页的内容面板自带白色卡片，不再叠加详情卡片底色与圆角。 */
.internal-app-detail-main.capability-detail > .internal-app-detail-panel {
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.capability-web-detail > #internalAppWebPanel {
    width: 100%;
    margin: 0;
    padding: 24px;
    overflow: visible;
    border-radius: 8px;
    background: #fff;
}

.capability-web-detail .internal-app-capability-intro {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.capability-web-detail .internal-app-capability-intro h2,
.capability-robot-detail .internal-app-capability-intro h2 {
    margin: 0 0 12px;
    color: #1f1f1f;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

.capability-robot-detail .internal-app-capability-intro h2 {
    margin-bottom: 10px;
}

.capability-web-detail .internal-app-capability-intro p,
.capability-robot-detail .internal-app-capability-intro p {
    margin: 0;
    color: #8c8c8c;
    font-size: 14px;
    line-height: 22px;
}

.capability-web-detail .internal-app-capability-section {
    margin-bottom: 16px;
    padding: 0;
    border-top: 1px solid rgba(31, 31, 31, .06);
    border-bottom: 0;
}

.capability-web-detail .internal-app-detail-section-heading {
    height: 76px;
    margin: 0;
    padding: 24px 0;
    align-items: center;
}

.capability-web-detail .internal-app-detail-section-heading .internal-app-icon-button {
    width: 28px;
    height: 28px;
}

.capability-web-detail .internal-app-detail-section-heading h3 {
    margin: 0;
    color: #1f1f1f;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.capability-web-detail .internal-app-capability-readonly {
    max-width: none;
    padding: 4px 0 12px;
    border: 0;
    border-radius: 0;
}

.capability-web-detail .internal-app-capability-row {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 48px;
    padding: 0;
    border-bottom: 1px solid rgba(31, 31, 31, .06);
    font-size: 14px;
    line-height: 21px;
}

.capability-web-detail .internal-app-capability-row > span {
    color: #595959;
    line-height: 22px;
}

.capability-web-detail .internal-app-capability-row > strong {
    min-width: 0;
    color: #1f1f1f;
    font-weight: 400;
    line-height: 22px;
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.capability-web-detail .internal-app-capability-editor {
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.capability-web-detail .internal-app-platform-fieldset {
    display: flex;
    gap: 14px 20px;
    margin: 0 0 24px;
    padding: 0 0 14px;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
}

.capability-web-detail .internal-app-platform-fieldset legend {
    padding: 0;
    color: #1f1f1f;
    font-size: 14px;
    font-weight: 400;
}

.capability-web-detail .internal-app-form-field {
    margin-bottom: 24px;
}

.capability-web-detail .internal-app-form-field input[type="url"] {
    height: 38px;
}

.capability-web-detail .internal-app-capability-actions {
    justify-content: flex-start;
    margin: 0;
    padding-bottom: 12px;
}

/* 编辑态按网页应用原型采用两列表单网格；只限定在网页应用编辑态，
   避免影响已配置只读态和其他能力的编辑器。 */
.capability-web-detail.capability-web-editing .internal-app-detail-section-heading {
    height: 72px;
    padding: 24px 0;
}

.capability-web-detail.capability-web-editing .internal-app-capability-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.capability-web-detail.capability-web-editing .internal-app-platform-fieldset {
    display: block;
    grid-column: 1 / -1;
    width: calc(100% - 4px);
    margin: 0 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #595959;
}

.capability-web-detail.capability-web-editing .internal-app-platform-fieldset legend {
    height: 22px;
    margin: 0;
    padding: 0;
    color: #595959;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.capability-web-detail.capability-web-editing .internal-app-platform-options {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 21px;
    margin: 4px 0 0;
}

.capability-web-detail.capability-web-editing .internal-app-platform-options label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 21px;
    margin: 0;
    color: #1f1f1f;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

.capability-web-detail.capability-web-editing .internal-app-platform-options input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #3886fb;
}

.capability-web-detail.capability-web-editing .internal-app-platform-fieldset .internal-app-field-hint {
    display: block;
    height: 20px;
    margin: 8px 0 0;
    color: #8c8c8c;
    font-size: 12px;
    line-height: 20px;
}

.capability-web-detail.capability-web-editing .internal-app-platform-fieldset .internal-app-field-error:empty {
    display: none;
}

.capability-web-detail.capability-web-editing .internal-app-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #595959;
}

.capability-web-detail.capability-web-editing .internal-app-form-field > label {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 21px;
    margin: 0;
    color: #595959;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

.capability-web-detail.capability-web-editing .internal-app-form-field input[type="url"] {
    height: 36px;
    padding: 7px 11px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    line-height: 21px;
}

.capability-web-detail.capability-web-editing .internal-app-web-backend-field {
    grid-column: 1 / -1;
}

.capability-web-detail.capability-web-editing .internal-app-web-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    height: 76px;
    margin: 0;
    padding: 24px 0 20px;
}

.capability-web-detail.capability-web-editing .internal-app-capability-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    height: 32px;
    margin: 0;
    padding: 0;
}

.capability-web-detail.capability-web-editing .internal-app-capability-actions .btn {
    height: 32px;
    min-height: 32px;
    padding: 0 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 21px;
}

.capability-web-detail.capability-web-editing .internal-app-capability-actions .btn-cancel {
    color: #595959;
    background: #fff;
    border-color: #bfbfbf;
}

.capability-robot-detail .internal-app-detail-main {
    background: transparent;
}

.capability-robot-detail .internal-app-capability-intro {
    min-height: 206px;
    margin: 0 0 16px;
    padding: 24px;
    border: 0;
    border-radius: 8px;
    background: #fff;
}

.capability-robot-detail .internal-app-capability-intro .internal-app-doc-links {
    gap: 20px;
    margin-top: 24px;
}

.capability-robot-detail .internal-app-robot-section {
    min-height: 430px;
    padding: 24px 24px 40px;
    border: 0;
    border-radius: 8px;
    background: #fff;
}

.capability-robot-detail .internal-app-detail-section-heading {
    margin-bottom: 12px;
}

.capability-robot-detail .internal-app-robot-section .internal-app-detail-section-heading {
    justify-content: space-between;
}

.capability-robot-detail .internal-app-robot-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.capability-robot-detail .internal-app-robot-edit {
    min-height: 32px;
    padding: 5px 14px;
}

.capability-robot-detail .internal-app-robot-code-copy {
    margin: 0 0 24px;
    font-size: 14px;
}

.capability-robot-detail .internal-app-robot-section .internal-app-detail-section-heading h3 {
    font-size: 16px;
    font-weight: 500;
}

.capability-robot-detail .internal-app-robot-section .internal-app-switch {
    width: 44px;
    height: 22px;
    margin-left: 0;
}

.capability-robot-detail .internal-app-robot-section .internal-app-switch span {
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
}

.capability-robot-detail .internal-app-robot-section .internal-app-switch.on span {
    transform: translateX(22px);
}

.capability-robot-detail .internal-app-robot-section .internal-app-capability-readonly {
    max-width: 760px;
    border: 0;
    border-radius: 0;
}

.capability-robot-detail .internal-app-robot-summary-row {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
    min-height: 56px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.capability-robot-detail .internal-app-robot-summary-row:first-child {
    min-height: 96px;
}

.capability-robot-detail .internal-app-robot-summary-row > span:first-child {
    color: #595959;
}

.capability-robot-detail .internal-app-robot-summary-row > strong,
.capability-robot-detail .internal-app-robot-summary-row > div {
    color: #1f1f1f;
    font-weight: 400;
}

.capability-robot-detail .internal-app-robot-section .internal-app-capability-readonly > .btn {
    margin: 16px 0 0;
}

.capability-robot-detail .internal-app-capability-editor {
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.capability-robot-detail .internal-app-capability-actions {
    justify-content: flex-start;
    margin: 0;
}

/* 权限管理与事件订阅在原型中都是一个连续的白色内容面板。 */
.capability-permission-detail > #internalAppPermissionsPanel,
.capability-event-detail > #internalAppEventsPanel {
    width: 100%;
    min-height: 500px;
    margin: 0;
    padding: 24px;
    border-radius: 8px;
    background: #fff;
}

.capability-permission-detail .internal-app-capability-intro,
.capability-event-detail .internal-app-capability-intro {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.capability-permission-detail .internal-app-capability-intro h2,
.capability-event-detail .internal-app-capability-intro h2 {
    margin: 0 0 10px;
    color: #1f1f1f;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

.capability-permission-detail .internal-app-capability-intro p,
.capability-event-detail .internal-app-capability-intro p {
    margin: 0;
    color: #8c8c8c;
    font-size: 14px;
    line-height: 22px;
}

.capability-permission-detail .internal-app-permission-section,
.capability-event-detail .internal-app-event-section {
    padding: 0;
    border: 0;
}

.capability-permission-detail .internal-app-permission-toolbar {
    justify-content: flex-start;
    margin: 24px 0 16px;
}

.internal-app-permission-search {
    display: flex;
    width: 260px;
    height: 32px;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: #bfbfbf;
}

.internal-app-permission-search:focus-within {
    border-color: #3886fb;
    box-shadow: 0 0 0 2px rgba(56, 134, 251, .1);
}

.internal-app-permission-search svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: currentColor;
}

.internal-app-permission-search input {
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 0;
    border: 0;
    outline: 0;
    color: #1f1f1f;
    background: transparent;
    font: inherit;
    font-size: 14px;
    line-height: 30px;
}

.internal-app-permission-search input::placeholder {
    color: #bfbfbf;
}

.capability-permission-detail .internal-app-permission-table {
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.capability-permission-detail .internal-app-permission-head,
.capability-permission-detail .internal-app-permission-row {
    grid-template-columns: minmax(120px, 1.1fr) minmax(220px, 1.5fr) minmax(130px, 1fr) minmax(72px, .6fr);
    gap: 16px;
    align-items: center;
    padding: 0 24px;
}

.capability-permission-detail .internal-app-permission-head {
    min-height: 44px;
    color: #8c8c8c;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

/* 权限行行高统一固定为 88px：接口数量不同的权限行保持等高，最多容纳三条接口。 */
.capability-permission-detail .internal-app-permission-row {
    height: 88px;
    border-top: 0;
    border-bottom: 1px solid var(--proto-divider);
    color: #595959;
    font-size: 14px;
    line-height: 22px;
}

.capability-permission-detail .internal-app-permission-row:last-child {
    border-bottom: 0;
}

.internal-app-permission-code-heading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.internal-app-permission-code-heading .internal-app-info-dot {
    width: 14px;
    height: 14px;
    padding: 0;
    border-color: #bfbfbf;
    background: transparent;
    color: #8c8c8c;
    cursor: help;
    font: inherit;
    font-size: 10px;
    line-height: 12px;
}

.internal-app-permission-help {
    position: relative;
    display: inline-flex;
}

.internal-app-permission-tooltip {
    position: absolute;
    z-index: 10;
    bottom: calc(100% + 8px);
    left: 50%;
    width: max-content;
    max-width: 260px;
    padding: 7px 10px;
    border-radius: 4px;
    background: rgba(31, 31, 31, .9);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(2px);
    transition: opacity .15s ease, transform .15s ease;
}

.internal-app-permission-help:hover .internal-app-permission-tooltip,
.internal-app-permission-help:focus-within .internal-app-permission-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.internal-app-permission-name {
    color: #1f1f1f;
    font-weight: 400;
}

.internal-app-permission-apis {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.capability-permission-detail .internal-app-permission-api {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #595959;
    font-size: 14px;
}

.internal-app-permission-doc-button {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    color: #3886fb;
    text-decoration: none;
}

.internal-app-permission-doc-button:hover {
    background: rgba(56, 134, 251, .08);
}

.internal-app-permission-doc-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: #3886fb;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.3;
}

.internal-app-permission-code code {
    color: #8c8c8c;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
}

.internal-app-permission-category {
    justify-self: start;
    padding: 4px 8px;
    border-radius: 5px;
    background: #f1f4f8;
    color: #595959;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
}

.capability-permission-detail .internal-app-empty {
    min-height: 162px;
    padding: 70px 20px;
}

.capability-permission-detail .internal-app-error,
.capability-event-detail .internal-app-error {
    margin-top: 16px;
}

.capability-event-detail .internal-app-capability-intro .internal-app-doc-links {
    margin-top: 24px;
}

.capability-event-detail .internal-app-capability-intro .internal-app-doc-links a {
    font-size: 14px;
    line-height: 22px;
}

.capability-event-detail .internal-app-event-section {
    margin-top: 24px;
    max-width: 1000px;
}

.capability-event-detail .internal-app-detail-section-heading {
    min-height: 41px;
    gap: 8px;
    margin: 0;
    padding: 0 0 16px;
    border-bottom: 1px solid #f0f0f0;
}

.capability-event-detail .internal-app-detail-section-heading h3,
.capability-event-detail .internal-app-event-list h3,
.capability-event-detail .internal-app-event-unconfigured h3 {
    margin: 0;
    color: #1f1f1f;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.capability-event-detail .internal-app-event-edit {
    width: 28px;
    height: 28px;
}

.capability-event-detail .internal-app-capability-readonly {
    max-width: none;
    padding: 24px 0 0;
    border: 0;
    border-radius: 0;
}

.capability-event-detail .internal-app-capability-readonly .internal-app-capability-row {
    grid-template-columns: 144px minmax(0, 520px);
    align-items: center;
    min-height: 48px;
    padding: 0;
    border-bottom: 0;
    font-size: 14px;
    line-height: 22px;
}

.capability-event-detail .internal-app-capability-readonly .internal-app-capability-row > span {
    color: #595959;
}

.capability-event-detail .internal-app-capability-readonly .internal-app-capability-row > strong {
    color: #1f1f1f;
    font-weight: 400;
}

.capability-event-detail .internal-app-capability-editor {
    max-width: none;
    padding: 24px 0 0;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.capability-event-detail .internal-app-event-push-type {
    display: flex;
    gap: 12px;
    min-height: 22px;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    color: #595959;
    font-size: 14px;
    line-height: 22px;
}

.capability-event-detail .internal-app-event-push-type > span {
    color: #595959;
}

.capability-event-detail .internal-app-event-push-type > strong {
    color: #1f1f1f;
    font-weight: 400;
}

.capability-event-detail .internal-app-form-field {
    gap: 8px;
    margin-bottom: 24px;
}

.capability-event-detail .internal-app-form-field > label {
    color: #595959;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.capability-event-detail .internal-app-form-field input[type="url"],
.capability-event-detail .internal-app-secret-input input {
    width: 100%;
    height: 36px;
    min-width: 0;
    padding: 7px 11px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    outline: 0;
    color: #1f1f1f;
    background: #fff;
    font: inherit;
    font-size: 14px;
    line-height: 20px;
}

.capability-event-detail .internal-app-form-field input:focus {
    border-color: #3886fb;
    box-shadow: 0 0 0 2px rgba(56, 134, 251, .1);
}

.capability-event-detail .internal-app-secret-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px 36px;
    gap: 0;
}

.capability-event-detail .internal-app-secret-input input {
    border-radius: 4px 0 0 4px;
}

/* 安全设置在原型中同样是连续的白色内容面板，标题区拍平并把「编辑」放在右侧。 */
.capability-security-detail > #internalAppSecurityPanel {
    width: 100%;
    margin: 0;
    padding: 24px;
    border-radius: 8px;
    background: #fff;
}

.capability-security-detail .internal-app-capability-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.capability-security-detail .internal-app-capability-intro h2 {
    margin: 0 0 12px;
    color: #1f1f1f;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

.capability-security-detail .internal-app-capability-intro p {
    margin: 0;
    color: #8c8c8c;
    font-size: 14px;
    line-height: 22px;
}

.capability-security-detail .internal-app-security-edit {
    flex: 0 0 auto;
    height: 32px;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 4px;
    color: #595959;
    background: #fff;
    border-color: #bfbfbf;
    font-size: 14px;
    font-weight: 400;
}

.capability-security-detail .internal-app-security-edit:hover {
    color: #3886fb;
    background: #fff;
    border-color: #bfbfbf;
}

.capability-security-detail .internal-app-security-edit svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.capability-security-detail .internal-app-security-section {
    max-width: 1000px;
    padding: 0;
    border: 0;
}

.capability-security-detail .internal-app-capability-readonly {
    display: block;
    max-width: 760px;
    padding: 4px 0 12px;
    border: 0;
    border-radius: 0;
}

.capability-security-detail .internal-app-capability-row {
    display: grid;
    min-height: 56px;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 0;
    border-bottom: 1px solid rgba(31, 31, 31, .06);
    font-size: 14px;
}

.capability-security-detail .internal-app-capability-row:last-child {
    border-bottom: 0;
}

.capability-security-detail .internal-app-capability-row > span {
    color: #8c8c8c;
    font-size: 14px;
    line-height: 22px;
}

.capability-security-detail .internal-app-capability-row > strong {
    min-width: 0;
    color: #1f1f1f;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    overflow-wrap: anywhere;
}

.capability-security-detail .internal-app-capability-editor {
    max-width: 1000px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.capability-security-detail .internal-app-form-field {
    gap: 0;
    margin: 0 0 24px;
}

.capability-security-detail .internal-app-form-field > label {
    margin: 0 0 8px;
    color: #1f1f1f;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    white-space: nowrap;
}

.capability-security-detail .internal-app-form-field textarea {
    display: block;
    width: 100%;
    height: 76px;
    min-height: 76px;
    max-height: var(--admin-textarea-max-height);
    padding: 4px 11px;
    color: #1f1f1f;
    background: #fff;
    border: 1px solid rgba(126, 134, 142, .24);
    border-radius: 4px;
    font: inherit;
    font-size: 14px;
    line-height: 22px;
    resize: vertical;
    overflow-y: auto;
}

.capability-security-detail .internal-app-form-field textarea::placeholder {
    color: #bfbfbf;
}

.capability-security-detail .internal-app-form-field textarea:focus {
    border-color: #3886fb;
    box-shadow: 0 0 0 2px #3886fb1f;
}

.capability-security-detail .internal-app-form-field.has-error textarea {
    border-color: #ff4d4f;
}

.capability-security-detail .internal-app-field-error {
    margin: 4px 0 0;
    color: #ff4d4f;
    font-size: 13px;
    line-height: 20px;
}

.capability-security-detail .internal-app-field-hint {
    margin: 4px 0 0;
    color: #8c8c8c;
    font-size: 12px;
    line-height: 20px;
}

.capability-security-detail .internal-app-field-hint a {
    margin-left: 8px;
    color: #3886fb;
    font-size: inherit;
    font-weight: 400;
    text-decoration: none;
}

.capability-security-detail .internal-app-field-hint a:hover {
    color: #0958d9;
}

.capability-security-detail .internal-app-capability-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 0;
    padding-bottom: 12px;
}

.capability-security-detail .internal-app-capability-actions .btn {
    height: 32px;
    min-height: 32px;
    min-width: 64px;
    padding: 0 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

.capability-security-detail .internal-app-capability-actions .btn-cancel {
    color: #595959;
    background: #fff;
    border: 1px solid #bfbfbf;
}

.internal-app-event-secret-action {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d9d9d9;
    border-left: 0;
    background: #fff;
    color: #8c8c8c;
    cursor: pointer;
}

.internal-app-event-secret-action:last-child {
    border-radius: 0 4px 4px 0;
}

.internal-app-event-secret-action:hover,
.internal-app-event-secret-action:focus-visible {
    color: #3886fb;
}

.internal-app-event-secret-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.internal-app-event-secret-action svg[viewBox="64 64 896 896"] {
    fill: currentColor;
    stroke: none;
}

.internal-app-event-secret-toggle .event-eye-on,
.internal-app-event-secret-toggle[aria-pressed="true"] .event-eye-off {
    display: none;
}

.internal-app-event-secret-toggle[aria-pressed="true"] .event-eye-on {
    display: block;
}

.capability-event-detail .internal-app-event-request-hint {
    color: #8c8c8c;
    line-height: 20px;
}

.capability-event-detail .internal-app-event-request-hint a {
    color: #3886fb;
    text-decoration: none;
}

.capability-event-detail .internal-app-capability-actions {
    justify-content: flex-start;
    margin: 4px 0 0;
}

.capability-event-detail .internal-app-event-unconfigured,
.capability-event-detail .internal-app-event-list {
    max-width: 1000px;
    margin-top: 24px;
    padding: 0;
    border: 0;
}

.capability-event-detail .internal-app-event-unconfigured h3,
.capability-event-detail .internal-app-event-list h3 {
    padding: 0;
    border: 0;
}

.internal-app-event-divider {
    height: 1px;
    margin-top: 14px;
    background: #f0f0f0;
}

.capability-event-detail .internal-app-event-unconfigured p {
    margin: 22px 0 0;
    color: #8c8c8c;
    font-size: 14px;
    line-height: 22px;
}

.internal-app-event-options {
    display: grid;
    max-width: 860px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.capability-event-detail .internal-app-event-row {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 12px;
    min-height: 62px;
    padding: 11px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fafafa;
    color: #595959;
    font-size: 14px;
    line-height: 22px;
}

.internal-app-event-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.internal-app-event-copy strong {
    color: #595959;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
}

.internal-app-event-copy small {
    overflow: hidden;
    color: #8c8c8c;
    background: transparent;
    font-family: inherit;
    font-size: 11px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.capability-event-detail .internal-app-event-switch {
    position: relative;
    width: 36px;
    min-width: 36px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #bfbfbf;
    color: transparent;
    cursor: pointer;
    transition: background-color .18s ease;
}

.capability-event-detail .internal-app-event-switch[aria-checked="true"] {
    border-color: transparent;
    background: #3886fb;
}

.internal-app-event-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: none;
    transition: transform .18s ease;
}

.internal-app-event-switch[aria-checked="true"] .internal-app-event-switch-thumb {
    transform: translateX(16px);
}

.internal-app-event-switch:focus-visible {
    outline: 2px solid rgba(56, 134, 251, .35);
    outline-offset: 2px;
}

.internal-app-event-switch:disabled {
    cursor: wait;
    opacity: .58;
}

@media (max-width: 600px) {
    /* 创建应用抽屉在窄屏下占满宽度，图标与说明文字改为顶部对齐。 */
    .internal-app-drawer-body .internal-app-upload-row {
        align-items: flex-start;
    }
}

.internal-app-upload-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.internal-app-icon-preview-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    overflow: visible;
}

.internal-app-icon-picker {
    display: flex;
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    border: 1px dashed #d9d9d9;
    border-radius: 5px;
}

.internal-app-icon-preview-wrap .internal-app-icon-picker {
    width: 100%;
    height: 100%;
    flex: none;
}

.internal-app-icon-picker:hover {
    border-color: var(--proto-blue);
}

.internal-app-icon-picker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.internal-app-icon-default svg {
    width: 56px;
    height: 56px;
}

.internal-app-upload-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.internal-app-upload-copy p {
    color: var(--proto-text-tertiary);
    font-size: 12px;
    line-height: 18px;
}

.internal-app-upload-trigger {
    width: max-content;
    padding: 0;
    color: var(--proto-text);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
}

.internal-app-upload-trigger:hover {
    color: var(--proto-blue);
}

.internal-app-icon-remove {
    position: absolute;
    z-index: 1;
    top: -7px;
    right: -7px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    padding: 0;
    color: #595959;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 50%;
    cursor: pointer;
}

.internal-app-icon-remove svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.internal-app-icon-remove:hover {
    color: #ff4d4f;
    border-color: #ff7875;
}

.capability-robot-detail .internal-app-robot-avatar-field {
    gap: 8px;
}

.capability-robot-detail .internal-app-robot-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #f5f5f5;
}

.capability-robot-detail .internal-app-robot-avatar svg {
    width: 100%;
    height: 100%;
}

.capability-robot-detail .internal-app-robot-field-heading {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #1f1f1f;
    font-size: 14px;
    line-height: 22px;
}

.capability-robot-detail .internal-app-robot-field-heading > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.capability-robot-detail label[for="internalAppRobotNameInput"] {
    gap: 0;
    margin-bottom: 1px;
    color: #1f1f1f;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.capability-robot-detail label[for="internalAppRobotNameInput"] .required {
    margin-right: 0;
    margin-left: 4px;
    color: #ff4d4f;
}

.capability-robot-detail .internal-app-robot-use-app-icon,
.capability-robot-detail #btnUseInternalAppName {
    padding: 0;
    color: #3886fb;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    text-decoration: none;
}

.capability-robot-detail #btnUseInternalAppName {
    margin-left: 20px;
}

.capability-robot-detail .internal-app-robot-use-app-icon:hover,
.capability-robot-detail #btnUseInternalAppName:hover {
    color: #0d50d9;
    text-decoration: none;
}

.capability-robot-detail .internal-app-robot-use-app-icon:disabled,
.capability-robot-detail #btnUseInternalAppName:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.capability-robot-detail .internal-app-robot-use-app-icon:disabled:hover,
.capability-robot-detail #btnUseInternalAppName:disabled:hover {
    color: #3886fb;
}

.capability-robot-detail .internal-app-robot-upload-row {
    align-items: flex-start;
}

.capability-robot-detail .internal-app-robot-icon-picker {
    position: relative;
    display: block;
    width: 104px;
    height: 104px;
    flex: 0 0 104px;
    padding: 0;
    background: #f5f5f5;
    border: 1px dashed #d9d9d9;
    border-radius: 0;
    cursor: pointer;
}

.capability-robot-detail .internal-app-robot-icon-picker .internal-app-icon-default,
.capability-robot-detail .internal-app-robot-icon-picker img {
    display: block;
    width: 100%;
    height: 100%;
}

.capability-robot-detail .internal-app-robot-icon-picker .internal-app-icon-default svg {
    width: 100%;
    height: 100%;
}

.capability-robot-detail .internal-app-robot-upload-trigger {
    position: absolute;
    right: 0;
    bottom: 0;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #fff;
    background: #0000007a;
    pointer-events: none;
}

.capability-robot-detail .internal-app-robot-upload-trigger svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.capability-robot-detail .internal-app-robot-avatar-field > .internal-app-field-hint {
    color: #8c8c8c;
    line-height: 20px;
}

.internal-app-drawer-footer {
    display: flex;
    min-height: 70px;
    flex: 0 0 70px;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--proto-divider);
}

.internal-app-publish-reminder {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin: 0 0 20px;
    padding: 0 18px;
    color: #6d5631;
    background: #fff6df;
    border-radius: 10px;
}

.internal-app-publish-reminder-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    color: #d99b2b;
    border: 2px solid #d99b2b;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.internal-app-publish-reminder-close {
    margin-left: auto;
    color: #8d8068;
    background: transparent;
    border: 0;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

/* 版本管理页与版本详情在原型中位于内容卡片内并自带页头，因此隐藏共享的详情标题行。 */
.internal-app-detail-main.internal-app-version-page > .workspace-module-title { display: none; }
.internal-app-detail-main.internal-app-version-page > .internal-app-detail-panel { padding: 24px; border-radius:8px; }

/* 成员管理页与版本管理页一样自带页头，隐藏共享的详情标题行。 */
.internal-app-detail-main.internal-app-members-page > .workspace-module-title { display: none; }
.internal-app-detail-main.internal-app-members-page > .internal-app-detail-panel { padding: 24px; border-radius:8px; }

.internal-app-members-heading {
    display: flex;
    align-items: flex-start;
    margin: 0 0 24px;
}

.internal-app-members-heading h2 {
    margin: 0 0 12px;
    color: var(--proto-text);
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

.internal-app-members-heading p {
    margin: 0;
    color: var(--proto-text-tertiary);
    font-size: 14px;
    line-height: 22px;
}

.internal-app-version-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.internal-app-version-page-heading h2 {
    margin: 0 0 12px;
    color: var(--proto-text);
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

.internal-app-version-page-heading p {
    margin: 0;
    color: var(--proto-text-tertiary);
    font-size: 14px;
    line-height: 22px;
}

.internal-app-version-create {
    height: 32px;
    padding: 0 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    box-shadow: none;
}

.internal-app-version-create svg { width: 16px; height: 16px; fill: currentColor; }
.internal-app-version-create:disabled,
.internal-app-version-create:disabled:hover { color: #bfbfbf; background: #f5f5f5; border-color: #d9d9d9; box-shadow: none; cursor: not-allowed; opacity: 1; }

.internal-app-version-table { overflow-x: auto; }

.internal-app-version-table-head,
.internal-app-version-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 90px;
    align-items: center;
    gap: 16px;
    min-width: 760px;
    padding: 0 24px;
}

.internal-app-version-table-head {
    min-height: 44px;
    color: var(--proto-text-tertiary);
    background: #fafafa;
    border-bottom: 1px solid var(--proto-divider);
    font-size: 14px;
}

.internal-app-version-row {
    min-height: 64px;
    color: var(--proto-text-secondary);
    border-bottom: 1px solid var(--proto-divider);
    font-size: 14px;
}

.internal-app-version-row:last-child { border-bottom: 0; }
.internal-app-version-row:hover { background: #fbfdff; }
.internal-app-version-row strong { color: var(--proto-text); font-size: 14px; font-weight: 400; }
.internal-app-version-publisher,
.internal-app-version-published-at { font-size: 14px; }
.internal-app-version-status { display: inline-flex; width: max-content; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 5px; font-size: 11px; font-weight: 600; line-height: 1.2; }
.internal-app-version-status.is-draft { color: #6d4abd; background: #f0eafd; }
.internal-app-version-status.is-published { color: #087443; background: #e8f8ef; }
.internal-app-version-action { padding: 0; color: var(--proto-blue); background: transparent; border: 0; font-size: 14px; font-weight: 400; cursor: pointer; white-space: nowrap; }
.internal-app-version-action:hover { color: #174a9b; }
.internal-app-version-empty { display: flex; min-height: 240px; align-items: center; justify-content: center; padding: 0; text-align: center; }
.internal-app-version-loading { padding: 36px; color: var(--proto-text-tertiary); text-align: center; }
.internal-app-version-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 16px; color: #a43f45; background: #fff0f0; border-radius: 8px; }

/* 版本详情 */
.internal-app-version-back { display: inline-flex; height: 32px; align-items: center; gap: 6px; margin: 0 0 10px; padding: 0; color: var(--proto-text); background: transparent; border: 0; font-size: 14px; cursor: pointer; }
.internal-app-version-back svg { width: 14px; height: 14px; fill: currentColor; }
.internal-app-version-back:hover { color: var(--proto-blue); }
.internal-app-version-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 38px; }
.internal-app-version-detail-title { display: flex; align-items: center; gap: 10px; }
.internal-app-version-detail-title h2 { margin: 0; color: var(--proto-text); font-size: 20px; font-weight: 500; line-height: 28px; }
.internal-app-version-detail-status { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; color: var(--proto-text-secondary); background: var(--proto-divider); border-radius: 4px; font-size: 12px; line-height: 24px; }
.internal-app-version-detail-status.is-online { color: #00a870; background: rgba(0, 168, 112, 0.1); }
.internal-app-version-actions { display: flex; align-items: center; gap: 8px; }
.internal-app-version-actions .btn { height: 32px; padding: 0 16px; border-radius: 4px; font-size: 14px; font-weight: 400; }
.internal-app-version-actions .btn-outline { color: var(--proto-text-secondary); border-color: var(--proto-border); }
.internal-app-version-detail-description { margin: 10px 0 26px; color: var(--proto-text-tertiary); font-size: 14px; line-height: 22px; }
.internal-app-version-detail-fields,
.internal-app-version-editor { display: flex; flex-direction: column; gap: 22px; }
.internal-app-version-detail-field { display: flex; flex-direction: column; gap: 10px; color: var(--proto-text); font-size: 14px; }
.internal-app-version-detail-field > span { line-height: 22px; }
.internal-app-version-detail-field .required { margin-right: 0; margin-left: 4px; color: #ff4d4f; }
.internal-app-version-detail-field > strong { min-height: 32px; color: var(--proto-text); font-size: 14px; font-weight: 400; line-height: 32px; word-break: break-word; }
.internal-app-version-detail-description-value { white-space: pre-line; }
.internal-app-version-detail-field input,
.internal-app-version-detail-field textarea { width: 100%; padding: 7px 11px; color: var(--proto-text); background: #fff; border: 1px solid var(--proto-border); border-radius: 4px; outline: 0; box-sizing: border-box; font: inherit; font-size: 14px; }
.internal-app-version-detail-field input { height: 36px; }
.internal-app-version-detail-field textarea { min-height: 76px; max-height: var(--admin-textarea-max-height); overflow-y: auto; resize: vertical; line-height: 22px; }
.internal-app-version-detail-field input:focus,
.internal-app-version-detail-field textarea:focus { border-color: var(--proto-blue); box-shadow: 0 0 0 2px rgba(56, 134, 251, 0.12); }
.internal-app-version-change-section { margin-top: 24px; }
.internal-app-version-change-section h3 { margin: 0 0 12px; color: var(--proto-text); font-size: 14px; font-weight: 400; line-height: 22px; }
.internal-app-version-change-panel { padding: 24px; background: #fafafa; }
.internal-app-version-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: stretch; gap: 16px; }
.internal-app-version-section-card { display: flex; max-height: 320px; min-height: 0; flex-direction: column; padding: 16px; overflow: hidden; background: #fff; border: 1px solid var(--proto-divider); border-radius: 6px; }
.internal-app-version-section-card h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--proto-text); font-size: 14px; font-weight: 400; line-height: 22px; }
.internal-app-version-section-card h4 svg { width: 16px; height: 16px; fill: currentColor; }
.internal-app-version-section-card p { margin: 0; color: var(--proto-text-secondary); font-size: 14px; line-height: 22px; }
.internal-app-version-section-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.internal-app-version-changes { margin: 0; padding: 0; list-style: none; }
.internal-app-version-changes li { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-bottom: 1px solid var(--proto-divider); }
.internal-app-version-changes li:first-child { padding-top: 0; }
.internal-app-version-changes li:last-child { border-bottom: 0; }
.internal-app-version-changes span { color: var(--proto-text-tertiary); font-size: 12px; line-height: 18px; }
.internal-app-version-changes strong { overflow: hidden; color: var(--proto-text); font-size: 14px; font-weight: 400; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
.internal-app-version-creator-row { display: grid; min-height: 54px; grid-template-columns: 160px minmax(0, 1fr); align-items: center; margin-top: 24px; border-top: 1px solid var(--proto-divider); font-size: 14px; }
.internal-app-version-creator-row span { color: var(--proto-text-secondary); }
.internal-app-version-creator-row strong { color: var(--proto-text); font-weight: 400; }
.internal-app-version-edit-actions { display: flex; align-items: center; gap: 8px; margin-top: 28px; }
.internal-app-version-edit-actions .btn { height: 32px; padding: 0 16px; border-radius: 4px; font-size: 14px; font-weight: 400; }
.internal-app-version-edit-actions .btn-cancel { color: var(--proto-text-secondary); background: #fff; border-color: var(--proto-border); }

@media (max-width: 900px) {
    .internal-app-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .internal-app-title-actions,
    .internal-app-search {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .internal-app-title-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .internal-app-content {
        padding: 0 16px;
    }

    .internal-app-development-wrap {
        right: 16px;
    }

    .internal-app-pagination {
        align-items: flex-end;
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .internal-app-total {
        width: 100%;
    }

    .internal-app-drawer-header,
    .internal-app-drawer-body {
        padding-right: 20px;
        padding-left: 20px;
    }
}
