395 lines
16 KiB
CSS
395 lines
16 KiB
CSS
/* ============================================================
|
|
沃林学生管理系统 - 样式
|
|
纯手写,无任何外部依赖(离线也能开)
|
|
============================================================ */
|
|
|
|
:root {
|
|
--brand: #3b5bdb;
|
|
--brand-dark: #2f4bc0;
|
|
--brand-light: #edf2ff;
|
|
--bg: #f5f7fb;
|
|
--surface: #ffffff;
|
|
--border: #e6e9f0;
|
|
--border-strong: #d5dae6;
|
|
--text: #1f2430;
|
|
--text-2: #5b6478;
|
|
--text-3: #8b93a7;
|
|
--success: #12b76a;
|
|
--success-bg: #e9f9f0;
|
|
--warn: #f79009;
|
|
--warn-bg: #fff6e6;
|
|
--danger: #e5484d;
|
|
--danger-bg: #fdeced;
|
|
--info: #4c6ef5;
|
|
--info-bg: #edf2ff;
|
|
--radius: 10px;
|
|
--radius-sm: 7px;
|
|
--shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .06);
|
|
--shadow-lg: 0 12px 40px rgba(16, 24, 40, .16);
|
|
--sidebar-w: 214px;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body {
|
|
margin: 0;
|
|
height: 100%;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
|
"Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
|
font-size: 14px;
|
|
color: var(--text);
|
|
background: var(--bg);
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
button, input, select, textarea { font-family: inherit; font-size: inherit; }
|
|
a { color: var(--brand); text-decoration: none; }
|
|
|
|
/* ---------------- 登录页 ---------------- */
|
|
.login-wrap {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: linear-gradient(135deg, #eef2ff 0%, #f7f9fc 45%, #e8f4ff 100%);
|
|
padding: 20px;
|
|
}
|
|
.login-card {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
background: var(--surface);
|
|
border-radius: 16px;
|
|
padding: 36px 32px 28px;
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
.login-logo {
|
|
width: 46px; height: 46px; border-radius: 13px;
|
|
background: var(--brand); color: #fff;
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-size: 20px; font-weight: 700; margin-bottom: 18px;
|
|
}
|
|
.login-card h1 { font-size: 21px; margin: 0 0 6px; }
|
|
.login-card .sub { color: var(--text-3); margin: 0 0 24px; font-size: 13px; }
|
|
.login-hint {
|
|
margin-top: 18px; padding: 10px 12px; border-radius: var(--radius-sm);
|
|
background: var(--brand-light); color: var(--brand-dark); font-size: 12.5px; line-height: 1.7;
|
|
}
|
|
|
|
/* ---------------- 布局 ---------------- */
|
|
.layout { display: flex; min-height: 100vh; }
|
|
|
|
.sidebar {
|
|
width: var(--sidebar-w);
|
|
flex: 0 0 var(--sidebar-w);
|
|
background: #1c2333;
|
|
color: #c8d0e0;
|
|
display: flex; flex-direction: column;
|
|
position: fixed; top: 0; bottom: 0; left: 0;
|
|
overflow-y: auto;
|
|
}
|
|
.sidebar .brand {
|
|
padding: 18px 18px 16px;
|
|
display: flex; align-items: center; gap: 10px;
|
|
border-bottom: 1px solid rgba(255,255,255,.07);
|
|
}
|
|
.sidebar .brand .mark {
|
|
width: 30px; height: 30px; border-radius: 8px; background: var(--brand);
|
|
display: flex; align-items: center; justify-content: center;
|
|
color: #fff; font-weight: 700; font-size: 13px;
|
|
}
|
|
.sidebar .brand .name { color: #fff; font-weight: 600; font-size: 14.5px; }
|
|
.sidebar .brand .ver { color: #6d778c; font-size: 11px; }
|
|
|
|
.nav { padding: 10px 8px 24px; }
|
|
.nav-group-title {
|
|
padding: 14px 10px 6px; font-size: 11px; letter-spacing: .08em;
|
|
color: #6d778c; text-transform: uppercase;
|
|
}
|
|
.nav-item {
|
|
display: flex; align-items: center; gap: 9px;
|
|
padding: 8.5px 10px; border-radius: var(--radius-sm);
|
|
cursor: pointer; color: #c8d0e0; font-size: 13.5px;
|
|
transition: background .12s, color .12s;
|
|
}
|
|
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
|
|
.nav-item.active { background: var(--brand); color: #fff; font-weight: 500; }
|
|
.nav-item .ico { width: 17px; text-align: center; opacity: .9; font-size: 14px; }
|
|
.nav-item .badge-dot {
|
|
margin-left: auto; background: var(--danger); color: #fff;
|
|
border-radius: 9px; padding: 0 6px; font-size: 11px; line-height: 17px;
|
|
}
|
|
|
|
.main {
|
|
flex: 1; margin-left: var(--sidebar-w);
|
|
display: flex; flex-direction: column; min-width: 0;
|
|
}
|
|
|
|
.topbar {
|
|
height: 56px; background: var(--surface);
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex; align-items: center; padding: 0 22px; gap: 14px;
|
|
position: sticky; top: 0; z-index: 20;
|
|
}
|
|
.topbar h2 { font-size: 15.5px; margin: 0; font-weight: 600; }
|
|
.topbar .crumb { color: var(--text-3); font-size: 12.5px; }
|
|
.topbar .spacer { flex: 1; }
|
|
.user-chip {
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding: 5px 10px; border-radius: 20px; background: var(--bg);
|
|
font-size: 13px; color: var(--text-2);
|
|
}
|
|
.user-chip .av {
|
|
width: 24px; height: 24px; border-radius: 50%; background: var(--brand);
|
|
color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11.5px;
|
|
}
|
|
|
|
.view { padding: 20px 22px 60px; }
|
|
|
|
/* ---------------- 卡片 ---------------- */
|
|
.card {
|
|
background: var(--surface); border: 1px solid var(--border);
|
|
border-radius: var(--radius); box-shadow: var(--shadow);
|
|
margin-bottom: 16px;
|
|
}
|
|
.card-head {
|
|
padding: 14px 16px; border-bottom: 1px solid var(--border);
|
|
display: flex; align-items: center; gap: 10px;
|
|
}
|
|
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
|
|
.card-head .desc { color: var(--text-3); font-size: 12.5px; }
|
|
.card-head .spacer { flex: 1; }
|
|
.card-body { padding: 16px; }
|
|
.card-body.tight { padding: 0; }
|
|
|
|
.grid { display: grid; gap: 16px; }
|
|
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
|
|
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
|
|
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
|
|
|
|
/* KPI */
|
|
.kpi {
|
|
background: var(--surface); border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
|
|
}
|
|
.kpi .label { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
|
|
.kpi .value { font-size: 27px; font-weight: 650; margin: 7px 0 3px; letter-spacing: -.02em; }
|
|
.kpi .foot { color: var(--text-3); font-size: 12px; }
|
|
.kpi.accent { background: linear-gradient(135deg, var(--brand) 0%, #5c7cfa 100%); border: none; color: #fff; }
|
|
.kpi.accent .label, .kpi.accent .foot { color: rgba(255,255,255,.8); }
|
|
|
|
/* ---------------- 表单 ---------------- */
|
|
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
|
|
.form-row label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
|
|
.form-row label .req { color: var(--danger); margin-left: 2px; }
|
|
.form-row .hint { font-size: 11.5px; color: var(--text-3); }
|
|
|
|
input[type=text], input[type=number], input[type=password], input[type=date],
|
|
input[type=email], select, textarea {
|
|
width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong);
|
|
border-radius: var(--radius-sm); background: #fff; color: var(--text);
|
|
transition: border-color .12s, box-shadow .12s; outline: none;
|
|
}
|
|
input:focus, select:focus, textarea:focus {
|
|
border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59,91,219,.12);
|
|
}
|
|
textarea { resize: vertical; min-height: 62px; }
|
|
select[multiple] { min-height: 92px; padding: 4px; }
|
|
|
|
.btn {
|
|
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
|
padding: 7.5px 14px; border-radius: var(--radius-sm);
|
|
border: 1px solid var(--border-strong); background: #fff; color: var(--text);
|
|
cursor: pointer; transition: all .12s; white-space: nowrap; font-size: 13px;
|
|
}
|
|
.btn:hover { border-color: #b9c1d4; background: #fafbff; }
|
|
.btn:active { transform: translateY(1px); }
|
|
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
|
|
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
|
|
.btn.danger { color: var(--danger); border-color: #f3c6c8; }
|
|
.btn.danger:hover { background: var(--danger-bg); }
|
|
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
|
|
.btn.ghost:hover { background: var(--bg); }
|
|
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
|
|
.btn:disabled { opacity: .5; cursor: not-allowed; }
|
|
|
|
/* 筛选栏 */
|
|
.toolbar {
|
|
display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-end;
|
|
padding: 14px 16px; border-bottom: 1px solid var(--border);
|
|
}
|
|
.toolbar .field { display: flex; flex-direction: column; gap: 5px; }
|
|
.toolbar .field label { font-size: 11.5px; color: var(--text-3); }
|
|
.toolbar .field input, .toolbar .field select { min-width: 132px; padding: 7px 9px; }
|
|
.toolbar .spacer { flex: 1; }
|
|
|
|
/* ---------------- 表格 ---------------- */
|
|
.table-wrap { overflow-x: auto; }
|
|
table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
thead th {
|
|
text-align: left; padding: 10px 14px; background: #fafbfe;
|
|
color: var(--text-2); font-weight: 600; font-size: 12.5px;
|
|
border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0;
|
|
}
|
|
tbody td { padding: 10px 14px; border-bottom: 1px solid #f1f3f8; vertical-align: middle; }
|
|
tbody tr:hover { background: #fafbff; }
|
|
tbody tr.row-danger { background: #fffafa; }
|
|
tbody tr.row-danger:hover { background: #fff4f4; }
|
|
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
|
|
td.center, th.center { text-align: center; }
|
|
.empty { text-align: center; color: var(--text-3); padding: 38px 0; }
|
|
|
|
.tag {
|
|
display: inline-flex; align-items: center; gap: 4px;
|
|
padding: 2px 8px; border-radius: 20px; font-size: 12px; line-height: 18px;
|
|
background: var(--bg); color: var(--text-2); white-space: nowrap;
|
|
}
|
|
.tag.blue { background: var(--info-bg); color: #3b5bdb; }
|
|
.tag.green { background: var(--success-bg); color: #087443; }
|
|
.tag.orange { background: var(--warn-bg); color: #b54708; }
|
|
.tag.red { background: var(--danger-bg); color: #b42318; }
|
|
.tag.gray { background: #f1f3f8; color: var(--text-2); }
|
|
|
|
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
|
|
.muted { color: var(--text-3); }
|
|
.strong { font-weight: 600; }
|
|
.nowrap { white-space: nowrap; }
|
|
.link { color: var(--brand); cursor: pointer; }
|
|
.link:hover { text-decoration: underline; }
|
|
|
|
/* 只读账号:所有写入口隐藏。
|
|
w-act 有两个挂法,都是有意为之:
|
|
1) 挂在列的 cls 上 → 整列(th + td)一起隐藏,适用于「操作」列里全是写链接的表
|
|
(成绩/就业/班级/老师/顾问)。
|
|
2) 挂在单个 span 上 → 逐链接隐藏,适用于学生表的「操作」列 —— 那列里还有
|
|
「详情」链接,只读账号需要它,整列藏掉等于把查看功能也砍了。
|
|
#ro-badge 由 app.js 在进入应用时按角色显隐,这里只兜底样式。 */
|
|
.readonly-mode .w-act { display: none !important; }
|
|
#ro-badge { margin-right: 8px; }
|
|
|
|
/* 分页 */
|
|
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
|
|
.pager .info { color: var(--text-3); font-size: 12.5px; }
|
|
.pager .spacer { flex: 1; }
|
|
.pager .btns { display: flex; gap: 6px; align-items: center; }
|
|
|
|
/* ---------------- 弹窗 ---------------- */
|
|
.modal-mask {
|
|
position: fixed; inset: 0; background: rgba(20, 26, 40, .45);
|
|
display: flex; align-items: flex-start; justify-content: center;
|
|
padding: 56px 16px; z-index: 100; overflow-y: auto;
|
|
animation: fadeIn .14s ease;
|
|
}
|
|
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
|
|
.modal {
|
|
background: var(--surface); border-radius: 13px; width: 100%; max-width: 620px;
|
|
box-shadow: var(--shadow-lg); animation: slideUp .18s ease;
|
|
}
|
|
.modal.wide { max-width: 880px; }
|
|
.modal.narrow { max-width: 440px; }
|
|
@keyframes slideUp { from { transform: translateY(10px); opacity: .6 } to { transform: none; opacity: 1 } }
|
|
.modal-head {
|
|
padding: 16px 20px; border-bottom: 1px solid var(--border);
|
|
display: flex; align-items: center;
|
|
}
|
|
.modal-head h3 { margin: 0; font-size: 15px; }
|
|
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; }
|
|
.modal-head .x:hover { color: var(--text); }
|
|
.modal-body { padding: 18px 20px; max-height: 62vh; overflow-y: auto; }
|
|
.modal-foot {
|
|
padding: 14px 20px; border-top: 1px solid var(--border);
|
|
display: flex; justify-content: flex-end; gap: 9px;
|
|
}
|
|
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
|
|
.form-grid .full { grid-column: 1 / -1; }
|
|
|
|
/* ---------------- 提示 ---------------- */
|
|
#toasts {
|
|
position: fixed; top: 18px; right: 18px; z-index: 200;
|
|
display: flex; flex-direction: column; gap: 9px; max-width: 380px;
|
|
}
|
|
.toast {
|
|
background: var(--surface); border: 1px solid var(--border);
|
|
border-left: 3px solid var(--brand);
|
|
border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
|
|
padding: 11px 14px; font-size: 13px; animation: slideIn .18s ease;
|
|
display: flex; gap: 9px; align-items: flex-start; line-height: 1.55;
|
|
}
|
|
@keyframes slideIn { from { transform: translateX(16px); opacity: 0 } to { transform: none; opacity: 1 } }
|
|
.toast.ok { border-left-color: var(--success); }
|
|
.toast.err { border-left-color: var(--danger); }
|
|
.toast.warn { border-left-color: var(--warn); }
|
|
.toast .ic { flex: 0 0 auto; }
|
|
|
|
/* ---------------- 图表 ---------------- */
|
|
.chart { width: 100%; overflow: visible; }
|
|
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
|
|
.bar-row .nm { flex: 0 0 138px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
|
|
.bar-row .bar { flex: 1; height: 17px; background: #f1f3f8; border-radius: 5px; overflow: hidden; position: relative; }
|
|
.bar-row .bar > i { display: block; height: 100%; border-radius: 5px; background: var(--brand); transition: width .35s; }
|
|
.bar-row .bar > i.g { background: linear-gradient(90deg, #4c6ef5, #748ffc); }
|
|
.bar-row .bar > i.r { background: linear-gradient(90deg, #e5484d, #f2777a); }
|
|
.bar-row .bar > i.o { background: linear-gradient(90deg, #f79009, #fbbf5c); }
|
|
.bar-row .bar > i.gr { background: linear-gradient(90deg, #12b76a, #4fd18b); }
|
|
.bar-row .vl { flex: 0 0 74px; text-align: right; font-variant-numeric: tabular-nums; }
|
|
|
|
.stat-line { display: flex; flex-wrap: wrap; gap: 22px; padding: 4px 0 2px; }
|
|
.stat-line .it .k { color: var(--text-3); font-size: 12px; }
|
|
.stat-line .it .v { font-size: 18px; font-weight: 600; margin-top: 2px; }
|
|
|
|
/* ---------------- Tab ---------------- */
|
|
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); padding: 0 16px; flex-wrap: wrap; }
|
|
.tab {
|
|
padding: 10px 13px; cursor: pointer; color: var(--text-2); font-size: 13px;
|
|
border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
|
|
}
|
|
.tab:hover { color: var(--text); }
|
|
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
|
|
|
|
/* ---------------- 规则构建器 ---------------- */
|
|
.rule-group {
|
|
border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
|
|
padding: 8px; margin: 6px 0; background: #fcfdff;
|
|
}
|
|
.rule-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
|
|
.logic-toggle { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; }
|
|
.logic-toggle button {
|
|
border: none; background: #fff; padding: 3px 11px; cursor: pointer;
|
|
font-size: 12px; color: var(--text-2);
|
|
}
|
|
.logic-toggle button.on { background: var(--brand); color: #fff; }
|
|
.rule-leaf {
|
|
display: flex; gap: 7px; align-items: center; padding: 5px 0; flex-wrap: wrap;
|
|
}
|
|
.rule-leaf select, .rule-leaf input { padding: 5px 8px; }
|
|
.rule-leaf .f-field { flex: 0 0 156px; }
|
|
.rule-leaf .f-op { flex: 0 0 116px; }
|
|
.rule-leaf .f-val { flex: 1; min-width: 110px; }
|
|
.rule-leaf .del { color: var(--text-3); cursor: pointer; padding: 0 3px; font-size: 15px; }
|
|
.rule-leaf .del:hover { color: var(--danger); }
|
|
|
|
pre.code {
|
|
background: #1c2333; color: #d7dce8; border-radius: var(--radius-sm);
|
|
padding: 12px 14px; overflow-x: auto; font-size: 12px; line-height: 1.65;
|
|
font-family: ui-monospace, Consolas, monospace; margin: 0; white-space: pre-wrap; word-break: break-all;
|
|
}
|
|
|
|
.tip {
|
|
padding: 10px 13px; border-radius: var(--radius-sm); background: var(--info-bg);
|
|
color: #33418f; font-size: 12.5px; line-height: 1.7; margin-bottom: 14px;
|
|
}
|
|
.tip.warn { background: var(--warn-bg); color: #8a4b08; }
|
|
.tip.danger { background: var(--danger-bg); color: #912018; }
|
|
|
|
.detail-list { display: grid; grid-template-columns: 108px 1fr; gap: 7px 12px; font-size: 13px; }
|
|
.detail-list dt { color: var(--text-3); }
|
|
.detail-list dd { margin: 0; }
|
|
|
|
.scroll-y { max-height: 380px; overflow-y: auto; }
|
|
|
|
@media (max-width: 900px) {
|
|
.sidebar { width: 62px; flex-basis: 62px; }
|
|
.sidebar .brand .name, .sidebar .brand .ver, .nav-item span:not(.ico), .nav-group-title { display: none; }
|
|
.main { margin-left: 62px; }
|
|
.form-grid { grid-template-columns: 1fr; }
|
|
}
|