/* ============================================================
   analysis.css — DeeplCad 工作台 (Tech Blue / Blueprint 设计语言)
   覆盖：面包屑/标题行、设置条、三栏布局、文件列表、分析结果
        （图层/文本预览/翻译进度/空状态）、批次统计、操作按钮
   覆盖 analysis.js 动态生成的所有 DOM 结构
   ============================================================ */

/* 工作台 main 用更紧凑的 padding */
.dc-main-workstation {
    padding: 22px 26px 26px;
    gap: 16px;
}

/* ==================== 面包屑 + 标题行 ==================== */
.dc-workstation-head {
    display: flex;
    align-items: flex-end;
    gap: 14px;
}

.dc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #8A94A3;
    margin-bottom: 4px;
}

.dc-breadcrumb a {
    color: #8A94A3;
    text-decoration: none;
    transition: color 0.15s;
}

.dc-breadcrumb a:hover { color: #1D5BD6; }

.dc-breadcrumb-sep { color: #B4BCC9; }

.dc-breadcrumb-current { color: #5B6675; }

.dc-workstation-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: #0E1726;
}

/* ==================== 设置条 ==================== */
.dc-settings-bar {
    background: #fff;
    border: 1px solid #E4EAF2;
    border-radius: 13px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px -18px rgba(15, 23, 42, 0.3);
}

/* 设置条内的标题隐藏（设计稿没有标题，直接平铺控件） */
.dc-settings-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dc-settings-content { display: block; }

.dc-controls-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.dc-option-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dc-option-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #8A94A3;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.dc-select {
    height: 38px;
    min-width: 150px;
    padding: 0 12px;
    border: 1px solid #D2DBE8;
    border-radius: 9px;
    background: #F7F9FC;
    font-family: inherit;
    font-size: 13.5px;
    color: #182233;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.dc-select:hover { border-color: #1D5BD6; }
.dc-select:focus { border-color: #1D5BD6; background: #fff; }

.domain-group .dc-select { min-width: 170px; }

/* 交换语言按钮 */
.dc-swap-btn {
    height: 38px;
    width: 38px;
    flex-shrink: 0;
    border: 1px solid #D2DBE8;
    border-radius: 9px;
    background: #fff;
    color: #1D5BD6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, transform 0.4s;
    margin-bottom: 0;
}

.dc-swap-btn:hover {
    background: #EAF1FE;
    border-color: #1D5BD6;
}

.dc-swap-btn:active svg {
    transform: scaleX(-1);
    transition: transform 0.3s;
}

/* 领域说明文字 */
.dc-domain-desc-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #EDF1F7;
}

.domain-desc {
    padding: 9px 13px;
    background: #F7F9FC;
    border: 1px dashed #D2DBE8;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.5;
    color: #7A8494;
}

/* 语言冲突警告（analysis.js:633 动态 append 到 .global-translation-options） */
.global-translation-options .language-warning {
    margin-top: 10px;
    padding: 8px 12px;
    background: #FCECEC;
    border: 1px solid #F3CFCF;
    border-radius: 8px;
    font-size: 12.5px;
    color: #C0392B;
}

/* ==================== 三栏布局 ==================== */
.dc-three-col {
    display: grid;
    grid-template-columns: 266px minmax(0, 1fr) 284px;
    gap: 16px;
    align-items: start;
}

/* ==================== 面板通用样式 ==================== */
.dc-panel {
    background: #fff;
    border: 1px solid #E4EAF2;
    border-radius: 13px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px -18px rgba(15, 23, 42, 0.3);
    overflow: hidden;
}

.dc-panel-inner {
    display: flex;
    flex-direction: column;
}

.dc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 15px;
    border-bottom: 1px solid #EDF1F7;
    gap: 12px;
}

.dc-panel-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0E1726;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-panel-bar {
    width: 3px;
    height: 15px;
    border-radius: 2px;
    background: #1D5BD6;
}

/* 通用 section-title 样式（兼容 analysis-vue.js i18n 重写） */
.section-title { font-size: 13.5px; font-weight: 600; color: #0E1726; }

/* 滚动条 */
.dc-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.dc-scroll::-webkit-scrollbar-thumb { background: #CBD5E4; border-radius: 4px; }
.dc-scroll::-webkit-scrollbar-track { background: transparent; }

/* ==================== 左栏：文件列表 + 左下角上传区 ==================== */
.files-section .dc-panel-inner {
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.dc-file-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #EAF1FE;
    color: #1D5BD6;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
}

.analyzed-files-list {
    flex: 1;
    max-height: 440px;
    overflow-y: auto;
    padding: 9px;
}

/* 左栏空状态引导区（点击也可直接触发上传） */
.dc-files-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 220px;
    margin: 4px;
    padding: 20px 14px;
    border: 1.5px dashed #D2DBE8;
    border-radius: 11px;
    background: #F9FBFD;
    color: #7A8494;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.dc-files-empty:hover {
    border-color: #1D5BD6;
    background: #F1F6FF;
    color: #1D5BD6;
}

.dc-files-empty svg {
    margin-bottom: 10px;
    color: #9AA6B8;
    transition: color 0.15s, transform 0.15s;
}

.dc-files-empty:hover svg {
    color: #1D5BD6;
    transform: translateY(-2px);
}

.dc-files-empty p {
    font-size: 12.5px;
    line-height: 1.55;
    margin: 0;
}

/* 左栏底部固定上传区（工作台左下角） */
.dc-files-upload-footer {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid #EDF1F7;
    background: #FAFBFD;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dc-workstation-upload-btn {
    width: 100%;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2E6FE6 0%, #1D5BD6 55%, #1749B5 100%);
    color: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px -6px rgba(29, 91, 214, 0.45);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.dc-workstation-upload-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -6px rgba(29, 91, 214, 0.55);
}

.dc-workstation-upload-btn:active:not(:disabled) {
    transform: translateY(0);
}

.dc-workstation-upload-btn:disabled {
    opacity: 0.68;
    cursor: not-allowed;
    box-shadow: none;
}

.dc-workstation-upload-hint {
    margin: 0;
    text-align: center;
    font-size: 11px;
    color: #8A94A3;
    line-height: 1.4;
}

/* 文件项右上角移除按钮 */
.file-remove-btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9AA6B8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.file-remove-btn:hover:not(:disabled) {
    background: #FCECEC;
    color: #C0392B;
}

.file-remove-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* 文件项（analysis.js:216 renderFilesList 动态生成） */
.file-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 11px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 5px;
    transition: background 0.15s, border-color 0.15s;
    border: 1px solid transparent;
    background: transparent;
}

.file-item:hover { background: #F7F9FC; }

.file-item.active {
    border-color: #C9D8F5;
    background: #EFF5FF;
    box-shadow: inset 3px 0 0 #1D5BD6;
}

.file-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.file-icon {
    flex-shrink: 0;
    width: 34px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 0;
    border-radius: 6px;
    color: #fff;
    background: linear-gradient(140deg, #2E6FE6, #1749B5);
    text-transform: uppercase;
}

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

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: #182233;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-status {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #8A94A3;
    margin-top: 2px;
    line-height: 1.5;
    word-break: break-word;
    width: 100%;
}

/* 兼容 analysis.js 动态注入的 status-* class（L1721-1725 用 --xxx-color 旧变量名） */
.file-status.status-error,
.file-status.status-failed,
.file-status.failed { color: #C0392B; }

.file-status.status-success,
.file-status.status-analyzed,
.file-status.analyzed { color: #12A150; }

.file-status.status-processing,
.file-status.status-pending,
.file-status.analyzing { color: #E69A3C; }

.file-status.status-warning { color: #E69A3C; }

/* 给 analysis.js 动态注入的 CSS 兜底变量（避免 --xxx-color 未定义导致颜色丢失） */
:root {
    --warning-color: #E69A3C;
    --info-color: #1D5BD6;
    --success-color: #12A150;
    --error-color: #C0392B;
}

/* 文件项的查看分析结果按钮 */
.view-btn {
    align-self: flex-end;
    padding: 5px 12px;
    border: 1px solid #C9D8F5;
    border-radius: 7px;
    background: #EAF1FE;
    color: #1D5BD6;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.view-btn:hover {
    background: #1D5BD6;
    border-color: #1D5BD6;
    color: #fff;
}

/* ==================== 中栏：分析结果 ==================== */
.analysis-section .dc-panel-inner { min-height: 400px; }

.dc-analysis-progress {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #E69A3C;
    display: flex;
    align-items: center;
    gap: 7px;
}

.dc-analysis-progress::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E69A3C;
    animation: dcPulseDot 1.4s infinite;
}

@keyframes dcPulseDot {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.dc-analysis-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ---------- 图层选择 ---------- */
.dc-layer-selection { padding: 15px 16px; border-bottom: 1px solid #EDF1F7; }

.dc-layer-controls { display: flex; flex-direction: column; gap: 11px; }

.dc-layer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dc-layer-row-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.dc-layer-actions { display: flex; gap: 8px; }

.dc-btn-layer {
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #1D5BD6 !important;
    background: #EAF1FE !important;
    border: 1px solid #C9D8F5 !important;
    border-radius: 7px !important;
    padding: 5px 11px !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
}

.dc-btn-layer:hover { background: #D6E4FB !important; }

.dc-btn-layer.btn-secondary {
    color: #5B6675 !important;
    background: #F4F7FB !important;
    border-color: #DCE4F0 !important;
}

.dc-btn-layer.btn-secondary:hover { background: #E1E8F2 !important; }

/* 图层下拉（保留 analysis.js 关闭判断依赖的 .layer-dropdown） */
.dc-layer-dropdown {
    position: relative;
    border: 1px solid #E4EAF2;
    border-radius: 10px;
    overflow: hidden;
}

.dc-layer-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 13px;
    background: #F7F9FC;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: #334155;
}

.dc-layer-dropdown-btn:hover { background: #EEF3FC; }

.layer-selection-text {
    flex: 1;
    text-align: left;
    color: #334155;
}

.layer-dropdown-arrow { color: #8A94A3; flex-shrink: 0; }

.dc-layer-dropdown-content {
    border-top: 1px solid #EDF1F7;
    background: #fff;
    display: none;
}

.dc-layer-dropdown-content.show { display: block; }

.layer-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
}

/* 图层项（analysis.js:401 displayLayers 动态生成） */
.layer-item {
    padding: 0;
    border-radius: 7px;
    transition: background 0.12s;
}

.layer-item:hover { background: #F7F9FC; }

.layer-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 13px;
    color: #182233;
}

.layer-checkbox {
    width: 17px;
    height: 17px;
    accent-color: #1D5BD6;
    cursor: pointer;
    flex-shrink: 0;
}

.layer-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layer-info {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #8A94A3;
    flex-shrink: 0;
}

/* ---------- 文本预览（保持 JS 原结构，只加美化） ---------- */
.dc-text-preview {
    padding: 13px 16px 16px;
    flex: 1;
}

.text-sample-item {
    padding: 11px 13px;
    background: #F7F9FC;
    border: 1px solid #E4EAF2;
    border-radius: 9px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}

.text-sample-item:hover { border-color: #C9D8F5; }

.sample-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: 11px;
}

.sample-left { display: flex; align-items: center; gap: 8px; color: #8A94A3; }

.sample-index {
    font-family: var(--font-mono);
    font-weight: 600;
    color: #B4BCC9;
}

.sample-layer {
    background: #EAF1FE;
    color: #1749B5;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 500;
}

.sample-chars {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #8A94A3;
}

.sample-text {
    font-size: 13.5px;
    color: #182233;
    line-height: 1.5;
    word-break: break-word;
}

/* ---------- 翻译进度 ---------- */
.dc-translation-progress {
    padding: 15px 16px;
    border-top: 1px solid #EDF1F7;
}

.dc-subsection-title {
    font-size: 13px;
    font-weight: 600;
    color: #0E1726;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-subsection-title::before {
    content: '';
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: #1D5BD6;
}

.dc-progress-list { display: flex; flex-direction: column; gap: 8px; }

/* 进度项（analysis.js:1084 createProgressItem 动态生成） */
.progress-item {
    padding: 12px 13px;
    background: #F7F9FC;
    border: 1px solid #E4EAF2;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.progress-file-name {
    font-size: 13px;
    font-weight: 500;
    color: #182233;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-status {
    font-size: 12px;
    font-weight: 500;
    color: #1D5BD6;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.progress-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1D5BD6;
    animation: dcPulseDot 1.4s infinite;
}

/* 兼容 analysis.js 动态注入的 status-* class */
.progress-status.status-pending,
.progress-status.status-processing { color: #1D5BD6; }
.progress-status.status-pending::before,
.progress-status.status-processing::before { background: #1D5BD6; }

.progress-status.status-success,
.progress-status.status-completed { color: #12A150; }
.progress-status.status-success::before,
.progress-status.status-completed::before { background: #12A150; animation: none; }

.progress-status.status-error,
.progress-status.status-failed { color: #C0392B; }
.progress-status.status-error::before,
.progress-status.status-failed::before { background: #C0392B; animation: none; }

.progress-status.status-warning { color: #E69A3C; }
.progress-status.status-warning::before { background: #E69A3C; }

.progress-bar-container {
    height: 6px;
    border-radius: 3px;
    background: #EEF2F8;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #2E6FE6, #1D5BD6);
    transition: width 0.4s ease;
}

.progress-message {
    font-size: 12px;
    color: #8A94A3;
    line-height: 1.5;
}

.progress-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.download-dwg, .download-csv {
    padding: 6px 12px !important;
    border: 1px solid #1D5BD6 !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #1D5BD6 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    transition: background 0.15s, color 0.15s !important;
}

.download-dwg:hover, .download-csv:hover { background: #1D5BD6 !important; color: #fff !important; }

.download-csv {
    border-color: #DCE4F0 !important;
    color: #5B6675 !important;
    background: #F4F7FB !important;
}

.download-csv:hover { background: #E1E8F2 !important; color: #334155 !important; border-color: #DCE4F0 !important; }

/* ---------- 空状态 ---------- */
.dc-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #8A94A3;
    min-height: 200px;
}

.dc-empty-state p {
    margin-top: 14px;
    font-size: 13px;
    color: #8A94A3;
}

/* ==================== 右栏：批次统计 ==================== */
.batch-statistics-section .dc-panel-inner { height: 100%; gap: 0; }

.dc-stats-empty, .dc-stats-real,
.stats-wrapper { padding: 6px 15px 14px; }

/* 同时支持原始 class（analysis.js 动态生成）和 dc- 前缀 class（HTML 静态部分） */
/* 布局：左侧 2 个小卡（文件数 / 字符总计）+ 右侧 1 个大卡（Credits，突出） */
.dc-stats-grid, .stats-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}
.dc-stats-grid, .stats-grid.stats-grid-3col {
    grid-template-columns: 1fr 1.6fr;
    grid-template-areas: "files credits" "chars credits";
}

/* 让 analysis.js 动态生成的 3 个 stats-item 按顺序落到对应网格区域 */
.dc-stats-grid .dc-stats-item:nth-child(1),
.stats-grid .stats-item:nth-child(1) { grid-area: files; }
.dc-stats-grid .dc-stats-item:nth-child(2),
.stats-grid .stats-item:nth-child(2) { grid-area: credits; }
.dc-stats-grid .dc-stats-item:nth-child(3),
.stats-grid .stats-item:nth-child(3) { grid-area: chars; }

.dc-stats-item, .stats-item {
    background: #F7F9FC;
    border: 1px solid #E4EAF2;
    border-radius: 9px;
    padding: 10px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Credits 卡片（中间项，grid-area: credits）突出显示 */
.dc-stats-grid .dc-stats-item:nth-child(2),
.stats-grid .stats-item:nth-child(2) {
    background: linear-gradient(135deg, #EAF1FE, #D6E4FB);
    border-color: #C9D8F5;
    justify-content: center;
}

.dc-stats-grid .dc-stats-item:nth-child(2) .stat-value,
.dc-stats-grid .dc-stats-item:nth-child(2) .dc-stat-value,
.stats-grid .stats-item:nth-child(2) .stat-value {
    font-size: 26px;
    color: #1D5BD6;
    letter-spacing: -0.5px;
}

.dc-stats-grid .dc-stats-item:nth-child(2) .stat-label,
.dc-stats-grid .dc-stats-item:nth-child(2) .dc-stat-label,
.stats-grid .stats-item:nth-child(2) .stat-label {
    color: #1749B5;
    font-weight: 600;
}

.dc-stat-label, .stat-label {
    font-size: 10.5px;
    color: #8A94A3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.dc-stat-value, .stat-value {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: #0E1726;
}

/* 加载指示器 */
.dc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 11.5px;
    color: #8A94A3;
}

.dc-loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #DCE4F0;
    border-top-color: #1D5BD6;
    border-radius: 50%;
    animation: dcSpin 0.8s linear infinite;
}

@keyframes dcSpin {
    to { transform: rotate(360deg); }
}

.loading-text { font-size: 11.5px; color: #8A94A3; }

/* ---------- 操作按钮区 ---------- */
.dc-action-buttons {
    padding: 14px 15px;
    border-top: 1px solid #EDF1F7;
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: auto;
}

.dc-btn-action {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.dc-btn-action:active { transform: scale(0.98); }

.btn-primary.dc-btn-action {
    background: linear-gradient(135deg, #2E6FE6, #1D5BD6);
    color: #fff;
    border: none;
    box-shadow: 0 6px 16px -6px rgba(46, 111, 230, 0.55);
}

.btn-primary.dc-btn-action:hover {
    background: linear-gradient(135deg, #2361DE, #1749B5);
}

.btn-primary.dc-btn-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #B4BCC9;
    box-shadow: none;
}

.btn-secondary.dc-btn-action {
    background: #F4F7FB;
    color: #5B6675;
    border: 1px solid #DCE4F0;
}

.btn-secondary.dc-btn-action:hover {
    background: #E1E8F2;
    color: #334155;
}

/* ==================== 通知（保留 .notification 契约） ==================== */
.notification {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 500;
    min-width: 280px;
    max-width: 380px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.25);
    border-left: 4px solid #1D5BD6;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: dcSlideIn 0.3s ease both;
}

.notification.success { border-left-color: #12A150; }
.notification.warning { border-left-color: #E69A3C; }
.notification.error { border-left-color: #C0392B; }

.notification-message {
    flex: 1;
    font-size: 13px;
    color: #182233;
    line-height: 1.4;
}

@keyframes dcSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: none; }
}

/* ==================== 加载态（analysis.js:1442 动态 insertAdjacentHTML） ==================== */
.loading-state {
    padding: 30px 20px;
    text-align: center;
    color: #8A94A3;
    font-size: 13px;
}

.loading-state .loading-spinner {
    width: 24px;
    height: 24px;
    margin: 0 auto 10px;
    border: 2.5px solid #DCE4F0;
    border-top-color: #1D5BD6;
    border-radius: 50%;
    animation: dcSpin 0.8s linear infinite;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1100px) {
    .dc-three-col {
        grid-template-columns: 1fr;
    }
    .files-section, .batch-statistics-section { order: 2; }
    .analysis-section { order: 1; }
}

@media (max-width: 760px) {
    .dc-main-workstation { padding: 18px; }
    .dc-controls-row { flex-direction: column; align-items: stretch; }
    .dc-option-group { width: 100%; }
    .dc-select { width: 100%; min-width: 0; }
    .dc-swap-btn { align-self: flex-start; }
    .dc-workstation-title { font-size: 18px; }
    .dc-stats-grid, .stats-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "files" "chars" "credits";
    }
    .notification { left: 12px; right: 12px; min-width: 0; max-width: none; }
}
