/* ============================================================
   研究生科研日常管理平台 — Design System
   主题：blue(科研蓝) / green(墨绿) / warm(暖色) / dark(深色) / gray(简约灰白)
   ============================================================ */
:root {
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
  --sidebar-w: 232px;
  --topbar-h: 60px;
}
[data-theme="blue"] {
  --bg: #f5f7fa; --bg-soft: #eef2f7; --card: #ffffff; --card-2: #f8fafc;
  --border: #e4e9f0; --border-2: #d4dbe5;
  --text: #101828; --text-2: #475467; --text-3: #98a2b3;
  --primary: #2563eb; --primary-hover: #1d4ed8; --primary-soft: #e8effd; --primary-text: #1e40af;
  --success: #059669; --success-soft: #e3f6ef;
  --warning: #d97706; --warning-soft: #fdf1e0;
  --danger: #dc2626; --danger-soft: #fdeaea;
  --violet: #7c3aed; --violet-soft: #f0e9fd;
  --chart-1: #2563eb; --chart-2: #0891b2; --chart-3: #7c3aed; --chart-4: #059669; --chart-5: #d97706; --chart-6: #db2777;
}
[data-theme="green"] {
  --bg: #f4f8f6; --bg-soft: #e9f2ee; --card: #ffffff; --card-2: #f7fbf9;
  --border: #dfe9e4; --border-2: #c9dbd2;
  --text: #0f1f18; --text-2: #3f5a4e; --text-3: #8aa79a;
  --primary: #059669; --primary-hover: #047857; --primary-soft: #e0f4ec; --primary-text: #065f46;
  --success: #059669; --success-soft: #e0f4ec;
  --warning: #b45309; --warning-soft: #fdf0dd;
  --danger: #dc2626; --danger-soft: #fdeaea;
  --violet: #0f766e; --violet-soft: #e0f2f0;
  --chart-1: #059669; --chart-2: #0d9488; --chart-3: #4d7c0f; --chart-4: #0891b2; --chart-5: #ca8a04; --chart-6: #7c2d12;
}
[data-theme="warm"] {
  --bg: #faf7f4; --bg-soft: #f4eee7; --card: #ffffff; --card-2: #fdfaf7;
  --border: #ece3d9; --border-2: #ddd0c2;
  --text: #26180f; --text-2: #6b5443; --text-3: #ab9683;
  --primary: #c2410c; --primary-hover: #9a3412; --primary-soft: #fbe9e0; --primary-text: #9a3412;
  --success: #15803d; --success-soft: #e7f5eb;
  --warning: #b45309; --warning-soft: #fdf0dd;
  --danger: #dc2626; --danger-soft: #fdeaea;
  --violet: #9333ea; --violet-soft: #f5eafd;
  --chart-1: #ea580c; --chart-2: #d97706; --chart-3: #b45309; --chart-4: #0891b2; --chart-5: #7c3aed; --chart-6: #be185d;
}
[data-theme="dark"] {
  --bg: #0f1319; --bg-soft: #161c25; --card: #171e28; --card-2: #1c242f;
  --border: #263140; --border-2: #334155;
  --text: #e6ebf2; --text-2: #9aa8ba; --text-3: #64748b;
  --primary: #3b82f6; --primary-hover: #60a5fa; --primary-soft: #1a2b45; --primary-text: #93c5fd;
  --success: #34d399; --success-soft: #10312a;
  --warning: #fbbf24; --warning-soft: #352a10;
  --danger: #f87171; --danger-soft: #3b1518;
  --violet: #a78bfa; --violet-soft: #251d3d;
  --chart-1: #3b82f6; --chart-2: #22d3ee; --chart-3: #a78bfa; --chart-4: #34d399; --chart-5: #fbbf24; --chart-6: #f472b6;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
}
[data-theme="gray"] {
  --bg: #f6f7f8; --bg-soft: #eef0f2; --card: #ffffff; --card-2: #fafbfc;
  --border: #e3e6ea; --border-2: #d2d7dd;
  --text: #1a1f26; --text-2: #4b5563; --text-3: #9ca3af;
  --primary: #334155; --primary-hover: #1e293b; --primary-soft: #eceff3; --primary-text: #1e293b;
  --success: #15803d; --success-soft: #e8f5ec;
  --warning: #a16207; --warning-soft: #f8f0da;
  --danger: #b91c1c; --danger-soft: #f9e8e8;
  --violet: #57534e; --violet-soft: #efeeec;
  --chart-1: #475569; --chart-2: #64748b; --chart-3: #94a3b8; --chart-4: #334155; --chart-5: #0ea5e9; --chart-6: #78716c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; }
::selection { background: var(--primary-soft); }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--card); border-right: 1px solid var(--border);
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 80; /* 高于 drawer-mask(70)，保证抽屉模式下菜单可点击 */
  display: flex; flex-direction: column; transition: transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex-shrink: 0;
}
img.brand-logo { display: block; }
.brand-name { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.brand-sub { font-size: 11px; color: var(--text-3); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav-group-label { font-size: 11px; color: var(--text-3); padding: 12px 10px 4px; letter-spacing: .05em; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  color: var(--text-2); cursor: pointer; font-size: 13.5px; margin-bottom: 2px; border: none;
  background: none; width: 100%; text-align: left; transition: background .12s;
}
.nav-item:hover { background: var(--bg-soft); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item .nav-badge { margin-left: auto; }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.user-chip:hover { background: var(--bg-soft); }
.user-chip .u-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-chip .u-role { font-size: 11px; color: var(--text-3); }

.main-wrap { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); background: var(--card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 0 20px;
}
.topbar-search { position: relative; flex: 1; max-width: 420px; }
.topbar-search input {
  width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-soft); color: var(--text); padding: 0 12px 0 38px; font-size: 16px; outline: none;
}
.topbar-search input:focus { border-color: var(--primary); background: var(--card); }
.topbar-search .s-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-pop {
  position: absolute; top: 46px; left: 0; right: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto; z-index: 60; display: none;
}
.search-pop.open { display: block; }
.search-group { padding: 8px 6px; }
.search-group-title { font-size: 11px; color: var(--text-3); padding: 4px 10px; }
.search-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.search-item:hover { background: var(--bg-soft); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: none;
  color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center;
  position: relative; transition: background .12s;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.bell-dot {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.notif-pop {
  position: absolute; top: 50px; right: 12px; width: min(360px, calc(100vw - 24px));
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); z-index: 60; display: none; overflow: hidden;
}
.notif-pop.open { display: block; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { padding: 11px 16px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.notif-item:hover { background: var(--bg-soft); }
.notif-item.unread { background: var(--primary-soft); }
.notif-item .n-title { font-weight: 600; font-size: 13px; }
.notif-item .n-content { font-size: 12px; color: var(--text-2); }
.notif-item .n-time { font-size: 11px; color: var(--text-3); }
.notif-empty { padding: 40px; text-align: center; color: var(--text-3); font-size: 13px; }

.view { flex: 1; padding: 24px; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.page-desc { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-title { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); gap: 10px; flex-wrap: wrap; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-label { font-size: 12px; color: var(--text-2); }
.stat-value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat-extra { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .12s; white-space: nowrap;
  min-height: 38px;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--card); border-color: var(--border-2); color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-soft { background: var(--primary-soft); color: var(--primary-text); }
.btn-soft:hover { filter: brightness(.96); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { height: 30px; min-height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 52px; min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 600;
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; letter-spacing: .03em;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: var(--bg-soft); }
.tbl .cell-primary { font-weight: 600; color: var(--text); }
.tbl .cell-link { color: var(--primary); cursor: pointer; font-weight: 600; }
.tbl .cell-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.tbl .num { font-variant-numeric: tabular-nums; }

/* ---------- 徽章 / 状态 ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.b-green { background: var(--success-soft); color: var(--success); } .b-green .dot { background: var(--success); }
.b-yellow { background: var(--warning-soft); color: var(--warning); } .b-yellow .dot { background: var(--warning); }
.b-red { background: var(--danger-soft); color: var(--danger); } .b-red .dot { background: var(--danger); }
.b-blue { background: var(--primary-soft); color: var(--primary-text); } .b-blue .dot { background: var(--primary); }
.b-gray { background: var(--bg-soft); color: var(--text-2); } .b-gray .dot { background: var(--text-3); }
.b-violet { background: var(--violet-soft); color: var(--violet); } .b-violet .dot { background: var(--violet); }

/* ---------- 头像 ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field .req::after { content: " *"; color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border-2); border-radius: 10px; background: var(--card);
  color: var(--text); padding: 9px 12px; font-size: 16px; outline: none; transition: border .12s;
}
.field textarea { resize: vertical; min-height: 76px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.field-error { border-color: var(--danger) !important; }

/* ---------- 模态 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,19,25,.5); backdrop-filter: blur(2px);
  z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn .15s ease;
}
.modal {
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg);
  width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column;
  animation: slideUp .18s ease; border: 1px solid var(--border);
}
.modal-lg { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 15.5px; font-weight: 700; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } }

/* ---------- Toast ---------- */
#toast-root { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: 12px; padding: 12px 16px; min-width: 260px; max-width: 380px;
  box-shadow: var(--shadow-lg); font-size: 13px; animation: slideIn .2s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast .t-title { font-weight: 700; }
.toast .t-msg { color: var(--text-2); margin-top: 2px; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }

/* ---------- 进度条 ---------- */
.progress { height: 6px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; border-radius: 4px; background: var(--primary); transition: width .4s; }
.progress.green > div { background: var(--success); }
.progress.yellow > div { background: var(--warning); }
.progress.red > div { background: var(--danger); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress { flex: 1; }
.progress-row .pct { font-size: 12px; font-weight: 700; color: var(--text-2); min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; background: var(--bg-soft); border-radius: 11px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; border: none; background: none; white-space: nowrap; }
.tab.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty svg { width: 42px; height: 42px; opacity: .4; margin-bottom: 10px; }
.empty .e-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.empty .e-desc { font-size: 12.5px; margin-top: 4px; }

/* ---------- 时间轴 ---------- */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border-2); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 20px 14px; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-dot { position: absolute; left: -24px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--primary); }
.tl-dot.green { border-color: var(--success); } .tl-dot.yellow { border-color: var(--warning); }
.tl-dot.violet { border-color: var(--violet); } .tl-dot.gray { border-color: var(--border-2); }
.tl-date { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.tl-title { font-size: 13.5px; font-weight: 600; margin-top: 1px; }
.tl-desc { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg) 50%, var(--primary-soft) 100%);
  padding: 20px;
}
.login-card { width: 400px; max-width: 100%; background: var(--card); border-radius: 20px; padding: 38px 34px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-logo .brand-logo { width: 44px; height: 44px; border-radius: 12px; }
.login-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.login-sub { font-size: 12px; color: var(--text-3); }
.login-form .field { margin-bottom: 16px; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.8; }
.login-roles { margin-top: 20px; border-top: 1px dashed var(--border); padding-top: 14px; }
.role-demo { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); padding: 3px 0; }
.role-demo code { background: var(--bg-soft); padding: 1px 7px; border-radius: 5px; font-size: 11px; color: var(--text-2); }

/* ---------- 注册页 ---------- */
.reg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.reg-tab {
  padding: 10px 8px; border-radius: 11px; border: 1.5px solid var(--border); background: none;
  font-size: 13.5px; font-weight: 600; color: var(--text-3); cursor: pointer; transition: all .12s;
}
.reg-tab.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.reg-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); cursor: pointer; margin-bottom: 14px; }
.reg-back:hover { color: var(--primary); }
.reg-form .field { margin-bottom: 13px; }
.reg-form label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--text-2); }
.reg-form .req::after { content: ' *'; color: var(--danger); }
.login-card .hint-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 12.5px; }
.login-card .hint-row a { color: var(--primary); text-decoration: none; font-weight: 600; cursor: pointer; }

/* ---------- 用户弹出菜单（侧边栏底部）---------- */
.sidebar-footer { position: relative; }
.user-pop {
  position: absolute; bottom: calc(100% + 8px); left: 12px; right: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 90;
}
.user-pop.open { display: block; }
.user-pop .up-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 11px; border: none;
  background: none; border-radius: 9px; font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left;
}
.user-pop .up-item:hover { background: var(--bg-soft); color: var(--text); }
.user-pop .up-item.danger { color: var(--danger); }
.user-pop .up-item.danger:hover { background: var(--danger-soft, rgba(220,38,38,.08)); }
.user-pop .up-item svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------- 课表（研一）---------- */
.sched-upload-zone {
  border: 2px dashed var(--border-2); border-radius: 14px; padding: 34px 20px; text-align: center;
  cursor: pointer; transition: all .15s; background: var(--bg-soft);
}
.sched-upload-zone:hover { border-color: var(--primary); background: var(--primary-soft); }
.sched-upload-zone svg { width: 34px; height: 34px; color: var(--primary); margin-bottom: 10px; }
.sched-upload-zone .su-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.sched-upload-zone .su-sub { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.7; }
.sched-preview {
  border-radius: 14px; border: 1px solid var(--border); overflow: hidden; background: var(--bg-soft);
}
.sched-preview img { display: block; width: 100%; max-height: 560px; object-fit: contain; background: #fff; }

/* ---------- Dashboard 专属 ---------- */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px;
  border-radius: 12px; border: 1px dashed var(--border-2); cursor: pointer; background: none;
  color: var(--text-2); font-size: 12.5px; font-weight: 600; transition: all .12s; min-height: 44px;
}
.qa-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.qa-btn svg { width: 20px; height: 20px; }
.alert-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.alert-item:last-child { border-bottom: none; }
.alert-item .a-text { font-size: 13px; flex: 1; }
.alert-item .a-sub { font-size: 11.5px; color: var(--text-3); }

/* ---------- 周报表单 ---------- */
.report-banner {
  background: linear-gradient(120deg, var(--primary) 0%, var(--chart-2) 100%);
  border-radius: 16px; color: #fff; padding: 22px 24px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.report-banner .rb-title { font-size: 18px; font-weight: 800; }
.report-banner .rb-sub { font-size: 12.5px; opacity: .85; margin-top: 3px; }
.autosave-tip { font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.wi-row { display: grid; grid-template-columns: 130px 1fr 110px 130px 36px; gap: 10px; align-items: start; margin-bottom: 10px; }
.wi-row .field { margin: 0; }
.plan-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.plan-row .plan-idx { width: 26px; height: 26px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-text); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.big-submit-bar {
  position: sticky; bottom: 12px; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; box-shadow: var(--shadow-lg); z-index: 20; flex-wrap: wrap; margin-top: 18px;
}

/* ---------- 日历 ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head-cell { text-align: center; font-size: 11.5px; color: var(--text-3); font-weight: 600; padding: 6px 0; }
.cal-cell {
  min-height: 74px; border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px;
  font-size: 11px; position: relative; background: var(--card);
}
.cal-cell.other { opacity: .38; background: var(--bg-soft); }
.cal-cell.today { border-color: var(--primary); border-width: 2px; }
.cal-cell .cal-date { font-size: 12.5px; font-weight: 700; }
.cal-cell.weekend { background: var(--bg-soft); }
.cal-tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 10.5px; margin-top: 3px; margin-right: 3px; font-weight: 600; }
.cal-tag.lab { background: var(--success-soft); color: var(--success); }
.cal-tag.course { background: var(--primary-soft); color: var(--primary-text); }
.cal-tag.field { background: var(--violet-soft); color: var(--violet); }
.cal-tag.meeting { background: var(--warning-soft); color: var(--warning); }
.cal-tag.leave { background: var(--danger-soft); color: var(--danger); }
.cal-tag.miss { background: var(--danger-soft); color: var(--danger); }

/* ---------- 论文 ---------- */
.paper-flow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.flow-node {
  padding: 5px 12px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  background: var(--bg-soft); color: var(--text-3); white-space: nowrap; position: relative;
}
.flow-node.done { background: var(--success-soft); color: var(--success); }
.flow-node.current { background: var(--primary); color: #fff; }
.flow-arrow { color: var(--text-3); font-size: 11px; }
.paper-card { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.paper-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stage-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.stage-row:last-child { border-bottom: none; }
.stage-row .s-name { width: 110px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.stage-row .progress { flex: 1; }

/* ---------- 组会演示模式 ---------- */
.meeting-stage {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 30px; min-height: 60vh; box-shadow: var(--shadow-lg);
}
.meeting-stage .ms-name { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.meeting-stage .ms-meta { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.ms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.ms-block { background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.ms-block .msb-title { font-size: 13px; font-weight: 700; color: var(--primary-text); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.ms-block ul { padding-left: 18px; font-size: 13.5px; color: var(--text-2); }
.ms-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.ms-counter { font-size: 13px; color: var(--text-3); font-weight: 600; }

/* ---------- 图表 ---------- */
.chart-box { width: 100%; overflow: hidden; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 8px 2px 2px; font-size: 11.5px; color: var(--text-2); }
.chart-legend .lg-item { display: flex; align-items: center; gap: 5px; }
.chart-legend .lg-dot { width: 9px; height: 9px; border-radius: 3px; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-center { position: relative; }
.donut-center .dc-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center .dc-num { font-size: 24px; font-weight: 800; }
.donut-center .dc-label { font-size: 11px; color: var(--text-3); }
.donut-legend { flex: 1; min-width: 170px; }
.donut-legend .dl-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.donut-legend .dl-row .lg-dot { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend .dl-val { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 设置 ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.theme-card {
  border: 2px solid var(--border); border-radius: 14px; padding: 14px; cursor: pointer;
  background: var(--card); text-align: center; transition: border .12s;
}
.theme-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.theme-card .tc-preview { height: 52px; border-radius: 9px; margin-bottom: 9px; display: flex; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.theme-card .tc-bar { width: 26%; }
.theme-card .tc-main { flex: 1; display: flex; flex-direction: column; }
.theme-card .tc-chip { height: 9px; margin: 4px; border-radius: 3px; }
.theme-card .tc-name { font-size: 12.5px; font-weight: 700; }
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.rule-row:last-child { border-bottom: none; }
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border-2); border-radius: 999px; cursor: pointer; transition: .15s; }
.switch .slider::before { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .15s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.rule-input { width: 74px; height: 34px; border: 1px solid var(--border-2); border-radius: 9px; background: var(--card); color: var(--text); text-align: center; font-size: 16px; font-weight: 700; }

/* ---------- 移动端底部导航 & 抽屉 ---------- */
.bottom-tabs {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--card); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.bt-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 8px; border: none; background: none; color: var(--text-3); font-size: 10.5px; cursor: pointer; min-width: 52px; min-height: 48px; }
.bt-item svg { width: 21px; height: 21px; }
.bt-item.active { color: var(--primary); font-weight: 700; }
.bt-item .bt-badge { position: relative; }
.bt-item .bt-badge .bell-dot { top: -4px; right: -10px; }
.drawer-mask { position: fixed; inset: 0; background: rgba(15,19,25,.45); z-index: 70; display: none; }
.drawer-mask.open { display: block; }
.hamburger { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-grid, .dash-grid-3 { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .wi-row { grid-template-columns: 110px 1fr 80px; }
  .wi-row .field:nth-child(4) { display: none; }
  .ms-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-wrap { margin-left: 0; }
  .bottom-tabs { display: flex; }
  .hamburger { display: flex; }
  .view { padding: 14px 14px calc(84px + env(safe-area-inset-bottom)); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-value { font-size: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .field input, .field select { padding: 12px; }  /* 手机端触控高度提升至 ~44px */
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .cal-cell { min-height: 56px; padding: 3px 4px; }
  .cal-tag { font-size: 9.5px; padding: 1px 5px; }
  .page-title { font-size: 18px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-search { max-width: none; min-width: 0; }   /* 手机端允许搜索框收缩，防横向溢出 */
  .topbar-search input { font-size: 16px; height: 36px; min-width: 0; }
  .login-card { padding: 28px 22px; }
  .meeting-stage { padding: 18px; }
  .meeting-stage .ms-name { font-size: 24px; }
  /* 表格转卡片 */
  .tbl.mobile-cards thead { display: none; }
  .tbl.mobile-cards, .tbl.mobile-cards tbody { display: block; }
  .tbl.mobile-cards tr {
    display: block; background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
  }
  .tbl.mobile-cards td { display: block; border: none; padding: 3px 0; }
  .tbl.mobile-cards td::before {
    content: attr(data-label); font-size: 10.5px; color: var(--text-3); font-weight: 600;
    display: block; text-transform: uppercase; letter-spacing: .04em;
  }
  .settings-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid-3 { grid-template-columns: 1fr; }
  .big-submit-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .cal-cell { min-height: 48px; }
  .cal-cell .cal-date { font-size: 11px; }
  #toast-root { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; width: 100%; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

.boot-loading { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--text-3); }
.boot-logo { width: 44px; height: 44px; border-radius: 12px; background: url('/icons/icon-192-v3.png') center/cover no-repeat; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* 打印（组会汇报） */
@media print {
  .sidebar, .topbar, .bottom-tabs, .ms-nav { display: none !important; }
  .main-wrap { margin: 0; }
}

/* ===================== 期刊目录组件 ===================== */
.j-hint { font-size: 12px; color: var(--text-3); padding: 6px 4px; line-height: 1.6; }
.j-hit { font-size: 12.5px; color: var(--text-2); background: var(--bg-soft); border-radius: 8px; padding: 8px 10px; line-height: 1.6; }
.j-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; max-height: 216px; overflow-y: auto; }
.j-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; min-height: 40px; border-bottom: 1px solid var(--border-soft); background: var(--bg); }
.j-item:last-child { border-bottom: none; }
.j-item:hover { background: var(--bg-soft); }
.j-item .j-name { flex: 1; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.j-item .j-sub { font-size: 11px; color: var(--text-3); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.j-lv-badge { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 6px; }

/* ===================== 每日待办（第七批重设计：学生端 / 导师端共用） ===================== */
.todo-stat { display: flex; align-items: baseline; gap: 5px; font-size: 12px; color: var(--text-3); padding: 0 2px 10px; }
.todo-stat b { color: var(--primary); font-size: 15px; }
.todo-input-row { display: flex; gap: 8px; }
.todo-input { flex: 1; min-width: 0; font-size: 16px; height: 44px; border-radius: 22px; border: 1.5px solid var(--border-2); background: var(--card-2); padding: 0 16px; color: var(--text); transition: border-color .15s, background .15s; }
.todo-input:focus { border-color: var(--primary); background: var(--card); outline: none; }
.todo-list { margin-top: 6px; max-height: 280px; overflow-y: auto; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed var(--border); min-height: 44px; animation: todoIn .22s ease; }
.todo-item:last-child { border-bottom: none; }
@keyframes todoIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.todo-check { display: flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.todo-check input { display: none; }
.tc-box { width: 22px; height: 22px; border: 2px solid var(--border-2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: all .18s; color: #fff; background: var(--card); }
.tc-box svg { opacity: 0; transform: scale(.4); transition: all .18s; }
.todo-check input:checked + .tc-box { background: var(--primary); border-color: var(--primary); }
.todo-check input:checked + .tc-box svg { opacity: 1; transform: scale(1); }
.todo-text { flex: 1; font-size: 13.5px; line-height: 1.6; word-break: break-all; transition: color .2s; }
.todo-item.done .todo-text { color: var(--text-3); text-decoration: line-through; }
.todo-ovd { font-size: 10.5px; color: var(--danger); background: var(--danger-soft); border-radius: 6px; padding: 2px 7px; flex-shrink: 0; }
.todo-del { border: none; background: transparent; color: var(--text-3); cursor: pointer; padding: 6px; border-radius: 8px; flex-shrink: 0; min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: all .15s; }
.todo-item:hover .todo-del, .todo-del:focus-visible { opacity: 1; }
.todo-del:hover { background: var(--danger-soft); color: var(--danger); }
@media (hover: none) { .todo-del { opacity: .65; } }
.todo-done-group { margin-top: 4px; }
.todo-done-group summary { font-size: 12px; color: var(--text-3); cursor: pointer; padding: 7px 2px; user-select: none; list-style: none; display: flex; align-items: center; gap: 5px; }
.todo-done-group summary::before { content: '▸'; transition: transform .15s; font-size: 10px; }
.todo-done-group[open] summary::before { transform: rotate(90deg); }
.todo-done-group summary::-webkit-details-marker { display: none; }
.todo-empty { text-align: center; padding: 20px 10px 14px; color: var(--text-3); font-size: 12.5px; line-height: 1.8; }
.todo-empty svg { opacity: .45; margin-bottom: 4px; }

/* ===================== 第三批：首页三列区 / 打卡签退 / 组内实时状态 ===================== */
/* 三列区：待办 | 出勤打卡 | 组内状态（窄屏自动堆叠） */
.tri-grid { display: grid; grid-template-columns: 1.1fr 1.3fr 1.1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .tri-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) { .tri-grid { grid-template-columns: 1fr; } }

/* 可点击数据卡 */
.stat-card.stat-click { cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.stat-card.stat-click:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(37,99,235,.12); }
.stat-card.stat-click:active { transform: translateY(0); }

/* ---- 出勤打卡卡 ---- */
.clock-period-hint { font-size: 12.5px; color: var(--text-2); background: var(--bg-soft); border-radius: 8px; padding: 8px 10px; line-height: 1.5; }
.clock-active { background: linear-gradient(180deg, rgba(34,197,94,.07) 0%, rgba(34,197,94,.02) 100%); border: 1px solid rgba(34,197,94,.25); border-radius: 12px; padding: 12px; }
.ca-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ca-kind { font-weight: 700; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-time { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); flex-shrink: 0; animation: pulse-ring 1.6s ease-out infinite; }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.clock-logs { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 8px; max-height: 200px; overflow-y: auto; }
.clock-log-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px dashed var(--border); font-size: 12.5px; min-height: 38px; }
.clock-log-row:last-child { border-bottom: none; }
.clock-period { flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--violet, #7c3aed); background: var(--violet-soft, rgba(124,58,237,.1)); border-radius: 6px; padding: 2px 7px; }
.clock-kind { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clock-time { flex-shrink: 0; color: var(--text-3); font-size: 11.5px; }
.clock-dur { flex-shrink: 0; font-weight: 700; color: var(--text-2); font-size: 12px; }

/* ---- 本周打卡卡（第九批：7 天逐日时段明细） ---- */
.wk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.wk-day { border: 1px solid var(--border); border-radius: 10px; padding: 8px 6px; min-width: 0; }
.wk-day.today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.wk-day.wek { background: var(--bg-2, #f8fafc); }
.wk-day.future { opacity: .45; }
.wk-day-head { font-size: 11px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-day.today .wk-day-head { color: var(--primary); }
.wk-weekend-tag { font-size: 9px; color: var(--text-3); background: var(--border-2, #e2e8f0); border-radius: 4px; padding: 0 4px; margin-left: 3px; }
.wk-seg { display: flex; flex-direction: column; gap: 1px; font-size: 10.5px; padding: 4px 0; border-top: 1px dashed var(--border); }
.wk-seg:first-of-type { border-top: none; }
.wk-seg .badge { align-self: flex-start; font-size: 9.5px; padding: 1px 6px; border-radius: 5px; }
.wk-seg .b-soft { background: var(--primary-soft); color: var(--primary-text, var(--primary)); font-weight: 600; }
.wk-seg-time { color: var(--text-3); }
.wk-seg-dur { font-weight: 700; color: var(--text-2); }
.wk-none { text-align: center; color: var(--text-3); font-size: 12px; padding: 10px 0; }
/* 周末打卡标签（月历）：浅色描边样式，与工作日实底区分 */
.cal-tag.wek { background: transparent !important; border: 1px solid currentColor; opacity: .75; }
@media (max-width: 1100px) { .wk-days { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px) { .wk-days { grid-template-columns: repeat(2, 1fr); } }

/* ---- 导师端周视图表格（第九批） ---- */
.wk-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.wk-table th { position: sticky; top: 0; background: var(--card); padding: 8px 6px; text-align: center; font-size: 11px; color: var(--text-3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.wk-table th.wk-th-wek { color: var(--text-3); font-weight: 500; }
.wk-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; }
.wk-table td.wk-stu { text-align: left; white-space: nowrap; }
.wk-table td.wk-cell-wek { background: rgba(148,163,184,.06); }
.wk-table .wk-name { font-weight: 700; color: var(--text); cursor: pointer; }
.wk-table .wk-name:hover { color: var(--primary); text-decoration: underline; }
.wk-cell-k { font-size: 10.5px; font-weight: 600; }
.wk-cell-h { color: var(--text-3); font-size: 11px; }
.wk-sum { font-weight: 700; white-space: nowrap; font-size: 11.5px; }
.wk-view-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
@media (max-width: 768px) {
  .wk-table th, .wk-table td { padding: 7px 4px; font-size: 11.5px; }
  #btn-new-makeup { min-height: 40px; }   /* 申请补打卡按钮触控高度 */
}

/* ---- 组内实时状态卡 ---- */
.lab-status-summary { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ls-chip { font-size: 11.5px; background: var(--bg-soft); color: var(--text-2); border-radius: 999px; padding: 3px 10px; font-weight: 600; }
.lab-status-list { max-height: 300px; overflow-y: auto; }
.ls-row { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px dashed var(--border); min-height: 44px; }
.ls-row:last-child { border-bottom: none; }
.ls-row.offline { opacity: .5; }
.ls-name { font-size: 13px; font-weight: 600; color: var(--text); flex-shrink: 0; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-grade { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.ls-row .badge { margin-left: auto; flex-shrink: 0; }

/* 四列数据卡（窄屏自动降为 2 列，避免内联样式覆盖媒体查询导致横向溢出） */
.stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1200px) { .stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .stat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }

/* 通用防溢出：grid 子项允许收缩，防止卡片内不可断行内容（如长期刊名）把 1fr 轨道撑宽 */
.dash-grid > *, .dash-grid-3 > *, .tri-grid > *, .stat-grid > * { min-width: 0; }

/* ---- 第四批：实验室打卡点（导师地图选点 + 学生定位打卡）---- */
.cp-pin-wrap { background: none; border: none; }
.cp-controls { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.cp-radius-row { display: flex; align-items: center; gap: 12px; }
.cp-radius-row input[type="range"] { flex: 1; accent-color: var(--primary); min-width: 0; }
/* 学生端定位状态行 */
.geo-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); padding: 4px 0 2px; }
.geo-status.ok { color: var(--success); }
.geo-status.no { color: var(--danger); }
.geo-status .geo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.geo-status.ok .geo-dot { background: var(--success); }
.geo-status.no .geo-dot { background: var(--danger); }
/* 导师端位置验证徽章 */
.vip-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: var(--success); background: var(--success-soft, #e6f7ef); border-radius: 5px; padding: 1px 5px; vertical-align: middle; margin-left: 3px; }

/* ===================== PWA 安装引导中心 ===================== */
.login-install-link { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12.5px; color: var(--primary); cursor: pointer; font-weight: 600;
  padding: 10px 8px; border-radius: 10px; transition: background .15s; }
.login-install-link:hover { background: var(--primary-soft); }
.login-install-link svg { flex-shrink: 0; }

.guide-detect { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2);
  background: var(--bg-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.guide-detect svg { color: var(--primary); flex-shrink: 0; }
.guide-detect b { color: var(--text); }

.guide-steps { display: flex; flex-direction: column; gap: 10px; }
.guide-step { display: flex; align-items: flex-start; gap: 12px; }
.guide-num { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary-text); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.guide-txt { font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.guide-txt b { color: var(--primary-text); background: var(--primary-soft); padding: 1px 7px; border-radius: 6px; font-weight: 700; }

.guide-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--warning);
  background: var(--warning-soft); border-radius: 10px; padding: 10px 12px; margin-top: 14px; line-height: 1.7; }
.guide-note.blue { color: var(--primary-text); background: var(--primary-soft); }
.guide-note svg { flex-shrink: 0; margin-top: 2px; }

.guide-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3);
  margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); line-height: 1.7; }
.guide-foot svg { flex-shrink: 0; }

@media (max-width: 768px) {
  .guide-txt { font-size: 14.5px; } /* 步骤文案在手机上略放大，方便照着操作 */
  .guide-step { gap: 10px; }
}

/* ===================== 校历渲染（第十六批）===================== */
.cal-cell.holiday { background: var(--danger-soft, #fdeaea); }
.cal-cell.holiday .cal-date { color: var(--danger); }
.cal-cell.brek { background: var(--bg-soft); }
.cal-cell.brek .cal-date { color: var(--text-3); }
.cal-cell.workday-cp { background: var(--primary-soft); }
.cal-cell.workday-cp .cal-date { color: var(--primary-text); }
.cal-hol-tag { display: inline-block; padding: 1px 6px; border-radius: 5px; font-size: 10px; margin-top: 3px; margin-right: 3px;
  font-weight: 700; background: var(--danger-soft); color: var(--danger); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-brek-tag { display: inline-block; padding: 1px 6px; border-radius: 5px; font-size: 10px; margin-top: 3px; margin-right: 3px;
  font-weight: 600; background: var(--card-2); color: var(--text-3); }
.cal-cp-tag { display: inline-block; padding: 1px 6px; border-radius: 5px; font-size: 10px; margin-top: 3px; margin-right: 3px;
  font-weight: 700; background: var(--primary-soft); color: var(--primary-text); }
.cal-tag.vac { background: var(--violet-soft); color: var(--violet); }   /* 暑假休假（区别普通请假红） */
.cal-cfg-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px dashed var(--border); font-size: 13px; }
.cal-cfg-row:last-child { border-bottom: none; }
.cal-cfg-row .c-date { font-weight: 700; min-width: 92px; color: var(--text); }
.cal-cfg-row .c-name { color: var(--text-3); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vac-bar { display: flex; align-items: center; gap: 10px; background: var(--violet-soft); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.vac-bar b { color: var(--violet); font-size: 15px; }

/* ===================== 第二十批：工作台积分水池卡 ===================== */
.pool-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pool-wrap { position: relative; width: 100px; height: 100px; flex-shrink: 0; margin: 4px 0; }
.pool-svg { width: 100px; height: 100px; display: block; }
.pool-water-rect { transition: y .9s cubic-bezier(.34,1.2,.44,1), height .9s cubic-bezier(.34,1.2,.44,1); }
.pool-wave { animation: poolWave 3.2s ease-in-out infinite; transform-origin: center; }
@keyframes poolWave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2.5px); } }
.pool-drop { position: absolute; left: 50%; top: 0; width: 11px; height: 15px; margin-left: -5px;
  background: linear-gradient(180deg, var(--primary-light, #5b9bff), var(--primary, #2563eb));
  border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%; opacity: 0;
  animation: poolDrop .85s cubic-bezier(.5,0,.8,.6) forwards; }
@keyframes poolDrop { 0% { top: -18px; opacity: 0; } 12% { opacity: 1; } 72% { top: 42px; opacity: 1; } 100% { top: 50px; opacity: 0; } }
.pool-ripple { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border: 2.5px solid var(--primary, #2563eb);
  border-radius: 50%; transform: translate(-50%, -50%); opacity: 0;
  animation: poolRipple 1s ease-out .55s forwards; pointer-events: none; }
@keyframes poolRipple { 0% { width: 14px; height: 14px; opacity: .85; } 100% { width: 104px; height: 104px; opacity: 0; } }
.pool-num { font-size: 30px; font-weight: 800; color: var(--primary); line-height: 1.1; transition: color .3s; }
.pool-num.neg { color: var(--danger); }
.pool-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.7; }
.pool-cta { margin-left: auto; }
@media (max-width: 520px) { .pool-cta { margin-left: 0; } }

/* ===================== 第二十一批：与君共勉每日一句 ===================== */
.quote-card { display: flex; gap: 12px; align-items: flex-start; background: var(--card);
  border: 1px solid var(--border-2, rgba(0,0,0,.05)); border-left: 3px solid var(--primary);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.quote-card .q-mark { font-size: 30px; font-weight: 800; color: var(--primary); opacity: .5;
  line-height: .8; font-family: Georgia, serif; flex-shrink: 0; }
.quote-card .q-text { font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.quote-card .q-src { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.quote-card .q-src span { opacity: .8; }

/* ===================== 第二十一批：卫生值日卡 ===================== */
.duty-card .duty-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.duty-card .duty-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.duty-person { display: inline-flex; align-items: center; gap: 7px; }

/* ===================== 第二十四批：ICP 备案页脚 ===================== */
.icp-footer { text-align: center; padding: 14px 0 10px; margin-top: auto; }
.icp-footer a { font-size: 11.5px; color: var(--text-3); text-decoration: none; }
.icp-footer a:hover { color: var(--primary); }
@media (max-width: 768px) { .main-wrap .icp-footer { padding-bottom: max(10px, env(safe-area-inset-bottom)); } }
