/* ==========================================================================
   AI 数据开发工作台 · 视觉系统
   设计语言来自：350000-website-data-platform-template-gemini
   - 浅色冷灰底 / 白卡 / 蓝主调 / 64px 顶栏 / 220px 侧栏 / 内联 SVG
   ========================================================================== */

:root {
    --bg-global: #f4f6f8;
    --bg-card: #ffffff;
    --bg-soft: #f8fafc;
    --bg-muted: #f1f5f9;

    --text-main: #0f172a;
    --text-muted: #334155;
    --text-light: #64748b;
    --text-faint: #94a3b8;

    --color-blue: #3b82f6;
    --color-blue-hover: #2563eb;
    --color-blue-light: #eff6ff;
    --color-teal: #0d9488;
    --color-green: #16a34a;
    --color-amber: #d97706;
    --color-rose: #e11d48;
    --color-purple: #8b5cf6;

    --border-color: #e2e8f0;
    --border-soft: #f1f5f9;

    --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md: 0 4px 12px rgba(15,23,42,0.06);
    --shadow-lg: 0 8px 24px rgba(15,23,42,0.08);

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

[data-theme="dark"] {
    --bg-global: #0b1220;
    --bg-card: #111a2e;
    --bg-soft: #0f1828;
    --bg-muted: #1c2740;

    --text-main: #e2e8f0;
    --text-muted: #cbd5e1;
    --text-light: #94a3b8;
    --text-faint: #64748b;

    --color-blue: #60a5fa;
    --color-blue-hover: #3b82f6;
    --color-blue-light: #1e3a5f;
    --color-teal: #2dd4bf;
    --color-green: #34d399;
    --color-amber: #fbbf24;
    --color-rose: #fb7185;
    --color-purple: #a78bfa;

    --border-color: #1e293b;
    --border-soft: #1c2740;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-global);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.5;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; }
code, pre { font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; }

/* 全局滚动条美化 */
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
[data-theme="dark"] * { scrollbar-color: #334155 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-blue); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #334155; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: var(--color-blue); }

/* 全局动画 */
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
    50% { box-shadow: 0 0 0 5px rgba(22, 163, 74, 0); }
}
@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-fade-in { animation: page-fade-in 0.25s ease-out; }

/* ==========================================================================
   全屏骨架
   ========================================================================== */
.app-layout { display: flex; flex-direction: column; height: 100vh; }
.app-body { display: flex; flex: 1; height: calc(100vh - 64px); overflow: hidden; }

/* ==========================================================================
   顶栏 (64px)
   ========================================================================== */
.app-header {
    height: 64px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    flex-shrink: 0;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-icon {
    width: 32px; height: 32px;
    background: var(--color-blue);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    box-shadow: inset -1px -1px 2px rgba(0,0,0,0.08);
    flex-shrink: 0;
}
.logo-text { font-size: 18px; font-weight: 700; color: var(--text-main); flex-shrink: 0; }
.header-tag {
    font-size: 11px; background: var(--bg-muted); color: var(--text-light);
    padding: 3px 8px; border-radius: var(--radius-sm); font-weight: 600;
    flex-shrink: 0;
}

/* 面包屑 */
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-light);
    margin-left: 8px;
    overflow: hidden;
}
.breadcrumb .crumb-sep {
    color: var(--text-faint);
    display: inline-flex; align-items: center;
}
.breadcrumb .crumb-link {
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.15s;
}
.breadcrumb .crumb-link:hover { color: var(--color-blue); }
.breadcrumb .crumb-current {
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
}

.header-right { display: flex; align-items: center; gap: 12px; }

/* 全局搜索框 */
.global-search {
    position: relative;
    display: flex; align-items: center;
    width: 240px; height: 36px;
    background-color: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 10px 0 32px;
    transition: all 0.15s;
}
.global-search:focus-within {
    border-color: var(--color-blue);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.global-search .search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--text-light);
    display: inline-flex;
}
.global-search input {
    flex: 1;
    height: 100%;
    border: none; outline: none;
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
}
.global-search input::placeholder { color: var(--text-faint); }
.search-kbd {
    font-family: "SF Mono", Menlo, monospace;
    font-size: 11px;
    color: var(--text-light);
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 0 5px;
    line-height: 16px;
}
.btn-primary {
    background-color: var(--color-blue); color: white; border: none;
    padding: 8px 16px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 500; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    transition: background-color 0.15s, transform 0.1s;
}
.btn-primary:hover { background-color: var(--color-blue-hover); }
.btn-primary:active { transform: scale(0.97); }

.btn-icon {
    width: 36px; height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    background: white; cursor: pointer; font-size: 16px;
    color: var(--text-light);
    transition: all 0.15s;
}
.btn-icon:hover { color: var(--color-blue); border-color: var(--color-blue); }

.user-info-text { font-size: 14px; color: var(--text-main); }
.user-dropdown {
    background-color: var(--bg-muted); border: 1px solid #cbd5e1;
    color: var(--text-muted); padding: 6px 12px;
    border-radius: var(--radius-md); font-size: 14px; cursor: pointer;
    display: flex; align-items: center; gap: 6px; font-weight: 500;
}

/* ==========================================================================
   侧栏 (220px) — 字体规范参照 index01.html 极简风
   ========================================================================== */
.app-sidebar {
    width: 220px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 16px 8px 14px 8px;
    display: flex; flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}
.sidebar-section { margin-bottom: 16px; }
.sidebar-menu-title {
    font-size: 12px; font-weight: 600; color: var(--text-faint);
    padding: 6px 14px 8px 14px;
    letter-spacing: 0;
}
.sidebar-menu { list-style: none; }
.sidebar-menu a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    color: var(--text-muted); font-size: 14px; font-weight: 500;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.sidebar-menu a:hover { background-color: var(--bg-muted); color: var(--text-main); }
.sidebar-menu a.active {
    background-color: var(--color-blue-light);
    color: var(--color-blue); font-weight: 600;
}
.menu-text { flex: 1; }
.menu-badge {
    font-size: 11px; background-color: var(--color-rose); color: white;
    padding: 1px 6px; border-radius: 10px; font-weight: 700;
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid var(--border-soft);
    font-size: 12px; color: var(--text-light);
    line-height: 1.5;
}
.sidebar-footer .footer-line { display: flex; justify-content: space-between; }
.sidebar-footer .footer-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--color-green); display: inline-block; margin-right: 6px;
    animation: pulse-dot 2.4s ease-in-out infinite;
}

/* ==========================================================================
   主滚动画布
   ========================================================================== */
.app-content {
    flex: 1; padding: 24px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 20px;
}

/* 页头 (页面标题 + 描述) */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
}
.page-head h2 {
    font-size: 20px; font-weight: 700; color: var(--text-main);
    display: flex; align-items: center; gap: 8px;
}
.page-head .page-desc {
    font-size: 13px; color: var(--text-light); margin-top: 4px;
}

/* ==========================================================================
   告警条 (顶置通知)
   ========================================================================== */
.global-alert-banner {
    background-color: #fffbeb; border: 1px solid #fde68a;
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
}
.alert-message-box {
    display: flex; align-items: center; gap: 10px;
    font-size: 13.5px; color: #b45309;
}
.alert-icon {
    color: var(--color-amber);
    display: inline-flex; align-items: center;
}
.alert-icon svg { display: block; }
.btn-text-action {
    font-size: 13.5px; color: var(--color-blue); font-weight: 600;
    cursor: pointer; background: transparent; border: none;
    white-space: nowrap;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 8px; border-radius: var(--radius-sm);
    transition: background-color 0.15s;
}
.btn-text-action:hover { background: var(--color-blue-light); }

/* ==========================================================================
   Metric Row (4 列 KPI)
   ========================================================================== */
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}
.metric-header {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: var(--text-light); font-weight: 600;
}
.metric-header-tag { color: var(--text-faint); font-size: 11px; font-weight: 500; }
.metric-body { margin-top: 6px; display: flex; align-items: baseline; gap: 4px; }
.metric-number {
    font-size: 24px; font-weight: 700; color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.metric-unit { font-size: 12px; color: var(--text-light); font-weight: normal; }
.metric-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    font-size: 11px;
    display: flex; align-items: center; justify-content: space-between;
    color: var(--text-light);
}
.trend-up { color: var(--color-green); font-weight: 600; }
.trend-down { color: var(--color-rose); font-weight: 600; }
.trend-flat { color: var(--text-muted); font-weight: 600; }

/* ==========================================================================
   Chart Panel (图表卡)
   ========================================================================== */
.analytics-chart-row {
    display: grid; grid-template-columns: 2fr 1fr; gap: 20px;
}
.chart-panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.panel-inner-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
}
.panel-inner-title {
    font-size: 15px; font-weight: 700; color: var(--text-main);
    display: flex; align-items: center; gap: 8px;
}
.panel-inner-title svg { display: block; flex-shrink: 0; }
.panel-inner-meta { font-size: 12px; color: var(--text-light); }
.panel-inner-body { padding: 20px; }

.svg-chart-container { width: 100%; height: 180px; position: relative; }

/* 模型/Skill 占比分布 */
.model-distribution-list { display: flex; flex-direction: column; gap: 14px; }
.model-dist-item { display: flex; flex-direction: column; gap: 4px; }
.dist-meta { display: flex; justify-content: space-between; font-size: 13px; }
.dist-name { font-weight: 600; color: var(--text-muted); }
.dist-pct { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-main); }
.dist-progress-bg {
    width: 100%; height: 8px;
    background-color: var(--bg-muted);
    border-radius: 4px; overflow: hidden;
}
.dist-progress-fill { height: 100%; border-radius: 4px; background-color: var(--color-blue); }

/* ==========================================================================
   工具栏 / Tab 切换
   ========================================================================== */
.toolbar-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.toolbar-title { font-size: 15px; font-weight: 700; color: var(--text-main); }

.toolbar-tabs {
    display: flex; gap: 4px;
    overflow-x: auto;
    padding: 3px;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    scrollbar-width: thin;
}
.toolbar-tabs::-webkit-scrollbar { height: 4px; }
.toolbar-tabs::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
.tab-btn {
    padding: 6px 12px; font-size: 13px; font-weight: 600;
    color: var(--text-light); border: none; background: transparent;
    cursor: pointer; border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all 0.15s;
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active {
    background-color: white;
    color: var(--color-blue);
    box-shadow: 0 1px 2px rgba(15,23,42,0.06);
}

/* Pill (时间窗) */
.time-pill-group {
    display: flex; background: var(--bg-muted);
    padding: 3px; border-radius: var(--radius-md); gap: 2px;
}
.time-pill {
    padding: 6px 14px; font-size: 13px; font-weight: 600;
    color: var(--text-light); border: none; background: transparent;
    cursor: pointer; border-radius: var(--radius-sm);
}
.time-pill.active {
    background-color: white; color: var(--text-main);
    box-shadow: 0 1px 2px rgba(15,23,42,0.06);
}

.select-filter {
    height: 38px; padding: 0 32px 0 12px; font-size: 14px;
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    background-color: white; cursor: pointer;
    color: var(--text-main);
}

/* ==========================================================================
   Info Card
   ========================================================================== */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.info-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
}
.info-card-title {
    font-size: 15px; font-weight: 700; color: var(--text-main);
    display: flex; align-items: center; gap: 8px;
}
.info-card-title svg { display: block; flex-shrink: 0; }
.info-card-body { padding: 20px; }
.info-card-body p { font-size: 13.5px; color: var(--text-muted); line-height: 1.7; }
.info-card-body pre {
    background: var(--bg-soft); border: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 12.5px;
    padding: 12px 14px; border-radius: var(--radius-md);
    overflow-x: auto; line-height: 1.6;
}
.info-card-body ul, .info-card-body ol { padding-left: 20px; line-height: 1.9; font-size: 13.5px; color: var(--text-muted); }
.info-card-body ul li, .info-card-body ol li { margin-bottom: 2px; }

/* Info grid (key-value 对子) */
.info-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 14px 24px;
}
.info-grid .info-item {
    display: flex; flex-direction: column; gap: 4px;
    border-bottom: 1px dashed var(--border-soft);
    padding-bottom: 8px;
}
.info-grid .label { font-size: 12px; color: var(--text-light); font-weight: 600; }
.info-grid .value {
    font-size: 13.5px; color: var(--text-main); font-weight: 500;
    word-break: break-all;
}
.info-grid .value code {
    background: var(--bg-muted); padding: 2px 6px;
    border-radius: var(--radius-sm); font-size: 12.5px;
}

/* Check list */
.check-list { list-style: none; padding-left: 0; }
.check-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13.5px; color: var(--text-muted);
    display: flex; align-items: center; gap: 10px;
}
.check-list li:last-child { border-bottom: none; }
.check-list .check-icon {
    color: var(--color-green);
    width: 18px; height: 18px;
    background: rgba(22, 163, 74, 0.1);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   Rich Data Table
   ========================================================================== */
.main-data-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.table-toolbar {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
    background-color: var(--bg-soft);
    flex-wrap: wrap; gap: 12px;
}

.rich-data-table { width: 100%; border-collapse: collapse; text-align: left; }
.rich-data-table th {
    background-color: var(--bg-soft);
    color: var(--text-light);
    font-size: 12px; font-weight: 600;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    user-select: none;
}
.rich-data-table th.sortable { cursor: pointer; transition: color 0.15s; }
.rich-data-table th.sortable:hover { color: var(--color-blue); }
.rich-data-table th .sort-arrow {
    display: inline-flex; vertical-align: middle;
    margin-left: 4px;
    color: var(--text-faint);
    transition: color 0.15s;
}
.rich-data-table th.sort-asc .sort-arrow,
.rich-data-table th.sort-desc .sort-arrow { color: var(--color-blue); }
.rich-data-table td {
    padding: 12px 20px;
    font-size: 13.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.rich-data-table tr:last-child td { border-bottom: none; }
.rich-data-table tr:hover td { background-color: var(--bg-soft); }
.rich-data-table .num-col { font-variant-numeric: tabular-nums; text-align: right; }
.rich-data-table .strong-col { font-weight: 600; color: var(--text-main); }
.rich-data-table code {
    background: var(--bg-muted); color: var(--text-main);
    padding: 2px 6px; border-radius: var(--radius-sm); font-size: 12px;
}

.copy-btn {
    background: transparent; border: none; cursor: pointer;
    color: var(--text-faint); margin-left: 6px;
    padding: 2px 4px; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center;
    transition: all 0.15s;
    vertical-align: middle;
}
.copy-btn:hover { color: var(--color-blue); background: var(--color-blue-light); }
.copy-btn svg { display: block; }

/* Status badge */
.badge-status {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}
.badge-status .badge-dot {
    width: 6px; height: 6px; border-radius: 50%; display: inline-block;
}
.status-success { background-color: #e6f4ea; color: #137333; }
.status-success .badge-dot { background-color: var(--color-green); }
.status-warning { background-color: #fff4e5; color: #b45309; }
.status-warning .badge-dot { background-color: var(--color-amber); }
.status-error { background-color: #fce8e6; color: #c5221f; }
.status-error .badge-dot { background-color: var(--color-rose); }
.status-info { background-color: #eff6ff; color: #1d4ed8; }
.status-info .badge-dot { background-color: var(--color-blue); }
.status-frozen { background-color: var(--bg-muted); color: var(--text-muted); }
.status-frozen .badge-dot { background-color: var(--text-faint); }

/* 分页 */
.table-pagination-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
    background: white;
    font-size: 13px; color: var(--text-light);
    flex-wrap: wrap; gap: 8px;
}
.pagination-btn-group { display: flex; gap: 4px; }
.pag-btn {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    background: white; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 12.5px;
    color: var(--text-muted);
}
.pag-btn:hover:not(:disabled) { border-color: var(--color-blue); color: var(--color-blue); }
.pag-btn:disabled { color: var(--text-faint); cursor: not-allowed; }
.pag-btn.active {
    background-color: var(--color-blue); color: white;
    border-color: var(--color-blue); font-weight: 700;
}

/* ==========================================================================
   Sparkline (KPI 卡内嵌)
   ========================================================================== */
.kpi-sparkline { height: 28px; margin-top: 8px; width: 100%; }
.kpi-sparkline svg { width: 100%; height: 100%; display: block; }

/* ==========================================================================
   表格行操作列
   ========================================================================== */
.row-actions { display: inline-flex; align-items: center; gap: 4px; }
.row-action-btn {
    background: transparent; border: 1px solid var(--border-color);
    color: var(--text-muted); cursor: pointer;
    padding: 3px 8px; border-radius: var(--radius-sm);
    font-size: 12px;
    display: inline-flex; align-items: center; gap: 3px;
    transition: all 0.15s;
}
.row-action-btn:hover { border-color: var(--color-blue); color: var(--color-blue); background: var(--color-blue-light); }
.row-action-btn.danger:hover { border-color: var(--color-rose); color: var(--color-rose); background: rgba(225,29,72,0.06); }
.row-action-btn.warn:hover { border-color: var(--color-amber); color: var(--color-amber); background: rgba(217,119,6,0.06); }
.row-action-btn svg { display: block; }

/* ==========================================================================
   空态
   ========================================================================== */
.empty-state {
    padding: 40px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: var(--text-light);
}
.empty-state .empty-icon {
    width: 56px; height: 56px;
    background: var(--bg-muted);
    color: var(--text-faint);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 4px;
}
.empty-state .empty-title { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.empty-state .empty-desc { font-size: 12.5px; color: var(--text-light); }

/* ==========================================================================
   审计日志卡
   ========================================================================== */
.audit-log-list { display: flex; flex-direction: column; }
.audit-log-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}
.audit-log-row:last-child { border-bottom: none; }
.audit-log-row .log-time {
    font-variant-numeric: tabular-nums;
    color: var(--text-light);
    width: 140px; flex-shrink: 0;
}
.audit-log-row .log-actor {
    font-weight: 600; color: var(--text-main);
    width: 100px; flex-shrink: 0;
}
.audit-log-row .log-tag {
    font-size: 11px; padding: 2px 7px; border-radius: 3px;
    font-weight: 700; flex-shrink: 0;
    background: var(--bg-muted); color: var(--text-light);
}
.audit-log-row .log-tag.tag-deploy { background: #e8f8f2; color: #059669; }
.audit-log-row .log-tag.tag-warn { background: #fff7ed; color: #d97706; }
.audit-log-row .log-tag.tag-config { background: #eff6ff; color: #1d4ed8; }
.audit-log-row .log-msg { color: var(--text-muted); flex: 1; }
.audit-log-row .log-meta { color: var(--text-faint); font-size: 12px; flex-shrink: 0; }
[data-theme="dark"] .audit-log-row .log-tag.tag-deploy { background: rgba(52,211,153,0.15); color: #34d399; }
[data-theme="dark"] .audit-log-row .log-tag.tag-warn { background: rgba(251,191,36,0.15); color: #fbbf24; }
[data-theme="dark"] .audit-log-row .log-tag.tag-config { background: rgba(96,165,250,0.15); color: #60a5fa; }

/* ==========================================================================
   数据字典页
   ========================================================================== */
.dict-table-list { display: flex; flex-direction: column; gap: 12px; }
.dict-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}
.dict-table-card:hover { box-shadow: var(--shadow-sm); border-color: #cbd5e1; }
.dict-table-head {
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border-color);
}
.dict-table-name {
    font-family: "SF Mono", Menlo, monospace;
    font-size: 14px; font-weight: 700; color: var(--text-main);
}
.dict-table-desc { padding: 12px 20px; font-size: 13px; color: var(--text-muted); border-bottom: 1px solid var(--border-soft); }
.dict-fields { padding: 4px 0; }
.dict-field-row {
    padding: 8px 20px;
    display: grid; grid-template-columns: 200px 110px 1fr;
    gap: 12px; align-items: baseline;
    font-size: 13px;
    border-bottom: 1px dashed var(--border-soft);
}
.dict-field-row:last-child { border-bottom: none; }
.dict-field-name {
    font-family: "SF Mono", Menlo, monospace;
    color: var(--text-main); font-weight: 600;
}
.dict-field-type {
    font-size: 11px; color: var(--text-light);
    background: var(--bg-muted);
    padding: 2px 6px; border-radius: var(--radius-sm);
    width: fit-content;
}
.dict-field-comment { color: var(--text-muted); }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex; flex-direction: column; gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-blue);
    box-shadow: 0 6px 16px rgba(59,130,246,0.10);
}
.feature-card-header {
    display: flex; align-items: center; justify-content: space-between;
}
.feature-card-title {
    font-size: 14px; font-weight: 700; color: var(--text-main);
    display: flex; align-items: center; gap: 8px;
}
.feature-card-tag {
    font-size: 11px; padding: 2px 6px; border-radius: var(--radius-sm);
    background: var(--bg-muted); color: var(--text-light);
    font-weight: 600;
}
.feature-card-desc {
    font-size: 13px; color: var(--text-light); line-height: 1.6;
    flex: 1;
}
.feature-card-meta {
    font-size: 12px; color: var(--text-light);
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 4px;
}

/* ==========================================================================
   血缘图谱 (内联 SVG)
   ========================================================================== */
.lineage-canvas {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    overflow-x: auto;
}
.lineage-row {
    display: flex; align-items: center; justify-content: center;
    gap: 24px; flex-wrap: wrap;
}
.lineage-node {
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    min-width: 240px;
    display: flex; flex-direction: column; gap: 6px;
    transition: all 0.2s ease;
}
.lineage-node:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.lineage-node.node-source { border-color: var(--color-blue); }
.lineage-node.node-target { border-color: var(--color-purple); }
.lineage-node-title { font-size: 14px; font-weight: 700; color: var(--text-main); }
.lineage-node-id { font-size: 11px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.lineage-arrow {
    color: var(--color-blue); font-size: 24px; font-weight: 700;
    line-height: 1;
}

/* ==========================================================================
   Workflow (12 步流程)
   ========================================================================== */
.workflow-tabs-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
}
.workflow-tabs {
    display: flex; gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.workflow-tabs::-webkit-scrollbar { height: 4px; }
.workflow-tabs::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
.workflow-tab {
    padding: 8px 14px 8px 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px; font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.15s;
}
.workflow-tab:hover { border-color: var(--color-blue); color: var(--color-blue); }
.workflow-tab.active {
    background: var(--color-blue);
    color: white;
    border-color: var(--color-blue);
    box-shadow: 0 2px 6px rgba(59,130,246,0.25);
}
.workflow-tab .step-num {
    font-family: "SF Mono", Menlo, monospace;
    font-size: 11px;
    background: var(--bg-muted); color: var(--text-muted);
    padding: 2px 7px; border-radius: 999px; font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
}
.workflow-tab.active .step-num {
    background: rgba(255,255,255,0.22); color: white;
}
.workflow-tab .step-title { letter-spacing: 0.01em; }

.workflow-content { margin-top: 16px; }

/* ==========================================================================
   双栏布局 (文档中心)
   ========================================================================== */
.docs-layout {
    display: grid; grid-template-columns: 220px 1fr; gap: 16px;
}
.docs-toc {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 8px;
    align-self: flex-start;
    position: sticky; top: 0;
}
.docs-toc-title {
    font-size: 11px; font-weight: 700; color: var(--text-light);
    padding: 0 14px 8px 14px;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.docs-toc-list { list-style: none; }
.docs-toc-list a {
    display: block; padding: 9px 14px;
    color: var(--text-muted); font-size: 14px; font-weight: 500;
    border-radius: var(--radius-md); cursor: pointer;
    transition: all 0.15s;
}
.docs-toc-list a:hover { background: var(--bg-muted); color: var(--text-main); }
.docs-toc-list a.active {
    background: var(--color-blue-light); color: var(--color-blue); font-weight: 600;
}
.docs-content { display: flex; flex-direction: column; gap: 16px; }

/* ==========================================================================
   Toast 提示 (复制反馈)
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 32px; left: 50%; transform: translateX(-50%);
    background: var(--text-main); color: white;
    padding: 10px 18px; border-radius: var(--radius-md);
    font-size: 13px; font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    z-index: 1000;
    opacity: 0; transition: opacity 0.2s;
    pointer-events: none;
}
.toast.show { opacity: 1; }

/* ==========================================================================
   商务数据平台扩展组件
   ========================================================================== */

/* Hero Banner — 主页欢迎区 */
.hero-banner {
    background: linear-gradient(120deg, var(--color-blue) 0%, #1e40af 50%, #6366f1 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
    position: relative; overflow: hidden;
}
.hero-banner::after {
    content: ''; position: absolute; right: -40px; top: -40px;
    width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
    pointer-events: none;
}
.hero-greeting { display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.hero-title { font-size: 20px; font-weight: 700; letter-spacing: 0.01em; }
.hero-subtitle { font-size: 13px; color: rgba(255,255,255,0.85); }
.hero-stats { display: flex; gap: 28px; z-index: 1; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat .num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-stat .lbl { font-size: 11px; color: rgba(255,255,255,0.78); letter-spacing: 0.04em; }

/* KPI 6 列布局 */
.metric-row.col-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1280px) { .metric-row.col-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .metric-row.col-6 { grid-template-columns: repeat(2, 1fr); } }

/* 头像 */
.avatar {
    width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-size: 11px; font-weight: 700;
    flex-shrink: 0;
    border: 1.5px solid var(--bg-card);
}
.avatar.lg { width: 32px; height: 32px; font-size: 12px; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar:not(:first-child) { margin-left: -8px; }
.user-cell { display: inline-flex; align-items: center; gap: 6px; }
.user-cell .name { color: var(--text-main); font-weight: 500; }

/* 优先级 / Tag */
.priority-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: 999px;
    line-height: 1.4;
}
.priority-p0 { background: rgba(225,29,72,0.10); color: #be123c; border: 1px solid rgba(225,29,72,0.25); }
.priority-p1 { background: rgba(217,119,6,0.10); color: #b45309; border: 1px solid rgba(217,119,6,0.25); }
.priority-p2 { background: rgba(59,130,246,0.10); color: #1d4ed8; border: 1px solid rgba(59,130,246,0.25); }
.priority-p3 { background: var(--bg-muted); color: var(--text-light); border: 1px solid var(--border-color); }

.tag-chip {
    display: inline-flex; align-items: center;
    font-size: 11px; padding: 1px 7px; border-radius: var(--radius-sm);
    background: var(--bg-muted); color: var(--text-muted);
    margin-right: 4px; line-height: 1.6;
}
.tag-chip.tag-blue { background: var(--color-blue-light); color: var(--color-blue); }
.tag-chip.tag-green { background: rgba(22,163,74,0.10); color: #15803d; }
.tag-chip.tag-rose { background: rgba(225,29,72,0.10); color: #be123c; }
.tag-chip.tag-amber { background: rgba(217,119,6,0.10); color: #b45309; }
.tag-chip.tag-purple { background: rgba(139,92,246,0.10); color: #6d28d9; }

/* 进度条 (内联宽度填充) */
.progress-track {
    width: 100%; height: 6px;
    background-color: var(--bg-muted);
    border-radius: 3px; overflow: hidden;
    position: relative;
}
.progress-track .progress-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.progress-track.thin { height: 4px; }

/* 漏斗图 */
.funnel-list { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: flex; flex-direction: column; gap: 4px; }
.funnel-row-meta { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; }
.funnel-stage { color: var(--text-muted); font-weight: 600; }
.funnel-count { color: var(--text-main); font-variant-numeric: tabular-nums; font-weight: 700; }
.funnel-pct { color: var(--text-light); font-size: 11px; margin-left: 4px; }
.funnel-bar {
    height: 28px; border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--color-blue), #60a5fa);
    transition: width 0.5s ease;
    display: flex; align-items: center; justify-content: flex-end;
    padding: 0 10px; color: white; font-size: 11px; font-weight: 600;
}
.funnel-bar.s2 { background: linear-gradient(90deg, #0d9488, #14b8a6); }
.funnel-bar.s3 { background: linear-gradient(90deg, #6d28d9, #8b5cf6); }
.funnel-bar.s4 { background: linear-gradient(90deg, #d97706, #f59e0b); }
.funnel-bar.s5 { background: linear-gradient(90deg, #be123c, #f43f5e); }

/* 健康度环形图 */
.health-card { display: flex; align-items: center; gap: 24px; }
.health-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.health-ring .score {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.health-ring .score-num { font-size: 30px; font-weight: 700; color: var(--text-main); font-variant-numeric: tabular-nums; line-height: 1; }
.health-ring .score-label { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.health-breakdown { flex: 1; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.health-row { display: flex; flex-direction: column; gap: 3px; }
.health-row-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-muted); }
.health-row-meta strong { color: var(--text-main); font-weight: 700; }

/* Top 列表 */
.top-list { display: flex; flex-direction: column; }
.top-item {
    display: grid; grid-template-columns: 22px 1fr auto;
    gap: 10px; align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-soft);
    font-size: 13px;
}
.top-item:last-child { border-bottom: none; }
.top-rank {
    width: 22px; height: 22px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-muted); color: var(--text-light);
    font-size: 11px; font-weight: 700;
}
.top-rank.r1 { background: rgba(225,29,72,0.12); color: #be123c; }
.top-rank.r2 { background: rgba(217,119,6,0.12); color: #b45309; }
.top-rank.r3 { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.top-name { font-weight: 600; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-meta { font-size: 11px; color: var(--text-light); margin-top: 1px; }
.top-value { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 12px; }

/* 告警分布 mini-pill */
.alert-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.alert-stat-pill {
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    padding: 12px; display: flex; flex-direction: column; gap: 4px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.alert-stat-pill:hover { box-shadow: var(--shadow-sm); }
.alert-stat-pill .lvl {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.alert-stat-pill .num { font-size: 22px; font-weight: 700; color: var(--text-main); font-variant-numeric: tabular-nums; }
.alert-stat-pill.l-critical { border-left: 3px solid var(--color-rose); }
.alert-stat-pill.l-critical .lvl { color: var(--color-rose); }
.alert-stat-pill.l-warning { border-left: 3px solid var(--color-amber); }
.alert-stat-pill.l-warning .lvl { color: var(--color-amber); }
.alert-stat-pill.l-info { border-left: 3px solid var(--color-blue); }
.alert-stat-pill.l-info .lvl { color: var(--color-blue); }

/* 告警列表行 (监控页) */
.alert-list { display: flex; flex-direction: column; }
.alert-row {
    display: grid;
    grid-template-columns: 8px 90px 1fr 130px 120px 110px 100px;
    gap: 12px; align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}
.alert-row:last-child { border-bottom: none; }
.alert-row .lvl-bar { width: 4px; height: 28px; border-radius: 2px; }
.alert-row.lvl-critical .lvl-bar { background: var(--color-rose); }
.alert-row.lvl-warning .lvl-bar { background: var(--color-amber); }
.alert-row.lvl-info .lvl-bar { background: var(--color-blue); }
.alert-row .alert-id { color: var(--text-light); font-family: "SF Mono", Menlo, monospace; font-size: 11px; }
.alert-row .alert-title { color: var(--text-main); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-row .alert-target { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.alert-row .alert-metric { font-family: "SF Mono", Menlo, monospace; font-size: 11px; color: var(--text-muted); }
.alert-row .alert-value { font-weight: 600; color: var(--text-main); font-variant-numeric: tabular-nums; }
.alert-row .alert-time { color: var(--text-light); font-size: 12px; }
.alert-row:hover { background: var(--bg-soft); }
@media (max-width: 1100px) {
    .alert-row { grid-template-columns: 4px 1fr; gap: 8px; }
    .alert-row > *:not(.lvl-bar):not(.alert-main) { display: none; }
}

/* SLA 监控卡 */
.sla-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 14px; padding: 4px 0; }
.sla-card {
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    padding: 14px; display: flex; flex-direction: column; gap: 6px;
}
.sla-card .name { font-size: 12px; color: var(--text-light); font-weight: 600; }
.sla-card .val { font-size: 22px; font-weight: 700; color: var(--text-main); font-variant-numeric: tabular-nums; }
.sla-card .target { font-size: 11px; color: var(--text-light); }
.sla-card.healthy .val { color: var(--color-green); }
.sla-card.warning .val { color: var(--color-amber); }
.sla-card.breach .val { color: var(--color-rose); }
.sla-card .mini-bar { height: 22px; margin-top: 4px; }

/* 配额条 */
.quota-list { display: flex; flex-direction: column; gap: 14px; }
.quota-row { display: flex; flex-direction: column; gap: 6px; }
.quota-meta { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; }
.quota-meta .name { color: var(--text-muted); font-weight: 600; }
.quota-meta .val { color: var(--text-main); font-variant-numeric: tabular-nums; }
.quota-meta .reset { font-size: 11px; color: var(--text-faint); }

/* 账单/费用结构 */
.billing-summary {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px;
    padding: 4px 0;
}
@media (max-width: 900px) { .billing-summary { grid-template-columns: 1fr; } }
.billing-bigval {
    font-size: 32px; font-weight: 700; color: var(--text-main);
    font-variant-numeric: tabular-nums; line-height: 1.1;
}
.billing-mini { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.billing-bar-row {
    display: grid; grid-template-columns: 110px 1fr 110px 60px;
    gap: 10px; align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-soft);
    font-size: 13px;
}
.billing-bar-row:last-child { border-bottom: none; }
.billing-bar-row .name { color: var(--text-muted); font-weight: 600; }
.billing-bar-row .amt { color: var(--text-main); font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.billing-bar-row .pct { font-size: 11px; color: var(--text-light); text-align: right; }

/* 活动/动态信息流 */
.activity-feed { display: flex; flex-direction: column; }
.activity-row {
    display: grid;
    grid-template-columns: 56px 24px 1fr;
    gap: 10px; align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}
.activity-row:last-child { border-bottom: none; }
.activity-row .time { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; padding-top: 4px; }
.activity-row .icon-dot {
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-muted); color: var(--text-muted);
    margin-top: 2px;
}
.activity-row .icon-dot.deploy { background: rgba(22,163,74,0.10); color: var(--color-green); }
.activity-row .icon-dot.alert { background: rgba(225,29,72,0.10); color: var(--color-rose); }
.activity-row .icon-dot.config { background: rgba(59,130,246,0.10); color: var(--color-blue); }
.activity-row .icon-dot.login { background: rgba(139,92,246,0.10); color: var(--color-purple); }
.activity-row .body { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.activity-row .body strong { color: var(--text-main); font-weight: 600; }

/* 通知中心 (顶栏) */
.notify-btn { position: relative; }
.notify-dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--color-rose);
    border: 2px solid var(--bg-card);
}

/* DAG 血缘 v2 */
.dag-canvas {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    overflow-x: auto;
}
.dag-grid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 36px 24px; align-items: center;
    min-width: 920px;
}
.dag-col-title {
    font-size: 11px; font-weight: 700; color: var(--text-faint);
    letter-spacing: 0.05em; text-align: center; padding-bottom: 6px;
    border-bottom: 1px dashed var(--border-color);
}
.dag-node {
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex; flex-direction: column; gap: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.dag-node:hover { border-color: var(--color-blue); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.dag-node .layer-tag {
    font-size: 10px; padding: 1px 6px; border-radius: 3px; font-weight: 700;
    background: var(--bg-muted); color: var(--text-light);
    width: fit-content;
}
.dag-node .layer-tag.l-ods { background: var(--bg-muted); color: var(--text-light); }
.dag-node .layer-tag.l-dwd { background: rgba(59,130,246,0.12); color: var(--color-blue); }
.dag-node .layer-tag.l-dwm { background: rgba(13,148,136,0.12); color: var(--color-teal); }
.dag-node .layer-tag.l-ads { background: rgba(139,92,246,0.12); color: var(--color-purple); }
.dag-node .layer-tag.l-report { background: rgba(217,119,6,0.12); color: var(--color-amber); }
.dag-node .lbl { font-size: 12px; font-weight: 600; color: var(--text-main); word-break: break-all; line-height: 1.4; }
.dag-node .meta { font-size: 11px; color: var(--text-light); }

.field-lineage-list { display: flex; flex-direction: column; gap: 12px; }
.field-lineage-row {
    border: 1px dashed var(--border-color); border-radius: var(--radius-md);
    padding: 10px 14px;
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center;
}
.field-target { color: var(--color-blue); font-family: "SF Mono", Menlo, monospace; font-size: 12px; font-weight: 700; }
.field-target-table { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.field-arrow { color: var(--text-faint); display: inline-flex; }
.field-sources { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--text-muted); }
.field-sources code { background: var(--bg-muted); padding: 1px 5px; border-radius: 3px; font-size: 11px; }

/* 数据字典 v2 头部统计 */
.dict-table-head .meta-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    font-size: 12px; color: var(--text-light);
}
.dict-table-head .meta-row .stat { display: inline-flex; align-items: center; gap: 4px; }
.dict-table-head .meta-row strong { color: var(--text-main); font-weight: 600; }

/* 抽屉 (任务详情) */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.45);
    z-index: 200; opacity: 0; pointer-events: none;
    transition: opacity 0.2s;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.drawer-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 92vw;
    background: var(--bg-card); border-left: 1px solid var(--border-color);
    z-index: 201; transform: translateX(100%); transition: transform 0.25s ease;
    display: flex; flex-direction: column;
    box-shadow: -8px 0 24px rgba(15,23,42,0.10);
}
.drawer-panel.show { transform: translateX(0); }
.drawer-head {
    padding: 16px 20px; border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
}
.drawer-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
.drawer-close {
    background: transparent; border: none; cursor: pointer;
    color: var(--text-light); padding: 4px;
    display: inline-flex; border-radius: var(--radius-sm);
}
.drawer-close:hover { background: var(--bg-muted); color: var(--text-main); }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }

/* Skill 卡 v2 元数据 */
.skill-meta-row {
    display: flex; align-items: center; gap: 10px;
    font-size: 11.5px; color: var(--text-light);
    padding-top: 6px; border-top: 1px dashed var(--border-soft);
}
.skill-meta-row .stat { display: inline-flex; align-items: center; gap: 3px; }
.skill-meta-row .stat svg { color: var(--text-faint); }
.skill-meta-row .star-yellow { color: #d97706; }

/* TAPD 进度条 */
.step-progress {
    display: inline-flex; align-items: center; gap: 4px;
    width: 130px;
}
.step-progress .seg {
    flex: 1; height: 5px; border-radius: 2px;
    background: var(--bg-muted);
}
.step-progress .seg.done { background: var(--color-blue); }

/* ==========================================================================
   响应式 (≤ 900px 侧栏塌缩)
   ========================================================================== */
@media (max-width: 900px) {
    .app-sidebar { width: 180px; padding: 14px 6px 12px 6px; }
    .sidebar-menu a { padding: 9px 12px; font-size: 13px; }
    .sidebar-menu-title { padding: 4px 12px 6px 12px; font-size: 11px; }
    .sidebar-footer { padding: 12px; font-size: 11px; }
    .metric-row { grid-template-columns: repeat(2, 1fr); }
    .analytics-chart-row { grid-template-columns: 1fr; }
    .docs-layout { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .header-right .user-info-text { display: none; }
}

@media (max-width: 600px) {
    .app-sidebar { display: none; }
    .app-content { padding: 16px; gap: 14px; }
    .metric-row { grid-template-columns: 1fr; }
    .app-header { padding: 0 14px; }
    .logo-text { font-size: 16px; }
    .header-tag { display: none; }
    .btn-primary { padding: 8px 12px; font-size: 13px; }
}

/* ==========================================================================
   交互组件 (Subagent 4)：批量工具栏 / 确认对话框 / 导出菜单 / 任务详情
   ========================================================================== */
.bulk-bar {
    position: fixed; left: 50%; bottom: 24px;
    transform: translateX(-50%) translateY(120%);
    display: flex; align-items: center; gap: 12px;
    padding: 10px 18px;
    background: var(--text-main); color: white;
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.18);
    z-index: 900; opacity: 0; pointer-events: none;
    transition: transform .28s ease, opacity .2s ease;
    font-size: 13px;
}
.bulk-bar.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.bulk-bar .bulk-count { font-weight: 600; padding-right: 8px; border-right: 1px solid rgba(255,255,255,.18); }
.bulk-bar button {
    background: rgba(255,255,255,.10); color: white;
    border: 1px solid rgba(255,255,255,.18);
    padding: 6px 14px; border-radius: 999px;
    cursor: pointer; font-size: 13px;
    transition: background .15s ease;
}
.bulk-bar button:hover { background: rgba(255,255,255,.22); }
.bulk-bar button.danger { background: var(--color-rose); border-color: var(--color-rose); }
.bulk-bar button.ghost { background: transparent; border-color: transparent; color: rgba(255,255,255,.7); }

.confirm-dialog-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0;
    animation: cd-fade .18s ease forwards;
}
@keyframes cd-fade { to { opacity: 1; } }
.confirm-dialog {
    width: 450px; max-width: calc(100vw - 32px);
    background: var(--bg-card); color: var(--text-main);
    border-radius: 12px; padding: 24px 24px 18px;
    box-shadow: 0 24px 48px rgba(0,0,0,.22);
    transform: translateY(10px);
    animation: cd-pop .22s ease forwards;
    border: 1px solid var(--border-color);
}
@keyframes cd-pop { to { transform: translateY(0); } }
.confirm-dialog h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.confirm-dialog p { margin: 0 0 20px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.confirm-dialog .actions { display: flex; justify-content: flex-end; gap: 8px; }
.confirm-dialog button {
    padding: 7px 18px; border-radius: var(--radius-md);
    font-size: 13px; cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s ease; font-weight: 500;
}
.confirm-dialog .cancel-btn { background: var(--bg-muted); color: var(--text-main); border-color: var(--border-color); }
.confirm-dialog .cancel-btn:hover { background: var(--bg-soft); }
.confirm-dialog .danger-btn { background: var(--color-rose); color: #fff; }
.confirm-dialog .danger-btn:hover { background: #be123c; }
.confirm-dialog .primary-btn { background: var(--color-blue); color: #fff; }
.confirm-dialog .primary-btn:hover { background: var(--color-blue-hover); }

.export-menu {
    position: absolute; min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px 0;
    box-shadow: 0 12px 28px rgba(0,0,0,.14);
    z-index: 950; font-size: 13px;
}
.export-menu .em-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; cursor: pointer;
    color: var(--text-muted);
}
.export-menu .em-item:hover { background: var(--bg-soft); color: var(--color-blue); }

.task-detail-section { margin-bottom: 22px; }
.task-detail-section .tds-title {
    font-size: 13px; font-weight: 700; color: var(--text-main);
    margin: 0 0 10px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 6px;
}
.task-detail-section pre.tds-sql {
    background: #0f172a; color: #e2e8f0;
    padding: 12px 14px; border-radius: var(--radius-md);
    font-size: 12px; line-height: 1.6;
    overflow: auto; margin: 0; max-height: 220px;
}
.task-detail-section .tds-mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.task-detail-section .tds-mini-table th,
.task-detail-section .tds-mini-table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.task-detail-section .tds-mini-table th { color: var(--text-light); font-weight: 600; background: var(--bg-soft); }
.task-detail-section ul.tds-list { margin: 0; padding-left: 18px; font-size: 12px; color: var(--text-muted); line-height: 1.8; }
.task-detail-grid { display: grid; grid-template-columns: 110px 1fr 110px 1fr; row-gap: 8px; column-gap: 14px; font-size: 12px; }
.task-detail-grid dt { color: var(--text-light); }
.task-detail-grid dd { margin: 0; color: var(--text-main); word-break: break-all; }

/* 顶栏滚动阴影 */
.app-header.scrolled { box-shadow: 0 2px 12px rgba(15,23,42,0.06); }

/* Onboarding 浮层 */
.onboarding-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.6);
    z-index: 998;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.onboarding-overlay.show { opacity: 1; pointer-events: auto; }
.onboarding-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 28px 32px;
    width: 460px; max-width: 92vw;
    box-shadow: 0 24px 64px rgba(0,0,0,0.30);
    transform: translateY(10px);
    transition: transform 0.3s ease;
}
.onboarding-overlay.show .onboarding-card { transform: translateY(0); }
.onboarding-card .ob-step { font-size: 11px; color: var(--text-light); letter-spacing: 0.08em; }
.onboarding-card h2 { font-size: 22px; font-weight: 700; margin: 6px 0 12px; }
.onboarding-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 18px; }
.onboarding-card .ob-actions { display: flex; justify-content: space-between; align-items: center; }
.onboarding-card .ob-dots { display: flex; gap: 6px; }
.onboarding-card .ob-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bg-muted); }
.onboarding-card .ob-dot.active { background: var(--color-blue); width: 18px; border-radius: 3px; }
