/**
 * template-variants.css
 * 模板变体样式汇总（从各 registerCss() 迁移而来）
 *
 * 包含：view 变体（report/workflow/tabs/timeline）、chart（dashboard/bar/line/pie）、
 * form 变体（batch-create/wizard/inline-edit/standard）、browse 变体（card/tree/timeline）、
 * shared 组件（empty-state/progress-bar/stat-card）、widgets、createItem/updateItem/browseJoin、
 * recycle bin、duplicate
 *
 * CSS 变量继承自 layout.css
 */

/* ================================================================
   VIEW 变体 — report
   ================================================================ */
.report-summary {
    background: var(--accent-primary, #0070D6);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.report-summary-item { text-align: center; }
.report-summary-item.highlight { background: rgba(255,255,255,0.2); padding: 15px; border-radius: 4px; }
.report-summary-label { font-size: 14px; opacity: 0.9; margin-bottom: 8px; }
.report-summary-value { font-size: 24px; font-weight: bold; }
.report-table { margin-bottom: 30px; }
.report-table-title {
    font-size: 16px; font-weight: bold; color: var(--text-primary, #1a1a1a);
    margin-bottom: 15px; padding-left: 10px; border-left: 4px solid var(--accent-primary, #0070D6);
}
.report-table table { width: 100%; }
.report-table thead th { background: var(--bg-secondary, #f5f5f5); font-weight: bold; text-align: center; border: 1px solid #e7eaec; padding: 12px; }
.report-table tbody td { border: 1px solid #e7eaec; padding: 10px; }
.report-table tbody td:first-child { font-weight: 500; }
.report-table tbody td.number { text-align: right; }
.report-table tfoot td { background: #f9f9f9; font-weight: bold; border: 1px solid #e7eaec; padding: 12px; }
.report-chart { margin-bottom: 30px; }
@media print {
    .no-print { display: none !important; }
    .report-summary { background: #f5f5f5 !important; color: #333 !important; }
}

/* ================================================================
   VIEW 变体 — workflow
   ================================================================ */
.workflow-container { padding: 20px 0; }
.workflow-steps { position: relative; padding: 20px 0; }
.workflow-step { display: flex; margin-bottom: 30px; position: relative; }
.workflow-step::before { content: ''; position: absolute; left: 30px; top: 60px; bottom: -30px; width: 2px; background: #e7eaec; }
.workflow-step:last-child::before { display: none; }
.workflow-step-icon {
    flex-shrink: 0; width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; z-index: 10; position: relative;
}
.workflow-step-icon.completed { background: var(--accent-success, #008A47); color: #fff; }
.workflow-step-icon.current { background: var(--accent-primary, #0070D6); color: #fff; animation: wf-pulse 2s infinite; }
.workflow-step-icon.pending { background: #f3f3f4; color: #999; border: 2px solid #e7eaec; }
.workflow-step-icon.rejected { background: var(--accent-danger, #c41e1e); color: #fff; }
@keyframes wf-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 112, 214, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(0, 112, 214, 0); }
}
.workflow-step-content { flex: 1; margin-left: 20px; background: #fff; border: 1px solid #e7eaec; border-radius: 4px; padding: 20px; }
.workflow-step-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.workflow-step-name { font-size: 16px; font-weight: bold; color: var(--text-primary, #1a1a1a); }
.workflow-step-time { font-size: 12px; color: var(--text-muted, #767676); }
.workflow-step-approver { color: var(--text-secondary, #555); margin-bottom: 10px; }
.workflow-step-comment { background: #f9f9f9; padding: 10px; border-radius: 4px; color: var(--text-secondary, #555); font-size: 14px; }
.workflow-status-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: bold; }
.workflow-status-badge.completed { background: var(--accent-success, #008A47); color: #fff; }
.workflow-status-badge.current { background: var(--accent-primary, #0070D6); color: #fff; }
.workflow-status-badge.pending { background: #f3f3f4; color: #999; }
.workflow-status-badge.rejected { background: var(--accent-danger, #c41e1e); color: #fff; }

/* ================================================================
   VIEW 变体 — tabs
   ================================================================ */
.view-tabs .nav-tabs > li > a { color: var(--text-secondary, #555); padding: 12px 20px; }
.view-tabs .nav-tabs > li.active > a { color: var(--accent-primary, #0070D6); border-bottom: 2px solid var(--accent-primary, #0070D6); background: transparent; }
.view-tabs .nav-tabs > li > a:hover { background: var(--bg-secondary, #f5f5f5); border-color: transparent; }
.view-tabs .nav-tabs > li > a i { margin-right: 5px; }
.tab-badge {
    display: inline-block; min-width: 18px; padding: 3px 7px; font-size: 11px; font-weight: bold;
    line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: middle;
    background-color: var(--accent-danger, #c41e1e); border-radius: 10px; margin-left: 5px;
}
.view-tabs .tab-content { padding: 20px; background: #fff; border: 1px solid #e7eaec; border-top: none; }

/* ================================================================
   VIEW 变体 — timeline
   ================================================================ */
.timeline-view { position: relative; padding: 20px 0; }
.timeline-view::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #e7eaec; transform: translateX(-50%); }
.timeline-item { position: relative; margin-bottom: 40px; display: flex; align-items: flex-start; }
.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
.timeline-content {
    width: calc(50% - 40px); background: #fff; border: 1px solid #e7eaec;
    border-radius: 4px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.timeline-item:nth-child(odd) .timeline-content { margin-right: auto; text-align: right; }
.timeline-item:nth-child(even) .timeline-content { margin-left: auto; text-align: left; }
.timeline-view .timeline-badge {
    position: absolute; left: 50%; transform: translateX(-50%); width: 40px; height: 40px;
    border-radius: 50%; background: #fff; border: 3px solid var(--accent-primary, #0070D6);
    display: flex; align-items: center; justify-content: center; z-index: 10; font-size: 16px;
}
.timeline-badge.blue { border-color: var(--accent-primary, #0070D6); color: var(--accent-primary, #0070D6); }
.timeline-badge.green { border-color: var(--accent-success, #008A47); color: var(--accent-success, #008A47); }
.timeline-badge.orange { border-color: #f8ac59; color: #f8ac59; }
.timeline-badge.red { border-color: var(--accent-danger, #c41e1e); color: var(--accent-danger, #c41e1e); }
.timeline-badge.gray { border-color: #999; color: #999; }
.timeline-time { font-size: 12px; color: var(--text-muted, #767676); margin-bottom: 8px; }
.timeline-title { font-size: 16px; font-weight: bold; color: var(--text-primary, #1a1a1a); margin-bottom: 10px; }
.timeline-description { color: var(--text-secondary, #555); line-height: 1.6; margin-bottom: 10px; }
.timeline-user { font-size: 12px; color: var(--text-muted, #767676); }
.timeline-attachments { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.timeline-attachment { display: inline-block; margin-right: 10px; color: var(--link-color, #0070D6); }
@media (max-width: 768px) {
    .timeline-view::before { left: 20px; }
    .timeline-item { flex-direction: column !important; }
    .timeline-content { width: calc(100% - 60px); margin-left: 60px !important; text-align: left !important; }
    .timeline-view .timeline-badge { left: 20px; transform: none; }
}

/* ================================================================
   CHART 变体 — dashboard KPI
   ================================================================ */
.kpi-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; margin-bottom: 20px; }
.kpi-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border-left: 4px solid var(--accent-primary, #0070D6); }
.kpi-card.blue { border-left-color: var(--accent-primary, #0070D6); }
.kpi-card.green { border-left-color: var(--accent-success, #008A47); }
.kpi-card.orange { border-left-color: #f8ac59; }
.kpi-card.red { border-left-color: var(--accent-danger, #c41e1e); }
.kpi-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.kpi-label { font-size: 14px; color: var(--text-muted, #767676); font-weight: 500; }
.kpi-icon { font-size: 24px; color: #ccc; }
.kpi-value { font-size: 28px; font-weight: bold; color: var(--text-primary, #1a1a1a); margin-bottom: 8px; }
.kpi-trend { font-size: 12px; font-weight: bold; }
.kpi-trend.up { color: var(--accent-success, #008A47); }
.kpi-trend.down { color: var(--accent-danger, #c41e1e); }
.chart-box { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 20px; }
.chart-box-title { font-size: 16px; font-weight: bold; color: var(--text-primary, #1a1a1a); margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #f0f0f0; }
.data-table-box { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 20px; }
.data-table-title { font-size: 16px; font-weight: bold; color: var(--text-primary, #1a1a1a); margin-bottom: 15px; }

/* ================================================================
   CHART 变体 — bar/line/pie 公用
   ================================================================ */
.chart-container { position: relative; height: 400px; margin: 20px 0; }
.chart-container--pie { max-width: 600px; margin-left: auto; margin-right: auto; }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.summary-card { background: #fff; border: 1px solid #e7eaec; border-radius: 4px; padding: 20px; text-align: center; }
.summary-card-icon { font-size: 32px; color: var(--accent-primary, #0070D6); margin-bottom: 10px; }
.summary-card-label { font-size: 14px; color: var(--text-muted, #767676); margin-bottom: 5px; }
.summary-card-value { font-size: 24px; font-weight: bold; color: var(--text-primary, #1a1a1a); }
.trend-up { color: var(--accent-success, #008A47); }
.trend-down { color: var(--accent-danger, #c41e1e); }
.data-table { margin-top: 30px; }
.data-table table { width: 100%; }
.data-table thead th { background: var(--bg-secondary, #f5f5f5); font-weight: bold; text-align: center; border: 1px solid #e7eaec; padding: 12px; }
.data-table tbody td { border: 1px solid #e7eaec; padding: 10px; text-align: center; }
.color-indicator { display: inline-block; width: 16px; height: 16px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }

/* ================================================================
   FORM 变体 — batch-create
   ================================================================ */
.batch-table-container { overflow-x: auto; margin-bottom: 20px; }
.batch-table { width: 100%; min-width: 800px; }
.batch-table thead th { background: var(--bg-secondary, #f5f5f5); font-weight: bold; text-align: center; border: 1px solid #e7eaec; padding: 12px 8px; white-space: nowrap; }
.batch-table thead th.required::after { content: " *"; color: var(--accent-danger, #c41e1e); }
.batch-table tbody td { border: 1px solid #e7eaec; padding: 5px; }
.batch-table tbody td input,
.batch-table tbody td select { width: 100%; border: none; padding: 8px; background: transparent; }
.batch-table tbody td input:focus,
.batch-table tbody td select:focus { background: var(--row-hover-bg, #f0f7ff); outline: 1px solid var(--accent-primary, #0070D6); }
.batch-table tbody tr:hover { background: #f9f9f9; }
.row-number { text-align: center; color: var(--text-muted, #767676); font-weight: bold; }
.row-actions { text-align: center; }
.row-delete-btn { color: var(--accent-danger, #c41e1e); cursor: pointer; padding: 5px 10px; }
.row-delete-btn:hover { color: #a31818; }
.batch-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 15px; background: #f9f9f9; border-radius: 4px; }

/* ================================================================
   FORM 变体 — wizard
   ================================================================ */
.wizard-steps { display: flex; justify-content: space-between; margin-bottom: 40px; position: relative; }
.wizard-steps::before { content: ''; position: absolute; top: 30px; left: 0; right: 0; height: 2px; background: #e7eaec; z-index: 0; }
.wizard-step { flex: 1; text-align: center; position: relative; z-index: 1; }
.wizard-step-circle {
    width: 60px; height: 60px; border-radius: 50%; background: #fff; border: 3px solid #e7eaec;
    margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #999; transition: all 0.3s;
}
.wizard-step.active .wizard-step-circle { border-color: var(--accent-primary, #0070D6); background: var(--accent-primary, #0070D6); color: #fff; box-shadow: 0 0 0 4px rgba(0, 112, 214, 0.2); }
.wizard-step.completed .wizard-step-circle { border-color: var(--accent-primary, #0070D6); background: #fff; color: var(--accent-primary, #0070D6); }
.wizard-step-title { font-size: 14px; font-weight: bold; color: var(--text-secondary, #555); margin-bottom: 5px; }
.wizard-step.active .wizard-step-title { color: var(--accent-primary, #0070D6); }
.wizard-step-description { font-size: 12px; color: var(--text-muted, #767676); }
.wizard-content { min-height: 300px; margin-bottom: 20px; }
.wizard-step-panel { display: none; }
.wizard-step-panel.active { display: block; }
.wizard-buttons { display: flex; justify-content: space-between; padding-top: 20px; border-top: 1px solid #e7eaec; }

/* ================================================================
   FORM 变体 — inline-edit
   ================================================================ */
.inline-edit-table { width: 100%; }
.inline-edit-table thead th { background: var(--bg-secondary, #f5f5f5); font-weight: bold; text-align: center; border: 1px solid #e7eaec; padding: 12px; }
.inline-edit-table tbody td { border: 1px solid #e7eaec; padding: 8px; }
.inline-edit-cell { position: relative; cursor: pointer; min-height: 30px; }
.inline-edit-cell:hover { background: var(--row-hover-bg, #f0f7ff); }
.inline-edit-cell.editing { background: #fff; }
.inline-edit-input { width: 100%; border: 1px solid var(--accent-primary, #0070D6); padding: 6px; box-shadow: 0 0 5px rgba(0, 112, 214, 0.3); }
.inline-edit-readonly { color: var(--text-muted, #767676); font-style: italic; }
.cell-changed { background: var(--row-hover-bg, #f0f7ff); position: relative; }
.cell-changed::after { content: '*'; color: #f8ac59; font-weight: bold; position: absolute; right: 5px; top: 5px; }
.save-indicator {
    position: fixed; top: 70px; right: 20px; padding: 10px 20px;
    background: var(--accent-success, #008A47); color: #fff; border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); display: none; z-index: 1000;
}
.row-checkbox { text-align: center; }

/* ================================================================
   FORM 变体 — standard
   ================================================================ */
.form-section { margin-bottom: 30px; }
.form-section-title {
    font-size: 16px; font-weight: bold; color: var(--text-primary, #1a1a1a);
    margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--accent-primary, #0070D6);
}
.form-section-title i { margin-right: 8px; color: var(--accent-primary, #0070D6); }
.required-mark::after { content: " *"; color: var(--accent-danger, #c41e1e); }

/* ================================================================
   FORM 变体 — detail-table（子表面板）
   ================================================================ */
.detail-table-panel { margin-top: 20px; border: 1px solid #e7eaec; border-radius: 4px; background: #fff; }
.detail-table-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; background: #f9f9f9; border-bottom: 1px solid #e7eaec; }
.detail-table-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-primary, #1a1a1a); }
.detail-table-panel .detail-table { margin-bottom: 0; }
.detail-table-panel .detail-table thead th { background: #fafafa; font-size: 12px; font-weight: 600; color: var(--text-secondary, #555); padding: 6px 8px; white-space: nowrap; }
.detail-table-panel .detail-table tbody td { padding: 4px 6px; vertical-align: middle; }
.detail-table-panel .detail-table .form-control.input-sm { height: 28px; padding: 2px 6px; font-size: 12px; }
.detail-table-panel .detail-table textarea.form-control.input-sm { height: auto; }
.dt-col-rownum { color: var(--text-muted, #767676); font-size: 12px; }
.dt-col-actions .btn-sm { padding: 2px 6px; }

/* ================================================================
   BROWSE 变体 — card
   ================================================================ */
.product-card { border: 1px solid #e7eaec; border-radius: 4px; background: #fff; margin-bottom: 20px; transition: all 0.3s; overflow: hidden; }
.product-card:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.1); transform: translateY(-2px); }
.product-card-image { width: 100%; height: 200px; object-fit: cover; background: var(--bg-secondary, #f5f5f5); }
.product-card-body { padding: 15px; }
.product-card-title { font-size: 16px; font-weight: bold; margin-bottom: 10px; color: var(--text-primary, #1a1a1a); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-desc { color: var(--text-secondary, #555); font-size: 13px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 60px; }
.product-card-price { color: var(--accent-danger, #c41e1e); font-size: 18px; font-weight: bold; }
.product-card-footer { padding: 10px 15px; background: #f9f9f9; border-top: 1px solid #e7eaec; font-size: 12px; color: var(--text-muted, #767676); }

/* ================================================================
   BROWSE 变体 — tree
   ================================================================ */
.tree-grid-row { cursor: pointer; }
.tree-grid-row:hover { background-color: var(--row-hover-bg, #f0f7ff); }
.tree-indent { display: inline-block; width: 20px; }
.tree-toggle { cursor: pointer; color: var(--link-color, #0070D6); margin-right: 5px; }
.tree-toggle:hover { color: var(--link-hover, #004fa3); }
.tree-node-icon { margin-right: 5px; color: var(--text-secondary, #555); }
.tree-level-0 { font-weight: bold; }
.tree-level-1 { padding-left: 20px; }
.tree-level-2 { padding-left: 40px; }
.tree-level-3 { padding-left: 60px; }
.tree-level-4 { padding-left: 80px; }

/* ================================================================
   BROWSE 变体 — timeline
   ================================================================ */
.browse-timeline { position: relative; padding: 20px 0; }
.browse-timeline::before { content: ''; position: absolute; left: 30px; top: 0; bottom: 0; width: 2px; background: #e7eaec; }
.browse-timeline .timeline-item { position: relative; padding-left: 70px; margin-bottom: 30px; }
.browse-timeline .timeline-badge {
    position: absolute; left: 20px; width: 22px; height: 22px;
    border-radius: 50%; background: #fff; border: 2px solid var(--accent-primary, #0070D6); z-index: 10;
}
.browse-timeline .timeline-badge.green { border-color: var(--accent-success, #008A47); }
.browse-timeline .timeline-badge.blue { border-color: var(--accent-primary, #0070D6); }
.browse-timeline .timeline-badge.orange { border-color: #f8ac59; }
.browse-timeline .timeline-badge.red { border-color: var(--accent-danger, #c41e1e); }
.browse-timeline .timeline-badge.gray { border-color: #999; }
.browse-timeline .timeline-badge i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 10px; }
.timeline-panel { background: #fff; border: 1px solid #e7eaec; border-radius: 4px; padding: 15px; box-shadow: 0 1px 1px rgba(0,0,0,0.05); }
.timeline-heading { margin-bottom: 10px; }
.browse-timeline .timeline-title { font-size: 15px; font-weight: bold; color: var(--text-primary, #1a1a1a); margin: 0 0 5px 0; }
.timeline-meta { font-size: 12px; color: var(--text-muted, #767676); }
.timeline-body { color: var(--text-secondary, #555); line-height: 1.6; }
.timeline-date-divider { position: relative; padding-left: 70px; margin: 30px 0 20px 0; }
.timeline-date-divider .date-label { display: inline-block; background: #f3f3f4; padding: 5px 15px; border-radius: 12px; font-size: 12px; font-weight: bold; color: var(--text-secondary, #555); }

/* ================================================================
   SHARED 组件 — empty-state
   ================================================================ */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted, #767676); }
.empty-state-icon { font-size: 80px; margin-bottom: 20px; opacity: 0.6; }
.empty-state-image { max-width: 300px; margin-bottom: 20px; opacity: 0.7; }
.empty-state-title { font-size: 24px; font-weight: 600; color: var(--text-secondary, #555); margin-bottom: 10px; }
.empty-state-message { font-size: 14px; color: var(--text-muted, #767676); margin-bottom: 30px; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.empty-state-actions { margin-top: 30px; }
.empty-state-actions .btn { margin: 0 5px; }

/* ================================================================
   SHARED 组件 — progress-bar
   ================================================================ */
.progress-container { margin-bottom: 15px; }
.progress-label { font-size: 14px; color: var(--text-secondary, #555); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.progress-striped .progress-bar {
    background-image: linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-size: 40px 40px;
}
.progress-striped.active .progress-bar { animation: progress-stripes 2s linear infinite; }
@keyframes progress-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } }
.progress-circle { width: 120px; height: 120px; margin: 0 auto; }

/* ================================================================
   SHARED 组件 — stat-card
   ================================================================ */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card {
    background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 4px solid var(--accent-primary, #0070D6); transition: all 0.3s;
    text-decoration: none; color: inherit; display: block;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-decoration: none; }
.stat-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.stat-card-label { font-size: 14px; color: var(--text-muted, #767676); font-weight: 500; }
.stat-card-icon { font-size: 32px; color: #ccc; opacity: 0.5; }
.stat-card-value { font-size: 32px; font-weight: bold; color: var(--text-primary, #1a1a1a); margin-bottom: 8px; }
.stat-card-trend { font-size: 12px; font-weight: bold; }
.stat-card-trend.up { color: var(--accent-success, #008A47); }
.stat-card-trend.down { color: var(--accent-danger, #c41e1e); }
.stat-card-footer { margin-top: 15px; padding-top: 15px; border-top: 1px solid #f0f0f0; font-size: 12px; color: var(--text-muted, #767676); }

/* ================================================================
   WIDGET — WorkflowTimeline
   ================================================================ */
.wf-timeline { border-left: 1px solid #e7eaec; padding-left: 20px; margin-top: 20px; }
.wf-timeline .timeline-item { position: relative; margin-bottom: 20px; }
.wf-timeline .timeline-item .date { text-align: right; width: 110px; position: relative; padding-right: 10px; }
.wf-timeline .timeline-item .date i { position: absolute; right: -8px; top: 5px; background: #fff; color: var(--accent-primary, #0070D6); font-size: 14px; }
.wf-timeline .timeline-item .content { border-left: 1px solid #e7eaec; padding-left: 20px; }
.wf-timeline .timeline-item .content p { margin-bottom: 5px; }
.wf-timeline .timeline-item .content strong { color: var(--text-secondary, #555); }

/* ================================================================
   WIDGET — QuickDesign
   ================================================================ */
.quick-design-panel { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 10px; margin-bottom: 15px; }
.quick-design-floating { position: fixed; right: 20px; top: 100px; width: 180px; z-index: 1000; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.quick-design-title { font-weight: bold; color: var(--link-color, #0070D6); margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.quick-design-links { list-style: none; padding: 0; margin: 0; }
.quick-design-links li { margin: 5px 0; }
.quick-design-links a { display: block; padding: 5px 10px; color: var(--text-primary, #1a1a1a); text-decoration: none; border-radius: 3px; transition: all 0.3s; }
.quick-design-links a:hover { background: var(--bg-secondary, #f5f5f5); color: var(--link-color, #0070D6); }
.quick-design-links i { width: 20px; text-align: center; }

/* ================================================================
   createItem / updateItem 公用样式
   ================================================================ */
.ci-template { max-width: 1100px; margin: 0 auto; }
.ci-form-card { background: #fff; border: 1px solid #e7eaec; border-radius: 4px; padding: 20px 24px; }
.ci-parent-info { background: #f8f9fa; border: 1px solid #e7eaec; border-radius: 4px; padding: 12px 16px; margin-bottom: 16px; font-size: 16px; color: var(--text-secondary, #555); }
.ci-parent-info strong { color: var(--text-primary, #1a1a1a); }
.ci-form-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid #f0f0f0; text-align: right; }
.ci-section-title { font-size: 18px; font-weight: 600; color: var(--text-primary, #1a1a1a); margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-primary, #0070D6); }
.ci-section-title:first-child { margin-top: 0; }
.ci-detail-panel { margin-top: 0; }
.ci-detail-toolbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.ci-detail-table { width: 100%; border-collapse: collapse; }
.ci-detail-table th { background: #f9f9f9; font-size: 16px; font-weight: 600; padding: 8px 10px; border: 1px solid #e7eaec; white-space: nowrap; }
.ci-detail-table td { padding: 6px 8px; border: 1px solid #e7eaec; vertical-align: middle; }
.ci-detail-table .ci-col-rownum { width: 36px; text-align: center; color: var(--text-muted, #767676); font-size: 14px; }
.ci-detail-table .ci-col-action { width: 50px; text-align: center; }
.ci-detail-table .form-control { font-size: 16px; }
.ci-detail-table input.form-control, .ci-detail-table select.form-control { height: 30px; padding: 4px 8px; }
.ci-detail-row.ci-row-deleted { display: none; }
.ci-tq-wrap { position: relative; }
.ci-tq-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 1050; background: #fff; border: 1px solid #ddd; border-top: none; border-radius: 0 0 4px 4px; max-height: 200px; overflow-y: auto; display: none; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.ci-tq-item { padding: 6px 10px; cursor: pointer; font-size: 16px; border-bottom: 1px solid #f0f0f0; }
.ci-tq-item:hover { background: var(--row-hover-bg, #f0f7ff); }
.ci-tq-item:last-child { border-bottom: none; }
.ci-tq-loading { padding: 8px 10px; color: var(--text-muted, #767676); font-size: 14px; text-align: center; }
@media (max-width: 767px) {
    .ci-template { padding: 0 8px; max-width: 100%; }
    .ci-form-card { padding: 16px; }
    .ci-detail-table { font-size: 14px; }
}

/* ================================================================
   browseJoin 公用样式
   ================================================================ */
.bj-table-wrap { background: #fff; border: 1px solid #e7eaec; border-radius: 4px; }
.bj-table-wrap .grid-view { margin-bottom: 0; }
.bj-table-wrap table { font-size: 16px; }
.bj-table-wrap th { background: #fafafa; font-weight: 500; color: var(--text-secondary, #555); white-space: nowrap; }
.bj-table-wrap td { vertical-align: middle; }
.bj-search-bar { background: #fff; border: 1px solid #e7eaec; border-radius: 4px; padding: 12px 16px; margin-bottom: 12px; }
.bj-search-bar .form-control { font-size: 16px; }
.bj-search-bar .rl-search-form { display: flex; margin: 0; align-items: stretch; }
.bj-search-bar .rl-search-form .rl-search-input { flex: 1 1 auto; border-radius: 4px 0 0 4px; }
.bj-search-bar .rl-search-form .rl-search-btn { border-radius: 0 4px 4px 0; margin-left: -1px; white-space: nowrap; }
.bj-record-count { font-size: 14px; line-height: 30px; }

/* ================================================================
   回收站 recycle
   ================================================================ */
.rl-recycle-banner { display: flex; align-items: center; padding: 10px 15px; background: #fff8e1; border: 1px solid #ffe082; border-radius: 4px; margin-bottom: 12px; font-size: 16px; color: #795548; }
.rl-recycle-banner-icon { margin-right: 8px; font-weight: 600; font-size: 16px; }
.rl-recycle-banner-text { flex: 1; }
.rl-recycle-banner-count { font-weight: 600; color: #e65100; margin-left: 8px; }
.rl-batch-bar { display: none; align-items: center; padding: 8px 15px; background: #e3f2fd; border: 1px solid #90caf9; border-radius: 4px; margin-bottom: 8px; font-size: 16px; color: #1565c0; gap: 12px; }
.rl-batch-bar.active { display: flex; }
.rl-batch-bar-count { font-weight: 600; }
.rl-card-item-actions { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.rl-confirm-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 9999; }
.rl-confirm-overlay.active { display: flex; justify-content: center; align-items: center; }
.rl-confirm-box { background: #fff; border-radius: 6px; padding: 24px; max-width: 400px; width: 90%; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.rl-confirm-title { font-size: 18px; font-weight: 600; color: var(--text-primary, #1a1a1a); margin-bottom: 12px; }
.rl-confirm-msg { font-size: 16px; color: var(--text-secondary, #555); margin-bottom: 20px; line-height: 1.5; }
.rl-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 767px) {
    .rl-batch-bar { flex-direction: column; align-items: stretch; gap: 8px; }
}

/* ================================================================
   复制提示横幅 duplicate
   ================================================================ */
.rf-dup-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; margin-bottom: 16px; background: #fff8e6; border: 1px solid #ffe58f; border-radius: 6px; font-size: 16px; color: #874d00; }
.rf-dup-banner-icon { flex-shrink: 0; width: 20px; height: 20px; line-height: 20px; text-align: center; background: #faad14; color: #fff; border-radius: 50%; font-size: 14px; font-weight: 700; }
.rf-dup-banner-text { flex: 1; }
.rf-dup-banner-source { font-weight: 600; color: var(--text-primary, #1a1a1a); }

/* ================================================================
   Dark Mode 覆盖
   ================================================================ */
body.dark-mode .report-summary { background: var(--accent-primary); }
body.dark-mode .report-table-title { color: var(--text-primary); }
body.dark-mode .workflow-step-content { background: var(--bg-primary); border-color: var(--border-color); }
body.dark-mode .workflow-step-name { color: var(--text-primary); }
body.dark-mode .workflow-step-comment { background: var(--bg-secondary); color: var(--text-primary); }
body.dark-mode .timeline-content,
body.dark-mode .timeline-panel { background: var(--bg-primary); border-color: var(--border-color); color: var(--text-primary); }
body.dark-mode .kpi-card,
body.dark-mode .chart-box,
body.dark-mode .data-table-box,
body.dark-mode .stat-card,
body.dark-mode .summary-card,
body.dark-mode .product-card { background: var(--bg-primary); border-color: var(--border-color); }
body.dark-mode .kpi-value,
body.dark-mode .stat-card-value,
body.dark-mode .summary-card-value,
body.dark-mode .product-card-title { color: var(--text-primary); }
body.dark-mode .kpi-label,
body.dark-mode .stat-card-label,
body.dark-mode .summary-card-label { color: var(--text-secondary); }
body.dark-mode .batch-table thead th,
body.dark-mode .inline-edit-table thead th,
body.dark-mode .detail-table-panel .detail-table thead th { background: var(--bg-secondary); color: var(--text-secondary); }
body.dark-mode .batch-table tbody td,
body.dark-mode .inline-edit-table tbody td,
body.dark-mode .detail-table-panel { background: var(--bg-primary); border-color: var(--border-color); color: var(--text-primary); }
body.dark-mode .detail-table-header { background: var(--bg-secondary); border-color: var(--border-color); }
body.dark-mode .empty-state-title { color: var(--text-primary); }
body.dark-mode .empty-state-message { color: var(--text-secondary); }
body.dark-mode .quick-design-panel { background: var(--bg-primary); border-color: var(--border-color); }
body.dark-mode .quick-design-title { color: var(--accent-primary); }
body.dark-mode .ci-form-card,
body.dark-mode .bj-table-wrap,
body.dark-mode .bj-search-bar { background: var(--bg-primary); border-color: var(--border-color); }
body.dark-mode .ci-detail-table th { background: var(--bg-secondary); }
body.dark-mode .ci-detail-table td,
body.dark-mode .ci-detail-table th { border-color: var(--border-color); }
body.dark-mode .ci-tq-results { background: var(--bg-primary); border-color: var(--border-color); }
body.dark-mode .ci-tq-item:hover { background: var(--bg-secondary); }
body.dark-mode .rl-confirm-box { background: var(--bg-primary); }
body.dark-mode .rl-confirm-title { color: var(--text-primary); }
body.dark-mode .rl-confirm-msg { color: var(--text-secondary); }
body.dark-mode .rf-dup-banner { background: rgba(250, 173, 20, 0.1); border-color: rgba(250, 173, 20, 0.3); color: #faad14; }
