/* ================================================
   GEO 通用版前端 — Corporate Trust 风格
   Indigo (primary) + Violet (secondary) 渐变签名
   Plus Jakarta Sans 字体 / 蓝紫色调阴影 / 卡片 hover lift
   ================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Corporate Trust Design Tokens */
    --primary: #4F46E5;          /* Indigo 600 - 核心品牌色 */
    --primary-hover: #4338CA;    /* Indigo 700 - hover 态 */
    --primary-light: #EEF2FF;    /* Indigo 50 - 浅色底 */
    --secondary: #7C3AED;        /* Violet 600 - 渐变第二色 */
    --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --success: #4F46E5;          /* Indigo 600 — Corporate Trust 品牌色 */
    --warning: #F59E0B;          /* Amber 500 */
    --danger: #EF4444;           /* Red 500 */
    --text: #0F172A;             /* Slate 900 - 高对比 */
    --text-secondary: #64748B;   /* Slate 500 - 辅助文字 */
    --text-muted: #94A3B8;       /* Slate 400 - 弱化文字 */
    --border: #E2E8F0;           /* Slate 200 - 细线分隔 */
    --bg: #F8FAFC;               /* Slate 50 - 页面背景 */
    --card-bg: #FFFFFF;
    /* 蓝紫色调阴影代替中性灰（Corporate Trust 签名） */
    --shadow: 0 4px 20px -2px rgba(79, 70, 229, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(79, 70, 229, 0.15), 0 8px 10px -6px rgba(79, 70, 229, 0.1);
    --shadow-button: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
}

html, body {
    height: 100%;
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }
.req { color: var(--danger); }

.container { max-width: 960px; margin: 0 auto; padding: 24px 20px 60px; }
.page { display: none; }
.page.active { display: block; }

.page-header { margin-bottom: 20px; }
.page-header h2 { font-size: 22px; font-weight: 600; }
.page-header .sub { color: var(--text-secondary); margin-top: 4px; }

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(79, 70, 229, 0.06);
    transition: all .2s ease;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* ============ 全局流程指示器（整体缩小 + 无横拉条） ============ */
.step-indicator {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; flex-wrap: nowrap;
    overflow-x: visible;                    /* ★ 不要横拉条 */
    padding: 8px 10px;
    margin-bottom: 12px;
}
.si-bar { display: flex; align-items: center; justify-content: center; width: 100%; }
.si-line {
    width: 16px; align-self: center; flex-shrink: 0;
    height: 2px; background: #e2e8f0; border-radius: 1px;
}
.si-step {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 999px;
    background: #f1f5f9; color: #94a3b8;
    font-size: 12px; font-weight: 500;
    border: 1px solid #e2e8f0;
    flex-shrink: 1; min-width: 0;          /* ★ 允许压缩，不溢出 */
    transition: all 0.2s ease;
    white-space: nowrap;
}
.si-num {
    width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    background: transparent; color: inherit;
    flex-shrink: 0;
    border: 1px solid currentColor;
}
.si-label { color: inherit; white-space: nowrap; font-size: 12px; }
.si-done { background: #4F46E5; color: #ffffff; border-color: #4F46E5; }
/* ★ si-done 选中态：白字 + 白圈深靛蓝字 */
.si-done .si-num {
    background: #ffffff;
    color: #4338CA;
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.si-done .si-label { color: #ffffff !important; }    /* ★ 强制白字防覆盖 */
.si-done + .si-line { background: #4F46E5; }
.si-current {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: #ffffff; border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 18px rgba(79,70,229,.40);
    z-index: 1; font-weight: 600;
}
.si-current .si-num {
    background: #ffffff;
    color: #4338CA;
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.si-current .si-label { color: #ffffff !important; }
.si-todo { background: transparent; }
.si-text {
    font-size: 11px; color: #94a3b8; margin-left: auto; align-self: center;
}

/* ============== 导航 ============== */
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 52px;
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand { font-size: 16px; font-weight: 700; color: var(--primary); }
.nav-links { display: flex; gap: 4px; }
.nav-link {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all .15s;
}
.nav-link:hover { color: var(--primary); background: var(--primary-light); }
.nav-link.active { color: var(--primary); background: var(--primary-light); font-weight: 500; }
.user-label { font-size: 12px; color: var(--text-muted); }

/* ============== 按钮 ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: var(--card-bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    gap: 6px;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--gradient-primary); color: #fff; border-color: transparent; box-shadow: var(--shadow-button); }
.btn-primary:hover:not(:disabled) { background: var(--gradient-primary); filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,70,229,.4); }
.btn-secondary { background: #f3f4f6; color: var(--text); border-color: var(--border); white-space: nowrap; }
.btn-secondary:hover:not(:disabled) { background: #e5e7eb; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ============== 表单 ============== */
/* Step1 两栏卡片式布局 */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 4px;
}
.split-col .form-group { margin-bottom: 14px; }
.split-col .form-group:last-child { margin-bottom: 0; }
.split-col .section-title { margin-top: 0; }

.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-group { flex: 1; display: flex; flex-direction: column; }
.form-group label {
    font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary);
}
.form-group input, .form-group select, .form-group textarea {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.form-group textarea { min-height: 40px; resize: vertical; }
.cost-group { flex: 0 0 180px; }
.cost-display {
    padding: 9px 12px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
}

/* ============== 入口页 ============== */
.entry-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.entry-card {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}
.entry-card h1 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.entry-msg { color: var(--text-secondary); margin-bottom: 20px; }
.entry-error {
    background: #fef2f2;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-top: 16px;
}
.entry-loading { margin-top: 16px; }
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
.spinner.small { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    color: var(--primary);
    font-size: 14px;
}

/* ============== 17 题列表 ============== */
.kw-hint {
    background: #fef3c7;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: #92400e;
    font-size: 13px;
    margin-bottom: 14px;
}
.q-list { display: flex; flex-direction: column; gap: 12px; }
.q-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: #fafbfc;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border);
}
.q-item.kw-driven { border-left-color: var(--warning); }
.q-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.q-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: monospace;
}
.q-stage { font-size: 12px; color: var(--text-muted); }
.q-type-tag {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    background: #f3f4f6;
    color: var(--text-secondary);
}
.q-type-tag.kw { background: #fef3c7; color: #92400e; }
.q-item textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 40px;
}
.q-item textarea:focus { outline: none; border-color: var(--primary); }
.q-kw-hint { font-size: 12px; color: var(--warning); margin-top: 2px; }

/* ============== 进度 ============== */
.progress-stage { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.progress-hint {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 16px 0;
}
.progress-phase { font-size: 16px; font-weight: 500; color: var(--text); }
.progress-percent {
    font-size: 24px; font-weight: 700; color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.progress-bar-wrap {
    height: 10px;
    background: #eef1f5;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 24px;
}
.progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #4F46E5 0%, #7C3AED 100%);
    border-radius: 5px;
    transition: width 0.8s ease-out;
}
.progress-timeline { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-step {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    background: #f3f4f6;
    color: var(--text-muted);
}
.timeline-step.active { background: var(--primary); color: #fff; }
.timeline-step.done { background: #EEF2FF; color: var(--primary); }

/* ============== 报告 ============== */
.report-score-row { display: flex; gap: 16px; margin-bottom: 20px; }
.score-card {
    flex: 1;
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
}
.score-card.bcvs-card { border-top: 4px solid var(--primary); }
.score-card.oracle-card { border-top: 4px solid var(--gradient-primary); }
.score-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.score-value {
    font-size: 42px; font-weight: 700; line-height: 1;
    margin-bottom: 6px; font-variant-numeric: tabular-nums;
}
.bcvs-card .score-value { color: var(--primary); }
.oracle-card .score-value { color: #7C3AED; }
.score-sub { font-size: 12px; color: var(--text-muted); }

.stage-bars { display: flex; flex-direction: column; gap: 10px; }
.stage-row { display: flex; align-items: center; gap: 12px; }
.stage-name { width: 72px; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.stage-bar-wrap {
    flex: 1; height: 24px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}
.stage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4F46E5, #7C3AED);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    font-size: 12px;
    color: #fff;
    font-weight: 500;
    min-width: 36px;
    transition: width .6s ease;
}
.stage-score {
    width: 44px;
    font-size: 14px; font-weight: 600;
    text-align: right; font-variant-numeric: tabular-nums;
}

/* ★ 雷达卡片标题跟随画布居中，整卡观感平衡 */
.oracle-radar-card h3 { text-align: center; }
.oracle-radar-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    /* 让雷达图卡片撑满 grid 行高，内部用 flex-grow 填满 → canvas 底部与右列对齐 */
}
.radar-wrap {
    position: relative;
    flex: 1 1 auto;          /* ★ 自动撑满卡片剩余高度 */
    min-height: 280px;       /* 保底不低于原来的 280 */
    height: auto;            /* 覆盖之前的固定 height:300px */
    max-width: 480px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
}
/* ★ 确保 canvas 从不超过容器，避免雷达图溢出卡片 */
.radar-wrap canvas {
    max-width: 100%;
    max-height: 100%;        /* ★ 让 canvas 在 radar-wrap 内自适应 */
    height: auto;
    display: block;
    margin: 0 auto;
}
.dim-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: center; }
.dim-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.dim-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.dim-name { color: var(--text-secondary); }
.dim-score { font-weight: 600; color: var(--text); }

.advice-list { display: flex; flex-direction: column; gap: 10px; }
.advice-card {
    background: #ffffff;              /* ★ 白底：和父容器拉开层次 */
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 14px 16px 14px 18px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 1px 3px rgba(15,23,42,.06);   /* ★ 极细 shadow 增层次，Corporate Trust 惯用 */
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.advice-card:hover {
    box-shadow: 0 4px 14px rgba(79,70,229,.10);  /* hover 蓝紫调阴影 */
    transform: translateY(-1px);
    border-color: #C7D2FE;
}
.advice-card.priority-high { border-left-color: var(--danger); }
.advice-card.priority-medium { border-left-color: var(--warning); }
.advice-card.priority-low { border-left-color: #9ca3af; }
.advice-sub { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.advice-problem { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.advice-actions { list-style: none; padding: 0; }
.advice-actions li {
    font-size: 13px; color: var(--text);
    padding: 3px 0 3px 14px; position: relative;
}
.advice-actions li::before {
    content: "•"; position: absolute; left: 0;
    color: var(--primary); font-weight: 600;
}
.advice-framework {
    font-size: 12px; color: var(--text-muted);
    margin-top: 8px; padding-top: 8px;
    border-top: 1px dashed var(--border);
}

.details-block { margin-top: 16px; }
.details-block summary {
    cursor: pointer;
    padding: 10px 0;
    color: var(--primary);
    font-size: 13px;
    user-select: none;
}
.pq-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pq-item {
    padding: 10px 14px;
    background: #fafbfc;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border);
}
.pq-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pq-text { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.pq-metrics { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; }
.pq-metric { display: flex; align-items: center; gap: 4px; }
.pq-metric .dot { width: 8px; height: 8px; border-radius: 50%; }

.empty-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px 0;
    background: #fafbfc;
    border-radius: var(--radius-sm);
}

/* ============== 任务表 ============== */
.task-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.task-table th, .task-table td {
    padding: 12px 10px; text-align: left;
    border-bottom: 1px solid var(--border);
}
.task-table th {
    font-weight: 600; color: var(--text-secondary);
    background: #fafbfc; font-size: 13px;
}
.task-table tbody tr:hover { background: #fafbfc; }
.loading-row { text-align: center; color: var(--text-muted); padding: 30px 0 !important; }

.status-pill {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px; font-size: 12px; font-weight: 500;
}
.status-pill.queued { background: #fef3c7; color: #92400e; }
.status-pill.running { background: #E0E7FF; color: #4F46E5; }
.status-pill.succeeded { background: #EEF2FF; color: #3730A3; }
.status-pill.failed { background: #fee2e2; color: #b91c1c; }
.status-pill.cancelled { background: #f3f4f6; color: #6b7280; }

.action-link { color: var(--primary); text-decoration: none; font-size: 13px; }
.action-link:hover { text-decoration: underline; }

.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin-top: 16px; padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px; color: var(--text-secondary);
}

.error-card { text-align: center; padding: 40px 24px; }
.error-card h2 { color: var(--danger); margin-bottom: 12px; }

/* ============== Toast ============== */
.toast {
    position: fixed; top: 70px; left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    background: #1f2937; color: #fff;
    font-size: 14px; z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: toastIn .25s ease;
}
.toast.success { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}



.btn-ghost {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #6b7280;
}
.btn-ghost:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

/* ============== 分组标题 ============== */
.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 16px 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #f3f4f6;
}

/* ============== 关键词池编辑 ============== */
.kw-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}
.kw-group {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    background: #fafafa;
}
.kw-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}
.kw-group textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color .15s;
    box-sizing: border-box;
    background: #fff;
}
.kw-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.kw-count {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

/* ============== 关键词表格（Step 2 参考图同款） ============== */
.kw-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.kw-table-head, .kw-row {
    display: grid;
    grid-template-columns: 1fr 120px 72px 110px 44px;
    gap: 12px;
    align-items: center;
}
.kw-table-head {
    background: #f9fafb;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}
.kw-col-kw { padding: 8px 14px; }
.kw-col-type { padding: 8px 0; }
.kw-col-weight, .kw-col-tag { padding: 8px 0; }
.kw-col-ops { padding: 8px 0; text-align: center; }

.kw-group-row { border-bottom: 1px solid var(--border); }
.kw-group-row:last-child { border-bottom: none; }
.kw-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fafbfc;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.kw-group-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kw-group-count { color: var(--text-muted); font-weight: 500; margin-left: auto; font-size: 12px; }
.kw-add-row {
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 4px;
    color: var(--primary);
    font-size: 12px;
    padding: 2px 10px;
    cursor: pointer;
    margin-left: 8px;
    transition: background .15s;
}
.kw-add-row:hover { background: var(--primary-light); }

.kw-row { padding: 0 14px; border-bottom: 1px solid #f3f4f6; }
.kw-row:last-child { border-bottom: none; }
.kw-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 4px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    border-bottom: 1px solid transparent;
    transition: border-color .15s, background .15s;
}
.kw-input:hover { border-bottom-color: var(--border); }
.kw-input:focus {
    outline: none;
    background: var(--primary-light);
    border-radius: 4px;
    border-bottom-color: var(--primary);
}
.kw-input-sm {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 4px;
    color: var(--text);
    transition: border-color .15s;
}
.kw-input-sm:focus { outline: none; border-color: var(--primary); }
.kw-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid;
}
.kw-del-row {
    background: transparent;
    border: none;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.kw-del-row:hover { color: #ef4444; background: #fef2f2; }
.kw-empty-type {
    padding: 18px 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    background: #fafbfc;
}
.kw-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.kw-group-head label { margin-bottom: 0; }
.kw-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}
.kw-badge-ok { background: #EEF2FF; color: #312E81; }
.kw-badge-warn { background: #fffbeb; color: #92400e; }
.kw-badge-risk { background: #fef2f2; color: #991b1b; }

.kw-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid;
}
.kw-summary-ok { background: #EEF2FF; border-color: #a7f3d0; color: #312E81; }
.kw-summary-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.kw-summary-risk { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.kw-summary-label { font-weight: 600; }
.kw-summary-detail { font-size: 12px; opacity: .85; }

/* ============== 问题集阶段分组 ============== */
/* ============== 题目集 6 阶段 Tabs（Step 3 参考图同款） ============== */
.qs-tabs-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.qs-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;          /* ★ 关键：不换行，6 阶段始终一行 */
    overflow-x: auto;           /* ★ 窄屏时横向滚动代替换行 */
    flex-shrink: 1;
}
.qs-tabs::-webkit-scrollbar { height: 4px; }
.qs-tabs::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.qs-tabs::-webkit-scrollbar-track { background: transparent; }
.qs-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
}
.qs-tab:hover { background: #f3f4f6; color: var(--text); }
.qs-tab.active {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: #ffffff !important;                /* ★ 强制白字 */
    border-color: transparent;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
/* ★ active 子元素强制白字（覆盖任何继承链断裂情况） */
.qs-tab.active .qs-tab-name { color: #ffffff !important; }
.qs-tab.active .qs-tab-num {
    background: rgba(255,255,255,0.25);
    color: #ffffff !important;
}
.qs-tab.active .qs-tab-dot.ok { background: #ffffff; }
.qs-tab.active .qs-tab-dot.warn,
.qs-tab.active .qs-tab-dot.risk { box-shadow: 0 0 0 1px rgba(255,255,255,.6); }

/* 非 active 态的 qs-tab-num / qs-tab-dot（兼容第一套 tab） */
.qs-tab .qs-tab-num {
    font-size: 11px;
    background: #f3f4f6;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0 7px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}
.qs-tab .qs-tab-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #94a3b8;
}
.qs-tab .qs-tab-dot.ok { background: #22c55e; }
.qs-tab .qs-tab-dot.warn { background: #f59e0b; }
.qs-tab .qs-tab-dot.risk { background: #ef4444; }
.qs-tabs-actions { display: flex; gap: 8px; }
.qs-add-stage-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px dashed var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}
.qs-add-stage-btn:hover { background: var(--primary-light); }

/* Panel：每个阶段的卡片列表容器 */
.qs-stage-panel { display: none; }
.qs-stage-panel.active { display: block; }
.qs-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 2px 10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.qs-diff {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}
.qs-diff-none { background: #f3f4f6; color: #6b7280; }
.qs-diff-warn { background: #fffbeb; color: #92400e; }
.qs-diff-risk { background: #fef2f2; color: #991b1b; }

.qs-summary {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid;
}
.qs-summary-ok { background: #EEF2FF; border-color: #a7f3d0; color: #312E81; }
.qs-summary-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.qs-summary-risk { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.qs-empty-stage {
    padding: 18px 16px;
    color: #9ca3af;
    font-size: 13px;
    background: #f9fafb;
    border-radius: 6px;
    text-align: center;
}

.flash-new { animation: flashNew 1s ease-out; }
@keyframes flashNew {
    0% { box-shadow: 0 0 0 3px rgba(79,110,247,.25); }
    100% { box-shadow: none; }
}

/* ============ 题目删除按钮 ============ */
.q-del-btn {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #9ca3af;
    font-size: 16px; line-height: 1;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0;
    transition: all .15s;
    margin-left: auto;
}
.q-del-btn:hover { background: #fef2f2; border-color: #ef4444; color: #ef4444; }

/* ============ Step 4/5 采集进度演示 ============ */
.collect-block {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.collect-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.collect-block-title { font-size: 13px; font-weight: 600; color: var(--text); }
.collect-block-count { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.collect-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
}
.collect-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f9fafb;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all .25s ease;
}
.collect-item .ci-badge {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .25s ease;
}
.collect-item .ci-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collect-item .ci-label { font-size: 11px; color: #9ca3af; margin-left: 8px; }
.collect-item.done {
    background: #EEF2FF;
    color: #312E81;
}
.collect-item.done .ci-badge {
    background: #6366F1;
    color: #fff;
}
.collect-item.done .ci-label { color: #4F46E5; font-weight: 500; }
.collect-item.active {
    background: #EEF2FF;
    color: #4338CA;
}
.collect-item.active .ci-badge {
    background: #4F46E5;
    color: #fff;
    animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* ============ 新增：逐题/逐维度采集进度（running/pending/ci-mark） ============ */
.collect-item .ci-mark {
    display: inline-block;
    width: 22px;
    text-align: center;
    font-size: 13px;
    flex-shrink: 0;
}
.collect-item.pending {
    color: #9ca3af;
    opacity: 0.6;
}
.collect-item.pending .ci-mark { color: #d1d5db; }
.collect-item.running {
    background: #EEF2FF;
    color: #4338CA;
}
.collect-item.running .ci-mark {
    animation: pulse 1.2s ease-in-out infinite;
}

/* ============ 采集进度：题目完整文本 + 阶段标签 + 右侧状态 ============ */
.collect-item .ci-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.collect-item .ci-text {
    font-size: 13px;
    color: #1f2937;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.collect-item.pending .ci-text { color: #9ca3af; font-weight: 400; }
.collect-item.done .ci-text { color: #111827; }
.collect-item .ci-meta {
    font-size: 11px;
    color: #6b7280;
}
.collect-item .ci-stage {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #4b5563;
    font-weight: 500;
}
.collect-item .ci-right {
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f3f4f6;
}
.collect-item.done .ci-right {
    color: #4338CA;
    background: #E0E7FF;
    font-weight: 600;
}
.collect-item.running .ci-right {
    color: #4338CA;
    background: #E0E7FF;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .split-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
    .form-row { flex-direction: column; gap: 12px; }
    .cost-group { flex: 1; }
    .report-score-row { flex-direction: column; }
    .stage-name { width: 56px; font-size: 12px; }
    .score-value { font-size: 34px; }
}
/* ============ Oracle 维度 tooltip ============ */
.dim-tip {
    position: fixed;
    z-index: 9999;
    max-width: 260px;
    padding: 8px 12px;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    white-space: nowrap;
}
.dim-tip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 12px;
    border-width: 4px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}
.dim-item { cursor: default; }
/* ---------- AI 生成伪进度条（关键词/采集题页） ---------- */
.kw-progress { margin: 12px 0 16px; padding: 14px 16px; background: #f0f4ff; border-radius: 10px; border: 1px solid #dbe7ff; }
.kw-progress .bar-wrap { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.kw-progress .bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary) 0%, #6b8cff 100%); border-radius: 4px; transition: width .3s ease; }
.kw-progress .bar-text { font-size: 13px; color: var(--primary); margin-top: 8px; font-weight: 500; }
.generate-hint { text-align: center; padding: 28px 20px; color: var(--text-muted); font-size: 14px; }
.generate-hint .big-emoji { font-size: 40px; display: block; margin-bottom: 8px; }

/* ============ 高级选项折叠区 ============ */
.advanced-options { margin: 12px 0 4px; border-top: 1px dashed #e5e7eb; padding-top: 8px; }
.advanced-options summary { cursor: pointer; font-size: 13px; color: #6b7280; padding: 8px 0; user-select: none; }
.advanced-options summary:hover { color: var(--primary); }
.advanced-options[open] summary { color: var(--primary); font-weight: 500; }
.advanced-options .form-row { margin-top: 8px; }
.advanced-options .hint-text { font-size: 12px; color: #9ca3af; margin: 4px 0 0; line-height: 1.5; }

/* ============ 个人中心样式 ============ */
.user-label-link { color: var(--primary); text-decoration: none; font-weight: 500; padding: 4px 10px; border-radius: 6px; transition: background .15s; }
.user-label-link:hover { background: #f0f4ff; }
.logout-btn { color: #ef4444; text-decoration: none; font-size: 13px; padding: 4px 10px; border-radius: 6px; border: 1px solid #fecaca; transition: all .15s; margin-left: 6px; }
.logout-btn:hover { background: #fef2f2; border-color: #ef4444; }

.page-profile .card { margin-bottom: 20px; }
.page-profile .section-title { margin-bottom: 12px; }

.readonly-group input { background: #f3f4f6; color: #6b7280; cursor: not-allowed; }

.save-hint { font-size: 13px; margin-left: 12px; color: #9ca3af; }
.save-hint.saving { color: var(--primary); }
.save-hint.success { color: #4F46E5; }
.save-hint.error { color: #ef4444; }
.save-key-hint { font-size: 12px; color: #9ca3af; margin-left: 8px; }

.profile-stats-card { display: flex; gap: 40px; padding: 20px 28px; }
.stat-item { text-align: left; }
.stat-num { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-label { font-size: 13px; color: #6b7280; margin-top: 6px; }

/* 必填标记 */
.form-group label .required { color: #ef4444; margin-left: 2px; }

/* 问题反馈 */
.section-subtitle { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 24px 0 10px; }
.feedback-history { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.feedback-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.feedback-item:last-child { border-bottom: none; }
.feedback-content .fb-time { font-size: 12px; color: #9ca3af; margin-bottom: 4px; }
.feedback-content .fb-text { font-size: 14px; color: var(--text-primary); line-height: 1.5; white-space: pre-wrap; }
.feedback-pending { margin-top: 8px; font-size: 13px; color: #f59e0b; }
.feedback-reply { margin-top: 10px; background: #E0E7FF; border-left: 3px solid #4F46E5; padding: 10px 12px; border-radius: 4px; }
.feedback-reply .reply-meta { font-size: 12px; color: #4F46E5; margin-bottom: 6px; font-weight: 500; }
.feedback-reply .reply-text { font-size: 14px; color: var(--text-primary); line-height: 1.5; }
.empty-hint { font-size: 13px; color: #9ca3af; text-align: center; padding: 20px; }

/* help-icon 问号提示 */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
    transition: background .15s, color .15s;
}
.help-icon:hover {
    background: var(--primary);
    color: #fff;
}

/* ============== 报告页（对齐参考图 4/5/6） ============== */

/* 报告页 header：左侧步骤 icon + 标题，右侧 3 按钮 */
.page-header-attribution {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.page-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.page-header-left .si-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 16px;
    flex-shrink: 0;
}
.report-header-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.report-header-actions .btn { white-space: nowrap; }

/* --- BCVS 总分区：左大数字 + 右 5 张 M/R/P/D/S 卡 --- */
.bcvs-score-block {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 16px;
    margin-bottom: 20px;
    align-items: end;  /* ★ 两列底边对齐 */
}
.bcvs-total-card {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 24px;
    display: flex; flex-direction: column; justify-content: center;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.35), 0 1px 3px rgba(124, 58, 237, 0.15);
}
.bcvs-total-card .score-label {
    font-size: 13px; opacity: .85; margin-bottom: 4px; letter-spacing: .5px; color: #fff;
}
.bcvs-total-card .score-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.score-brand {
    font-size: 15px; font-weight: 600; color: #fff; opacity: .95;
    margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bcvs-total-card .score-value {
    font-size: 56px; font-weight: 700; line-height: 1;
    margin-bottom: 6px; color: #fff;
}
.bcvs-total-card .score-sub {
    font-size: 12px; opacity: .75; color: #fff;
}
.bcvs-metric-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.bcvs-metric-card {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 10px 10px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex; flex-direction: column; gap: 2px;
    justify-content: center;
}
.bmc-key { font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.bmc-name { font-size: 11px; color: #6b7280; }
.bmc-value { font-size: 22px; font-weight: 700; line-height: 1.2; }

/* --- Oracle 雷达图 + 5 张维度评分卡 并排 --- */
.oracle-score-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;  /* ★ 让雷达图卡片和右侧五维列表等高 → 上下沿对齐 */
}
.oracle-dim-cards {
    display: flex; flex-direction: column;
    gap: 30px;  /* ★ 用户指定 gap=30px 固定优先 */
}
.od-card {
    display: flex; align-items: stretch;
    background: #fff;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: visible;
    transition: box-shadow .15s;
    min-width: 0;  /* ★ 给卡片一个最小高度 → 文字内容可真正上下居中 */
}
.od-card:hover { box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12), 0 1px 3px rgba(124, 58, 237, 0.08); transform: translateY(-1px); }
.od-bar { width: 4px; flex-shrink: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.od-info { flex: 1; min-width: 0; padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.od-name-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-width: 0; }
.od-name { font-size: 12px; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-badge { font-size: 9px; padding: 1px 6px; border-radius: 999px; font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.od-badge.str-strong  { background: #EEF2FF; color: #4F46E5; }
.od-badge.str-upmid   { background: #E0E7FF; color: #4338CA; }
.od-badge.str-lowmid  { background: #fef3c7; color: #d97706; }
.od-badge.str-weak    { background: #fee2e2; color: #dc2626; }
.od-attr { font-size: 10px; color: #9ca3af; white-space: nowrap; }
.od-score { font-size: 20px; font-weight: 700; padding: 6px 10px; align-self: center; flex-shrink: 0; white-space: nowrap; }

/* --- Oracl 五维卡 hover 提示 --- */
.od-card { position: relative; cursor: help; }
.od-tip {
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    max-width: 260px;
    padding: 10px 14px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    line-height: 1.55;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    z-index: 50;
    white-space: normal;
}
.od-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}
.od-card:hover .od-tip { display: block; }


/* --- 归因分析块：上下堆叠（用户明确要求） --- */
.attr-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.attr-summary-card {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border: 1px solid #C7D2FE;
    border-radius: var(--radius);
    padding: 20px 22px;
    transition: box-shadow .2s ease, transform .2s ease;
    height: fit-content;
}
.attr-summary-card:hover {
    box-shadow: 0 6px 20px rgba(79,70,229,.12);
    transform: translateY(-1px);
}
.attr-advice-card {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);  /* ★ 浅灰调代替原浅黄色，更贴合 Corporate Trust 的靛蓝紫主色 */
    border: 1px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 20px 22px;
    transition: box-shadow .2s ease, transform .2s ease;
}
.attr-advice-card:hover {
    box-shadow: 0 6px 20px rgba(79,70,229,.08);
    transform: translateY(-1px);
}
.attr-card-title {
    font-size: 15px; font-weight: 600; color: #4338CA;
    margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.attr-narrative {
    font-size: 14px; line-height: 1.85; color: #1F2937;
    letter-spacing: .005em;
}

/* ================================================
   Step 2 关键词管理 — Tab + 表格 + 头部徽章
   ================================================ */
.kw-page-head, .qs-page-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; flex-wrap: wrap;
}
.kw-head-left, .qs-head-left { display: flex; align-items: center; gap: 14px; }
.kw-head-right, .qs-head-right { display: flex; gap: 10px; align-items: center; }

.step-badge {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px; color: #fff; flex-shrink: 0;
}
.step-badge-2 { background: linear-gradient(135deg, #f97316, #ea580c); }
.step-badge-3 { background: linear-gradient(135deg, #4F46E5, #7C3AED); }

.btn-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    color: #fff !important; border: none;
}
.btn-purple:hover { filter: brightness(1.08); }

.btn-primary-solid {
    padding: 8px 14px !important; font-weight: 600 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
}
.btn-green {
    background: linear-gradient(135deg, #4F46E5, #7C3AED) !important;
    color: #fff !important; border: none;
    white-space: nowrap !important;
}
.btn-green:hover { filter: brightness(1.08); }

.kw-tabs {
    display: flex; gap: 4px; border-bottom: 2px solid var(--border);
    margin-bottom: 12px; padding-bottom: 0;
}
.kw-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border: none; background: transparent;
    cursor: pointer; color: var(--text-secondary);
    font-size: 14px; font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all .2s;
}
.kw-tab:hover { color: var(--text); }
.kw-tab.active {
    color: var(--primary); border-bottom-color: var(--primary);
    font-weight: 600;
}
.kw-tab-icon { font-size: 16px; }
.kw-tab-count {
    background: var(--primary-light, #eef2ff); color: var(--primary, #4F46E5);
    font-size: 12px; font-weight: 600;
    padding: 2px 8px; border-radius: 10px;
    min-width: 22px; text-align: center;
}

.kw-warn-hint {
    background: #fef3c7; color: #92400e;
    padding: 8px 14px; border-radius: 6px;
    font-size: 12.5px; margin-bottom: 12px;
    border-left: 3px solid #f59e0b;
}

.kw-table-wrap {
    border: 1px solid var(--border); border-radius: 8px;
    overflow: hidden;
}
.kw-table { width: 100%; border-collapse: collapse; }
.kw-table thead { background: #f9fafb; }
.kw-table th {
    text-align: left; padding: 10px 14px;
    font-size: 12.5px; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: .5px;
}
.kw-table th.kw-ops-col, .kw-table td.kw-ops-col,
.kw-ops-col { text-align: right !important; width: 90px; }
.kw-table tbody tr {
    border-top: 1px solid var(--border); transition: background .15s;
}
.kw-table tbody tr:hover { background: #fafbfc; }
.kw-table td { padding: 10px 14px; }
.kw-row-input {
    border: none; background: transparent; width: 100%;
    padding: 4px 6px; font-size: 14px; color: var(--text);
    border-radius: 4px; transition: background .15s, box-shadow .15s;
}
.kw-row-input:focus {
    outline: none; background: #fff;
    box-shadow: 0 0 0 2px rgba(79,110,247,.25);
}

.kw-cat-tag {
    display: inline-block; padding: 3px 10px;
    font-size: 12px; font-weight: 500;
    border-radius: 12px;
}
.kw-cat-product { background: #E0E7FF; color: #4F46E5; }
.kw-cat-technology { background: #EEF2FF; color: #3730A3; }
.kw-cat-scenario { background: #fef3c7; color: #b45309; }

.kw-del-icon {
    background: none; border: none; cursor: pointer;
    font-size: 15px; padding: 4px 6px;
    border-radius: 6px; transition: background .15s;
}
.kw-del-icon:hover { background: #fee2e2; }

.kw-empty-row {
    text-align: center; color: var(--text-muted);
    padding: 28px; font-size: 13px;
}

.kw-foot {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid var(--border);
}
.kw-foot-right { display: flex; gap: 10px; align-items: center; }

/* ================================================
   Step 3 问题集 — 阶段 Tab + 卡片
   ================================================ */
/* ===== .qs-tab-items（JS 动态渲染的问题列表卡片） ===== */
.qs-tab-items .q-item {
    display: block; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: 8px;
    margin-bottom: 10px; background: var(--card-bg, #fff);
}
/* ★ 修复问题正文 textarea 挤左边（默认 inline-block 宽度不撑满） */
.qs-tab-items .q-item textarea {
    width: 100%;
    box-sizing: border-box;
    display: block;
    font-size: 14px;
    line-height: 1.6;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-family: inherit;
    color: var(--text);
    background: #F8FAFC;
    resize: vertical;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.qs-tab-items .q-item textarea:hover { border-color: #CBD5E1; background: #fff; }
.qs-tab-items .q-item textarea:focus {
    outline: none;
    border-color: #4F46E5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.qs-tab-items .q-item-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px;
}
.qs-tab-items .q-badge {
    background: #4338CA; color: #fff;
    font-weight: 600; font-size: 12px;
    padding: 2px 8px; border-radius: 4px; min-width: 22px;
    text-align: center;
}
.qs-tab-items .q-actions {
    margin-left: auto; display: flex; gap: 6px;
}
.qs-tab-items .q-edit-icon,
.qs-tab-items .q-del-btn {
    background: none; border: none; cursor: pointer;
    font-size: 15px; padding: 4px 6px;
    border-radius: 6px; line-height: 1;
}
.qs-tab-items .q-edit-icon:hover { background: #eef2ff; }
.qs-tab-items .q-del-btn:hover { background: #fee2e2; }

.qs-foot {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid var(--border);
    gap: 12px;
}
.qs-foot-right {
    display: flex; gap: 14px; align-items: center;
}
.qs-foot-model {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    white-space: nowrap;
}
.qs-foot-model label {
    font-size: 12px; color: var(--text-secondary);
    font-weight: 500; white-space: nowrap;
    display: flex; align-items: center; gap: 5px;
}
.qs-foot-model label i {
    color: #7C3AED;
}
.qs-foot-model select {
    border: 1px solid #e2e8f0; border-radius: 6px;
    padding: 5px 10px; font-size: 13px;
    background: #fff; color: var(--text);
    font-weight: 500; min-width: 110px;
    outline: none; cursor: pointer;
    transition: border-color .15s;
}
.qs-foot-model select:hover { border-color: #7C3AED; }
.qs-foot-model select:focus { border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124,58,237,.12); }

.qs-empty-stage {
    text-align: center; color: var(--text-muted);
    padding: 40px; font-size: 13px;
    border: 1px dashed var(--border); border-radius: 8px;
    background: #fafbfc;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .bcvs-score-block { grid-template-columns: 1fr; }
    .bcvs-metric-cards { grid-template-columns: repeat(5, 1fr); }
    .bcvs-total-card .score-value { font-size: 40px; }
    .oracle-score-block { grid-template-columns: 1fr; }
    /* 雷达图区域：卡片标题和画布跟随居中，移动端压缩高度省空间 */
    .oracle-radar-card h3 { text-align: center; }
    .oracle-radar-card { padding: 20px 16px; }
    .radar-wrap { min-height: 280px; max-width: 100%; }
    .page-header-attribution { flex-direction: column; align-items: flex-start; gap: 12px; }
    .kw-page-head, .qs-page-head { flex-direction: column; gap: 12px; }
    .kw-head-right, .qs-head-right { width: 100%; justify-content: flex-start; }
    .kw-foot, .qs-foot { flex-direction: column; gap: 10px; align-items: stretch; }
    .kw-foot-right, .qs-foot-right { justify-content: flex-end; }
    .kw-tab, .qs-tab { padding: 8px 12px; font-size: 13px; }
}
@media (max-width: 480px) {
    .bcvs-metric-cards { grid-template-columns: repeat(3, 1fr); gap: 8px; }  /* ★ 5 卡→3 列（3+2），不再挤成一排 */
    .bcvs-metric-card { padding: 12px 6px; }
    .bmc-value { font-size: 20px; }
    .kw-tab-icon { display: none; }
    .radar-wrap { min-height: 250px; }  /* ★ 小屏再压缩雷达高度省空间 */
}

/* ================================================
   Lucide 图标通用样式（Corporate Trust 统一尺寸/色）
   登录页 lucide-react 风格 stroke-width=2
   ================================================ */
.icon-btn {
    width: 16px; height: 16px;
    stroke-width: 2;
    display: inline-block;
    vertical-align: -2px;
}
.btn-primary .icon-btn,
.btn-primary-solid .icon-btn,
.btn-purple .icon-btn,
.btn-green .icon-btn { color: #fff; }
.btn-secondary .icon-btn,
.btn-outline .icon-btn { color: var(--text-secondary); }
.icon-inline {
    width: 14px; height: 14px;
    stroke-width: 2;
    display: inline-block;
    vertical-align: -1px;
    margin-right: 4px;
    color: var(--primary);
}
.big-icon {
    width: 40px; height: 40px;
    stroke-width: 1.8;
    color: var(--primary);
    margin-bottom: 8px;
    display: inline-block;
}

/* ================================================
   运营管理看板（仅超管，2026-09-21）
   专业商务风格：墨绿主色 + 琥珀金点缀，服从品牌不变量
   ================================================ */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.admin-tab {
    padding: 8px 16px;
    border: 1px solid var(--border, #e3e3e3);
    border-radius: 8px;
    background: #fff;
    color: var(--text-secondary, #555);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.admin-tab:hover { border-color: var(--primary); color: var(--primary); }
.admin-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.admin-stat {
    background: #fff;
    border: 1px solid var(--border, #e3e3e3);
    border-radius: 10px;
    padding: 14px 16px;
    min-width: 150px;
    flex: 1 1 150px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.admin-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-stat-val {
    font-size: 22px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
    line-height: 1.2;
}
.admin-stat-label { font-size: 12px; color: var(--text-secondary, #777); margin-top: 4px; }
.admin-stat-sub { font-size: 11px; color: #999; margin-top: 2px; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}
.admin-table th {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 2px solid var(--border, #e3e3e3);
    font-size: 12px;
    color: var(--text-secondary, #666);
    white-space: nowrap;
    font-weight: 600;
}
.admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.admin-table tr:hover td { background: #fafbfa; }
.admin-table code {
    background: #f2f4f2;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
}
.fd-dims { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.fd-dim {
    display: inline-block; padding: 1px 6px; margin: 1px 0;
    border-radius: 4px; background: #eef2ef; color: #2D6A4F;
    font-size: 11px; font-weight: 600; letter-spacing: .3px;
}
.fd-total { font-weight: 700; color: #2D6A4F; margin-right: 6px; }
.btn-mini {
    padding: 3px 10px; font-size: 12px; border-radius: 5px;
    border: 1px solid #2D6A4F; color: #2D6A4F; background: #fff;
    cursor: pointer; transition: all .15s ease;
}
.btn-mini:hover { background: #2D6A4F; color: #fff; }
.btn-mini:disabled { opacity: .55; cursor: default; }
.status-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #e9ece9;
    color: #666;
    margin-right: 4px;
}
.status-chip.st-active { background: #e4f3e8; color: #2d6a4f; }
.status-chip.st-ws { background: #eef3fb; color: #2b5aa0; }
.status-chip.st-cita { background: #f6efe2; color: #8a6d1f; }
.admin-err {
    color: #b03a2e;
    font-size: 12px;
    max-width: 260px;
    white-space: pre-wrap;
}
.admin-reply-btn {
    padding: 4px 12px;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: #fff;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}
.admin-reply-btn:hover { background: var(--primary); color: #fff; }
.admin-reply-text { font-size: 12px; color: #444; }
.admin-reply-input { display: flex; gap: 6px; align-items: flex-start; }
.admin-reply-input textarea {
    flex: 1;
    min-width: 200px;
    border: 1px solid var(--border, #e3e3e3);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    resize: vertical;
}
.admin-reply-send {
    padding: 6px 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

/* ---- 运维看板：并发折线图 / 当前并发 / 兜底备注（2026-09-22） ---- */
.admin-chart {
    margin-top: 12px;
    padding: 6px 4px 2px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
}
.conc-now {
    font-weight: 700;
}
.conc-now.crit {
    color: #e5484d;
}
.admin-note {
    margin: 4px 0 10px;
    padding: 8px 12px;
    background: #fdf6ec;
    border: 1px solid #f3e2c0;
    border-radius: 6px;
    color: #6b5a2e;
    font-size: 12px;
    line-height: 1.5;
}
