/* 新增组件样式(Toast / ConfirmDialog),原型 CSS 之外的补充 */
.toast-box { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--fg); color: #fff; font-size: 13px; padding: 9px 18px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); opacity: 0; transform: translateY(-6px);
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--chong); }
.toast.ok { background: var(--bao); }

.dlg-mask {
  position: fixed; inset: 0; background: rgba(29,33,41,.45); z-index: 400;
  display: flex; align-items: center; justify-content: center;
}
.dlg {
  background: var(--surface); border-radius: 14px; padding: 24px; width: 90%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.dlg-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; line-height: 1.6; }
.dlg input {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
  font-size: 14px; outline: none; margin-bottom: 16px;
}
.dlg input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.dlg-btns { display: flex; gap: 10px; justify-content: flex-end; }

.lib-filter.active { border-color: var(--primary); color: var(--primary); }
.boot-error { padding: 80px 24px; text-align: center; color: var(--sub); font-size: 14px; line-height: 2; }

/* ---- 档案弹窗表单 ---- */
.pf-form { display: flex; flex-direction: column; gap: 14px; }
.pf-field { display: flex; flex-direction: column; gap: 4px; }
.pf-field label { font-size: 12px; color: var(--muted); }
.pf-req { color: var(--chong); }
.pf-field input, .pf-field select {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; outline: none; background: var(--surface);
}
.pf-field input:focus, .pf-field select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim);
}
.pf-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.pf-actions button { white-space: nowrap; }
.pf-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---- 学生端弹窗身份行(退出/改密) ---- */
.pf-identity-row {
  display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pf-identity-row .btn-ghost { font-size: 13px; padding: 6px 12px; }

/* ---- 筛选面板锁定遮罩 ---- */
.filter-panel { position: relative; }
.filter-lock {
  position: absolute; inset: 0; z-index: 10;
  background: rgba(255,255,255,0.78); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px; border-radius: 10px;
}
.filter-lock.show { display: flex; }
.filter-lock-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px;
}
.filter-lock-inner svg { color: var(--primary); }

/* ---- 修改资料按钮 ---- */
#editProfileBtn {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--primary); cursor: pointer;
  white-space: nowrap; margin-left: 4px; user-select: none;
}
#editProfileBtn:hover { opacity: 0.8; }

/* ---- 单列计划标签 ---- */
.dl-chip { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--wen-bg); color: var(--wen); }
.code-chip { display: inline-block; font-size: 10px; color: var(--muted); font-family: monospace; letter-spacing: 0.5px; }

/* ---- 用户列表姓名链接 ---- */
.um-name-link { color: var(--primary); text-decoration: none; cursor: pointer; font-weight: 600; }
.um-name-link:hover { text-decoration: underline; }

/* ---- 用户管理头部账号按钮(身份/改密/退出) ---- */
.um-account {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--sub);
  border-radius: 100px; padding: 4px 12px 4px 5px;
  font-size: 12px; font-weight: 600; cursor: pointer; margin-left: auto;
  white-space: nowrap; transition: all .15s;
}
.um-account:hover { border-color: var(--primary); color: var(--primary); }
.um-account-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---- 侧栏导航排序(桌面端) ----
   admin:智能填报 / 工具箱 / 用户 依次排列;
   student:「用户」项置底,替换原首字头像圆形按钮 */
.rail-nav { flex: 1; }
.rail-item:not([data-action]) { order: 1; }
.rail-item[data-action="lib"] { order: 2; }
.rail-item[data-action="users"] { order: 3; }
.rail-spacer { display: none; }

/* student「用户」项图标:名字首字圆形(web + mobile 通用) */
.rail-avatar-mini {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---- 学校名称可点击链接 ---- */
.school-link { color: var(--fg); text-decoration: none; cursor: pointer; }
.school-link:hover { color: var(--primary); text-decoration: underline; }

/* ---- 详情页 tab(报考信息/学校概况/师资力量) ---- */
.dt-tabs { display: flex; gap: 8px; margin: 18px 0 14px; border-bottom: 1px solid var(--line, #E5E6EB); }
.dt-tab {
  appearance: none; background: none; border: none; cursor: pointer;
  padding: 8px 14px 10px; font-size: 14px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.dt-tab:hover { color: var(--fg, #1D2129); }
.dt-tab.active { color: var(--primary, #5A5BE6); border-bottom-color: var(--primary, #5A5BE6); }
.dt-tab.na::after { content: "·未采集"; font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 2px; }

/* 简章长文本渲染 */
.dt-para { font-size: 13.5px; line-height: 1.85; color: var(--fg, #1D2129); margin: 0 0 12px; text-align: justify; }
.dt-subhead { font-size: 14px; font-weight: 700; margin: 18px 0 8px; color: var(--fg, #1D2129); }
.dt-list { margin: 0 0 12px; padding-left: 18px; }
.dt-list li { font-size: 13px; line-height: 1.8; margin-bottom: 4px; }

/* ---- 用户列表修改次数 ---- */
.edits-remain { font-size: 12px; color: var(--muted); cursor: pointer; }
.edits-remain:hover { color: var(--primary); text-decoration: underline; }
.edits-remain.warn { color: var(--chong); font-weight: 600; }

/* ---- 档案弹窗两列栅格(2026-07-10):短字段左右并排,长说明字段 pf-full 独占整行;
   弹窗加宽至 640px 后高度约减半,基本居中于视口;容器不足两列宽(手机)自动回落单列 ---- */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; align-items: start; }
.pf-grid .pf-field { min-width: 0; }
.pf-grid .pf-full { grid-column: 1 / -1; }
