/* stuapp 学习管理系统样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #f4f6f9; color: #2c3e50; font-size: 14px; line-height: 1.6;
}
a { color: #3467c9; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶栏 */
.topbar { background: #1f3a5f; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 600; font-size: 16px; padding: 12px 0; }
.brand:hover { text-decoration: none; }
.topbar nav a { color: #c8d4e6; margin-left: 18px; padding: 12px 0; display: inline-block; }
.topbar nav a:hover { color: #fff; text-decoration: none; }
.topbar nav a.on { color: #fff; border-bottom: 3px solid #5b9bd5; }

.container { max-width: 1100px; margin: 20px auto; padding: 0 16px; }
.footer { max-width: 1100px; margin: 30px auto; padding: 0 16px 24px; color: #97a3b4; font-size: 12px; }

/* 标题 */
h1.page-title { font-size: 20px; margin-bottom: 14px; }
h2.sec-title { font-size: 16px; margin: 22px 0 10px; border-left: 4px solid #5b9bd5; padding-left: 8px; }

/* 学科切换标签 */
.subject-tabs { margin-bottom: 16px; border-bottom: 2px solid #e3e8ef; }
.subject-tabs a { display: inline-block; padding: 8px 18px; margin-right: 4px; color: #5a6b80; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.subject-tabs a.on { color: #1f3a5f; font-weight: 600; border-bottom-color: #5b9bd5; }
.subject-tabs a:hover { text-decoration: none; color: #1f3a5f; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(16,36,64,.08); padding: 16px 18px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; }

.subject-card .sc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.subject-card .sc-name { font-size: 17px; font-weight: 700; }
.subject-card .sc-target { color: #97a3b4; font-size: 12px; }
.score-line { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; }
.score-big { font-size: 30px; font-weight: 700; color: #1f3a5f; }
.score-sub { color: #97a3b4; font-size: 12px; }
.meter { background: #edf1f7; border-radius: 6px; height: 10px; overflow: hidden; margin: 8px 0; }
.meter > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg,#5b9bd5,#3dc49a); }
.kv { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; }
.kv .k { color: #7a8699; }
.kv .v { font-weight: 600; }

/* 徽章 */
.badge { display: inline-block; padding: 1px 10px; border-radius: 10px; font-size: 12px; }
.badge.lv0 { background: #eef1f5; color: #8a95a6; }
.badge.lv1 { background: #fdeceb; color: #d24640; }
.badge.lv2 { background: #fff5e0; color: #c9860a; }
.badge.lv3 { background: #e6f8f1; color: #1e9e6a; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; background: #edf1f7; color: #5a6b80; }
.tag.warn { background: #fdeceb; color: #d24640; }
.tag.ok { background: #e6f8f1; color: #1e9e6a; }
.tag.info { background: #e8f1fd; color: #2a6ec9; }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; background: #fff; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid #edf1f5; text-align: left; vertical-align: top; }
.tbl th { background: #f7f9fc; color: #5a6b80; font-weight: 600; white-space: nowrap; }
.tbl tr:hover td { background: #fafbfd; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl td.small { color: #8a95a6; font-size: 12px; }

/* 薄弱点 */
.weak-list { list-style: none; }
.weak-list li { padding: 7px 0; border-bottom: 1px dashed #edf1f5; display: flex; justify-content: space-between; gap: 10px; }
.weak-list li:last-child { border-bottom: none; }

/* 登录 */
.login-box { max-width: 360px; margin: 80px auto; background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 2px 8px rgba(16,36,64,.1); }
.login-box h1 { font-size: 18px; margin-bottom: 16px; text-align: center; }
.login-box input { width: 100%; padding: 9px 10px; border: 1px solid #d4dbe5; border-radius: 6px; margin-bottom: 12px; font-size: 14px; }

/* 表单 */
input[type=text], input[type=number], input[type=password] { padding: 7px 10px; border: 1px solid #d4dbe5; border-radius: 6px; font-size: 14px; }
button, .btn { background: #3b6fb5; color: #fff; border: none; padding: 8px 18px; border-radius: 6px; font-size: 14px; cursor: pointer; }
button:hover, .btn:hover { background: #2f5a94; text-decoration: none; }
.btn.gray { background: #8a95a6; }
.btn.red { background: #c0504d; }
form.inline { display: inline; }

.note { background: #f7f9fc; border-radius: 6px; padding: 10px 14px; color: #5a6b80; font-size: 13px; margin: 10px 0; }
.note.warn { background: #fdeceb; color: #a33; }

.chart-wrap { position: relative; height: 260px; }

.empty { color: #97a3b4; text-align: center; padding: 20px 0; }

@media (max-width: 640px) {
  .topbar-inner { justify-content: center; }
  .topbar nav a { margin: 0 8px; }
}
