/* 沃林学生管理系统 —— 主题样式 浅色后台风:白卡片 + 柔和阴影 + 靛蓝主色 */ :root { /* 覆盖 Element Plus 的主色,让组件库跟着一起变 */ --el-color-primary: #4F46E5; --el-color-primary-light-3: #7C74EC; --el-color-primary-light-5: #A5A0F2; --el-color-primary-light-7: #CECBF7; --el-color-primary-light-8: #E2E0FA; --el-color-primary-light-9: #F1F0FD; --el-color-primary-dark-2: #4038B8; --brand: #4F46E5; --brand-dark: #4038B8; --bg: #F8FAFC; --ink: #0F172A; --ink-2: #475569; --muted: #64748B; --line: #E2E8F0; --card-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12); --radius: 10px; --sidebar-w: 224px; } * { box-sizing: border-box; } html, body, #app { height: 100%; margin: 0; } body { font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; } .boot-fallback { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 15px; } /* ---------- 整体布局 ---------- */ .layout { display: flex; height: 100%; overflow: hidden; } .sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; } .brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); } .brand-mark { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), #7C74EC); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; letter-spacing: .5px; } .brand-text { line-height: 1.25; } .brand-title { font-size: 15px; font-weight: 650; letter-spacing: .2px; } .brand-sub { font-size: 11px; color: var(--muted); } .nav { padding: 12px 10px; overflow-y: auto; flex: 1; } .nav-group { font-size: 11px; color: var(--muted); letter-spacing: .1em; padding: 12px 10px 6px; text-transform: uppercase; } .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 2px; border-radius: 8px; color: var(--ink-2); cursor: pointer; user-select: none; position: relative; transition: background .15s, color .15s; } .nav-item:hover { background: #F1F5F9; color: var(--ink); } .nav-item.active { background: var(--el-color-primary-light-9); color: var(--brand); font-weight: 600; } .nav-item.active::before { content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); } .nav-item svg { flex: 0 0 18px; } .sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); line-height: 1.6; } /* ---------- 右侧主区 ---------- */ .main { flex: 1; display: flex; flex-direction: column; min-width: 0; } .topbar { height: 60px; flex: 0 0 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; } .topbar-title { font-size: 17px; font-weight: 650; } .topbar-sub { font-size: 12px; color: var(--muted); margin-top: 2px; } .topbar-actions { display: flex; align-items: center; gap: 10px; } .content { flex: 1; overflow-y: auto; padding: 20px 22px 32px; } /* ---------- 卡片 / 工具栏 ---------- */ .card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 18px; } .card + .card { margin-top: 16px; } .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; } .card-title { font-size: 15px; font-weight: 650; } .card-hint { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; } .card-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; } .mt12 { margin-top: 12px; } .muted { color: var(--muted); } .text-right { text-align: right; } /* ---------- KPI ---------- */ .kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; } @media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } } .kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 16px 18px; position: relative; overflow: hidden; } .kpi::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand); opacity: .8; } .kpi-label { font-size: 12px; color: var(--muted); } .kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin-top: 6px; font-variant-numeric: tabular-nums; } .kpi-unit { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; } /* ---------- 图表 ---------- */ .chart-card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; } @media (max-width: 1280px) { .chart-card { grid-template-columns: 1fr; } } .chart-box { height: 300px; width: 100%; } .chart-box.tall { height: 360px; } .empty-state { height: 300px; display: flex; align-items: center; justify-content: center; } /* ---------- 表格微调 ---------- */ .el-table th.el-table__cell { background: #F8FAFC !important; color: var(--ink-2); font-weight: 600; } .el-table { --el-table-border-color: var(--line); } .el-table .cell { line-height: 1.5; } .pager { display: flex; justify-content: flex-end; margin-top: 14px; } .score-detail { padding: 4px 0 4px 48px; } .score-detail .tag-list { display: flex; gap: 8px; flex-wrap: wrap; } /* 弹窗里的表单紧凑一点 */ .el-dialog__body .el-form-item:last-child { margin-bottom: 0; } .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } .form-grid .span2 { grid-column: 1 / -1; }