/* 题库管理系统 - 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Helvetica Neue",Helvetica,"PingFang SC","Microsoft YaHei",Arial,sans-serif; background: #f0f2f5; }
a { text-decoration: none; color: #409EFF; }

/* 布局 */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; background: #304156; color: #bfcbd9;
    position: fixed; top: 0; left: 0; bottom: 0;
    overflow-y: auto; z-index: 100; transition: width .3s;
}
.sidebar-logo {
    height: 60px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 600; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-menu { padding: 8px 0; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 24px; color: #bfcbd9; font-size: 14px;
    transition: all .2s;
}
.sidebar-menu a:hover { background: rgba(255,255,255,.04); color: #fff; }
.sidebar-menu a.active { background: #409EFF; color: #fff; }
.sidebar-menu a i { font-size: 18px; width: 20px; text-align: center; }

.admin-main {
    flex: 1; margin-left: 220px; padding: 20px;
    min-height: 100vh;
}
.main-header {
    background: #fff; padding: 14px 20px; border-radius: 6px;
    margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.main-header .breadcrumb { font-size: 14px; color: #606266; }
.main-header .user-area { display: flex; align-items: center; gap: 12px; font-size: 14px; }

/* 统计卡片 */
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px;
}
.stat-card {
    background: #fff; border-radius: 6px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex; align-items: center; gap: 16px;
}
.stat-card .stat-icon {
    width: 56px; height: 56px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; flex-shrink: 0;
}
.stat-card .stat-body { flex: 1; }
.stat-card .stat-val { font-size: 28px; font-weight: 700; color: #303133; }
.stat-card .stat-label { font-size: 13px; color: #909399; margin-top: 4px; }
.icon-blue { background: #ecf5ff; }
.icon-green { background: #f0f9eb; }
.icon-orange { background: #fdf6ec; }
.icon-purple { background: #f4f0fe; }

/* 内容卡片 */
.content-card {
    background: #fff; border-radius: 6px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 20px;
}
.content-card .card-title {
    font-size: 16px; font-weight: 600; color: #303133;
    margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center;
}

/* 表格优化 */
.el-table .warning-row { background: #fdf6ec; }
.el-table .success-row { background: #f0f9eb; }
.question-text-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 每日图表 */
.daily-chart { display: flex; justify-content: space-around; align-items: flex-end; height: 200px; padding: 20px 10px 0; }
.chart-bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 6px; }
.chart-bar-stack { display: flex; flex-direction: column-reverse; align-items: center; width: 100%; height: 160px; justify-content: flex-start; }
.chart-bar { width: 32px; border-radius: 4px 4px 0 0; min-height: 2px; transition: height .3s; }
.chart-bar-correct { background: linear-gradient(180deg, #67C23A, #95D475); }
.chart-bar-wrong { background: linear-gradient(180deg, #F56C6C, #F89898); border-radius: 0 0 4px 4px; }
.chart-bar-label { font-size: 12px; color: #909399; }
.chart-bar-val { font-size: 12px; color: #303133; font-weight: 600; }

/* 用户列表头像 */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-avatar-text { font-size: 28px; line-height: 1; flex-shrink: 0; }
.user-nickname { font-size: 14px; color: #303133; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 响应式 */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .admin-sidebar { width: 64px; }
    .sidebar-logo { font-size: 20px; }
    .sidebar-menu a span { display: none; }
    .admin-main { margin-left: 64px; }
    .stats-grid { grid-template-columns: 1fr; }
}
