/* ==========================================================================
   课题组管理系统 · 视觉系统
   方向：蓝白工作台 —— 冷灰纸底 / 纯白卡面 / 学院蓝主色
   规则：正文不小于 13.5px，辅助信息不小于 12px；短标签不折行，长标题才折行
   ========================================================================== */

:root {
  --paper: #f4f6f9;
  --paper-2: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #141a26;
  --ink-2: #4a5568;
  --muted: #7b8798;
  --line: #e3e8ef;
  --line-2: #eef1f6;

  --primary: #1d4ed8;
  --primary-dark: #16327a;
  --primary-soft: #eef3ff;

  --accent: #2f5fd0;
  --accent-2: #7ba0ea;
  --accent-soft: #eef3ff;

  --green: #15803d;
  --green-soft: #e8f6ec;
  --amber: #a16207;
  --amber-soft: #fdf4e3;
  --red: #b42318;
  --red-soft: #fdecea;
  --slate-soft: #f1f4f8;

  --shadow: 0 1px 2px rgba(20, 26, 38, .05), 0 8px 24px -18px rgba(20, 26, 38, .35);
  --shadow-lg: 0 26px 70px -26px rgba(10, 18, 34, .5);
  --radius: 14px;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-num: Georgia, "Times New Roman", "Songti SC", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.hidden, [hidden] { display: none !important; }
:focus-visible { outline: 2px solid rgba(29, 78, 216, .45); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(29, 78, 216, .16); }

/* ---------- 登录 / 初始化 ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  /* 银灰：靠「上亮下暗」的金属过渡 + 极细斜纹拉丝做出质感，不用彩色 */
  background:
    radial-gradient(1040px 640px at 24% -12%, rgba(255, 255, 255, .95) 0%, transparent 58%),
    radial-gradient(880px 560px at 94% 108%, rgba(168, 174, 186, .32) 0%, transparent 62%),
    radial-gradient(600px 420px at 8% 96%, rgba(255, 255, 255, .7) 0%, transparent 66%),
    linear-gradient(158deg, #f7f8fa 0%, #e3e6ea 47%, #eef0f3 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(112deg, rgba(108, 116, 130, .045) 0 1px, transparent 1px 7px),
    repeating-radial-gradient(circle at 86% 114%, rgba(120, 128, 142, .07) 0 1px, transparent 1px 38px),
    repeating-radial-gradient(circle at 4% -18%, rgba(150, 158, 172, .055) 0 1px, transparent 1px 52px);
  pointer-events: none;
}
.login-wrap::after {
  content: "";
  position: absolute;
  width: 640px; height: 640px; right: -180px; top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .85) 0%, transparent 66%);
  pointer-events: none;
}
.login-card {
  position: relative;
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 34px 76px -32px rgba(48, 54, 66, .42), 0 6px 20px -10px rgba(48, 54, 66, .14);
  border: 1px solid rgba(255, 255, 255, .9);
}
.login-brand {
  padding: 54px 48px 48px;
  color: #eaf0ff;
  background: linear-gradient(158deg, #1a336e 0%, #132a5c 52%, #0d1f47 100%);
  position: relative;
  overflow: hidden;
}
.login-brand::after {
  content: "";
  position: absolute;
  right: -90px; bottom: -110px;
  width: 320px; height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(159, 182, 232, .28);
  box-shadow: 0 0 0 44px rgba(159, 182, 232, .06), 0 0 0 88px rgba(159, 182, 232, .035);
}
.brand-mark {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 5px;
  color: #9fb6e8;
  border: 1px solid rgba(159, 182, 232, .5);
  border-radius: 5px;
  padding: 4px 8px 4px 13px;
  margin-bottom: 28px;
}
.login-brand h1 { font-size: 33px; font-weight: 600; letter-spacing: 1.5px; line-height: 1.35; }
.brand-sub { margin-top: 16px; color: #a9bce0; font-size: 14px; line-height: 1.95; }
.brand-lede {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid rgba(169, 188, 224, .18);
  color: #e6edfb; font-size: 16px; line-height: 1.8; letter-spacing: .3px;
}
.brand-points { margin-top: 30px; display: grid; gap: 15px; }
.brand-points li { font-size: 14.5px; color: #b9c9e8; display: flex; gap: 12px; align-items: baseline; line-height: 1.6; }
.brand-points span { color: #6f96ea; font-size: 14.5px; font-weight: 600; letter-spacing: 1.2px; font-family: inherit; font-variant-numeric: lining-nums; }
.login-form { padding: 54px 46px; display: flex; flex-direction: column; justify-content: center; background: var(--surface); }
.login-form h2 { font-size: 25px; font-weight: 600; letter-spacing: .5px; }
.login-form .muted { margin: 8px 0 30px; font-size: 14.5px; }
.login-hint { margin-top: 24px; font-size: 14.5px; color: var(--muted); text-align: center; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 14.5px; color: var(--ink-2); margin-bottom: 7px; font-weight: 600; letter-spacing: .2px; }
.cohort-input { display: flex; align-items: center; gap: 9px; }
.cohort-input input { width: 124px; text-align: center; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.cohort-input span { flex: 0 0 auto; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
input, textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #a6b0c0; }
input:focus, textarea:focus, select:focus {
  border-color: #9db4ee;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .1);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.75; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237b8798' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--red); font-size: 14px; margin-top: 12px; min-height: 20px; }

/* 存量成果补录开关 */
.legacy-switch {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  margin: 0 0 18px;
  border: 1px dashed #c9d8f2;
  background: #f7faff;
  border-radius: 11px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.legacy-switch:hover { background: #eff5ff; border-color: #9db4ee; }
.legacy-switch input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.legacy-switch b { display: block; font-size: 14px; font-weight: 600; color: #2b4a86; }
.legacy-switch em { display: block; margin-top: 3px; font-style: normal; font-size: 14.5px; line-height: 1.65; color: #7386a6; }

/* 任务花选品种 */
.species-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.sp-card {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s, background .15s;
}
.sp-card:hover { border-color: #b9cdf0; transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(20, 40, 80, .45); background: #fbfdff; }
.sp-card.active { border-color: #7d9ce8; background: #f7faff; box-shadow: inset 0 0 0 2px #dbe6ff; }
.sp-art { height: 42px; display: grid; place-items: center; filter: drop-shadow(0 1px 1.4px rgba(40, 55, 80, .2)); }
.sp-name { font-size: 14px; font-weight: 600; color: #3c4759; white-space: nowrap; }

/* 批量补登阶段 */
.batch-list { display: flex; flex-direction: column; gap: 8px; }
.batch-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.batch-item input { width: 16px; height: 16px; flex: none; accent-color: var(--primary); }
.batch-item .bi-name { font-size: 14px; font-weight: 500; }
.batch-item .bi-date { margin-left: auto; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.batch-item:has(input:checked) { border-color: #9db4ee; background: #f7faff; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
}
.btn:hover { border-color: #c9d3e3; background: #fafbfd; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(29, 78, 216, .22); }
.btn-primary:hover { background: #1b46c0; border-color: #1b46c0; box-shadow: 0 6px 16px -8px rgba(29, 78, 216, .7); }
.btn-danger { background: var(--surface); border-color: #f0c2bd; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #dda798; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--slate-soft); border-color: transparent; }
.btn-sm { padding: 6px 13px; font-size: 15px; border-radius: 9px; }
/* 成员管理操作列：人次多、按钮多，保持原来的小尺寸，整表才能一屏放下 */
.btn-xs { padding: 5px 10px; font-size: 14.5px; border-radius: 8px; }
.btn-block { width: 100%; padding: 12px; margin-top: 10px; font-size: 14.5px; }
.btn:disabled { opacity: .62; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary:disabled { background: #cbd5e1; border-color: #cbd5e1; color: #f8fafc; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 14.5px; padding: 0; transition: color .15s; }
.link-btn:hover { color: var(--primary); text-decoration: none; }

/* ---------- 主框架 ---------- */
.layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: 100vh; }
.sidebar, .main, .nav { min-width: 0; }
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-brand { display: flex; gap: 12px; align-items: center; padding: 22px 20px 20px; }
.side-logo {
  width: 38px; height: 38px; flex: none;
  border-radius: 10px;
  background: linear-gradient(140deg, #22459b, #16327a);
  color: #fff;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 3px 10px -4px rgba(22, 50, 122, .5);
}
.side-title { font-size: 14.5px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-sub { font-size: 11.5px; color: var(--muted); letter-spacing: 2.2px; text-transform: uppercase; margin-top: 1px; }
.nav { padding: 4px 10px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 14.5px; color: #a3aebf; padding: 16px 12px 8px; letter-spacing: 2.4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  border: 0; background: none;
  text-align: left;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 2px;
  transition: background .14s, color .14s, box-shadow .14s;
  white-space: nowrap;
}
.nav-item:hover { background: #f7f9fc; color: var(--ink); }
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}
.nav-item .ico { width: 17px; height: 17px; display: grid; place-items: center; opacity: .62; flex: none; }
.nav-item .ico svg { width: 16.5px; height: 16.5px; display: block; }
.nav-item.active .ico { opacity: .95; }
.nav-item .count {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 14.5px;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: grid; place-items: center;
  padding: 0 5px;
  font-variant-numeric: tabular-nums;
}
.side-foot { border-top: 1px solid var(--line-2); padding: 15px 16px 16px; }
.side-user { display: flex; gap: 11px; align-items: center; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
  flex-shrink: 0;
}
.avatar-img {
  border-radius: 50%; object-fit: cover; display: block;
  background: #eef2f9; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}
.avatar-initial {
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; flex-shrink: 0;
  letter-spacing: 0; box-shadow: inset 0 0 0 1px rgba(29, 78, 216, .1);
}
.name-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar-edit { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.avatar-edit .hint { font-size: 14px; color: var(--muted); margin-top: 5px; }
.key-box {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 14px; line-height: 1.65;
  background: #0f172a; color: #e2e8f0;
  padding: 13px 15px; border-radius: 10px;
  word-break: break-all;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.key-box button { color: #9fb6e8; border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); }
.key-card {
  border: 1px solid #d7e3f8; border-radius: 13px; padding: 18px 20px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
}
.cred-card {
  border: 1px solid #d7e3f8; border-radius: 13px; padding: 6px 20px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
}
.cred-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 13px 0; border-bottom: 1px dashed #dbe6f8; font-size: 14.5px;
}
.cred-row:last-child { border-bottom: 0; }
.cred-row span { color: var(--muted); flex: none; }
.cred-row b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px; letter-spacing: .4px; color: var(--ink);
  word-break: break-all; text-align: right;
}
.key-meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }
.side-user-info { font-size: 14.5px; line-height: 1.4; min-width: 0; }
.side-user-info div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.side-user-info .muted { font-size: 14px; }
.side-actions { display: flex; gap: 16px; margin-top: 11px; padding-left: 43px; }

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

/* 默认密码提示条 */
.security-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 36px;
  background: #eef3ff; color: #1d4ed8;
  border-bottom: 1px solid #d8e3fb;
  font-size: 14px;
}
.security-banner .sb-ico {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 14px;
  display: grid; place-items: center;
}
.security-banner .btn { margin-left: auto; border-color: #c2d3f5; color: #1d4ed8; background: #fff; }
.security-banner .btn:hover { background: #f7faff; border-color: #9db4ee; }

.topbar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding: 26px 32px 16px;
  background: rgba(244, 246, 249, .92);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(227, 232, 239, .9);
}
.topbar > div:first-child { min-width: 0; }
.topbar h2 {
  font-size: 25px; font-weight: 600; letter-spacing: .4px; line-height: 1.3;
  max-width: 760px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar p { font-size: 14px; margin-top: 4px; color: var(--muted); }
.topbar-actions { display: flex; gap: 9px; align-items: center; flex: none; padding-top: 3px; }
.content { padding: 22px 36px 60px; width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px 22px; }
.card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 15.5px; font-weight: 600; letter-spacing: .2px; }
.card-head .sub { font-size: 14.5px; color: var(--muted); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack { display: grid; gap: 18px; }
.stack-sm { display: grid; gap: 10px; }

/* 指标条：四格一块，不再四张一样的卡 */
.grid-4 {
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.grid-4 > .kpi {
  border: 0; box-shadow: none; border-radius: 0; background: transparent;
  padding: 20px 24px 22px;
  border-left: 1px solid var(--line-2);
  position: relative;
}
.grid-4 > .kpi:first-child { border-left: 0; }
.kpi .label { font-size: 14.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; letter-spacing: .3px; font-weight: 500; }
.kpi .value {
  font-family: var(--font-num);
  font-size: 38px; font-weight: 600; letter-spacing: -1px;
  margin-top: 8px; line-height: 1.05;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--ink);
}
.kpi .hint { font-size: 14px; color: var(--muted); margin-top: 8px; }
.kpi.accent .value { color: var(--primary-dark); }
.kpi.accent { background: linear-gradient(180deg, rgba(29, 78, 216, .05), transparent 62%); }
.kpi.warn .value { color: var(--red); }
.kpi.good .value { color: var(--green); }

/* ---------- 模块色 ---------- */
.mod {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; padding: 2.5px 8px; border-radius: 6px; font-weight: 600;
  white-space: nowrap; letter-spacing: .2px;
}
.mod::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.mod-thesis { background: #eaf0ff; color: #1d4ed8; }
.mod-journal { background: #e4f4f7; color: #0e7490; }
.mod-ip { background: #f2eafd; color: #6b21a8; }
.mod-other { background: #eef1f5; color: #475569; }

/* ---------- 状态 ---------- */
/* 学习方式小标签：全日制用素色，非全日制用暖色，扫一眼就能分出来 */
.tag-mode {
  display: inline-block; margin-left: 5px; font-size: 14.5px; font-weight: 600;
  padding: 1px 6px; border-radius: 5px; white-space: nowrap;
  background: var(--slate-soft); color: #52627a; border: 1px solid #dfe6ef;
}
.tag-mode.is-part { background: #fdf3e3; color: #9a6a12; border-color: #f0dcb4; }
.read-only-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; }
.read-only-row em { font-size: 14px; font-style: normal; }
/* 成员管理：微信测试按钮做成小圆点图标，未测是箭头、通过是勾、失败是感叹号 */
.wx-ico {
  margin-left: 6px; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 14px; line-height: 1; color: #94a3b8; padding: 0;
}
.wx-ico:hover { border-color: var(--primary); color: var(--primary); }
.wx-ico.ok { color: #fff; background: var(--green); border-color: var(--green); }
.wx-ico.bad { color: #fff; background: #b42318; border-color: #b42318; }
/* 个人设置里的「已保存」确认行：密钥不回显明文，用这一行告诉用户确实存上了 */
.pf-saved { margin-top: 6px; font-size: 14px; color: var(--green); line-height: 1.5; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; padding: 2.5px 8px; border-radius: 6px; font-weight: 600;
  white-space: nowrap; letter-spacing: .2px;
}
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.st-todo { background: var(--slate-soft); color: #52627a; }
.st-submitted { background: var(--amber-soft); color: var(--amber); }
.st-approved { background: var(--green-soft); color: var(--green); }
.st-reviewed { background: #e8f0fe; color: #1d4ed8; }
.st-rejected { background: var(--red-soft); color: var(--red); }
.badge-overdue { background: var(--red-soft); color: var(--red); }
.badge-overdue::before { display: none; }
.badge-legacy { background: #fdf3dd; color: #9a6a12; border: 1px solid #ecd9ae; }
.badge-legacy::before { display: none; }
.wx-tag {
  display: inline-flex; align-items: center; font-size: 14px; padding: 2.5px 8px;
  border-radius: 6px; font-weight: 600; white-space: nowrap;
}
.wx-off { background: #f1f3f6; color: #6b7280; }
.wx-wait { background: #fff7e8; color: #9a6a12; }
.wx-ok { background: #e9f7ef; color: #1d7a46; }
.wx-fail { background: #fdecec; color: var(--red); }
.wx-cell { display: flex; align-items: center; gap: 7px; }
.wx-cell .link-btn { font-size: 14px; padding: 0 2px; text-decoration: underline dotted; }

/* ---------- 项目卡 ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.proj-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 16px;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 26, 38, .03);
}
.proj-card:hover { border-color: #c3d2ee; box-shadow: 0 14px 30px -22px rgba(20, 26, 38, .6); transform: translateY(-2px); }
.proj-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bar, #cbd5e1); }
.proj-card.p-thesis { --bar: #1d4ed8; }
.proj-card.p-journal { --bar: #0e7490; }
.proj-card.p-ip { --bar: #6b21a8; }
.proj-card.p-other { --bar: #64748b; }
.proj-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.proj-title {
  font-size: 15.5px; font-weight: 600; line-height: 1.55; margin-top: 9px; letter-spacing: .1px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.proj-meta {
  font-size: 14.5px; color: var(--muted); margin-top: 8px;
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
}
.proj-meta > span { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.proj-meta > span + span::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; margin-right: 5px; }
.proj-foot {
  margin-top: 15px; padding-top: 13px; border-top: 1px dashed var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.progress { flex: 1; height: 6px; background: #eef1f6; border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #3b6fe0, var(--primary)); border-radius: 3px; transition: width .35s cubic-bezier(.22, 1, .36, 1); }
.progress-label { font-size: 14.5px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; }
.tl-item { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding-bottom: 14px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--line), var(--line-2));
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line);
  display: grid; place-items: center;
  font-size: 14px; color: var(--muted); font-weight: 600;
  font-family: var(--font-num);
  z-index: 1;
}
.tl-item.s-submitted .tl-dot { border-color: #e0b055; color: var(--amber); background: #fffdf7; }
.tl-item.s-approved .tl-dot { border-color: var(--primary); background: var(--primary); color: #fff; }
.tl-item.s-rejected .tl-dot { border-color: #d97b70; color: var(--red); background: #fff8f7; }
.tl-body { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; }
.tl-item.overdue .tl-body { border-color: #f2cdc8; background: #fffbfa; }
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.tl-name { font-size: 15px; font-weight: 600; letter-spacing: .1px; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-info { font-size: 14.5px; color: var(--muted); margin-top: 5px; display: flex; gap: 4px 14px; flex-wrap: wrap; align-items: center; }
.tl-info > span { white-space: nowrap; }
.tl-info > span + span::before { content: "·"; margin-right: 12px; color: #cbd5e1; }
.tl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tl-actions .muted { white-space: nowrap; }
.tl-note {
  margin-top: 11px; font-size: 14.5px; color: var(--ink-2); line-height: 1.8;
  background: #fafbfd; border-left: 2px solid #dbe3f0; border-radius: 0 8px 8px 0;
  padding: 10px 13px; white-space: pre-wrap; word-break: break-word;
}
.tl-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 14px; color: var(--primary); text-decoration: none; }
.tl-file:hover { text-decoration: underline; }
.tl-review { margin-top: 10px; font-size: 14px; padding: 9px 13px; border-radius: 8px; line-height: 1.75; }
.tl-review.rej { background: var(--red-soft); color: #8f1d13; }
.tl-review.ok { background: var(--green-soft); color: #14532d; }

.review-chain { margin-top: 11px; display: grid; gap: 6px; }
.review-line { font-size: 14px; padding: 8px 12px; border-radius: 8px; background: #f5f8fd; color: #3f4b5f; line-height: 1.75; }
.review-line.ok { background: var(--green-soft); color: #14532d; }
.review-line.rej { background: var(--red-soft); color: #8f1d13; }
code { background: #f1f4f8; padding: 1.5px 5px; border-radius: 4px; font-size: 14.5px; font-family: ui-monospace, Consolas, monospace; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 12px 16px; background: #fafbfd; border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: .6px;
}
th:first-child { padding-left: 22px; }
td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; vertical-align: middle; }
td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .13s; }
tbody tr:hover { background: #fcfdff; }
td .t-title { font-weight: 600; font-size: 14px; }
td .t-sub { font-size: 14.5px; color: var(--muted); margin-top: 1px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 工具条 ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs {
  display: inline-flex; background: #eaeef5; border-radius: 10px; padding: 3px; gap: 2px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; padding: 7px 15px; border-radius: 8px;
  font-size: 14.5px; color: var(--ink-2); transition: all .15s; white-space: nowrap; flex: none;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--primary-dark); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 26, 38, .12); }
.tab .n { font-size: 14px; color: var(--muted); margin-left: 7px; font-variant-numeric: tabular-nums; opacity: .85; }
.spacer { flex: 1; }
.search { max-width: 240px; }
.select-sm { padding: 8px 30px 8px 11px; font-size: 14.5px; border-radius: 9px; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .big { font-size: 28px; opacity: .35; margin-bottom: 12px; color: var(--primary); }
.empty p { font-size: 14.5px; }
.empty .btn { margin-top: 18px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(14, 22, 38, .45);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 24px; z-index: 100;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--surface); border-radius: 18px;
  width: min(640px, 100%);
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: pop .2s cubic-bezier(.22, 1, .36, 1);
  border: 1px solid rgba(255, 255, 255, .6);
}
@keyframes pop { from { transform: translateY(10px) scale(.985); opacity: .5 } to { transform: none; opacity: 1 } }
.modal.wide { width: min(800px, 100%); }
.modal-head { padding: 22px 26px 16px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 18.5px; font-weight: 600; letter-spacing: .3px; }
.modal-head p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.modal-body { padding: 22px 26px; overflow-y: auto; }
.modal-foot {
  padding: 15px 26px; border-top: 1px solid var(--line-2);
  display: flex; justify-content: flex-end; gap: 10px; background: #fcfdff;
  border-radius: 0 0 18px 18px;
}

/* ---------- 上传 ---------- */
.upload {
  display: block;
  border: 1.5px dashed #cdd7e6; border-radius: 12px;
  padding: 24px; text-align: center;
  background: #fbfcfe; cursor: pointer;
  transition: all .15s;
}
.upload:hover, .upload.drag { border-color: #7d9ce8; background: var(--primary-soft); }
.upload .u-main { font-size: 14.5px; color: var(--ink-2); }
.upload .u-main b { color: var(--primary); font-weight: 600; }
.upload .u-hint { font-size: 14px; color: var(--muted); margin-top: 5px; }
.upload.has-file { border-style: solid; border-color: #bfe0c9; background: #f7fcf8; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #14532d; }

/* ---------- 详情头 ---------- */
.detail-head { padding: 24px 26px 22px; background: linear-gradient(180deg, var(--surface) 0%, #fbfcff 100%); }
.detail-title { font-size: 22px; font-weight: 600; line-height: 1.5; letter-spacing: .2px; max-width: 46ch; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.detail-meta > span { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.detail-meta b { font-weight: 600; color: var(--ink); }
.detail-stats { display: flex; gap: 0; margin-top: 20px; flex-wrap: wrap; border-top: 1px dashed var(--line-2); padding-top: 18px; }
.detail-stat { padding: 0 30px; border-left: 1px solid var(--line-2); }
.detail-stat:first-child { padding-left: 0; border-left: 0; }
.detail-stat .v {
  font-family: var(--font-num); font-size: 25px; font-weight: 600;
  line-height: 1.15; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.3px;
}
.detail-stat .k { font-size: 14px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.detail-bar { margin-top: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---------- 表格里的数字与进度 ---------- */
.right { text-align: right; }
.rate-cell { display: flex; align-items: center; gap: 10px; }
.rate-cell .progress { width: 104px; flex: none; }
.rate-cell .progress-label { font-size: 14px; }

/* 设置页：单列阅读宽度，不要拉满整屏 */
/* 不再单独收窄：所有页面的卡片统一铺满内容区，左右边界一致 */
.settings-page { max-width: none; }
.settings-page .card-pad { padding: 20px 22px 22px; }

/* ---------- 步骤编辑 ---------- */
.step-row { display: grid; grid-template-columns: 22px 1fr 152px 30px; gap: 9px; align-items: center; margin-bottom: 9px; }
.step-idx { font-size: 14px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.icon-btn {
  border: 0; background: none; color: #a3aebf; font-size: 16px;
  width: 28px; height: 28px; border-radius: 7px; line-height: 1;
}
.icon-btn:hover { background: var(--red-soft); color: var(--red); }

/* ---------- 提示 ---------- */
.toast-root { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast {
  background: #1c2536; color: #fff; font-size: 14.5px;
  padding: 11px 20px; border-radius: 10px;
  box-shadow: 0 16px 40px -16px rgba(10, 18, 34, .7);
  animation: slide .22s cubic-bezier(.22, 1, .36, 1);
  border: 1px solid rgba(255, 255, 255, .08);
}
.toast.ok { background: #14532d; }
.toast.err { background: #8f1d13; }
@keyframes slide { from { transform: translateY(-10px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---------- 其他 ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 13px; }
.section-title h3 {
  font-size: 16px; font-weight: 600; letter-spacing: .3px;
  display: inline-flex; align-items: center; gap: 9px;
}
.section-title h3::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: linear-gradient(180deg, var(--accent-2), var(--primary)); }
.section-title .link { font-size: 14.5px; color: var(--muted); }
.section-title .link:hover { color: var(--primary); }
.section-title .muted { white-space: nowrap; }
.hint-box {
  background: #f8fafd; border: 1px solid var(--line);
  border-radius: 10px; padding: 13px 15px;
  font-size: 14px; color: var(--ink-2); line-height: 1.8;
}
.hint-box b { color: var(--ink); font-weight: 600; }
.owner-line { display: flex; align-items: center; gap: 8px; }
.dot-sep { color: #cbd5e1; }
.notice {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--amber-soft); color: #7c4a03; font-size: 14.5px; align-items: flex-start;
  line-height: 1.8;
}
.notice.red { background: var(--red-soft); color: #8f1d13; }
.notice b { font-weight: 600; }
.notice-ico { width: 17px; height: 17px; flex: none; margin-top: 3px; opacity: .85; }
.notice-ico svg { width: 17px; height: 17px; display: block; }
.notice-main { min-width: 0; flex: 1; }
.notice-title { font-size: 14px; font-weight: 600; color: inherit; }
.notice-body { margin-top: 4px; max-width: 74ch; color: #4a5568; text-wrap: pretty; }
.notice.red .notice-body { color: #7a3a2e; }
.notice.ok { background: var(--green-soft); color: #14532d; }
.notice.ok .notice-body { color: #22563a; }
.notice-time { margin-top: 6px; font-size: 14px; color: #8592a6; font-variant-numeric: tabular-nums; }

.msg-body {
  font-size: 14.5px; color: var(--ink-2); margin-top: 8px;
  line-height: 1.9; max-width: 74ch; text-wrap: pretty;
}

/* ==========================================================================
   花园（插画本体在 garden2d.js，这里只调外框）
   ========================================================================== */
.garden-head {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 16px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 15px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.gh-user { display: flex; gap: 12px; align-items: center; }
.gh-name { font-size: 16.5px; font-weight: 600; }
.gh-sub { font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.gh-note { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.gh-res { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.gh-actions { display: flex; gap: 8px; }
.res { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #4a5568; white-space: nowrap; }
.res i { font-style: normal; width: 16px; height: 16px; display: grid; place-items: center; flex: none; }
.res i svg { width: 15px; height: 15px; display: block; }
.res-leaf i { color: #5f9e58; }

.garden-stage {
  height: 486px; border-radius: 16px; overflow: hidden;
  background: #cfe7f5;
  border: 1px solid #d7e0ec;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 18px 34px -26px rgba(20, 40, 70, .55);
  position: relative; touch-action: none;
}
.garden-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.garden-loading { display: grid; place-items: center; height: 100%; color: #5b7a8f; font-size: 14.5px; }
.garden-status {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 14.5px; color: #6b7f92; padding: 10px 4px 18px;
}
.garden-status > span { white-space: nowrap; }

.plant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.plant-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  padding: 15px 17px; cursor: pointer; transition: border-color .16s, box-shadow .16s, transform .16s;
}
.plant-card:hover { border-color: #b9cdf0; box-shadow: 0 12px 26px -20px rgba(20, 40, 80, .45); transform: translateY(-2px); }
.pc-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pc-title-slot { min-height: 45px; display: flex; align-items: center; }
.pc-title { width: 100%; font-size: 14.5px; font-weight: 600; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); margin: 8px 0 10px; }
.pc-meta > span { white-space: nowrap; }
.pc-bar { height: 5px; background: #eee8db; border-radius: 3px; overflow: hidden; }
.pc-bar i { display: block; height: 100%; background: #6fa564; }

.peer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.peer-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; }
.peer-top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.pc-name { font-size: 14.5px; font-weight: 600; }
.pc-sub { font-size: 14px; color: var(--muted); }
.peer-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-2); margin-bottom: 12px; }
.peer-stats > span { white-space: nowrap; }
.gold-text { color: #9a6a12; font-weight: 600; }

.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.board-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.board-head .muted { font-size: 14px; font-weight: 400; white-space: nowrap; }
.board-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 14px; }
.rank { width: 19px; height: 19px; border-radius: 5px; background: #f0ece0; color: #6b7264;
  font-size: 14px; display: grid; place-items: center; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rank.r1 { background: #f8edd6; color: #94651a; }
.rank.r2 { background: #eef0ea; color: #5b6b60; }
.rank.r3 { background: #f7ece0; color: #96694a; }
.board-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.board-empty { font-size: 14.5px; color: var(--muted); padding: 10px 0; }

.msg-row { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.msg-row:last-child { border-bottom: 0; }
.msg-name { font-size: 14.5px; font-weight: 600; }
.msg-text { font-size: 14.5px; color: #3f4b42; margin: 3px 0; line-height: 1.7; }

.bloom-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.bloom-item { display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.bloom-dot { width: 16px; height: 16px; border-radius: 50%; background: #ecd07a; }
.bloom-item.full .bloom-dot { background: #6fa564; }
.bloom-info { font-size: 14px; color: var(--muted); }

.outcome-hero {
  background: linear-gradient(135deg, #1a356f, #0f2557);
  color: #eef3ff; border-radius: 16px;
  padding: 26px 28px; margin-bottom: 10px;
  position: relative; overflow: hidden;
  box-shadow: 0 20px 40px -30px rgba(20, 44, 34, .9);
}
.outcome-hero::after {
  content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px;
  border-radius: 50%; border: 1px solid rgba(159, 182, 232, .24);
  box-shadow: 0 0 0 36px rgba(159, 182, 232, .05);
}
.oh-title { font-size: 21px; font-weight: 600; letter-spacing: .5px; }
.oh-sub { font-size: 14.5px; color: #c9d8f5; margin-top: 7px; line-height: 1.75; max-width: 62ch; }
.oh-stats { font-size: 14.5px; color: #9fb6e8; margin-top: 14px; }
.outcome-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; }
.outcome-card { display: flex; gap: 13px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; }
.outcome-card.pending { opacity: .76; border-style: dashed; }
.oc-flower { font-size: 26px; color: #c79a3c; flex-shrink: 0; }
.oc-title { font-size: 14.5px; font-weight: 600; line-height: 1.55; }
.oc-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 6px; }
.oc-meta > span { white-space: nowrap; }
/* 期刊名 / 专利号单独占第二行：中文刊名短，跟着模块标签会挤在同一行，中英文要长得一样 */
.oc-journal { margin-top: 5px; font-size: 14px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
/* 作者固定放最后一行，和英文成果卡的排布对齐 */
.oc-owner { margin-top: 7px; font-size: 14px; color: var(--muted); }
.oc-right { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }

.garden-2d { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px; }
.g2d-item { text-align: center; cursor: pointer; }
.g2d-plant { font-size: 40px; }
.g2d-title { font-size: 14.5px; font-weight: 600; margin-top: 6px; }
.g2d-sub { font-size: 14px; color: var(--muted); }
.g2d-tip { text-align: center; font-size: 14px; color: var(--muted); padding-bottom: 16px; }

.g2-scene { display: block; width: 100%; height: 100%; }
.g2-plant { cursor: pointer; transition: filter .18s ease; }
.g2-plant:hover { filter: drop-shadow(0 8px 14px rgba(20, 40, 30, .22)) brightness(1.03); }

/* ---------- 花园交互 ---------- */
.g2-inner {
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.g2-plant:hover .g2-inner { transform: translateY(-5px) rotate(-.8deg); }
.g2-plant:active .g2-inner { transform: translateY(4px) scale(.955); }
.garden-stage { cursor: grab; touch-action: manipulation; }
.garden-stage.is-pressing { cursor: grabbing; }

.garden-entry {
  display: flex; align-items: center; gap: 15px; padding: 16px 20px; margin-top: 16px;
  background: linear-gradient(120deg, #f7faff, #fcfdff);
  border: 1px solid #dbe6ff; border-radius: 15px; cursor: pointer;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.garden-entry:hover { border-color: #9db4ee; transform: translateY(-1px); box-shadow: 0 14px 30px -24px rgba(60, 90, 60, .9); }
.ge-icon {
  width: 46px; height: 46px; border-radius: 13px; background: #fff;
  display: grid; place-items: center; font-size: 22px; color: #5a9e5a; border: 1px solid #e2f0e6;
}
.ge-title { font-size: 15px; font-weight: 600; }
.ge-sub { font-size: 14.5px; color: #6b8a76; margin-top: 3px; }
.ge-go { margin-left: auto; font-size: 14px; color: #3f7a4f; white-space: nowrap; }

.res-swap {
  border: 1px solid #cdd9ec; background: #f4f7fc; color: #3f5a86;
  font-size: 14px; padding: 2px 7px; border-radius: 6px;
  margin-left: 5px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.res-swap:hover { background: #e9f0fb; border-color: #b9cdf0; }

/* ---------- 留言板 ---------- */
.board-wall {
  background: #d8c3a5;
  border: 12px solid #b08a5e;
  border-radius: 16px;
  padding: 22px 20px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
  align-items: start;
  box-shadow: inset 0 2px 22px rgba(120, 90, 55, .25);
  min-height: 150px;
}
.note {
  background: #fffdf2;
  border-radius: 6px;
  padding: 13px 15px 15px;
  box-shadow: 1px 2px 0 rgba(120, 90, 55, .18), 0 3px 10px rgba(120, 90, 55, .12);
  transform: rotate(-.7deg);
  position: relative;
}
.note::before {
  content: ""; position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  width: 11px; height: 11px; border-radius: 50%;
  background: #c0563f; box-shadow: 0 1px 3px rgba(0, 0, 0, .28), inset -1px -1px 2px rgba(0, 0, 0, .18);
}
.note:nth-child(2n) { transform: rotate(.9deg); background: #fff8e0; }
.note:nth-child(3n) { transform: rotate(-1.4deg); background: #fdf7e8; }
.note-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.note-name { font-size: 14.5px; font-weight: 600; }
.note-sub { font-size: 14.5px; color: #9a8c76; }
.note-text { font-size: 14px; color: #4a4237; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.empty-note {
  grid-column: 1 / -1; text-align: center; color: #8d7a5f;
  background: transparent; box-shadow: none; transform: none; padding: 40px 0;
}
.empty-note::before { display: none; }
.note-input { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- 场景化花园 ---------- */
.mini-stack { display: flex; align-items: center; }
.mini-stack > * { margin-left: -9px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(20, 26, 38, .12); }
.mini-stack > *:first-child { margin-left: 0; }
.archive-box { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 13px; }
.archive-box summary { cursor: pointer; font-size: 14.5px; color: var(--muted); list-style: none; }
.archive-box summary::-webkit-details-marker { display: none; }
.archive-box summary::before { content: "▸ "; }
.archive-box[open] summary::before { content: "▾ "; }
.archive-wall { margin-top: 12px; opacity: .94; }
.g2-board { transition: filter .2s; }
.g2-board:hover { filter: drop-shadow(0 4px 10px rgba(60, 90, 60, .18)); }

/* ---------- 留言放大 ---------- */
.modal { position: relative; }
.note { cursor: zoom-in; transition: box-shadow .16s ease, filter .16s ease; }
.note:hover { box-shadow: 1px 3px 0 rgba(120, 90, 55, .18), 0 8px 22px rgba(120, 90, 55, .22); filter: brightness(1.02); }
.note:focus-visible { outline: 2px solid #c08a50; outline-offset: 3px; }
.note-zoom {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(34, 28, 20, .42);
  display: grid; place-items: center; padding: 26px;
  border-radius: 14px;
  animation: zoomIn .18s ease;
}
@keyframes zoomIn { from { opacity: 0; } to { opacity: 1; } }
.zoom-paper {
  position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto;
  background: #fffdf2; border-radius: 8px; padding: 26px 28px 20px;
  box-shadow: 0 18px 44px rgba(40, 30, 15, .3);
  transform: rotate(-.5deg);
}
.zoom-paper::before {
  content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: #c0563f;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25), inset -1px -1px 2px rgba(0, 0, 0, .18);
}
.zoom-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.zoom-meta b { display: block; font-size: 14px; color: #7a6746; }
.zoom-meta span { font-size: 14px; color: #9a8c76; }
.zoom-close {
  margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: #f2e8d3; color: #8a7550; font-size: 18px; line-height: 1; cursor: pointer;
}
.zoom-close:hover { background: #e8dabb; }
.zoom-text { font-size: 15.5px; line-height: 1.95; color: #3f382c; white-space: pre-wrap; word-break: break-word; min-height: 96px; }
.zoom-foot { margin-top: 18px; padding-top: 10px; border-top: 1px dashed #e4d8be; font-size: 14px; color: #a4967c; }

/* ---------- 领养花 ---------- */
.adopt-bar {
  display: flex; align-items: center; gap: 15px; padding: 13px 18px; margin-bottom: 12px;
  background: linear-gradient(120deg, #f4faf2, #f8fbff);
  border: 1px solid #d3e5cc; border-radius: 15px;
}
.ab-main { min-width: 0; }
.ab-art {
  width: 56px; height: 56px; display: grid; place-items: center; flex: none;
  background: #f8fbf4; border-radius: 13px; border: 1px solid #e0efdc;
}
.ab-name { font-size: 15px; font-weight: 600; white-space: nowrap; }
.ab-sub { font-size: 14.5px; color: #6b8a76; margin-top: 3px; }
.adopt-empty {
  display: flex; align-items: center; gap: 15px; padding: 17px 18px; margin-bottom: 12px;
  background: #f8fafd; border: 1px dashed #cdd7e6; border-radius: 15px;
}
.ae-icon {
  width: 44px; height: 44px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; font-size: 22px; color: #6fa564; flex: none;
}
.ae-title { font-size: 15px; font-weight: 600; }
.ae-sub { font-size: 14.5px; color: #8a7a5c; margin-top: 3px; line-height: 1.65; }
.adopt-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; }
.adopt-card {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px; cursor: pointer; font: inherit;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.adopt-card:hover { border-color: #b9cdf0; box-shadow: 0 10px 22px -16px rgba(20, 40, 80, .45); transform: translateY(-2px); background: #fbfdff; }
.adopt-card.active { border-color: #7d9ce8; box-shadow: inset 0 0 0 2px #dbe6ff; }
.adopt-art { height: 62px; display: grid; place-items: center; }
.adopt-name { font-size: 14px; font-weight: 600; }
.adopt-desc { font-size: 14px; color: #8592a6; }

.poll-card { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.poll-art {
  width: 66px; height: 66px; display: grid; place-items: center;
  background: #f7fbf4; border: 1px solid #e2f0dc; border-radius: 15px;
}
.poll-main { flex: 1; min-width: 170px; }
.poll-name { font-size: 15px; font-weight: 600; }
.poll-sub { font-size: 14.5px; color: #7b8a76; margin-top: 3px; }
.poll-dots { display: flex; gap: 7px; margin-top: 9px; }
.poll-actions { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
.poll-hint { font-size: 14px; color: #8592a6; text-align: center; }
.pd { width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 1px solid #c3d2b8; }
.pd.on { background: #E8B23A; border-color: #C98A1E; }

.g2-tip {
  position: absolute; z-index: 30; pointer-events: none;
  width: max-content; max-width: 250px;
  background: rgba(24, 34, 27, .95); color: #f3f2e8; padding: 9px 11px; border-radius: 9px;
  font-size: 14.5px; line-height: 1.65; display: flex; flex-direction: column; gap: 3px;
  box-shadow: 0 10px 26px -10px rgba(20, 30, 20, .6);
}
.g2-tip b { font-size: 14.5px; }
.g2-tip-next { color: #cfe3c6; }
.g2-tip-gold { color: #F2CE74; }

/* ---------- 花园夜间小事件 ---------- */
.g2-fw { transform-origin: 0 0; animation: g2fw 1.5s ease-out both; }
@keyframes g2fw {
  0% { transform: scale(.12); opacity: 0; }
  18% { opacity: 1; }
  60% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}
.g2-meteor { animation: g2meteor 1.7s ease-in both .2s; }
@keyframes g2meteor {
  0% { transform: translate(1020px, -20px); opacity: 0; }
  10% { opacity: 1; }
  72% { opacity: 1; }
  100% { transform: translate(230px, 280px); opacity: 0; }
}
.g2-ff { transform-box: fill-box; transform-origin: center; animation: g2ff 3.4s ease-in-out 2 both; }
@keyframes g2ff {
  0%, 100% { opacity: 0; transform: translateY(0); }
  25% { opacity: .95; transform: translateY(-12px); }
  55% { opacity: .45; transform: translateY(-22px); }
  80% { opacity: .9; transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .g2-fw, .g2-meteor, .g2-ff { animation: none; opacity: 0; }
}
.g2-plants.is-dry { filter: saturate(.72) brightness(.98); }
.g2-adopt { cursor: pointer; }

/* ---------- 枯萎分级 ---------- */
.g2-plants.is-wilt1 .g2-sway { filter: saturate(.74) brightness(1.02) hue-rotate(-6deg); }
.g2-plants.is-wilt2 .g2-sway { filter: saturate(.56) sepia(.16) brightness(1) hue-rotate(-8deg); }
.g2-plants.is-wilt3 .g2-sway { filter: saturate(.36) sepia(.34) brightness(.96) hue-rotate(-10deg); }
.g2-plants.is-wilt4 .g2-sway { filter: saturate(.16) sepia(.5) brightness(.88); }
.g2-plants.is-wilt3 .g2-inner { transform: skewX(-2deg); }
.g2-plants.is-wilt4 .g2-inner { transform: skewX(-4deg) translateY(2px); }
.g2-tip-warn { color: #FFD08A; }
.g2-grain { transform-box: fill-box; transform-origin: center; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .content { padding: 20px 28px 52px; }
  .topbar { padding: 24px 28px 15px; }
  .proj-grid { grid-template-columns: 1fr; }
  .plant-grid, .peer-grid, .board-grid { grid-template-columns: repeat(2, 1fr); }
  .outcome-grid { grid-template-columns: 1fr; }
  .detail-title { max-width: none; }
}

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 > .kpi:nth-child(3) { border-left: 0; }
  .grid-4 > .kpi:nth-child(n + 3) { border-top: 1px solid var(--line-2); }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; z-index: 40;
    height: auto; border-right: 0; border-bottom: 1px solid var(--line);
    min-width: 0; overflow: hidden;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
  }
  .side-brand { padding: 10px 14px; }
  .side-logo { width: 30px; height: 30px; border-radius: 8px; font-size: 14px; }
  .side-title { font-size: 14.5px; }
  .side-sub { display: none; }
  .main { min-width: 0; }
  .nav { display: flex; overflow-x: auto; padding: 0 10px 9px; gap: 4px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-label { display: none; }
  .nav-item { width: auto; white-space: nowrap; padding: 7px 12px; font-size: 14.5px; }
  .nav-item.active { box-shadow: none; }
  .side-foot { display: none; }
  .content { padding: 16px 16px 44px; }
  .topbar { padding: 14px 16px 12px; position: static; }
  .topbar h2 { font-size: 20px; }
  .login-card { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 660px; }
  .detail-title { font-size: 18.5px; }
  .detail-head { padding: 18px 18px 16px; }
  .detail-stat { padding: 0 18px; }
  .step-row { grid-template-columns: 18px 1fr 124px 26px; gap: 7px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; }
  #mod-picker { grid-template-columns: repeat(2, 1fr) !important; }
  #mod-picker .btn { min-width: 0; white-space: nowrap; justify-content: center; }
  .species-pick { gap: 7px; }
  .sp-name { font-size: 14.5px; }
  .garden-stage { height: 240px; }
  .garden-status > span { white-space: normal; }
}

/* 移动端：表格折叠为卡片 */
@media (max-width: 760px) {
  .kpi .value { font-size: 30px; }
  .kpi .label { font-size: 14px; }
  .kpi .hint { font-size: 14px; }
  .table-wrap.mobile-cards { overflow: visible; }
  .table-wrap.mobile-cards table { min-width: 0; }
  .table-wrap.mobile-cards table,
  .table-wrap.mobile-cards thead,
  .table-wrap.mobile-cards tbody,
  .table-wrap.mobile-cards tr,
  .table-wrap.mobile-cards td { display: block; width: 100%; }
  .table-wrap.mobile-cards thead { display: none; }
  .table-wrap.mobile-cards tbody { padding: 12px; }
  .table-wrap.mobile-cards tr {
    border: 1px solid var(--line); border-radius: 11px;
    margin-bottom: 10px; padding: 13px 15px; background: var(--surface);
  }
  .table-wrap.mobile-cards tr:last-child { margin-bottom: 0; }
  .table-wrap.mobile-cards td {
    border: 0; padding: 3px 0;
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    text-align: left !important;
  }
  .table-wrap.mobile-cards td::before {
    content: attr(data-label); font-size: 14px; color: var(--muted); flex-shrink: 0;
  }
  .table-wrap.mobile-cards td.cell-main {
    display: block; font-size: 14.5px; font-weight: 600; padding-bottom: 5px;
  }
  .table-wrap.mobile-cards td.cell-main::before { display: none; }
  .table-wrap.mobile-cards td.cell-main .t-sub { font-weight: 400; }
  .table-wrap.mobile-cards td:last-child { padding-top: 9px; }
  .table-wrap.mobile-cards td:last-child::before { content: ""; }
  .table-wrap.mobile-cards td:last-child .btn { flex-shrink: 0; }
  .table-wrap.mobile-cards tr:hover { background: var(--surface); }
  .plant-grid, .peer-grid, .board-grid { grid-template-columns: 1fr; }
  .gh-res { margin-left: 0; width: 100%; }
  .adopt-grid { grid-template-columns: repeat(2, 1fr); }
  .adopt-desc { display: none; }
  .plan-step-grid { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 阶段进度条（植株详情） ---------- */
.stage-track { position: relative; padding: 4px 0 2px; }
.st-rail {
  position: absolute; left: 8%; right: 8%; top: 29px; height: 3px;
  border-radius: 3px; background: #e7eefa;
}
.st-rail i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #9dc0f2 0%, #1d4ed8 100%);
  width: var(--pct, 0%); transition: width .45s ease;
}
.st-row { position: relative; display: flex; }
.st-node {
  flex: 1 1 0; min-width: 50px; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.st-art {
  width: 50px; height: 50px; display: grid; place-items: center;
  background: #fff; border-radius: 50%; position: relative; z-index: 1;
}
.st-node:not(.done) .st-art svg { filter: grayscale(.8) opacity(.62); }
.st-node.doing .st-art svg { filter: grayscale(.15) opacity(.92); }
.st-label {
  font-size: 14px; color: var(--ink-3); line-height: 1.3;
  max-width: 62px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-node.done .st-label { color: #1d4ed8; font-weight: 600; }

/* ---------- 组会安排 ---------- */
.sem-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sem-head-title { font-size: 15px; font-weight: 600; }
.sem-head-sub { font-size: 14.5px; color: var(--ink-3); margin-top: 5px; }
.sem-list { margin-top: 16px; display: grid; gap: 10px; }
.sem-row {
  display: flex; gap: 16px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.sem-row.is-past { background: #fafbfc; }
.sem-row.is-past .sd-day { color: var(--ink-3); }
.sem-row.is-today { border-color: #9db4ee; box-shadow: 0 0 0 3px rgba(29, 78, 216, .06); }
.sem-date { width: 92px; flex: none; }
.sd-day { font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.sd-week { font-size: 14px; color: var(--ink-3); margin-top: 3px; }
.sem-row.is-today .sd-day { color: var(--primary-dark); }
.sem-slots { flex: 1; display: grid; gap: 8px; min-width: 0; }
.sem-slot {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px;
  background: #f7f9fc; border: 1px solid transparent;
}
.sem-slot.is-empty {
  justify-content: space-between; background: #fbfcfe;
  border: 1px dashed #dfe6f0; color: var(--ink-3); font-size: 14.5px;
}
.sem-slot.is-mine { background: #eef4ff; border-color: #c9d8f8; }
.sem-main { min-width: 0; flex: 1; }
.sem-person { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.sem-tag { font-size: 14.5px; background: var(--primary); color: #fff; border-radius: 4px; padding: 1px 5px; font-weight: 500; }
.sem-topic {
  font-size: 14.5px; color: var(--ink-2); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sem-topic.is-empty { color: #a8b0bd; }
.sem-empty-text { font-size: 14.5px; }

@media (max-width: 640px) {
  .sem-row { flex-direction: column; gap: 10px; padding: 12px 13px; }
  .sem-date { width: auto; display: flex; align-items: baseline; gap: 8px; }
  .sd-week { margin-top: 0; }
  .sem-topic { white-space: normal; }
  .sem-slot { flex-wrap: wrap; }
}

/* ---------- 成果墙：影响因子 / 分区 ---------- */
.oc-metric {
  font-size: 14px; font-weight: 600; color: #9a6a12;
  background: #fdf6e3; border: 1px solid #f0e0b8; border-radius: 6px;
  padding: 3px 8px; white-space: nowrap; letter-spacing: .2px;
}
/* 成果墙：影响因子、分区、收录各占一行，纵向并列 */
.oc-metrics { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

/* ---------- 收录勾选 ---------- */
.indexing-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.idx-item {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: #fbfcfe; font-size: 14px; cursor: pointer; user-select: none;
  white-space: nowrap;
}
.idx-item:has(input:checked) { border-color: #9db4ee; background: #eef4ff; color: var(--primary-dark); font-weight: 600; }
.idx-item input { margin: 0; accent-color: #1d4ed8; }

/* ---------- 论文类型切换（中文期刊 / 英文 SCI） ---------- */
.paper-lang {
  display: inline-flex; gap: 3px; padding: 3px;
  background: #eef2f9; border-radius: 10px;
}
.paper-lang button {
  border: 0; background: transparent; cursor: pointer;
  padding: 7px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  font-family: inherit; transition: all .15s;
}
.paper-lang button.on {
  background: #fff; color: var(--primary-dark); font-weight: 600;
  box-shadow: 0 1px 3px rgba(20, 40, 80, .12);
}

/* ---------- 组会：节假日 / 批量导入 / 提醒 ---------- */
.sem-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sem-degree { font-size: 14.5px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.sem-mode {
  font-size: 14.5px; font-weight: 600; margin-left: 5px;
  color: #9a6a12; background: #fdf3e3; border: 1px solid #f0dcb4;
  border-radius: 5px; padding: 1px 5px;
}
.sem-skip-tag {
  display: inline-block; margin-top: 4px; font-size: 14.5px;
  color: #8a6d3b; background: #fdf6e3; border: 1px solid #f0e0b8;
  border-radius: 5px; padding: 1px 5px;
}
.sem-skip-tag.eve { color: #1d4ed8; background: #eef4ff; border-color: #c9d8f8; }
.sem-skip-btn {
  display: block; margin-top: 5px; border: 0; background: none; padding: 0;
  font-size: 14px; color: #9aa4b2; cursor: pointer; text-decoration: underline;
}
.sem-skip-btn:hover { color: var(--primary); }
.sem-row.is-skipped { background: #fbfbfc; border-style: dashed; }
.sem-row.is-skipped .sd-day { color: var(--ink-3); text-decoration: line-through; }
.sem-skipped-box {
  padding: 12px 14px; border: 1px dashed #e3dcc9; border-radius: 9px;
  background: #fffdf7; color: #8a6d3b; font-size: 14.5px;
}
.sem-extra { font-size: 14px; color: #b45309; margin-top: 2px; }
.sem-remind-last { font-size: 14.5px; color: var(--ink-3); margin-top: 12px; }

.holiday-list { display: grid; gap: 10px; }
.holiday-opt {
  text-align: left; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 13px 15px; cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.holiday-opt:hover:not(:disabled) { border-color: #9db4ee; background: #f7faff; }
.holiday-opt:disabled { opacity: .5; cursor: not-allowed; }
.holiday-opt b { display: block; font-size: 14px; margin-bottom: 3px; }
.holiday-opt span { font-size: 14.5px; color: var(--ink-3); line-height: 1.6; }

.import-summary { font-size: 14.5px; color: var(--ink-2); margin: 4px 0 10px; font-weight: 600; }
.import-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; }
.import-col { min-width: 0; }
.import-title { font-size: 14px; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.import-list {
  max-height: 260px; overflow: auto; border: 1px solid var(--line);
  border-radius: 9px; background: #fdfefe;
}
.import-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 10px; border-bottom: 1px solid #f1f4f8; font-size: 14.5px;
}
.import-row:last-child { border-bottom: 0; }
.import-row > span { color: var(--ink-3); width: 48px; flex: none; font-size: 14px; }
.import-row > b { font-weight: 600; white-space: nowrap; }
.import-row > em { font-style: normal; color: var(--ink-2); min-width: 0; }
.import-row > i { font-style: normal; color: #b42318; font-size: 14px; }
.import-row.bad { background: #fff8f7; }

@media (max-width: 640px) {
  .import-cols { grid-template-columns: 1fr; }
  .sem-head-actions { width: 100%; }
  .sem-head-actions .btn { flex: 1; }
}

/* ---------- 侧栏字号整体放大 20%（2026-10-22） ---------- */
.nav-label { font-size: 14px; letter-spacing: 2.3px; }
.nav-item { font-size: 14.3px; padding: 9px 12px; gap: 10px; }
.nav-item .ico { width: 17px; height: 17px; }
.nav-item .ico svg { width: 16.7px; height: 16.7px; }
.nav-item .count { font-size: 14.5px; }
.side-user { gap: 12px; }
.side-user .avatar { width: 33px; height: 33px; font-size: 14px; }
.side-user-info { font-size: 14.5px; line-height: 1.4; }
.side-user-info .muted { font-size: 14.5px; }
.side-actions { gap: 16px; padding-left: 44px; margin-top: 10px; }
.side-actions .link-btn, .side-actions button { font-size: 14.5px; }

/* 「工作台」小标题与导航项一起左对齐 */
.nav-label { text-align: left; padding: 16px 12px 8px; }

/* 悬停提示默认隐藏：.g2-tip 设了 display:flex，会盖掉 hidden 属性的 display:none，
   导致空提示框在花园重绘时闪成一条黑条 */
.g2-tip[hidden] { display: none !important; }

/* 导航项保持左对齐（2026-10-22 居中版撤掉，还是靠左好看） */
.nav-item { justify-content: flex-start; padding: 9px 12px; }
.nav-item .count { position: static; margin-left: auto; }

/* 花园广场卡片：按钮一律贴卡片底部，避免副标题折行时按钮高低不齐 */
.peer-card { display: flex; flex-direction: column; height: 100%; }
.peer-card > button[data-act="visit"] { margin-top: auto; align-self: flex-start; }

/* 项目详情里的「最近督办」压成一行，鼠标悬停看全文 */
.notice-body.notice-one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 概览「最新消息」：正文一行、卡片收窄一些 */
.notice-main { min-width: 0; }
.notice-one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 620px; }
.notice.notice-msg { max-width: 720px; }

/* 窄屏修复（2026-10-22）：单行省略的文字要能被压缩，操作按钮要能换行 */
.notice-main, .notice-one-line { min-width: 0; }
.notice.notice-msg { max-width: 100%; }
.notice-one-line { max-width: 100%; }
@media (max-width: 760px) {
  .gh-actions { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .notice.notice-msg { width: auto !important; max-width: calc(100vw - 32px) !important; overflow: hidden; }
  .notice.notice-msg .notice-main { min-width: 0; overflow: hidden; }
  .notice.notice-msg .notice-one-line { max-width: 100%; }
}

/* 花园头部：按钮和文字排在同一行，叶子仍在最右 */
@media (min-width: 1024px) {
  .garden-head { flex-wrap: nowrap; }
  .gh-user { min-width: 0; }
  .gh-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gh-actions { order: 1; margin-left: auto; }
  .gh-res { order: 2; margin-left: 14px; }
}

/* 花园头部：按钮组再往右靠一点，和叶子缩小间距 */
@media (min-width: 1024px) {
  .garden-head { padding-right: 16px; }
  .gh-actions { gap: 8px; margin-right: 0; }
  .gh-res { margin-left: 4px; }
}
@media (min-width: 1024px) {
  .garden-head { column-gap: 8px; padding-right: 14px; }
  .gh-res { margin-left: 0; }
}

/* 叶子挪到花园名字右边，做成名字旁的徽标 */
.gh-name-row { display: flex; align-items: center; gap: 10px; }
.gh-name-row .res-leaf { font-size: 14px; padding: 1px 8px; border-radius: 999px; background: #f2f8ef; border: 1px solid #d9e9d2; }
@media (min-width: 1024px) {
  .gh-actions { margin-left: auto; }
}

/* 侧栏导航：字距放松一点，中文看起来更透气 */
.nav-item { letter-spacing: 0.8px; line-height: 1.55; }
.nav-label { letter-spacing: 3px; }

/* 附件预览全屏时铺满屏幕，内容区自适应高度 */
.modal:fullscreen { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; display: flex; flex-direction: column; }
.modal:fullscreen .modal-body { flex: 1; max-height: none; overflow: auto; }
.modal:fullscreen iframe { height: 100%; }

/* 全屏预览时把上下留白收掉，内容撑满 */
.modal:fullscreen { padding: 0; }
.modal:fullscreen .modal-head { padding: 12px 18px; }
.modal:fullscreen .modal-body { padding: 10px 14px; min-height: 0; }
.modal:fullscreen .modal-body > div { height: 100% !important; }
.modal:fullscreen .modal-body iframe { height: 100% !important; }
.modal:fullscreen .modal-foot { padding: 10px 18px; }

/* 窄屏时顶部工具条允许换行，避免按钮挤出屏幕 */
@media (max-width: 860px) {
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
}

/* 窄屏：表格在自己的容器里横向滚动，不要撑破整页 */
.table-wrap { max-width: 100%; min-width: 0; }
.card, .card-pad { min-width: 0; }
@media (max-width: 860px) {
  #content { min-width: 0; overflow-x: hidden; }
}

/* 窄屏兜底：整页不横向滚动（表格、导航各自内部滚动） */
@media (max-width: 860px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
}

/* ---------- 云备份 ---------- */
.cloud-head { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-size: 14.5px; line-height: 1.7; }
.cloud-head.ok { background: #eef5ff; color: #173d6b; border: 1px solid #d7e6fb; }
.cloud-head.err { background: #fff2f0; color: #a8071a; border: 1px solid #ffd9d4; }
.cloud-list { margin: 0 0 6px; }
.cloud-snap { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cloud-snap b { min-width: 132px; font-weight: 600; }
.cloud-snap .muted { font-size: 14.5px; color: var(--muted); }
.cloud-tip { margin: 12px 0 0; font-size: 14.5px; line-height: 1.85; color: var(--muted); }
.cloud-files { margin: 0 0 12px; padding: 9px 14px; border-radius: 10px; font-size: 14px; line-height: 1.7; color: #173d6b; background: #f7faff; border: 1px solid #e4eefc; }
.cloud-files.err { background: #fff2f0; border-color: #ffd9d4; color: #a8071a; }
.cloud-files b { color: var(--primary); }
.ai-model-sel { font-size: 14.5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: inherit; max-width: 170px; }

/* ---------- 邀请二维码（发群用的那张图） ---------- */
.qr-panel { margin: 0 0 16px; padding: 14px 16px 16px; border-radius: 12px; background: #f7faff; border: 1px solid #e4eefc; }
.qr-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qr-panel-head b { font-size: 14.5px; color: #173d6b; }
.qr-panel-head .muted { font-size: 14.5px; }
.qr-panel-body { display: flex; gap: 18px; align-items: center; }
.qr-thumb { flex: none; width: 232px; min-height: 120px; display: flex; align-items: center; justify-content: center; font-size: 14.5px; color: var(--muted); }
.qr-thumb canvas { display: block; box-shadow: 0 2px 10px rgba(23, 61, 107, .08); }
.qr-panel-side { flex: 1; min-width: 0; }
.qr-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; font-weight: 600; letter-spacing: 1px; color: #173d6b; }
.qr-meta { margin: 4px 0 12px; font-size: 14.5px; }
.qr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-link { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); word-break: break-all; user-select: all; }
.reg-tip { margin: -2px 0 10px; font-size: 14.5px; min-height: 16px; color: var(--muted); }
.reg-tip.ok { color: #0f7b45; }
.reg-tip.err { color: #a8071a; }
@media (max-width: 640px) {
  .qr-panel-body { flex-direction: column; align-items: flex-start; }
  .qr-thumb { width: 100%; }
  .qr-thumb canvas { width: 200px !important; }
}
.qr-warn { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; font-size: 14px; line-height: 1.7; color: #8a5300; background: #fff8e6; border: 1px solid #ffe1a8; }
.qr-warn code { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }

/* ---------- 资料库 ---------- */
.lib-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.lib-chip { font-size: 14px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.lib-chip:hover { border-color: var(--accent-2); color: var(--primary); }
.lib-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.lib-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lib-row:last-child { border-bottom: 0; }
.lib-main { flex: 1; min-width: 0; }
.lib-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.lib-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; }
.lib-cat { font-size: 14px; padding: 1px 7px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); }
.lib-file { color: var(--accent); text-decoration: none; }
.lib-file:hover { text-decoration: underline; }
.lib-note { margin-top: 4px; }
@media (max-width: 640px) {
  .lib-row { flex-wrap: wrap; }
  .lib-row .btn { flex: 1; }
}

/* ---------- 登录方式切换 / 验证码 ---------- */
.login-tabs { display: flex; gap: 6px; margin: 4px 0 14px; padding: 4px; background: var(--paper-2); border-radius: 10px; }
.login-tab { flex: 1; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.login-tab.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(23, 61, 107, .08); }
.otp-row { display: flex; gap: 8px; }
.otp-row input { flex: 1; }
.otp-row .btn { white-space: nowrap; padding: 0 14px; }
@media (max-width: 480px) { .otp-row { flex-direction: column; } }

/* ---------- AI 生成的文字 ---------- */
.ai-out { white-space: pre-wrap; line-height: 1.95; font-size: 14.5px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; max-height: 52vh; overflow: auto; }

/* ==========================================================================
   v2 主题（2026-11-01）
   参考现代 SaaS 工作台重绘：白卡 / 冷灰纸底 / 靛蓝主色 / 胶囊标签。
   字号整体上调一档，正文 16px，辅助信息不低于 13.5px。
   只改视觉层，类名与结构全部兼容；要回滚：删除本段即可。
   ========================================================================== */

:root {
  /* 面与墨 */
  --paper: #f5f7fa;
  --paper-2: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --ink: #101828;
  --ink-2: #475467;
  --muted: #667085;
  --line: #e9edf3;
  --line-2: #f1f4f9;

  /* 主色：靛蓝，比原来的学院蓝更清透 */
  --primary: #2f56d9;
  --primary-dark: #1e3a9e;
  --primary-soft: #eef2ff;
  --accent: #2f56d9;
  --accent-2: #7c9bf0;
  --accent-soft: #eef2ff;

  --green: #067647;
  --green-soft: #ecfdf3;
  --amber: #b54708;
  --amber-soft: #fffaeb;
  --red: #b42318;
  --red-soft: #fef3f2;
  --slate-soft: #f2f4f7;
  /* 下面三个早前被引用过但一直没定义，导致那些文字退化成继承色 */
  --ink-3: #667085;
  --danger: #b42318;
  --warning: #b54708;

  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 26px -18px rgba(16, 24, 40, .18);
  --shadow-lg: 0 24px 60px -22px rgba(16, 24, 40, .3);
  --radius: 16px;

  --sidebar-w: 258px;
  /* 数字也走无衬线：老式衬线数字在小屏上显旧 */
  --font-num: inherit;
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-size: 16px; line-height: 1.62; color: var(--ink); background: var(--paper); letter-spacing: -.005em; }
.muted { color: var(--muted); }
code { font-size: 13.5px; border-radius: 5px; background: #f2f4f7; }
:focus-visible { outline: 2px solid rgba(47, 86, 217, .42); outline-offset: 2px; }
::selection { background: rgba(47, 86, 217, .15); }

/* 滚动条：细一点、浅一点，别抢视线 */
* { scrollbar-width: thin; scrollbar-color: #d5dbe5 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d5dbe5; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #bcc5d4; background-clip: content-box; }

/* ---------- 主框架 ---------- */
.layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }

/* ---------- 侧栏 ---------- */
.sidebar { background: #fff; border-right: 1px solid var(--line); }
.side-brand { padding: 22px 20px 16px; gap: 12px; }
.side-logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(145deg, #5478f0 0%, #2f56d9 55%, #1e3a9e 100%);
  font-size: 17px; font-weight: 600; letter-spacing: 0;
  box-shadow: 0 8px 18px -8px rgba(47, 86, 217, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.side-title { font-size: 16px; font-weight: 650; letter-spacing: 0; }
.side-sub { font-size: 12px; letter-spacing: 1.6px; color: #98a2b3; margin-top: 2px; font-weight: 500; }

.nav { padding: 2px 12px 8px; }
.nav-label {
  font-size: 13px; font-weight: 650; color: #98a2b3;
  letter-spacing: .6px; padding: 18px 12px 7px;
}
.nav-item {
  font-size: 15.5px; font-weight: 500;
  padding: 11px 13px; border-radius: 10px;
  color: var(--ink-2); gap: 12px; margin-bottom: 2px;
  letter-spacing: 0;
}
.nav-item:hover { background: #f7f9fc; color: var(--ink); }
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  box-shadow: none;
}
.nav-item .ico { width: 19px; height: 19px; opacity: .55; }
.nav-item .ico svg { width: 19px; height: 19px; }
.nav-item:hover .ico { opacity: .8; }
.nav-item.active .ico { opacity: 1; }
.nav-item .count {
  font-size: 13px; font-weight: 600;
  min-width: 20px; height: 20px; border-radius: 10px;
  background: #f04438; padding: 0 6px;
}

.side-foot { border-top: 1px solid var(--line-2); padding: 14px 14px 16px; }
.side-user {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc;
  border: 1px solid #eef1f6;
  border-radius: 14px;
  padding: 10px 10px 10px 11px;
}
.side-user-info { font-size: 14.5px; flex: 1; min-width: 0; }
.side-user-info .muted { font-size: 13.5px; color: var(--muted); }
/* 退出：靠在用户名右侧，图标化，悬停才变红 */
.side-logout {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: #667085;
  padding: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.side-logout svg { width: 17px; height: 17px; display: block; }
.side-logout:hover { background: #fff; border-color: var(--line); color: var(--red); }
.side-actions { padding-left: 4px; gap: 16px; margin-top: 10px; }
.side-actions .link-btn { font-size: 14px; }
.avatar { font-size: 14px; }

/* ---------- 顶栏 ---------- */
.main { background: var(--paper); }
.topbar {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 17px 32px;
  align-items: center;
  min-height: 74px;
}
.topbar h2 { font-size: 25px; font-weight: 650; letter-spacing: -.4px; }
.topbar p { font-size: 14px; margin-top: 3px; color: var(--muted); }
.topbar-actions { gap: 8px; padding-top: 0; }
.tb-head { min-width: 0; }
.tb-right { display: flex; align-items: center; gap: 10px; flex: none; max-width: 100%; }

.content { padding: 26px 32px 64px; }

/* 默认密码提示条 */
.security-banner {
  padding: 11px 32px;
  background: #eef2ff;
  color: #253c9c;
  border-bottom: 1px solid #dfe6fd;
  font-size: 14px;
  gap: 10px;
}
.security-banner .sb-ico { width: 20px; height: 20px; font-size: 13px; background: var(--primary); }
.security-banner .btn { border-color: #c9d6fb; color: var(--primary); }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid #eaedf3;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
}
.card-pad { padding: 22px 24px; }
.card-head { padding: 18px 24px; border-bottom: 1px solid var(--line-2); gap: 14px; }
.card-head h3 { font-size: 17.5px; font-weight: 650; letter-spacing: -.15px; }
.card-head .sub { font-size: 14px; }

.stack { gap: 20px; }
.stack-sm { gap: 10px; }
.grid-2 { gap: 18px; }
.grid-3 { gap: 16px; }

/* ---------- KPI ---------- */
/* 旧版把四张卡片装在一个白盒子里（容器有白底 + 边框 + overflow:hidden），
   改版后卡片各自带边框，容器那层白底就让中间的间距也变成白色，看着像连成一片。
   这里把容器的白底/边框/阴影/裁切全部清掉，只留 16px 间距露出页面底色。 */
.grid-4 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  background: none !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.grid-4 > .kpi {
  border: 1px solid #eaedf3 !important;
  border-radius: 18px;
  background: #fff;
  padding: 22px 24px 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
}
.grid-4 > .kpi.accent {
  background: linear-gradient(160deg, #f7f9ff 0%, #fff 62%);
  border-color: #dde5fd !important;
}
.kpi .label { font-size: 14.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.kpi .value { font-size: 42px; font-weight: 650; letter-spacing: -1.4px; margin-top: 10px; line-height: 1.05; }
.kpi .hint { font-size: 14px; margin-top: 8px; }
.kpi.accent .value { color: var(--primary); }
.kpi.warn .value { color: var(--red); }
.kpi.good .value { color: var(--green); }

/* ---------- 按钮 ---------- */
.btn {
  font-size: 14.5px; font-weight: 550;
  padding: 10px 17px;
  border-radius: 10px;
  border: 1px solid #dfe4ec;
  background: #fff;
  color: #344054;
  gap: 7px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  letter-spacing: 0;
}
.btn:hover { background: #f9fafb; border-color: #cfd6e2; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #3a61e3 0%, #2f56d9 100%);
  border-color: #2f56d9;
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 16px -9px rgba(47, 86, 217, .75);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #3255d6 0%, #2445bd 100%);
  border-color: #2445bd;
  box-shadow: 0 8px 20px -10px rgba(47, 86, 217, .8);
}
.btn-danger { color: var(--red); border-color: #f3c9c4; background: #fff; }
.btn-danger:hover { background: var(--red-soft); border-color: #eaa9a1; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: #f2f4f7; border-color: transparent; }
.btn-sm { font-size: 14px; padding: 8px 14px; border-radius: 9px; }
.btn-xs { font-size: 13.5px; padding: 6px 11px; border-radius: 8px; }
.btn-block { padding: 12px; font-size: 15.5px; }
/* 顶栏图标按钮：只留图标，title 给说明，省地方 */
.btn-ico {
  width: 40px; height: 40px; padding: 0; flex: none;
  font-size: 16px; border-radius: 11px;
  color: var(--ink-2); background: #fff;
}
.btn-ico:hover { color: var(--primary); border-color: #c9d6fb; background: #f8faff; }
.btn-ico svg { width: 19px; height: 19px; display: block; }
.btn:disabled { opacity: .55; }
.btn-primary:disabled { background: #cbd5e1; border-color: #cbd5e1; box-shadow: none; }
.link-btn { font-size: 14px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 18px; }
.field > span, .field > label, .field > .label {
  font-size: 14.5px; font-weight: 550; color: var(--ink-2);
  margin-bottom: 8px; letter-spacing: 0;
}
input, textarea, select {
  font-size: 15.5px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid #dfe4ec;
  background: #fff;
  color: var(--ink);
}
input:hover, textarea:hover, select:hover { border-color: #cfd6e2; }
input:focus, textarea:focus, select:focus {
  border-color: #93aaf5;
  box-shadow: 0 0 0 4px rgba(47, 86, 217, .1);
  background: #fff;
}
input::placeholder, textarea::placeholder { color: #98a2b3; }
textarea { line-height: 1.7; min-height: 104px; }
select { padding-right: 34px; background-position: right 13px center; }
.form-error { font-size: 14px; }
.cohort-input span { font-size: 15px; }
.select-sm { padding: 9px 32px 9px 12px; font-size: 14.5px; border-radius: 10px; }
.search { max-width: 260px; }
.otp-row .btn { padding: 0 18px; }
.legacy-switch { border-radius: 13px; padding: 13px 15px; }
.legacy-switch b { font-size: 15px; }
.legacy-switch em { font-size: 14px; }

/* ---------- 标签：统一胶囊 ---------- */
.badge, .mod, .wx-tag, .tag-mode, .lib-cat, .lib-chip, .sem-tag, .badge-legacy {
  font-size: 13.5px; font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  letter-spacing: 0;
  line-height: 1.5;
}
.badge::before, .mod::before { width: 5px; height: 5px; }
.tag-mode { padding: 2px 9px; border-radius: 7px; }
.lib-cat { padding: 3px 10px; }
.lib-chip { font-size: 14px; padding: 7px 14px; }
.lib-chip.on { background: var(--primary); border-color: var(--primary); box-shadow: 0 4px 12px -6px rgba(47, 86, 217, .7); }

.st-todo { background: #f2f4f7; color: #475467; }
.st-submitted { background: #fffaeb; color: #b54708; }
.st-reviewed { background: #eff4ff; color: #2f56d9; }
.st-approved { background: #ecfdf3; color: #067647; }
.st-rejected { background: #fef3f2; color: #b42318; }
.badge-overdue { background: #fef3f2; color: #b42318; }
.badge-legacy { background: #fffaeb; color: #b54708; border-color: #fde7bd; }
.mod-thesis { background: #eff4ff; color: #2f56d9; }
.mod-journal { background: #ecfdfd; color: #0e7490; }
.mod-ip { background: #f9f1fe; color: #7a1fa2; }
.mod-other { background: #f2f4f7; color: #475467; }
.wx-off { background: #f2f4f7; color: #667085; }
.wx-wait { background: #fffaeb; color: #b54708; }
.wx-ok { background: #ecfdf3; color: #067647; }
.wx-fail { background: #fef3f2; color: var(--red); }
.tag-mode.is-part { background: #fffaeb; color: #b54708; border-color: #fde7bd; }

/* ---------- 分段控件 ---------- */
.tabs { background: #f2f4f7; border-radius: 12px; padding: 4px; gap: 3px; }
.tab {
  font-size: 14.5px; font-weight: 500;
  padding: 8px 16px; border-radius: 9px; color: var(--ink-2);
}
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.tab.active {
  background: #fff; color: var(--ink); font-weight: 620;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 1px 3px rgba(16, 24, 40, .06);
}
.tab .n { font-size: 13.5px; margin-left: 7px; }

/* ---------- 表格 ---------- */
.table-wrap { border-radius: 18px; }
th {
  font-size: 13.5px; font-weight: 600; color: #667085;
  padding: 13px 16px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  letter-spacing: .2px;
}
th:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
td {
  padding: 15px 16px;
  font-size: 15px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
  /* 单元格内不折行：日期、"3 天"这类短信息一旦折行整行就变高变丑 */
  white-space: nowrap;
}
/* 唯独标题类内容允许折行，否则长题目会撑出一条超宽表格；姓名不折行 */
td .t-title, td .t-sub, td .tl-note { white-space: normal; }
td .name-cell .t-title, td .name-cell .t-sub { white-space: nowrap; }
td:first-child { padding-left: 24px; color: var(--ink); }
td .t-title { font-size: 15.5px; font-weight: 600; color: var(--ink); letter-spacing: -.1px; }
td .t-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
tbody tr:hover td { background: #fafbff; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- 项目卡 ---------- */
.proj-grid { gap: 18px; }
.proj-card {
  border: 1px solid #eaedf3; border-radius: 18px;
  padding: 20px 22px 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
}
.proj-card:hover {
  border-color: #c7d3f5;
  box-shadow: 0 14px 34px -22px rgba(16, 24, 40, .45);
  transform: translateY(-2px);
}
.proj-card::before { width: 3px; border-radius: 3px 0 0 3px; }
.proj-title { font-size: 17px; font-weight: 640; line-height: 1.5; letter-spacing: -.15px; }
.proj-meta { font-size: 14.5px; gap: 8px 14px; margin-top: 9px; }
.proj-foot { margin-top: 16px; padding-top: 14px; }
.progress { height: 7px; border-radius: 4px; background: #eef1f6; }
.progress > i { border-radius: 4px; background: linear-gradient(90deg, #6d8ef5, #2f56d9); }
.progress-label { font-size: 14px; font-weight: 600; }

/* ---------- 时间线 ---------- */
.tl-item { grid-template-columns: 32px 1fr; gap: 15px; padding-bottom: 16px; }
.tl-item::before { left: 15px; top: 32px; }
.tl-dot { width: 32px; height: 32px; font-size: 13.5px; }
.tl-body { border-radius: 16px; padding: 17px 20px; border-color: #eaedf3; }
.tl-name { font-size: 16px; font-weight: 620; }
.tl-info { font-size: 14.5px; margin-top: 6px; }
.tl-note { font-size: 14.5px; border-radius: 0 10px 10px 0; padding: 11px 14px; background: #fafbfd; }
.tl-file { font-size: 14px; margin-top: 10px; }
.tl-review { font-size: 14px; border-radius: 10px; padding: 10px 14px; }
.review-line { font-size: 14px; border-radius: 10px; padding: 9px 13px; }

/* ---------- 区块标题 ---------- */
.section-title { margin: 32px 0 14px; }
.section-title h3 { font-size: 17.5px; font-weight: 650; letter-spacing: -.15px; }
.section-title h3::before { width: 3px; height: 16px; background: linear-gradient(180deg, #7c9bf0, #2f56d9); }
.section-title .link { font-size: 14px; }

/* ---------- 提示块 ---------- */
.hint-box {
  background: #f8fafc;
  border: 1px solid #eef1f6;
  border-radius: 13px;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.notice { font-size: 14.5px; border-radius: 14px; padding: 15px 17px; }
.notice-title { font-size: 15px; }
.notice-body { font-size: 14.5px; }
.empty p { font-size: 15px; line-height: 1.7; }

/* AI 快捷工具条：单独一条，跟下面的指标卡区分开 */
.ai-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: linear-gradient(100deg, #f4f7ff 0%, #fafbff 55%, #ffffff 100%);
  border: 1px solid #e6ebfa;
  border-radius: 14px;
}
.ai-bar-ico {
  width: 28px; height: 28px; flex: none;
  border-radius: 9px; background: #e8eefe;
  display: grid; place-items: center; font-size: 14px;
}
.ai-bar-text { font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 640px) {
  .ai-bar { flex-wrap: wrap; }
  .ai-bar-text { flex: 1 1 100%; order: 2; }
}

/* ---------- 组会槽位 ---------- */
.sem-slot { border-radius: 11px; padding: 10px 13px; }
.sem-slot.is-empty {
  color: var(--muted);
  background: #f8fafc;
  border: 1px dashed #e2e8f2;
  font-size: 14.5px;
}

/* ---------- 空状态 ---------- */
.empty { padding: 34px 20px; }
.empty .big { font-size: 36px; opacity: .3; margin-bottom: 10px; }

/* ---------- 详情头 ---------- */
.detail-head { padding: 26px 28px 24px; border-radius: 18px 18px 0 0; }
.detail-title { font-size: 25px; font-weight: 650; line-height: 1.45; letter-spacing: -.4px; }
.detail-meta { font-size: 14.5px; gap: 8px 22px; margin-top: 13px; }
.detail-stats { margin-top: 22px; padding-top: 20px; }
.detail-stat { padding: 0 32px; }
.detail-stat .v { font-size: 28px; font-weight: 650; letter-spacing: -.8px; }
.detail-stat .k { font-size: 14px; margin-top: 4px; }

/* ---------- 弹窗 ---------- */
.modal { border-radius: 22px; }
.modal-head { padding: 24px 28px 18px; }
.modal-head h3 { font-size: 20px; font-weight: 650; letter-spacing: -.3px; }
.modal-head p { font-size: 14px; margin-top: 5px; }
.modal-body { padding: 24px 28px; }
.modal-foot { padding: 16px 28px; gap: 10px; border-radius: 0 0 22px 22px; background: #fcfdff; }

/* ---------- 上传区 ---------- */
.upload { border-radius: 14px; padding: 26px; border-color: #d5dbe5; }
.upload .u-main { font-size: 15px; }
.upload .u-hint { font-size: 14px; }
.file-chip { font-size: 14px; }

/* ---------- 登录页 ---------- */
.login-card { border-radius: 24px; }
.login-brand { padding: 56px 50px 50px; }
.login-brand h1 { font-size: 36px; font-weight: 650; letter-spacing: 1px; }
.brand-sub { font-size: 15px; }
.brand-lede { font-size: 17px; }
.brand-points li { font-size: 14.5px; }
.brand-points span { font-size: 14px; }
.brand-mark { font-size: 13px; }
.login-form { padding: 56px 48px; }
.login-form h2 { font-size: 27px; font-weight: 650; }
.login-form .muted { font-size: 14.5px; margin: 8px 0 30px; }
.login-hint { font-size: 14.5px; }
.login-tabs { border-radius: 12px; padding: 4px; }
.login-tab { font-size: 14.5px; padding: 9px 12px; border-radius: 9px; }

/* ---------- 其他常用块 ---------- */
.cloud-head, .cloud-files, .qr-panel, .link-card, .hint-box { border-radius: 13px; }
.cloud-snap { font-size: 14px; padding: 11px 0; }
.cloud-tip, .cloud-files, .cloud-head { font-size: 14px; line-height: 1.75; }
.qr-code { font-size: 18px; }
.qr-meta, .qr-panel-head b, .qr-panel-head .muted { font-size: 14px; }
.lib-title { font-size: 15.5px; }
.lib-meta { font-size: 14px; }
.lib-row { padding: 14px 0; }
.cred-row { font-size: 14.5px; }
.cred-row b { font-size: 16px; }
.key-box, .key-meta { font-size: 14px; }
.pf-saved { font-size: 14px; }
.wx-ico { width: 22px; height: 22px; font-size: 13.5px; }
.read-only-row { font-size: 14.5px; }
.read-only-row em { font-size: 14px; }
.avatar-edit .hint { font-size: 14px; }
.ai-out { font-size: 15px; }
.sem-row, .sem-topic { font-size: 15px; }

/* ---------- 窄屏：在最后重写一遍，保证盖住上面的桌面值 ---------- */
@media (max-width: 1180px) {
  .content { padding: 22px 26px 56px; }
  .topbar { padding: 16px 26px; }
}

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 > .kpi:nth-child(n + 3) { border-top: 1px solid #eaedf3 !important; }
  .detail-title { font-size: 22px; }
}

@media (max-width: 860px) {
  /* 手机：单列，侧栏变成顶部横向条 */
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; z-index: 40;
    height: auto; border-right: 0; border-bottom: 1px solid var(--line);
    min-width: 0; overflow: hidden;
    background: rgba(255, 255, 255, .96);
  }
  .side-brand { padding: 12px 16px; }
  /* 手机上侧栏变横条：只留一个退出按钮在右上角 */
  .side-foot {
    display: block;
    position: absolute; top: 11px; right: 12px;
    padding: 0; border: 0;
  }
  .side-user { background: transparent; border: 0; padding: 0; }
  .side-user .avatar, .side-user-info { display: none; }
  .side-logout {
    width: 36px; height: 36px;
    background: #fff; border-color: var(--line);
  }
  .side-logo { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
  .side-title { font-size: 15px; }
  .nav { padding: 0 12px 10px; gap: 5px; }
  .nav-item { font-size: 14.5px; padding: 8px 13px; border-radius: 9px; }
  .nav-item .ico svg { width: 17px; height: 17px; }
  .topbar { padding: 14px 18px; position: static; min-height: 0; flex-wrap: wrap; row-gap: 10px; }
  .tb-head { flex: 1 1 100%; min-width: 0; }
  .tb-right { flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; row-gap: 8px; }
  .topbar-actions { flex-wrap: wrap; min-width: 0; max-width: 100%; row-gap: 8px; }
  .topbar h2 { font-size: 21px; }
  .topbar p { font-size: 13.5px; }
  .content { padding: 18px 18px 48px; }
  .grid-2, .grid-3 { gap: 14px; }
  .detail-title { font-size: 19px; }
}

@media (max-width: 760px) {
  .kpi .value { font-size: 32px; }
  .kpi .label { font-size: 14px; }
  .kpi .hint { font-size: 13.5px; }
  .content { padding: 16px 14px 44px; }
  .card-pad { padding: 18px; }
  .card-head { padding: 16px 18px; }
  .card-head h3 { font-size: 16.5px; }
  th { font-size: 13px; }
  td { font-size: 14.5px; padding: 13px 14px; }
  td .t-title { font-size: 15px; }
  .table-wrap.mobile-cards td.cell-main { font-size: 15.5px; }
  .table-wrap.mobile-cards td::before { font-size: 13.5px; }
  .table-wrap.mobile-cards tr { border-radius: 14px; }
  .btn { font-size: 14px; padding: 9px 15px; }
  .btn-sm { font-size: 13.5px; padding: 7px 13px; }
  .btn-ico { width: 38px; height: 38px; }
  .proj-card { padding: 17px 18px 16px; }
  .proj-title { font-size: 16px; }
  .proj-meta { font-size: 14px; }
  .tl-body { padding: 15px 16px; }
  .tl-name { font-size: 15.5px; }
  .modal-head { padding: 20px 20px 15px; }
  .modal-body { padding: 20px; }
  .modal-foot { padding: 14px 20px; }
  .detail-head { padding: 18px; }
  .detail-stat { padding: 0 18px; }
  .detail-stat .v { font-size: 24px; }
  .detail-stat .k { font-size: 13.5px; }
  .detail-meta { font-size: 14px; }
  input, textarea, select { font-size: 16px; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .topbar { padding: 12px 14px; }
  .topbar h2 { font-size: 19px; }
  .topbar-actions { gap: 6px; }
  .section-title h3 { font-size: 16.5px; }
  .login-form { padding: 34px 24px; }
}


/* ---------- 课题组图标（2026-11-01） ---------- */
.lab-logo-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding-bottom: 20px; margin-bottom: 20px;
  border-bottom: 1px dashed var(--line-2);
}
.lab-logo-box {
  width: 76px; height: 76px; flex: none;
  border-radius: 18px;
  background: linear-gradient(145deg, #5478f0 0%, #2f56d9 55%, #1e3a9e 100%);
  color: #fff;
  display: grid; place-items: center;
  font-size: 30px; font-weight: 600;
  overflow: hidden;
  box-shadow: 0 10px 22px -12px rgba(47, 86, 217, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.lab-logo-box.has-img { background: #fff; border: 1px solid var(--line); box-shadow: none; }
.lab-logo-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lab-logo-copy { min-width: 0; flex: 1; }
.lab-logo-copy b { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.lab-logo-copy p { font-size: 14px; color: var(--muted); line-height: 1.75; margin-top: 5px; max-width: 62ch; text-wrap: pretty; }
.lab-logo-actions { display: flex; gap: 8px; margin-top: 12px; }

/* 侧栏与登录页的图标位：有图就用图，没图退回简称首字 */
/* 有自定义图标时：图标本身就是个圆角方块（中大护理学院那个绿底 logo 自带一圈白边），
   再套白底、边框、内边距就会变成「厚白框」。
   所以这里全部清掉，只留一点圆角防锯齿。 */
.side-logo.has-img { background: none; border: 0; box-shadow: none; overflow: hidden; }
.side-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.brand-mark.has-img {
  padding: 0; border: 0; background: none; letter-spacing: 0;
  box-shadow: none;
}
.brand-mark img {
  display: block; height: 52px; width: auto; max-width: 180px;
  object-fit: contain;
  border-radius: 8px;
}

.nw { white-space: nowrap; }

/* 表格里胶囊（状态、学习方式、微信提醒）自带左右内边距，
   会让里面的字比表头往右偏 9~11px，看起来"表头和数据没对齐"。
   用负 margin 抵消，列的左沿才落在同一条竖线上。 */
td > .badge:first-child,
td > .mod:first-child,
td > .wx-tag:first-child { margin-left: -11px; }
td > .tag-mode:first-child { margin-left: -9px; }

/* 状态胶囊前面那个小圆点会在表格里把文字推后 10px，导致和表头对不齐。
   表格里改用纯色胶囊（颜色本身已经区分状态），圆点只在正文里保留。 */
td > .badge:first-child::before,
td > .mod:first-child::before { display: none; }

/* ---------- 组会：学期切换条 ---------- */
.sem-term-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sem-term-bar label { font-size: 14px; color: var(--ink-2); font-weight: 550; }
.sem-term-bar select { width: auto; min-width: 240px; max-width: 100%; }
.sem-term-bar .badge { margin-left: 2px; }

/* ==========================================================================
   附件预览（2026-11-01）
   以前图片和 PDF 都塞在 iframe 里，图片会按原始像素铺开、超出就被切掉。
   改成 <img> + max-width/max-height 100%，先缩到框里，全屏时框变大它也跟着大。
   ========================================================================== */
.preview-stage {
  height: 68vh;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 14px;
  background: #f6f8fc;
  border: 1px solid #e6ecf5;
  border-radius: 12px;
}

/* PDF 仍然交给浏览器自带阅读器，铺满整块 */
.preview-stage.is-doc { display: block; padding: 0; overflow: hidden; }
.preview-stage.is-doc iframe { display: block; width: 100%; height: 100%; border: 0; }

.preview-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 32px -20px rgba(16, 24, 40, .65);
}

/* 原图比框大的时候才允许点开看原始尺寸 */
.preview-stage.has-zoom .preview-img { cursor: zoom-in; }
.preview-stage.is-zoomed { place-items: start; }
.preview-stage.is-zoomed .preview-img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* 全屏后预览区铺满剩余空间，图片按新尺寸重新计算 */
.modal:fullscreen .preview-stage { height: 100%; }

/* 纵向 flex 里 .modal-body 的 min-width 默认是 auto（= min-content），
   放大会被超大图片撑开、整个弹窗被推到屏幕外。加 min-width:0 归位，
   超出部分交给 .preview-stage 自己滚。 */
.modal-body { min-width: 0; }
.preview-stage { min-width: 0; max-width: 100%; }

/* 遮罩层的隐式网格列默认按 min-content 算，放大图片时会被撑到 2500px，
   弹窗跟着在超宽的列里居中、整体偏到屏幕右边。把列宽钉死成 1fr。 */
.modal-mask {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

/* ==========================================================================
   看板数字可点击（2026-11-02）
   只有那个大数字能点，卡片本身保持原样——不加箭头、不上浮、不描边，
   免得整块卡片看起来像个按钮。
   ========================================================================== */
.kpi-num {
  cursor: pointer;
  width: fit-content;
  transition: color .15s;
}
.kpi-num:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: currentColor;
}
.kpi-num:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }

/* 带筛选条件进列表页时的提示条 */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; margin-bottom: 14px;
  background: #fffaeb; border: 1px solid #fde7b0;
  border-radius: 12px; color: #8a5300;
}
.filter-bar .fb-ico {
  width: 20px; height: 20px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; background: #b54708; color: #fff;
  font-size: 12px; font-weight: 700;
}
.filter-bar .fb-text { flex: 1; font-size: 14.5px; line-height: 1.5; }
.filter-bar .fb-text b { font-weight: 650; }

/* ==========================================================================
   启动占位（2026-11-02）
   以前 #login-view 在 HTML 里默认可见，已登录的人每次刷新都要先看一眼登录表单。
   现在默认显示这块，等 /api/bootstrap 确认身份后再切到主界面或登录页。
   ========================================================================== */
.boot-view {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  background: #f5f7fa;
  transition: opacity .2s ease;
}
.boot-view[hidden] { display: none; }
.boot-view.is-out { opacity: 0; pointer-events: none; }

.boot-mark {
  width: 58px; height: 58px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #5478f0 0%, #2f56d9 55%, #1e3a9e 100%);
  color: #fff;
  box-shadow: 0 14px 28px -16px rgba(47, 86, 217, .85), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.boot-mark svg { width: 28px; height: 28px; opacity: .92; }

.boot-dots { display: flex; gap: 6px; }
.boot-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #c3d0e8;
  animation: bootPulse 1.1s ease-in-out infinite;
}
.boot-dots i:nth-child(2) { animation-delay: .15s; }
.boot-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bootPulse {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1); }
}

.boot-text { font-size: 14px; color: #8a94a6; letter-spacing: .3px; }

/* 用户系统里开了「减少动态效果」时，别转圈 */
@media (prefers-reduced-motion: reduce) {
  .boot-dots i { animation: none; opacity: .7; }
  .boot-view { transition: none; }
}

/* ==========================================================================
   督办弹窗里的 AI 拟稿（2026-11-02）
   以前「生成催办话术」放在总览页顶部，是整组一份的群发稿，老师觉得没意义。
   现在改成：点某个人的「督办」时，按这个人的真实进度现写一段。
   「重新生成」不单独占一行，做成输入框右下角的小图标（老师要求）。
   ========================================================================== */
.remind-box { position: relative; }
.remind-box textarea {
  min-height: 132px;
  resize: none;                /* 右下角让给图标，不再留拖拉手柄 */
  padding-right: 48px;         /* 文字不要钻到图标底下 */
}
.ai-fab {
  position: absolute; right: 8px; bottom: 8px;
  width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: #fff;
  border: 1px solid #dbe3f5;
  box-shadow: 0 2px 8px -4px rgba(16, 24, 40, .35);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
}
.ai-fab:hover:not(:disabled) { background: #f5f8ff; border-color: #c3d3fa; }
.ai-fab:active:not(:disabled) { transform: scale(.96); }
.ai-fab:disabled { opacity: .5; cursor: default; }
.ai-fab svg { width: 16px; height: 16px; }

.ai-draft-tip {
  margin-top: 9px;
  font-size: 13.5px; line-height: 1.5; color: var(--muted);
}
.ai-draft-tip.is-err { color: var(--red); }

/* 顶栏图标按钮的加载态：只把图标调淡，不换文字（换了会把图标挤掉） */
.btn-ico.is-busy svg { opacity: .35; }
.btn-ico.is-busy { cursor: progress; }

/* ==========================================================================
   待办：一个项目一块卡片（2026-11-02）
   表格里两个项目上下挨着，项目名还缩成一行灰字，题目三四十个字就分不清谁是谁。
   改成卡片后项目名独占一行、宽度给足，长标题折行也只影响自己这块。
   ========================================================================== */
.todo-list { display: grid; gap: 10px; }

.todo-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 14px 18px 15px;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.todo-card:hover { border-color: #cbd5e4; }
.todo-card.is-late { border-color: #f2cbc6; background: #fffbfa; }

.tc-top { display: flex; align-items: flex-start; gap: 10px; }
.tc-title {
  flex: 1; min-width: 0; margin: 0;
  font-size: 15.5px; font-weight: 600; line-height: 1.55;
  color: var(--ink); letter-spacing: .2px;
}
.tc-top .badge { flex: none; margin-top: 3px; }

.tc-bottom { display: flex; align-items: center; gap: 12px; margin-top: 9px; flex-wrap: wrap; }
.tc-stage { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1; }
.tc-stage-name { font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.tc-meta { font-size: 13.5px; color: var(--muted); }
.tc-meta::before { content: '·'; margin-right: 8px; color: #c6cedb; }
.tc-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

@media (max-width: 600px) {
  .todo-card { padding: 13px 14px 14px; }
  .tc-title { font-size: 15px; }
  .tc-actions { width: 100%; margin-left: 0; justify-content: flex-end; }
}

/* 云备份断连的红条：比密码提示更要紧，用红底 */
.security-banner.is-danger {
  background: #fdeceb;
  color: #b42318;
  border-bottom-color: #f5cdc9;
}
.security-banner.is-danger .sb-ico { background: #d92d20; }
.security-banner.is-danger .btn { border-color: #f0c2bd; color: #b42318; }
.security-banner.is-danger .btn:hover { background: #fff6f5; border-color: #e3a8a2; }

/* 资料库：链接条目 + 上传/链接两种模式（2026-11-02） */
.lib-tag {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  font-size: 12px; font-weight: 500; border-radius: 6px;
  background: #eef6ff; color: #1d6fd8; vertical-align: 1px;
}
.lib-mode { display: flex; gap: 8px; margin-bottom: 14px; }
.lib-mode button {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 14px; padding: 7px 14px; border-radius: 9px; cursor: pointer;
}
.lib-mode button.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ==========================================================================
   管理员端：逾期清单 / 全部项目 改成"一个学生一块"（2026-11-02）
   原来一人一行平铺在一张表里，同一个学生分散在列表各处，看不出"谁欠了几件事"，
   也看不出"这个项目是谁的"。改成卡片后，姓名在卡头，他的项目排在卡里。
   ========================================================================== */
.stu-list { display: grid; gap: 10px; }

.stu-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 13px 18px 6px;
  transition: border-color .15s;
}
.stu-card:hover { border-color: #cbd5e4; }
.stu-card.is-late { border-color: #f2cbc6; background: #fffbfa; }

/* 卡头：头像 + 姓名 + 学历标签 ……… 右侧统计 */
.sc-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 10px; margin-bottom: 2px;
  border-bottom: 1px dashed var(--line);
}
.sc-head .name-cell { flex: 1; min-width: 0; }
.sc-head b { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: .2px; }
.sc-sub {
  font-style: normal; font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc-tag {
  flex: none; font-size: 13px; color: var(--ink-2);
  background: #f3f6fb; border-radius: 999px; padding: 3px 11px;
}
.sc-tag.is-danger { color: #b13826; background: #fdeceb; }

/* 卡里的每一行 */
.sc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center; gap: 12px;
  padding: 10px 0;
}
.sc-row + .sc-row { border-top: 1px dashed #eef1f6; }
.sc-main { min-width: 0; }
.sc-main .t-title {
  font-size: 14.8px; font-weight: 600; color: var(--ink); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-main .t-sub {
  font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-when {
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.sc-when .badge { margin: 0; }

/* 全部项目那几行：模块 | 题目 | 进度 | 下一节点 | 风险 | 查看 */
.proj-row { grid-template-columns: auto minmax(0, 1fr) 132px 156px 88px auto; }
.sc-prog { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-prog .progress { flex: 1; }
.sc-risk { text-align: center; }
.proj-row .btn { justify-self: end; }

.sc-more { font-size: 13.5px; color: var(--muted); padding: 2px 0 2px 2px; }

/* 窗口窄了就把一行拆成两行，别把题目挤成一列字 */
@media (max-width: 1080px) {
  .proj-row {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 8px 14px; padding: 11px 0;
  }
  .proj-row .sc-main { flex: 1 1 100%; order: -1; }
  .proj-row .sc-prog { flex: 0 1 210px; }
  .proj-row .sc-when { flex: 0 0 auto; }
  .proj-row .btn { margin-left: auto; }
}

@media (max-width: 600px) {
  .stu-card { padding: 12px 14px 4px; }
  /* 姓名独占一行，统计另起一行：少数民族长名字在 390 宽下会把"2026级硕士生"
     挤成竖条，宁可多占一行也要读得顺 */
  .sc-head { flex-wrap: wrap; gap: 6px 10px; }
  .sc-head .name-cell { flex: 1 1 100%; }
  .sc-tag { font-size: 12.5px; padding: 2px 9px; }
  /* 逾期那几行：日期和按钮换到第二行，题目占满 */
  .sc-row:not(.proj-row) {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
  }
  .sc-row:not(.proj-row) .sc-when { grid-column: 1 / 2; }
  .sc-row:not(.proj-row) .btn { grid-column: 2 / 3; grid-row: 2; }
}

/* ==========================================================================
   顶栏「云备份」状态灯（2026-11-02）
   老师反馈：云端真出问题时，页面上看不到任何提示。红条只在异常且登录后出现，
   平时没有"正常"的对照，也没法判断是自己没看见还是压根没坏。
   所以常态也显示一盏灯：绿点=正常，红点=异常，点开看详情。
   ========================================================================== */
.cloud-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cloud-chip:hover { border-color: #cbd5e4; background: #fafbff; }
.cloud-chip > i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22a06b; box-shadow: 0 0 0 3px rgba(34,160,107,.12);
  flex: none;
}
.cloud-chip.is-bad { color: #b42318; border-color: #f0c2bd; background: #fff8f7; }
.cloud-chip.is-bad > i { background: #d92d20; box-shadow: 0 0 0 3px rgba(217,45,32,.14); }

/* 详情弹窗里的两列表 */
.kv-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kv-row { display: flex; align-items: center; gap: 14px; background: var(--surface); padding: 10px 14px; }
.kv-row > span { flex: none; width: 108px; font-size: 13.5px; color: var(--muted); }
.kv-row > b { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .cloud-chip span { display: none; }
  .cloud-chip { padding: 0 10px; }
}

/* ==========================================================================
   消息页排版（2026-11-02）
   原来正文被 max-width:74ch 卡在左边，右边一大片空白，看着全堆在左侧。
   改成：整列居中限宽、正文占满卡片、操作按钮挂到标题行右侧、时间沉到底部。
   ========================================================================== */
.msg-list { display: grid; gap: 10px; }

/* 卡片形式，但和顶部的工具条同宽铺满，不要缩成居中的窄条 */
.msg-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  align-items: start;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.msg-item:hover { border-color: #cbd5e4; }
.msg-item.is-unread { border-left: 3px solid #1d4ed8; }

.msg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-title { font-size: 15px; font-weight: 600; letter-spacing: .1px; }
.msg-unread { font-size: 12.5px; color: #1d4ed8; }
.msg-acts { display: flex; gap: 8px; margin-left: auto; }

/* 覆盖旧的 74ch 上限：正文跟着卡片走，行宽由 .msg-list 控 */
.msg-body { margin-top: 10px; max-width: none; }
.msg-time { margin-top: 10px; font-size: 13px; color: var(--muted); }

@media (max-width: 620px) {
  /* 手机上把操作按钮挪到正文下面，别挡在标题和内容之间 */
  .msg-item { grid-template-columns: minmax(0, 1fr); row-gap: 10px; padding: 14px; }
  .msg-acts { justify-content: flex-start; }
}

/* ==========================================================================
   模板管理页（2026-11-02）
   老师反馈模板名字太小。原来是行内 14px，提到 16.5px；步骤标签 13 → 13.5，
   行距和内边距一起放宽，整块读起来不再挤。
   ========================================================================== */
.tpl-row {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
}
.tpl-row:last-child { border-bottom: none; }
.tpl-main { min-width: 0; }
.tpl-name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 16.5px; font-weight: 600; line-height: 1.35; letter-spacing: .15px; color: var(--ink);
}
.tpl-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tpl-step {
  font-size: 13.5px; line-height: 1.5;
  background: #f4f6fa; border: 1px solid var(--line-2);
  border-radius: 5px; padding: 3px 9px; color: #41506b;
}
.tpl-acts { display: flex; gap: 6px; flex-shrink: 0; align-items: flex-start; }

@media (max-width: 620px) {
  .tpl-row { flex-direction: column; gap: 10px; }
  .tpl-name { font-size: 15.5px; }
  .tpl-acts { align-self: flex-end; }
}

/* 模板卡片收紧：原来卡头 17 + 内边距 20 + 行内 14 = 文字上方 51px 空白，
   看着像"卡片很大、字挤在中间"。这里把三层 padding 一起压下来。 */
.tpl-card .card-head { padding: 12px 18px; }
.tpl-card .card-pad { padding: 4px 18px 8px; }
.tpl-card .tpl-row { padding: 11px 0; }
.tpl-card .tpl-row:first-child { padding-top: 12px; }
.tpl-card .tpl-steps { margin-top: 11px; }
