/* ==================== MCP 面板（顶部说明 + 已安装/可安装 子Tab + 卡片网格） ==================== */
.cam-mcp-panel {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: #f5f5f5;
}
.cam-mcp-header {
    flex-shrink: 0;
    padding: 14px 20px 0;
    background: #fff;
}
.cam-mcp-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cam-mcp-desc {
    font-size: 13px;
    color: #666;
    line-height: 20px;
}
.cam-mcp-add {
    flex-shrink: 0;
    font-size: 13px;
    color: #4D6BFE;
    cursor: pointer;
    padding: 5px 12px;
    border: 1px solid #4D6BFE;
    border-radius: 6px;
    line-height: 18px;
    user-select: none;
    transition: background .2s;
}
.cam-mcp-add:hover {
    background: #f0f3ff;
}
/* 子Tab：已安装 N | 可安装 N（激活项加粗 + 底部指示线） */
.cam-mcp-tabs {
    display: flex;
    gap: 28px;
    margin-top: 12px;
    border-bottom: 1px solid #ececec;
}
.cam-mcp-tab {
    position: relative;
    padding: 8px 2px 10px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
    transition: color .2s;
}
.cam-mcp-tab em {
    font-style: normal;
    margin-left: 2px;
    font-size: 13px;
    color: #999;
}
.cam-mcp-tab:hover {
    color: #333;
}
.cam-mcp-tab.active {
    color: #222;
    font-weight: 600;
}
.cam-mcp-tab.active em {
    color: #222;
}
.cam-mcp-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #222;
    border-radius: 2px;
}
.cam-mcp-body {
    flex: 1;
    min-height: 0;
    overflow: visible;
    padding: 16px 20px 24px;
    box-sizing: border-box;
}
.cam-mcp-section {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}
.cam-mcp-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr)); /* 企业连接器（可安装）一行4个，卡片保底宽度避免过窄 */
    gap: 14px;
}
/* 已安装的 MCP：含状态标签/地址/卸载按钮，内容较多，给更宽卡片避免截断 */
[id$="-page-installed"] .cam-mcp-grid {
    grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
}
.cam-mcp-empty {
    padding: 70px 0;
    text-align: center;
    font-size: 13px;
    color: #999;
}

/* ==================== MCP 卡片（左头像 + 中名称/描述 + 右安装按钮） ==================== */
.cam-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
    min-width: 0;
    cursor: default;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.cam-card:hover {
    border-color: #c6d0ff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.cam-card-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
    flex-shrink: 0;
}
/* 卡片右上角三点更多按钮（接口项/编辑/删除 收纳于下拉，对齐伙伴卡片交互） */
.cam-card-more {
    position: absolute;
    top: 6px;
    right: 10px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
    z-index: 1;
}
.cam-card-more:hover {
    background: #f2f3f5;
}
.cam-card-more span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #999;
}
.cam-card-more:hover span {
    background: #333;
}
.cam-card-main {
    flex: 1;
    min-width: 0;
}
.cam-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding-right: 26px; /* 右侧预留三点按钮，避免挤压标题 */
}
.cam-card-title .cam-title-text {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 卡片标签（企业/已启用/已停用等） */
.cam-card-tag {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 400;
    color: #4D6BFE;
    background: #f0f3ff;
    border-radius: 4px;
    padding: 1px 6px;
    line-height: 16px;
    white-space: nowrap;
}
.cam-tag-on {
    color: #52c41a;
    background: #f0fbe9;
}
.cam-tag-off {
    color: #999;
    background: #f2f2f2;
}
/* MCP 卡片操作（接口项/编辑/删除）已改为右上角三点下拉，见 .cam-card-more */
.cam-card-desc {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    line-height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}
/* 已安装卡片补充的端点地址行 */
.cam-card-url {
    margin-top: 4px;
    font-size: 12px;
    color: #999;
    line-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cam-card-side {
    flex-shrink: 0;
    align-self: flex-end;
    margin-top: 6px;
}
/* 安装/卸载按钮（胶囊形，略小并靠下） */
.cam-install-btn {
    display: inline-block;
    min-width: 46px;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    padding: 0 10px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    color: #333;
    background: #fff;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: border-color .2s, color .2s, background .2s;
    box-sizing: content-box;
}
.cam-install-btn:hover {
    border-color: #4D6BFE;
    color: #4D6BFE;
}
/* 已安装态（可安装Tab中不可再安装） */
.cam-btn-installed,
.cam-btn-installed:hover {
    color: #999;
    border-color: #eee;
    background: #fafafa;
    cursor: default;
}
/* 卸载态（已安装Tab） */
.cam-btn-uninstall {
    color: #e34d59;
    border-color: #f3c4cb;
}
.cam-btn-uninstall:hover {
    border-color: #e34d59;
    color: #e34d59;
    background: #fef0f0;
}

/* ==================== MCP 内容页容器 ==================== */
#connector-tab-content,
#connector-tab-content-menu {
    height: 100%;
    box-sizing: border-box;
}

/* ==================== 接口项配置抽屉（卡片"接口项"按钮打开，内嵌 SmartTable） ==================== */
/* 抽屉内容器：提示条 + 表格填充剩余高度（SmartTable height:'100%' 依赖父级高度） */
.cam-api-smart-wrap {
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 10px 12px 0;
}
.cam-api-smart-tip {
    flex-shrink: 0;
    font-size: 12px;
    color: #999;
    line-height: 18px;
    padding-bottom: 8px;
}
.cam-api-smart-box {
    flex: 1;
    min-height: 0;
}
