/* ==========================================================================
   学生关爱档案管理系统 —— 样式表（浅色主题 · 2026 视觉改版）
   --------------------------------------------------------------------------
   改版原则：数据优先。
   - 信息层级用「字号 / 字重 / 留白」区分，而不是堆边框和颜色；
   - 一切数字用等宽数字（tabular-nums）右对齐或居中，方便纵向比大小；
   - 主色只用在「可点击 / 当前选中 / 关键指标」上，避免满屏蓝；
   - 圆角、阴影、过渡统一走变量，改一处全局生效。
   ========================================================================== */

:root {
  /* ---- 底色与层次 ---- */
  --bg: #f3f6fb;
  --bg-tint: radial-gradient(1200px 460px at 12% -8%, #e7eeff 0%, rgba(231, 238, 255, 0) 62%),
             radial-gradient(1000px 420px at 92% -14%, #e6f6f2 0%, rgba(230, 246, 242, 0) 60%);
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --surface-3: #eff3f9;
  --surface-hover: #f6f9ff;
  --border: #e7ecf4;
  --border-strong: #d3dcea;

  /* ---- 文字 ---- */
  --text: #101a2c;
  --text-2: #3f4d64;
  --muted: #7a879c;

  /* ---- 主色 ---- */
  --primary: #2f6bf0;
  --primary-dark: #1f4fd0;
  --primary-soft: #eaf0fe;
  --primary-line: #c9dafd;
  --brand-grad: linear-gradient(135deg, #6d8cff 0%, #3b5bfd 100%);

  /* ---- 语义色 ---- */
  --danger: #dc2626;
  --danger-soft: #fdeded;
  --success: #0f9d58;
  --success-soft: #e8f7ef;
  --warn: #b96a06;
  --warn-soft: #fdf4e4;

  /* ---- 形状 ---- */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  /* ---- 阴影：两层，近处薄、远处散，比单层大阴影更「现代」 ---- */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 26px -16px rgba(16, 24, 40, .22);
  --shadow-lg: 0 2px 6px rgba(16, 24, 40, .06), 0 28px 60px -22px rgba(16, 24, 40, .32);
  --ring: 0 0 0 3px rgba(47, 107, 240, .16);

  --sidebar-w: 238px;
  --font-num: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.hidden { display: none !important; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0; }

::selection { background: #d7e4ff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #9aa8bd; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 统一的键盘焦点环（鼠标点击不显示，键盘 Tab 才显示） */
:focus-visible { outline: none; }
button:focus-visible, .nav-item:focus-visible, .chip:focus-visible, a:focus-visible {
  box-shadow: var(--ring);
}

/* ============================ 登录 ============================ */

.login-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-tint), linear-gradient(150deg, #eef4ff 0%, #f7f9fd 48%, #eef8f4 100%);
}
.login-card {
  width: 372px; padding: 38px 34px 28px;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); text-align: center;
  border: 1px solid var(--border);
}
.login-logo {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 16px;
  background: var(--brand-grad);
  color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -10px rgba(59, 91, 253, .7);
}
.login-card h1 { font-size: 18px; margin-bottom: 4px; letter-spacing: .01em; }
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-card input {
  width: 100%; padding: 11px 14px; margin-bottom: 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.login-err { color: var(--danger); font-size: 13px; min-height: 20px; margin-top: 10px; }

/* ============================ 布局 ============================ */

.app { display: flex; height: 100vh; overflow: hidden; background: var(--bg-tint), var(--bg); }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 68%, #f7f9fd 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 14px; }
.brand-mark {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px;
  background: var(--brand-grad); color: #fff;
  font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px -9px rgba(59, 91, 253, .8);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.brand-text strong { font-size: 14px; white-space: nowrap; letter-spacing: .01em; }
.brand-text span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-group-title {
  font-size: 11px; color: #93a0b4; letter-spacing: .08em; font-weight: 600;
  padding: 15px 10px 6px; display: flex; justify-content: space-between; align-items: center;
}
.nav-group-title .mini-btn {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 2px 6px; border-radius: 6px;
  transition: background .14s, color .14s;
}
.nav-group-title .mini-btn:hover { background: var(--primary-soft); color: var(--primary); }

.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 11px; margin-bottom: 2px; border: none; background: transparent;
  border-radius: 9px; cursor: pointer; color: var(--text-2);
  font-size: 13.5px; font-family: inherit; text-align: left;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, #e9f0ff 0%, #f1f6ff 100%);
  color: var(--primary-dark); font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-item .ico { width: 18px; text-align: center; flex: 0 0 18px; font-size: 15px; }
.nav-item .txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .cnt {
  font-size: 11px; color: var(--muted); background: var(--surface-3);
  padding: 1px 7px; border-radius: 20px; min-width: 22px; text-align: center; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .cnt { background: #fff; color: var(--primary); box-shadow: 0 1px 2px rgba(47, 107, 240, .18); }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; box-shadow: 0 0 0 3px rgba(148, 163, 184, .14); }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, .6); }
.storage-info { font-size: 11px; color: var(--muted); text-align: center; margin-top: 9px; line-height: 1.5; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 26px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  z-index: 5;
}
.topbar-title h2 { font-size: 18.5px; letter-spacing: -.01em; }
.topbar-title p { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.content { flex: 1; overflow-y: auto; padding: 22px 26px 72px; }

/* ============================ 按钮 ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font-size: 13px; font-family: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s, transform .08s;
  line-height: 1.5;
}
.btn:hover { background: var(--surface-2); border-color: #bfcbdd; color: var(--text); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary {
  background: linear-gradient(180deg, #3f78f5 0%, var(--primary) 100%);
  border-color: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 8px 18px -10px rgba(47, 107, 240, .8);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #3a70ec 0%, var(--primary-dark) 100%);
  border-color: var(--primary-dark); color: #fff;
}
.btn-danger { background: var(--surface); border-color: #f0c2c2; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #e79a9a; color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; box-shadow: none; }
.btn-sm { padding: 4px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 5px 8px; }

/* ============================ 卡片 ============================ */

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 18px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px;
  background: linear-gradient(180deg, #fdfeff 0%, #f9fbfe 100%);
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.card-head h3 { font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.card-head .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 0 0; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px 13px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, rgba(47, 107, 240, .0), rgba(47, 107, 240, .06));
}
.stat-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-value {
  font-size: 27px; font-weight: 700; line-height: 1.22; margin-top: 5px;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat-bar { height: 4px; border-radius: 3px; margin-top: 12px; opacity: .9; }
.stat.clickable { cursor: pointer; transition: box-shadow .18s, transform .18s, border-color .18s; }
.stat.clickable:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--primary-line); }

/* ============================ 表格 ============================ */

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.tbl th, table.tbl td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl thead th {
  background: rgba(248, 250, 253, .96);
  backdrop-filter: blur(6px);
  color: #56637a; font-weight: 600; font-size: 12.5px;
  position: sticky; top: 0; z-index: 2; white-space: nowrap;
  border-bottom: 1px solid var(--border-strong);
  letter-spacing: .01em;
}
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:nth-child(even) td { background: #fcfdff; }
table.tbl tbody tr:hover td { background: var(--surface-hover); }
table.tbl tbody tr.selected td { background: #eef4ff; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.center, table.tbl th.center { text-align: center; }
table.tbl .nowrap { white-space: nowrap; }
table.tbl td strong { font-weight: 600; color: var(--text); }
table.tbl.compact th, table.tbl.compact td { padding: 6px 11px; }
table.tbl.compact { font-size: 12.5px; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .empty-ico { font-size: 40px; opacity: .45; margin-bottom: 12px; }
.empty h4 { color: var(--text-2); font-weight: 600; margin-bottom: 4px; font-size: 14.5px; }
.empty p { font-size: 13px; margin-bottom: 14px; }

/* 标签 / 徽章 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 9px; border-radius: 999px; font-size: 12px; line-height: 1.75;
  font-weight: 500; white-space: nowrap; border: 1px solid transparent;
}
.tag-click { cursor: pointer; transition: filter .12s, transform .12s; }
.tag-click:hover { filter: brightness(.965); transform: translateY(-1px); }
.tag-more { background: var(--surface-3); color: var(--muted); }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-green { background: var(--success-soft); color: var(--success); }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-blue { background: var(--primary-soft); color: var(--primary); }
.badge-gray { background: var(--surface-3); color: var(--text-2); }

/* ============================ 表单 ============================ */

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 500; }
.field label .req { color: var(--danger); margin-left: 2px; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 13.5px; font-family: inherit;
  color: var(--text); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input[type=text]:hover, input[type=number]:hover, input[type=date]:hover, select:hover, textarea:hover { border-color: #bfcbdd; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: #a8b3c4; }
textarea { resize: vertical; min-height: 64px; line-height: 1.65; }
select {
  cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%237a879c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 30px;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

.checkbox-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; padding: 3px 0; }
.checkbox-line input { width: 16px; height: 16px; flex: 0 0 16px; }
input[type=radio] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; vertical-align: -2px; }

/* 自定义复选框：原生控件在不同浏览器里长得太不一样，统一成方角 + 蓝底白勾 */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; flex: 0 0 16px;
  border: 1.5px solid var(--border-strong); border-radius: 5px; background: #fff;
  display: inline-grid; place-content: center;
  cursor: pointer; vertical-align: -3px;
  transition: background .14s, border-color .14s, box-shadow .14s;
}
input[type=checkbox]:hover { border-color: var(--primary); }
input[type=checkbox]:checked, input[type=checkbox]:indeterminate {
  background: var(--primary); border-color: var(--primary);
}
input[type=checkbox]:checked::after {
  content: ''; width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(.5px, -1px);
}
input[type=checkbox]:indeterminate::after { content: ''; width: 8px; height: 2px; background: #fff; border-radius: 1px; }
input[type=checkbox]:focus-visible { box-shadow: var(--ring); }
input[type=color] { border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }

/* ============================ 筛选 / 状态条 ============================ */

.toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 13px 18px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.toolbar input[type=text], .toolbar select { width: auto; min-width: 132px; padding: 6px 11px; font-size: 13px; }
.toolbar select { padding-right: 30px; }
.toolbar .search {
  min-width: 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6.2' cy='6.2' r='4.4' fill='none' stroke='%237a879c' stroke-width='1.5'/%3E%3Cpath d='M9.6 9.6 12.6 12.6' stroke='%237a879c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center;
  padding-left: 31px;
}
.toolbar .spacer { flex: 1; }

.chip-bar {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  padding: 10px 18px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafcff 0%, #f7fafd 100%);
}
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px;
  border-radius: 999px; font-size: 12.5px; border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; user-select: none; color: var(--text-2);
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s;
}
.chip:hover { border-color: var(--primary-line); color: var(--primary); background: #fbfdff; }
.chip.on {
  background: linear-gradient(180deg, #3f78f5, var(--primary)); border-color: var(--primary); color: #fff;
  box-shadow: 0 6px 14px -10px rgba(47, 107, 240, .9); font-weight: 500;
}
.chip .x { font-size: 13px; opacity: .7; }

.pager {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 11px 18px; border-top: 1px solid var(--border); font-size: 12.5px;
  color: var(--muted); flex-wrap: wrap; background: var(--surface-2);
}
.pager button { padding: 3px 11px; }

/* ============================ 弹窗 ============================ */

.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 24, 40, .38);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px) scale(.99) } to { opacity: 1; transform: translateY(0) scale(1) } }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; max-height: 92vh; display: flex; flex-direction: column;
  animation: slideUp .2s cubic-bezier(.2, .9, .3, 1); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .6);
}
.modal.wide { max-width: 900px; }
.modal.xwide { max-width: 1180px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 17px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 15.5px; }
.modal-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.modal-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 9px; align-items: center;
  padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2);
}
.modal-foot .left { margin-right: auto; }
.close-x {
  border: none; background: transparent; font-size: 20px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 3px 8px; border-radius: 8px;
  transition: background .14s, color .14s;
}
.close-x:hover { background: var(--surface-3); color: var(--text); }

/* ============================ Toast ============================ */

.toast-root { position: fixed; top: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: #101a2c; color: #fff; padding: 11px 17px; border-radius: 11px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); animation: slideUp .2s ease;
  display: flex; align-items: center; gap: 9px; max-width: 400px;
  border: 1px solid rgba(255, 255, 255, .08);
}
.toast.ok { background: linear-gradient(180deg, #127a4a, #0f6b41); }
.toast.err { background: linear-gradient(180deg, #b3261e, #9c1f18); }
.toast.warn { background: linear-gradient(180deg, #9a5b06, #874e05); }

/* ============================ 拖拽上传 ============================ */

.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 36px 20px; text-align: center; background: var(--surface-2);
  cursor: pointer; transition: border-color .16s, background .16s, transform .16s;
}
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.over { transform: scale(1.005); }
.dropzone .dz-ico { font-size: 34px; margin-bottom: 8px; }
.dropzone h4 { font-size: 14.5px; margin-bottom: 4px; }
.dropzone p { font-size: 12.5px; color: var(--muted); }
.dropzone .file-name { margin-top: 10px; font-size: 13px; color: var(--primary); font-weight: 600; }

/* ============================ 步骤条 ============================ */

.steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 4px 13px 4px 4px; }
.step .n {
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700;
  transition: background .16s, color .16s;
}
.step.on { color: var(--primary); font-weight: 600; }
.step.on .n { background: var(--primary); color: #fff; box-shadow: 0 6px 14px -8px rgba(47, 107, 240, .9); }
.step.done .n { background: var(--success); color: #fff; }

.preview-scroll { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.preview-scroll table.tbl th { top: 0; }
.col-course { background: #f6fbf8 !important; }
.cell-fail { color: var(--danger); font-weight: 700; font-variant-numeric: tabular-nums; }
.cell-pass { color: var(--text-2); }

/* ============================ 提示条 ============================ */

.note {
  display: flex; gap: 10px; padding: 11px 15px; border-radius: var(--radius-sm);
  font-size: 12.8px; line-height: 1.65; margin-bottom: 15px;
  background: var(--primary-soft); color: #1e40af; border: 1px solid var(--primary-line);
}
.note.warn { background: var(--warn-soft); color: #8a5108; border-color: #f2ddb4; }
.note.danger { background: var(--danger-soft); color: #991b1b; border-color: #f6cccc; }
.note.ok { background: var(--success-soft); color: #10603a; border-color: #c2e8d3; }
.note .ni { flex: 0 0 auto; font-size: 15px; }

/* ============================ 键值 / 进度条 ============================ */

.kv { display: grid; grid-template-columns: 86px 1fr; gap: 7px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { margin: 0; word-break: break-word; }

.bar-row { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; font-size: 12.8px; }
.bar-row .bar-label { width: 110px; flex: 0 0 110px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar-track { flex: 1; height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-row .bar-fill {
  height: 100%; border-radius: 999px;
  transition: width .35s cubic-bezier(.2, .9, .3, 1);
  /* 给内联设置的颜色叠一层很淡的高光，避免色块太"平" */
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(15, 23, 42, .06));
}
.bar-row .bar-val { width: 62px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 500; }

/* ============================ 学生详情 / 记录块 ============================ */

.detail-head { display: flex; align-items: center; gap: 15px; padding-bottom: 17px; border-bottom: 1px solid var(--border); margin-bottom: 17px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 52px;
  background: var(--brand-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700;
  box-shadow: 0 10px 22px -12px rgba(59, 91, 253, .9);
}
.detail-head h2 { font-size: 18px; }
.detail-head .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.mem-block { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 11px; overflow: hidden; background: var(--surface); }
.mem-block-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface-2); font-size: 13.5px; }
.mem-block-head .spacer { flex: 1; }
.mem-rec { padding: 11px 14px; border-top: 1px solid var(--border); font-size: 13px; }
.mem-rec .rec-del { float: right; }

/* 学生经历：一条一张卡，日期在最左边，一眼看出时间线 */
.ev-item { padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; background: var(--surface); font-size: 13px; }
.ev-item .ev-when { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ============================ 选项卡 ============================ */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
  position: relative; padding: 9px 15px; border: none; background: transparent; cursor: pointer;
  font-size: 13.5px; font-family: inherit; color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .14s, border-color .14s;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ============================ 内联编辑 ============================ */

.inline-edit {
  width: 100%; border: 1px solid transparent; background: transparent;
  padding: 4px 7px; border-radius: 7px; font-size: 13px; font-family: inherit; color: inherit;
  transition: border-color .14s, background .14s, box-shadow .14s;
}
.inline-edit:hover { border-color: var(--border-strong); background: var(--surface); }
.inline-edit:focus { border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); outline: none; }

/* ============================ 工具类 ============================ */

.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .gap8 { gap: 8px; } .gap12 { gap: 12px; }
.items-center { align-items: center; } .between { justify-content: space-between; }
.grow { flex: 1; }

/* ============================ 窄屏 ============================ */

@media (max-width: 860px) {
  :root { --sidebar-w: 64px; }
  .brand { justify-content: center; padding: 16px 8px 12px; }
  .brand-text, .nav-item .txt, .nav-group-title, .sidebar-foot .storage-info { display: none; }
  .nav-item { justify-content: center; padding: 9px 0; }
  .nav-item .cnt { display: none; }
  .content { padding: 16px 14px 64px; }
  .topbar { padding: 12px 14px; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ============================ 浏览器直接打印时的兜底 ============================ */
/* 打印预览走的是 /print.html（专门排版）；这里只是防止有人直接 Ctrl+P
   把侧边栏、按钮也打出来。 */
@media print {
  .sidebar, .topbar, .toolbar, .pager, .tabs, .toast-root, .modal-mask, .btn { display: none !important; }
  html, body { background: #fff; }
  .app { display: block; height: auto; overflow: visible; }
  .main, .content { overflow: visible; height: auto; padding: 0; }
  .card { box-shadow: none; border-color: #cbd5e1; break-inside: avoid; }
  table.tbl thead th { position: static; backdrop-filter: none; }
}
