/* ============================================================
 * data-move.css
 * 测评指标数据迁移 - 全局样式
 * 命名空间前缀 data-move-，防止与项目其他样式冲突
 * ============================================================ */

.data-move-container {
    --color-matched: #10b981;
    --color-missing: #dc2626;
    --color-unmatched: #f59e0b;
    --color-primary: #1E40AF;
    --color-text: #333;
    --color-text-muted: #666;
    --color-border: #e8e8e8;
    --color-bg: #fafafa;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius-card: 12px;
}

/* ----- 通用卡片 ----- */
.data-move-section-card,
.data-move-container .ant-card,
.data-move-container .ant-modal {
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card) !important;
}

/* ----- 步骤 1 圈定数据范围表单 ----- */
.data-move-scope-form {
    padding: 16px 0;
}

.data-move-scope-form .ant-form-item {
    margin-bottom: 12px;
    margin-right: 16px;
}

/*
 * Step1Scope 检索栏：3 行 search-item 默认全部展开可见。
 *
 * 必须同时覆盖两层：
 *   1. 外层 .root-search（layout.css:348-359 height: 82px）—— 来自 <layouts.Search>
 *   2. 内层 .root-search-wrapper（layout.css:393 height: 83px; overflow: hidden）—— 我自己加的 class
 *
 * 否则外层 82px 仍会锁死，3 行内容溢出后还会被 z-index:999 盖住下方动作卡片。
 */
.root-search.data-move-search {
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 8px !important;
    z-index: 1 !important;        /* 避免盖住下方动作卡片 */
}

.data-move-scope-search {
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    padding: 8px 10px !important;
}

/*
 * search-item 行内 item 间距（layout.css:443 已有 white-space: nowrap，
 * 这里控制 FormItem 之间的 margin，让排版更松散）。
 */
.data-move-scope-search .search-item {
    margin-bottom: 4px;
}

.data-move-scope-search .search-item .ant-form-item {
    margin-right: 12px;
    margin-bottom: 0;
}

.data-move-scope-actions {
    border: 1px solid var(--color-border);
}

.data-move-scope-tips {
    padding: 8px 12px;
    background: #f0f7ff;
    border-left: 3px solid var(--color-primary);
    border-radius: 4px;
}

/* ----- 步骤 2 源/目标指标选择 ----- */
.data-move-target-form {
    padding: 16px 0;
}

.data-move-target-form .ant-form-item {
    min-width: 360px;
}

/* ----- 步骤 3 双栏映射 ----- */
.data-move-mapping-pair {
    background: #fff;
    border-radius: var(--radius-card);
}

.data-move-mapping-pair .ant-table {
    border-radius: 8px;
    overflow: hidden;
}

.data-move-mapping-pair .ant-table-thead > tr > th {
    background: #f0f7ff !important;
    color: var(--color-primary);
    font-weight: 600;
}

/* ----- 步骤 4 底层自动匹配 ----- */
.data-move-step4 .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab {
    border-radius: 6px 6px 0 0;
}

.data-move-step4 .ant-tabs-tab-active {
    background: var(--color-primary) !important;
    color: #fff !important;
}

/* ----- 步骤 5 改写预览 ----- */
.data-move-step5 .data-move-summary-card {
    transition: transform 0.2s;
}

.data-move-step5 .data-move-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ----- JSON 树预览 ----- */
.data-move-tree-preview {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 12px;
    max-height: 480px;
    overflow-y: auto;
}

.data-move-tree-preview .data-move-tree-row {
    transition: background 0.15s;
}

.data-move-tree-preview .data-move-tree-row:hover {
    background: rgba(30, 64, 175, 0.05);
}

.data-move-tree-preview .data-move-tree-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

.data-move-tree-preview .data-move-tree-dot {
    flex-shrink: 0;
}

/* ----- 步骤 6 执行进度 ----- */
.data-move-progress {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

/* ----- 步骤条 ----- */
.data-move-step-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
    overflow-x: auto;
}

.data-move-step-header .data-move-step-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s;
}

.data-move-step-header .data-move-step-item.active {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.data-move-step-header .data-move-step-item.done {
    background: var(--color-matched);
    color: #fff;
}

.data-move-step-header .data-move-step-item.pending {
    background: #f5f5f5;
    color: #999;
}

/* ----- 响应式适配 ----- */
@media (max-width: 768px) {
    .data-move-progress {
        flex-direction: column;
        text-align: center;
    }

    .data-move-mapping-pair .ant-table {
        font-size: 12px;
    }
}
