/* ==========================================================================
   儒学商道 · 学·导·评一体化平台
   设计基调：宣纸底 · 墨色 · 青瓷绿 · 朱砂　|　零外部依赖，离线可用
   ========================================================================== */

:root {
  /* 底色 */
  --paper:        #FAF8F4;
  --paper-2:      #F4F1EA;
  --paper-3:      #EDE9E0;
  --surface:      #FFFFFF;

  /* 墨色文字 */
  --ink:          #1C1A17;
  --ink-2:        #4A463F;
  --ink-3:        #7C766C;
  --ink-4:        #A8A298;

  /* 青瓷（主色） */
  --celadon:      #3E7A63;
  --celadon-d:    #2A5A48;
  --celadon-l:    #E8F0EC;
  --celadon-m:    #B8D3C7;

  /* 朱砂（强调 / 预警） */
  --cinnabar:     #B3453A;
  --cinnabar-l:   #FBEDEB;
  --cinnabar-m:   #E8B5AE;

  /* 赭石（次强调 / 提醒） */
  --ochre:        #B07D2B;
  --ochre-l:      #FBF3E2;

  /* 竹青（中性辅助） */
  --bamboo:       #6E8570;
  --bamboo-l:     #EDF1EC;

  /* 边框 */
  --line:         rgba(28, 26, 23, 0.10);
  --line-2:       rgba(28, 26, 23, 0.16);
  --line-3:       rgba(28, 26, 23, 0.28);

  /* 圆角 */
  --r-s: 6px;
  --r-m: 8px;
  --r-l: 12px;
  --r-full: 999px;

  /* 阴影 */
  --sh-1: 0 1px 2px rgba(28, 26, 23, 0.04);
  --sh-2: 0 4px 16px rgba(28, 26, 23, 0.08);
  --sh-3: 0 12px 40px rgba(28, 26, 23, 0.14);

  /* 字体 */
  --f-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", "SimSun", Georgia, serif;
  --f-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", Roboto, sans-serif;
  --f-mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;

  --sidebar-w: 232px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
svg { display: block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   排版
   ========================================================================== */
.serif { font-family: var(--f-serif); }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.35; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }

.t-xs { font-size: 11px; }
.t-sm { font-size: 12px; }
.t-md { font-size: 13px; }
.muted { color: var(--ink-3); }
.muted-2 { color: var(--ink-4); }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-wrap { display: flex; min-height: 100vh; }

.login-brand {
  flex: 1 1 48%;
  background: var(--celadon-d);
  color: #EFF4F1;
  padding: 56px 52px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; right: -140px; bottom: -160px;
  width: 460px; height: 460px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
}
.login-brand::before {
  content: ""; position: absolute; right: -80px; bottom: -100px;
  width: 340px; height: 340px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
}
.brand-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-serif); font-size: 15px; letter-spacing: 0.14em;
}
.brand-seal {
  width: 34px; height: 34px; border-radius: var(--r-s);
  background: var(--cinnabar); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-serif); font-size: 17px; font-weight: 600;
}
.login-brand h1 {
  font-family: var(--f-serif); font-size: 46px; line-height: 1.3;
  letter-spacing: 0.04em; margin: 6px 0 14px; position: relative; z-index: 1;
  text-align: left; font-weight: 600;
}
/* 两行标题：一体化平台保持原始左对齐位置；学·导·评 更大更粗，并居中叠在其正上方 */
.login-brand h1 .bstack { display: inline-block; position: relative; }
.login-brand h1 .bmain { display: block; text-align: left; }
.login-brand h1 .btop {
  display: block; text-align: center; white-space: nowrap;
  font-size: 56px; letter-spacing: 0.22em; line-height: 1.1;
  font-weight: 700;
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 100%; margin-bottom: 6px;
}
.login-brand .sub { font-size: 14px; opacity: 0.75; line-height: 1.9; position: relative; z-index: 1; }
.quote-card {
  position: relative; z-index: 1;
  border-left: 2px solid rgba(255,255,255,0.28);
  padding-left: 18px; margin-top: 30px;
}
.quote-card p { font-family: var(--f-serif); font-size: 15px; line-height: 1.95; opacity: 0.92; }
.quote-card cite { display: block; margin-top: 8px; font-size: 12px; font-style: normal; opacity: 0.55; }
.brand-foot { font-size: 12px; opacity: 0.5; position: relative; z-index: 1; }

.login-panel {
  flex: 1 1 52%;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px; background: var(--paper);
}
.login-box { width: 100%; max-width: 384px; }
.login-box > h2 { font-size: 24px; font-family: var(--f-serif); letter-spacing: 0.02em; }
.login-box > .hint { color: var(--ink-3); font-size: 13px; margin-top: 8px; margin-bottom: 30px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.field .req { color: var(--cinnabar); }

.input, .select, .textarea {
  width: 100%; padding: 10px 13px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-s); font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--celadon);
  box-shadow: 0 0 0 3px rgba(62, 122, 99, 0.12);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.75; }
.select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237C766C' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}

.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.role-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; border: 1px solid var(--line-2);
  border-radius: var(--r-s); background: var(--surface);
  font-size: 13px; text-align: left; transition: all .15s;
}
.role-chip:hover { border-color: var(--celadon-m); background: var(--celadon-l); }
.role-chip.on { border-color: var(--celadon); background: var(--celadon-l); box-shadow: 0 0 0 3px rgba(62,122,99,.10); }
.role-chip .ic { width: 26px; height: 26px; border-radius: var(--r-s); display: grid; place-items: center;
  background: var(--paper-3); color: var(--ink-2); font-size: 13px; font-family: var(--f-serif); flex: 0 0 auto; }
.role-chip.on .ic { background: var(--celadon); color: #fff; }
.role-chip .nm { font-weight: 500; }
.role-chip .ds { font-size: 11px; color: var(--ink-4); }

.login-foot { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line-2); }
.demo-note { font-size: 12px; color: var(--ink-3); line-height: 1.85; }
.demo-note b { color: var(--ink-2); font-weight: 600; }

/* 登录页演示模式开关 */
.demo-switch { display: flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; margin-bottom: 16px; }
.demo-switch input { display: none; }
.demo-switch .switch { width: 42px; height: 23px; border-radius: var(--r-full); background: var(--paper-3); border: 1px solid var(--line-2); position: relative; transition: background .2s, border-color .2s; flex: 0 0 auto; }
.demo-switch .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform .2s; }
.demo-switch input:checked + .switch { background: var(--celadon); border-color: var(--celadon); }
.demo-switch input:checked + .switch::after { transform: translateX(19px); }
.demo-switch .ds-txt { display: flex; flex-direction: column; line-height: 1.45; }
.demo-switch .ds-txt b { font-size: 13px; color: var(--ink); font-weight: 600; }
.demo-switch .ds-txt span { font-size: 11px; color: var(--ink-4); }

/* 应用内演示模式横幅 */
.demo-banner { background: var(--ochre-l); color: #7a5512; font-size: 12px; padding: 7px 20px; border-bottom: 1px solid rgba(176,125,43,.3); letter-spacing: .01em; }

/* 应用内演示模式悬浮按钮 + 菜单 */
.demo-fab-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
.demo-fab { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); padding: 9px 15px; border-radius: var(--r-full); box-shadow: var(--sh-2); font-size: 13px; font-weight: 500; transition: box-shadow .15s, background .15s; }
.demo-fab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.demo-fab.on { background: var(--ochre); color: #fff; border-color: var(--ochre); }
.demo-fab.on .dot { background: #fff; }
.demo-fab:hover { box-shadow: var(--sh-3); }
.demo-menu { position: absolute; right: 0; bottom: 52px; width: 236px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); box-shadow: var(--sh-3); padding: 8px; display: none; }
.demo-menu.open { display: block; }
.dm-title { font-size: 12px; color: var(--ink-2); font-weight: 600; padding: 6px 8px 8px; }
.dm-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--r-s); font-size: 13px; color: var(--ink); }
.dm-item:hover { background: var(--paper-2); }
.dm-hint { font-size: 11px; color: var(--ink-4); padding: 9px 8px 4px; line-height: 1.55; border-top: 1px solid var(--line); margin-top: 4px; }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r-s);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent; transition: all .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--celadon); color: #fff; }
.btn-primary:hover { background: var(--celadon-d); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--line-3); background: var(--paper-2); }
.btn-quiet { background: transparent; color: var(--ink-3); }
.btn-quiet:hover { background: var(--paper-3); color: var(--ink); }
.btn-danger { background: var(--cinnabar); color: #fff; }
.btn-danger:hover { filter: brightness(0.93); }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 20px; font-size: 14px; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ==========================================================================
   应用骨架
   ========================================================================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--celadon-d); color: #DCE6E1;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sb-head { padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sb-head .brand-mark { color: #fff; font-size: 13.5px; letter-spacing: .1em; }
.sb-head .brand-seal { width: 30px; height: 30px; font-size: 15px; }
.sb-head .sub { font-size: 11px; opacity: .5; margin-top: 8px; letter-spacing: .05em; }

.sb-nav { flex: 1; overflow-y: auto; padding: 14px 10px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-color: transparent; }
.sb-group { font-size: 10.5px; letter-spacing: .14em; opacity: .38; padding: 14px 10px 7px; text-transform: uppercase; }
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--r-s); margin-bottom: 2px;
  font-size: 13.5px; color: #C6D5CE; transition: all .14s; width: 100%; text-align: left;
}
.sb-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-item.on { background: rgba(255,255,255,.13); color: #fff; font-weight: 500; }
.sb-item .ic { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
.sb-item .cnt { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: var(--r-full);
  background: rgba(255,255,255,.14); font-family: var(--f-mono); }
.sb-item.alert .cnt { background: var(--cinnabar); color: #fff; }

.sb-foot { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.09); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-s); width: 100%; }
.sb-user:hover { background: rgba(255,255,255,.07); }
.sb-user .av { width: 30px; height: 30px; border-radius: var(--r-full); background: var(--cinnabar);
  color: #fff; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: 0 0 auto; }
.sb-user .nm { font-size: 13px; color: #fff; text-align: left; }
.sb-user .rl { font-size: 11px; opacity: .55; text-align: left; }

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

.topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 26px; background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 17px; font-weight: 600; }
.topbar .crumb { font-size: 12px; color: var(--ink-4); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; width: 34px; height: 34px; border-radius: var(--r-s); align-items: center; justify-content: center; }
.menu-btn:hover { background: var(--paper-3); }

.content { flex: 1; padding: 24px 26px 48px; max-width: 1440px; width: 100%; }

/* ==========================================================================
   卡片 / 通用块
   ========================================================================== */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--sh-1);
}
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 14.5px; }
.card-head .spacer { flex: 1; }
.card-head .sub { font-size: 12px; color: var(--ink-4); }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.g-sb { grid-template-columns: minmax(0,1fr) 340px; }
.g-bs { grid-template-columns: 300px minmax(0,1fr); }

.row { display: flex; align-items: center; gap: 10px; }
.row-t { display: flex; align-items: flex-start; gap: 10px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

.sec-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sec-title h2 { font-size: 15px; }
.sec-title .line { flex: 1; height: 1px; background: var(--line); }

/* ==========================================================================
   统计卡
   ========================================================================== */
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 16px 18px; position: relative; overflow: hidden;
}
.stat .lb { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat .vl { font-family: var(--f-mono); font-size: 27px; font-weight: 600; margin-top: 7px; letter-spacing: -0.02em; }
.stat .vl small { font-size: 13px; font-weight: 400; color: var(--ink-4); margin-left: 3px; }
.stat .dt { font-size: 11.5px; color: var(--ink-4); margin-top: 5px; }
.stat .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--celadon); }
.stat.s-cin .bar { background: var(--cinnabar); }
.stat.s-och .bar { background: var(--ochre); }
.stat.s-bam .bar { background: var(--bamboo); }
.trend { font-size: 11.5px; font-family: var(--f-mono); padding: 1px 6px; border-radius: var(--r-s); }
.trend.up { color: var(--cinnabar); background: var(--cinnabar-l); }
.trend.down { color: var(--celadon); background: var(--celadon-l); }

/* ==========================================================================
   徽标 / 标签
   ========================================================================== */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: var(--r-s);
  font-size: 11.5px; font-weight: 500; line-height: 1.7;
  background: var(--paper-3); color: var(--ink-2);
}
.tag-cel { background: var(--celadon-l); color: var(--celadon-d); }
.tag-cin { background: var(--cinnabar-l); color: var(--cinnabar); }
.tag-och { background: var(--ochre-l); color: var(--ochre); }
.tag-bam { background: var(--bamboo-l); color: var(--bamboo); }
.tag-line { background: transparent; border: 1px solid var(--line-2); color: var(--ink-3); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }

.lv { display: inline-block; padding: 2px 8px; border-radius: var(--r-s); font-size: 11.5px; font-weight: 500; }
.lv-A { background: #E4F0E9; color: #235C43; }
.lv-B { background: var(--celadon-l); color: var(--celadon-d); }
.lv-C { background: var(--ochre-l); color: var(--ochre); }
.lv-D { background: var(--cinnabar-l); color: var(--cinnabar); }

/* ==========================================================================
   表格
   ========================================================================== */
.tbl-wrap { overflow-x: auto; }
.tbl { font-size: 13.5px; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--ink-3);
  padding: 11px 14px; background: var(--paper-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl th:first-child { border-top-left-radius: var(--r-m); }
.tbl th:last-child { border-top-right-radius: var(--r-m); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--paper-2); }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl .sticky-l { position: sticky; left: 0; background: var(--surface); z-index: 2; }
.tbl tbody tr:hover .sticky-l { background: var(--paper-2); }
.tbl th.sticky-l { background: var(--paper-2); z-index: 3; }

.av-sm {
  width: 30px; height: 30px; border-radius: var(--r-full); flex: 0 0 30px;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: var(--celadon-l); color: var(--celadon-d);
}
.av-lg { width: 52px; height: 52px; flex: 0 0 52px; font-size: 18px; border-radius: var(--r-full);
  display: grid; place-items: center; font-weight: 600; background: var(--celadon); color: #fff; }

.pbar { height: 5px; border-radius: var(--r-full); background: var(--paper-3); overflow: hidden; min-width: 60px; }
.pbar i { display: block; height: 100%; border-radius: var(--r-full); background: var(--celadon); }
.pbar.warn i { background: var(--ochre); }
.pbar.bad i { background: var(--cinnabar); }

/* ==========================================================================
   工具栏 / 筛选
   ========================================================================== */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search {
  position: relative; flex: 0 1 260px;
}
.search input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid var(--line-2);
  border-radius: var(--r-s); background: var(--surface); font-size: 13px; }
.search input:focus { outline: none; border-color: var(--celadon); box-shadow: 0 0 0 3px rgba(62,122,99,.12); }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: .4; }

.seg { display: inline-flex; background: var(--paper-3); border-radius: var(--r-s); padding: 2px; gap: 2px; }
.seg button { padding: 6px 13px; border-radius: 5px; font-size: 12.5px; color: var(--ink-3); transition: all .14s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); font-weight: 500; }

.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding: 14px 16px; }
.pager button { min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--r-s);
  font-size: 12.5px; color: var(--ink-2); border: 1px solid transparent; }
.pager button:hover:not(:disabled) { background: var(--paper-3); }
.pager button.on { background: var(--celadon); color: #fff; }
.pager button:disabled { opacity: .35; cursor: not-allowed; }

/* ==========================================================================
   评分表单（四档打钩）
   ========================================================================== */
.dim-block { border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; margin-bottom: 14px; }
.dim-head { display: flex; align-items: center; gap: 10px; padding: 12px 15px; background: var(--paper-2); }
.dim-head .nm { font-weight: 600; font-size: 14px; font-family: var(--f-serif); letter-spacing: .03em; }
.dim-body { padding: 14px 15px; }
.anchors { margin-bottom: 13px; }
.anchors li { position: relative; padding-left: 15px; font-size: 12.5px; color: var(--ink-2); line-height: 1.95; }
.anchors li::before { content: ""; position: absolute; left: 2px; top: 11px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--celadon-m); }

.lv-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.lv-opt {
  border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 9px 8px;
  text-align: center; transition: all .14s; background: var(--surface);
}
.lv-opt:hover { border-color: var(--celadon-m); background: var(--celadon-l); }
.lv-opt .l { font-size: 13px; font-weight: 500; display: block; }
.lv-opt .s { font-size: 11px; color: var(--ink-4); font-family: var(--f-mono); }
.lv-opt.on { border-color: var(--celadon); background: var(--celadon); color: #fff; box-shadow: 0 0 0 3px rgba(62,122,99,.14); }
.lv-opt.on .s { color: rgba(255,255,255,.75); }

.score-strip {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; background: var(--celadon-l);
  border: 1px solid var(--celadon-m); border-radius: var(--r-m);
}
.score-strip .k { font-size: 12px; color: var(--celadon-d); }
.score-strip .v { font-family: var(--f-mono); font-size: 21px; font-weight: 600; color: var(--celadon-d); }
.score-strip .sep { width: 1px; height: 26px; background: var(--celadon-m); }

/* ==========================================================================
   AI 对话
   ========================================================================== */
.chat-wrap { display: flex; flex-direction: column; height: 620px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 11px; max-width: 88%; }
.msg .av { width: 30px; height: 30px; border-radius: var(--r-s); flex: 0 0 30px; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; font-family: var(--f-serif); }
.msg.ai .av { background: var(--celadon); color: #fff; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .av { background: var(--cinnabar); color: #fff; }
.bubble { padding: 11px 14px; border-radius: var(--r-m); font-size: 13.5px; line-height: 1.8; }
.msg.ai .bubble { background: var(--paper-2); border: 1px solid var(--line); border-top-left-radius: 3px; }
.msg.me .bubble { background: var(--celadon); color: #fff; border-top-right-radius: 3px; }
.bubble p + p { margin-top: 9px; }
.bubble .q { color: var(--cinnabar); background: var(--cinnabar-l); padding: 1px 4px; border-radius: 3px; }
.msg.me .bubble .q { color: #fff; background: rgba(255,255,255,.2); }
.msg-time { font-size: 10.5px; color: var(--ink-4); margin-top: 5px; }

.chat-input { border-top: 1px solid var(--line); padding: 12px 14px; background: var(--paper-2); }
.chat-input .box { display: flex; gap: 9px; align-items: flex-end; }
.chat-input textarea { flex: 1; border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 9px 12px;
  background: var(--surface); resize: none; min-height: 42px; max-height: 130px; line-height: 1.7; font-size: 13.5px; }
.chat-input textarea:focus { outline: none; border-color: var(--celadon); box-shadow: 0 0 0 3px rgba(62,122,99,.12); }
.quick-asks { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.quick-ask { font-size: 11.5px; padding: 4px 10px; border-radius: var(--r-full);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); transition: all .14s; }
.quick-ask:hover { border-color: var(--celadon); color: var(--celadon-d); background: var(--celadon-l); }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); animation: bl 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes bl { 0%,60%,100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* AI 评分卡 */
.ai-card { border: 1px solid var(--celadon-m); border-radius: var(--r-m); overflow: hidden; background: var(--surface); }
.ai-card .hd { display: flex; align-items: center; gap: 9px; padding: 11px 14px;
  background: var(--celadon-l); border-bottom: 1px solid var(--celadon-m); }
.ai-card .hd .t { font-size: 13px; font-weight: 600; color: var(--celadon-d); }
.ai-card .bd { padding: 13px 14px; }
.ai-dim { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ai-dim:last-child { border-bottom: none; }
.ai-dim .n { width: 68px; flex: 0 0 68px; font-size: 12.5px; }
.ai-dim .b { flex: 1; }
.ai-dim .s { font-family: var(--f-mono); font-size: 13px; font-weight: 600; width: 34px; text-align: right; }
.ai-dim-cmt { margin: -2px 0 7px 78px; font-size: 11.5px; line-height: 1.6; color: var(--muted); }

.fix-item { padding: 10px 12px; border-radius: var(--r-s); background: var(--paper-2);
  border-left: 2px solid var(--ochre); margin-bottom: 8px; }
.fix-item .before { font-size: 12.5px; color: var(--cinnabar); text-decoration: line-through; opacity: .8; }
.fix-item .after { font-size: 12.5px; color: var(--celadon-d); font-weight: 500; margin-top: 3px; }
.fix-item .why { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }

/* ==========================================================================
   手册内容（学生端任务详情）
   ========================================================================== */
.manual-quote {
  background: var(--celadon-d); color: #EAF1EE; border-radius: var(--r-l);
  padding: 22px 24px; position: relative; overflow: hidden;
}
.manual-quote::before {
  content: "「"; position: absolute; right: 14px; top: -14px;
  font-family: var(--f-serif); font-size: 110px; opacity: .07; line-height: 1;
}
.manual-quote .zh { font-family: var(--f-serif); font-size: 17px; line-height: 1.95; letter-spacing: .03em; }
.manual-quote .en { font-size: 12px; opacity: .62; margin-top: 11px; line-height: 1.8; font-style: italic; }
.manual-quote .rd { font-size: 12.5px; opacity: .82; margin-top: 14px; padding-top: 13px;
  border-top: 1px solid rgba(255,255,255,.14); line-height: 1.9; }

.skill-item { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.skill-item:last-child { border-bottom: none; }
.skill-item .no { width: 26px; height: 26px; flex: 0 0 26px; border-radius: var(--r-s);
  background: var(--celadon-l); color: var(--celadon-d); display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; font-family: var(--f-mono); }
.skill-item .nm { font-size: 13.5px; font-weight: 600; }
.skill-item .pt { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.75; }
.skill-item .yi { font-size: 11.5px; color: var(--celadon); margin-top: 5px; font-family: var(--f-serif); letter-spacing: .04em; }

/* ==========================================================================
   Tabs
   ========================================================================== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button {
  padding: 10px 15px; font-size: 13.5px; color: var(--ink-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: all .14s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--celadon-d); border-bottom-color: var(--celadon); font-weight: 500; }

/* ==========================================================================
   任务卡（学生端）
   ========================================================================== */
.task-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 16px 17px; transition: all .16s; text-align: left; width: 100%; display: block;
}
.task-card:hover { border-color: var(--celadon-m); box-shadow: var(--sh-2); transform: translateY(-1px); }
.task-card .no { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-4); letter-spacing: .06em; }
.task-card .nm { font-size: 15px; font-weight: 600; margin-top: 4px; font-family: var(--f-serif); letter-spacing: .02em; }
.task-card .dao { font-size: 12px; color: var(--celadon); margin-top: 5px; font-family: var(--f-serif); }
.task-card .dims { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 11px; }
.task-card .ft { display: flex; align-items: center; gap: 9px; margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* ==========================================================================
   预警 / 提示条
   ========================================================================== */
.alert-row { display: flex; gap: 11px; padding: 12px 14px; border-radius: var(--r-m);
  background: var(--cinnabar-l); border: 1px solid var(--cinnabar-m); }
.alert-row.och { background: var(--ochre-l); border-color: #E8D3A8; }
.alert-row.cel { background: var(--celadon-l); border-color: var(--celadon-m); }
.alert-row .ic { flex: 0 0 18px; }
.alert-row .tx { font-size: 12.5px; line-height: 1.8; }
.alert-row .tx b { font-weight: 600; }

.empty { text-align: center; padding: 52px 20px; color: var(--ink-4); }
.empty .big { font-size: 40px; font-family: var(--f-serif); opacity: .18; }
.empty p { font-size: 13px; margin-top: 10px; }

/* ==========================================================================
   Modal / Drawer
   ========================================================================== */
.mask { position: fixed; inset: 0; background: rgba(28,26,23,.42); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .16s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-3);
  width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column; animation: pop .18s; }
.modal.wide { max-width: 940px; }
.modal.fit-screen { width: 96vw; max-width: 1200px; height: 92vh; max-height: none; border-radius: var(--r-m); }
.modal.fit-screen .modal-body { padding: 18px 22px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15.5px; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; gap: 9px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--paper-2); border-radius: 0 0 var(--r-l) var(--r-l); }
.x-btn { width: 30px; height: 30px; border-radius: var(--r-s); display: grid; place-items: center; color: var(--ink-3); }
.x-btn:hover { background: var(--paper-3); color: var(--ink); }

.toast-zone { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 15px; border-radius: var(--r-s);
  font-size: 13px; box-shadow: var(--sh-3); animation: slid .2s; display: flex; align-items: center; gap: 8px; }
.toast.ok { background: var(--celadon-d); }
.toast.err { background: var(--cinnabar); }
@keyframes slid { from { opacity: 0; transform: translateX(16px); } }

/* ==========================================================================
   图表容器
   ========================================================================== */
.chart-box { width: 100%; }
.chart-box svg { width: 100%; height: auto; }
.fit-chart svg { max-height: 210px; width: auto; max-width: 100%; margin: 0 auto; }
.fit-radar svg { max-height: 260px; width: auto; max-width: 100%; margin: 0 auto; }
.radar-wrap { display: flex; justify-content: center; }
.radar-wrap svg { max-width: 380px; width: 100%; height: auto; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.heat-cell { cursor: pointer; transition: opacity .12s; }
.heat-cell:hover { opacity: .72; }

/* 行为锚点提示 */
.anchor-hint { margin-top: 10px; min-height: 52px; }
.hint-box { background: var(--paper-2); border: 1px solid var(--line); border-left: 3px solid var(--celadon); border-radius: var(--r-s); padding: 10px 12px; }
.hint-box b { display: block; font-size: 12.5px; color: var(--celadon-d); margin-bottom: 5px; }
.hint-box p { font-size: 12px; color: var(--ink-2); line-height: 1.75; margin: 0; }
.anchor-hint .muted { font-size: 12px; }

/* 组长：组间互评四维度网格 */
.peer-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
/* 本组记录页右侧半宽容器内使用紧凑布局：四维度排成两行（2×2） */
.peer-grid--compact { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* 组长：每位组员的评分卡片 */
.member-rate-card .dim-rate { border: none; background: var(--paper-2); margin-bottom: 10px; }
.member-rate-card .dim-rate .dim-head { background: transparent; padding: 10px 12px; }
.member-rate-card .dim-rate .dim-body { padding: 0 12px 12px; }
.member-rate-card .dim-rate .anchor-hint { margin-top: 0; margin-bottom: 10px; }

/* 组长：贡献度滑块 */
.cf-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; background: var(--line); border-radius: 3px; outline: none; }
.cf-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--celadon); cursor: pointer; border: 2px solid var(--surface); box-shadow: var(--sh-1); }
.cf-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--celadon); cursor: pointer; border: 2px solid var(--surface); box-shadow: var(--sh-1); }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .g-sb { grid-template-columns: 1fr; }
  .g-bs { grid-template-columns: 1fr; }
  .g-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 980px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .login-brand { display: none; }
  .login-panel { flex: 1 1 100%; }
}

@media (max-width: 760px) {
  :root { --topbar-h: 54px; }
  .menu-btn { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90;
    transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--sh-3);
  }
  .sidebar.open { transform: translateX(0); }
  .sb-backdrop { position: fixed; inset: 0; background: rgba(28,26,23,.4); z-index: 80; }
  .content { padding: 16px 14px 40px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar h1 { font-size: 15.5px; }
  .g-2, .g-3, .g-4, .g-5 { grid-template-columns: 1fr; }
  .grid { gap: 12px; }
  .lv-picker { grid-template-columns: repeat(2, 1fr); }
  .modal { max-height: 92vh; }
  .mask { padding: 12px; }
  .chat-wrap { height: calc(100vh - var(--topbar-h) - 100px); }
  .msg { max-width: 94%; }
  .search { flex: 1 1 100%; }
  .toolbar { gap: 8px; }
  .card-body { padding: 14px; }
  .login-panel { padding: 32px 20px; }
  .stat .vl { font-size: 23px; }
}

@media (max-width: 420px) {
  .role-grid { grid-template-columns: 1fr; }
  .seg button { padding: 6px 9px; font-size: 12px; }
}

@media print {
  .sidebar, .topbar, .btn, .toolbar { display: none !important; }
  .content { padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ===================== 分组管理（教师建组 / 学生加入） ===================== */
.board { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.roster { width: 300px; flex: 0 0 300px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; }
.roster-head { font-weight: 600; display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.roster-head .cnt { background: var(--celadon-l); color: var(--celadon-d); border-radius: 20px; padding: 1px 9px; font-size: 12px; }
.roster-search .input { width: 100%; padding: 7px 10px; font-size: 13px; }
.roster-list { display: flex; flex-direction: column; gap: 6px; max-height: 62vh; overflow: auto; margin-top: 8px; }
.rchip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: grab; user-select: none; font-size: 13.5px; }
.rchip:hover { border-color: var(--celadon); }
.rchip:active { cursor: grabbing; }
.rchip.grouped { border-color: var(--celadon-m); background: var(--celadon-l); }
.rchip .chk { width: 15px; height: 15px; cursor: pointer; }
.rchip .nm { flex: 1; }
.groups-board { flex: 1; min-width: 280px; display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.group-col { width: 232px; flex: 0 0 232px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); display: flex; flex-direction: column; }
.group-col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.group-col-head .spacer { flex: 1; }
.group-drop { padding: 10px; min-height: 78px; display: flex; flex-direction: column; gap: 6px; }
.group-drop.dragover { background: var(--celadon-l); outline: 2px dashed var(--celadon); outline-offset: -4px; border-radius: 8px; }
.gmember { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--paper-2); border-radius: 6px; font-size: 13.5px; }
.gmember.is-leader { background: var(--ochre-l); }
.gmember .nm { flex: 1; }
.row-acts { display: flex; gap: 8px; }
.lnk { background: none; border: none; color: var(--celadon-d); cursor: pointer; font-size: 12px; padding: 0; }
.lnk.danger { color: var(--cinnabar); }
.drop-hint { color: var(--ink-3); font-size: 12px; text-align: center; padding: 18px 0; border: 1px dashed var(--line); border-radius: 8px; }
.btn-xs { padding: 3px 8px; font-size: 12px; line-height: 1.7; }

/* 学生加入小组 */
.join-wrap { max-width: 900px; margin: 0 auto; }
.join-hero { text-align: center; padding: 22px 16px 8px; }
.join-hero h2 { font-family: var(--f-serif); font-size: 22px; margin: 10px 0 8px; }
.join-badge { display: inline-block; background: var(--cinnabar-l); color: var(--cinnabar); border-radius: 20px; padding: 4px 14px; font-size: 12px; }
.join-card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-block; padding: 3px 9px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 20px; font-size: 12px; }
.callout { background: var(--celadon-l); border: 1px solid var(--celadon-m); border-radius: var(--r-m); padding: 10px 14px; font-size: 13px; }

@media (max-width: 760px) {
  .board { flex-direction: column; }
  .roster { width: 100%; flex: 1 1 auto; }
  .roster-list { max-height: 240px; }
  .groups-board { width: 100%; }
  .group-col { width: 100%; flex: 1 1 auto; }
}
