/* 仪表盘样式 */

header { border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 30px; }
header h1 { color: var(--text); }

.nav { display: flex; gap: 10px; margin: 15px 0; flex-wrap: wrap; }
.nav a {
    padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 4px; color: var(--text); font-size: 0.9em;
}
.nav a:hover { background: var(--accent); color: #fff; text-decoration: none; }

.card {
    background: var(--bg-card); border-radius: 8px; padding: 20px;
    margin-bottom: 16px; box-shadow: var(--shadow);
}
.card h2 { color: var(--text); font-size: 1.2em; margin-bottom: 12px; }

.metric-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
}
.metric { background: var(--inline-code-bg); padding: 15px; border-radius: 8px; text-align: center; }
.metric-value { font-size: 1.8em; font-weight: bold; color: var(--accent); }
.metric-label { font-size: 0.8em; color: var(--text-muted); }

table { width: 100%; border-collapse: collapse; margin: 10px 0; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--inline-code-bg); font-weight: 600; color: var(--text); }

form { margin: 15px 0; }
input, textarea, button, select {
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px;
    background: var(--bg-card); color: var(--text);
}
button { background: var(--accent); color: #fff; border: none; cursor: pointer; }
button:hover { background: var(--accent-hover); }

/* 知识库 */
.knowledge-group { margin-bottom: 20px; }
.knowledge-group h3 { color: var(--accent); margin-bottom: 8px; }
.knowledge-item { padding: 8px 12px; margin-bottom: 6px; background: var(--inline-code-bg); border-radius: 4px; }
.knowledge-term { font-weight: bold; color: var(--text); }
.knowledge-def { color: var(--text-muted); font-size: 0.9em; margin-top: 4px; }
.knowledge-source { font-size: 0.8em; color: var(--text-muted); }

/* 分类过滤 */
.category-filter { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.category-filter a {
    padding: 4px 12px; border-radius: 4px; background: var(--inline-code-bg);
    color: var(--text); font-size: 0.85em;
}
.category-filter a.active { background: var(--accent); color: #fff; }
.category-filter a:hover { text-decoration: none; background: var(--accent); color: #fff; }

/* 运行耗时趋势图 */
.chart-container { display: flex; align-items: flex-end; height: 120px; padding: 10px 0; }
.chart-bar {
    display: inline-block; width: 40px; margin: 0 4px; text-align: center; vertical-align: bottom;
}
.chart-bar-fill {
    background: var(--success); margin: 0 auto; border-radius: 3px 3px 0 0; width: 30px;
}
.chart-bar-label {
    font-size: 0.7em; color: var(--text-muted); margin-top: 4px;
    writing-mode: vertical-lr; text-orientation: mixed; height: 60px; overflow: hidden;
}
