/* ============ 移动端 H5 通用样式（学生端 / 教职工端共用） ============ */
:root {
  --m-primary: #3b5bdb;
  --m-primary-d: #2f4bc0;
  --m-bg: #f4f6fb;
  --m-card: #ffffff;
  --m-text: #1f2733;
  --m-muted: #8a94a6;
  --m-border: #e9edf4;
  --m-danger: #e03131;
  --m-warn: #f08c00;
  --m-ok: #2f9e44;
  --m-radius: 16px;
  --m-nav-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--m-bg); color: var(--m-text); font-size: 15px; line-height: 1.55;
}
.m-app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--m-bg);
  display: flex; flex-direction: column; position: relative; padding-bottom: calc(var(--m-nav-h) + var(--safe-b)); }
.m-topbar { position: sticky; top: 0; z-index: 20; background: linear-gradient(135deg, var(--m-primary), #5c7cfa);
  color: #fff; padding: 14px 16px 12px; display: flex; align-items: center; justify-content: space-between; }
.m-topbar h1 { font-size: 17px; margin: 0; font-weight: 700; }
.m-topbar .sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.m-topbar .avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-size: 15px; }
.m-body { flex: 1; padding: 14px 14px 8px; display: flex; flex-direction: column; }

/* 卡片 */
.m-card { background: var(--m-card); border-radius: var(--m-radius); padding: 16px; box-shadow: 0 4px 18px rgba(30,45,90,.05); margin-bottom: 14px; }
.m-card h3 { margin: 0 0 10px; font-size: 15px; }
.m-muted { color: var(--m-muted); font-size: 13px; }
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.m-grid .item { background: var(--m-card); border-radius: 14px; padding: 12px 6px; text-align: center;
  box-shadow: 0 4px 18px rgba(30,45,90,.05); cursor: pointer; }
.m-grid .item .ico { font-size: 24px; }
.m-grid .item .nm { font-size: 12px; margin-top: 6px; color: var(--m-text); }

/* 按钮 */
.m-btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 600;
  background: var(--m-primary); color: #fff; cursor: pointer; }
.m-btn:active { background: var(--m-primary-d); }
.m-btn.ghost { background: #eef1f8; color: var(--m-primary); }
.m-btn.danger { background: var(--m-danger); }
.m-btn:disabled { opacity: .6; }

/* 底部导航（纯文字，按功能切换；激活项主色 + 顶部指示条） */
.m-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px;
  height: calc(var(--m-nav-h) + var(--safe-b)); background: #fff; border-top: 1px solid var(--m-border);
  display: flex; z-index: 30; padding-bottom: var(--safe-b); }
.m-nav .tab { flex: 1; display: flex; align-items: center; justify-content: center; position: relative;
  color: var(--m-muted); font-size: 14.5px; font-weight: 500; cursor: pointer; }
.m-nav .tab.active { color: var(--m-primary); font-weight: 700; }
.m-nav .tab.active::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 30px; height: 3px; border-radius: 0 0 3px 3px; background: var(--m-primary); }

/* 登录页 */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 20px 16px; background: linear-gradient(160deg, #3b5bdb, #748ffc); position: relative; overflow: hidden; }
.login-wrap::before { content: ""; position: absolute; right: -140px; top: -120px; width: 380px; height: 380px;
  border-radius: 50%; background: radial-gradient(circle at 32% 32%, rgba(255,255,255,.18), rgba(255,255,255,0) 62%); }
.login-wrap::after { content: ""; position: absolute; left: -120px; bottom: -150px; width: 320px; height: 320px;
  border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(255,255,255,.12), rgba(255,255,255,0) 60%); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(15,30,80,.35); position: relative; z-index: 1; }
.login-hero { background: linear-gradient(135deg, var(--m-primary), #5c7cfa); color: #fff; padding: 30px 26px 26px; }
.login-logo { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; letter-spacing: 2px; margin-bottom: 16px; }
.login-hero h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: .5px; }
.login-hero .sub { color: rgba(255,255,255,.85); font-size: 13px; margin: 0; line-height: 1.6; }
.login-feats { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid rgba(255,255,255,.22);
  display: none; gap: 8px; flex-direction: column; }
.login-feats li { font-size: 12.5px; color: rgba(255,255,255,.9); }
.login-form { padding: 24px 22px 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--m-text); margin-bottom: 6px; font-weight: 600; }
.field input { width: 100%; height: 46px; border: 1px solid var(--m-border); border-radius: 12px; padding: 0 14px; font-size: 15px;
  background: #fbfcfe; color: var(--m-text); }
.field input:focus { outline: none; border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }
.field select {
  width: 100%; height: 46px; border: 1px solid var(--m-border); border-radius: 12px;
  padding: 0 36px 0 14px; font-size: 15px; color: var(--m-text); background-color: #fbfcfe; box-sizing: border-box;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3b5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.field select:focus { outline: none; border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }
.field select:disabled { color: var(--m-muted); background-color: #f1f3f8; }
.login-tip { font-size: 12px; color: var(--m-muted); margin: 12px 0 0; line-height: 1.6; }
.login-error { background: #fff0f0; color: var(--m-danger); font-size: 13px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }

/* 统一登录页：身份选择（紧凑分段切换，与输入框等高对齐） */
.identity-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #eef1f7; border: 1px solid var(--m-border); border-radius: 12px; }
.identity-card { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 9px; cursor: pointer;
  background: transparent; border: none; transition: background .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.identity-card:active { transform: scale(.98); }
.identity-card .ic { width: 22px; height: 22px; border-radius: 7px; display: flex; flex: 0 0 auto; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; background: #c2cbe0; transition: background .15s; }
.identity-card .nm { font-size: 14px; font-weight: 600; color: var(--m-muted); transition: color .15s; }
.identity-card .ds { display: none; }
.identity-card.on { background: #fff; box-shadow: 0 1px 4px rgba(20,30,60,.14); }
.identity-card.on .ic { background: linear-gradient(135deg, var(--m-primary), #5c7cfa); }
.identity-card.on .nm { color: var(--m-primary); }
/* 已登录便捷入口链接 */
.goto-link { color: var(--m-primary); font-weight: 600; }

/* 桌面端：登录卡变左右双栏（品牌区 + 表单区） */
@media (min-width: 720px) {
  .login-card { max-width: 780px; display: grid; grid-template-columns: 1fr 1fr; }
  .login-hero { padding: 44px 36px; display: flex; flex-direction: column; }
  .login-feats { display: flex; margin-top: auto; padding-top: 22px; }
  .login-form { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
  .login-form .m-btn { margin-top: 6px; }
}

/* 聊天（按设计稿：状态行 + 消息直接铺在页面背景上；输入条贴底部导航上方） */
#view-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#view-chat .messages { flex: 1; min-height: 0; }
.ai-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 10px; }
.ai-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px;
  background: #fff; border: 1px solid var(--m-border); font-size: 13px; color: var(--m-text); cursor: pointer;
  box-shadow: 0 1px 4px rgba(30,45,90,.04); -webkit-tap-highlight-color: transparent; }
.ai-tab .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ai-tab.active { background: var(--m-primary); border-color: var(--m-primary); color: #fff; font-weight: 600; }
.ai-tab.active .dot { background: #fff !important; }
.chat-status { position: relative; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--m-muted); margin: 0 2px 10px; }
.chat-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #2ec27e; flex: none; }
.messages { overflow-y: auto; padding: 2px 2px 8px; display: flex; flex-direction: column; gap: 13px; }
.msg-wrap { display: flex; flex-direction: column; gap: 5px; max-width: 88%; }
.msg-wrap.bot { align-self: flex-start; }
.msg-wrap.user { align-self: flex-end; }
.msg-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--m-muted); }
.msg-avatar { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #4f66f2, #6a5df0);
  color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.msg { padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.msg.user { background: linear-gradient(135deg, #4f66f2, #6a5df0); color: #fff; border-bottom-right-radius: 5px;
  box-shadow: 0 5px 14px rgba(79,102,242,.28); }
.msg.bot { background: #fff; color: var(--m-text); border-bottom-left-radius: 5px;
  box-shadow: 0 2px 10px rgba(30,45,90,.06); }
/* 等待回复时的「打字中」动画气泡（三个跳动圆点） */
.msg.typing { display: inline-flex; align-items: center; gap: 5px; padding: 15px 16px; min-width: 64px; }
.msg.typing .td { width: 7px; height: 7px; border-radius: 50%; background: #b9c2d8; animation: tdBounce 1.2s infinite ease-in-out; }
.msg.typing .td:nth-child(2) { animation-delay: .15s; }
.msg.typing .td:nth-child(3) { animation-delay: .3s; }
@keyframes tdBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; background: var(--m-primary); } }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 8px; }
.suggest button { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--m-border); background: #fff; color: var(--m-primary); cursor: pointer; }
.composer { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 18px; margin-top: 8px;
  background: #fff; border-radius: 999px; box-shadow: 0 4px 16px rgba(30,45,90,.08); }
.composer input { flex: 1; height: 40px; border: 0; padding: 0; background: transparent; color: var(--m-text); font-size: 14.5px; }
.composer input:focus { outline: none; }
.composer input::placeholder { color: #a4adc2; }
.send-round { width: 42px; height: 42px; border-radius: 50%; border: 0; flex: none; cursor: pointer;
  background: linear-gradient(135deg, #4f66f2, #6a5df0); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 12px rgba(79,102,242,.35); -webkit-tap-highlight-color: transparent; }
.send-round:active { transform: scale(.94); }
/* 学生端聊天：找导员按钮（左侧，点击即触发找导员分流到归属辅导员） */
.human-btn { flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg,#16b8a6,#0e9488); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 4px 10px rgba(13,148,136,.28);
  -webkit-tap-highlight-color: transparent; transition: .15s; }
.human-btn::before { content: none; } /* 「找导员」不带图标，纯文本保证单行 */
.human-btn:active { transform: scale(.96); background: #0b7d72; box-shadow: 0 2px 6px rgba(13,148,136,.3); }

/* 列表 / 表格行 */
.row { display: flex; align-items: center; justify-content: space-between; padding: 13px 4px; border-bottom: 1px solid var(--m-border); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row .t { font-size: 15px; }
.row .d { font-size: 12px; color: var(--m-muted); margin-top: 2px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.g { background: #e7f8ef; color: var(--m-ok); }
.badge.r { background: #fdeaea; color: var(--m-danger); }
.badge.m { background: #eef1f7; color: var(--m-muted); }
.badge.w { background: #fff3e0; color: var(--m-warn); }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(20,30,60,.45); display: none; z-index: 40; }
.drawer-mask.show { display: block; }
.drawer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; height: 86dvh;
  background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.15); transform: translate(-50%, 100%); transition: .25s; z-index: 41; display: flex; flex-direction: column; }
.drawer.show { transform: translate(-50%, 0); }
.drawer-head { padding: 16px 18px; border-bottom: 1px solid var(--m-border); display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.drawer-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.conv { border: 1px solid var(--m-border); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.conv .meta { font-size: 12px; color: var(--m-muted); margin-bottom: 8px; }
.bubble { padding: 8px 12px; border-radius: 10px; margin: 6px 0; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.bubble.u { background: #eaf1ff; }
.bubble.b { background: #f3f5fa; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(20,30,60,.45); display: none; z-index: 50; align-items: center; justify-content: center; }
.modal-mask.show { display: flex; }
.modal { width: 100%; max-width: 340px; background: #fff; border-radius: 16px; padding: 20px; }
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.modal .field { margin-bottom: 12px; }
.modal .actions { display: flex; gap: 10px; margin-top: 6px; }
.modal .actions .m-btn { margin: 0; }
.empty { text-align: center; color: var(--m-muted); padding: 40px 0; font-size: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.stat { background: #f7f9fc; border-radius: 12px; padding: 12px; text-align: center; }
.stat .v { font-size: 20px; font-weight: 700; color: var(--m-primary); }
.stat .l { font-size: 12px; color: var(--m-muted); margin-top: 2px; }
.alert-item { border-left: 3px solid var(--m-danger); background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(30,45,90,.04); }
.alert-item.mid { border-left-color: var(--m-warn); }
.alert-item .meta { font-size: 12px; color: var(--m-muted); margin-bottom: 6px; }
.alert-item .snip { font-size: 14px; background: #fff7f7; border-radius: 8px; padding: 8px 10px; margin: 6px 0; color: #555; }
.toast { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); background: rgba(30,40,60,.9); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 80; opacity: 0; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* ============ 升级组件：组织架构 / 看板 / 问候 / 标签 ============ */
/* 顶部栏副标题（组织架构） */
.m-topbar .org { font-size: 11.5px; opacity: .85; margin-top: 3px; }
.m-topbar .avatar { width: 38px; height: 38px; font-size: 16px; font-weight: 700; }

/* 问候横幅 */
.hero { background: linear-gradient(135deg, #4f66f2, #7a5df0); color: #fff; border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; box-shadow: 0 8px 22px rgba(90,95,242,.28); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-school { font-size: 18px; font-weight: 800; line-height: 1.25; }
.hero h2 { margin: 8px 0 0; font-size: 15px; font-weight: 400; }
.hero p { margin: 6px 0 0; font-size: 13px; opacity: .9; line-height: 1.5; }
.hero .subs { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.hero .subs .chip { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.25); }

/* 标签胶囊 */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eef1f8; color: var(--m-primary); font-size: 12px; }
/* 消息区快捷提问 */
.quick-qs { align-self: flex-start; max-width: 96%; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.quick-qs .qq-title { font-size: 12.5px; color: var(--m-muted); }
.quick-qs .chip.q { cursor: pointer; background: #e9edff; border: 0; color: #4a5cf0; padding: 8px 14px; font-size: 13px; border-radius: 12px; font-weight: 500; }
.quick-qs .chip.q:active { background: #d9e0ff; }
/* 历史问答记录（默认收起，点标题展开） */
.qa-history { align-self: stretch; margin-top: 4px; }

/* 状态栏「聊天记录」入口 + 未读/总数角标 */
.hist-entry { margin-left: auto; border: 1px solid var(--m-border); background: #fff; color: var(--m-primary); font-size: 12px; padding: 3px 11px; border-radius: 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; flex: none; }
.hist-entry:active { transform: scale(.96); background: #f2f6ff; }
.hist-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

/* 聊天记录底部抽屉（收拢历史，避免冲散聊天流） */
.sheet-mask { position: fixed; inset: 0; background: rgba(15,23,42,.42); z-index: 60; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; background: #fff; border-radius: 18px 18px 0 0; max-height: 82vh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .22s ease; box-shadow: 0 -8px 30px rgba(15,23,42,.18); }
.sheet.show { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--m-border); }
.sheet-title { font-size: 15px; font-weight: 700; color: var(--m-text); }
.sheet-close { border: none; background: #f1f3f8; color: var(--m-muted); width: 28px; height: 28px; border-radius: 50%; font-size: 14px; cursor: pointer; }
.sheet-close:active { transform: scale(.94); }
.sheet-body { padding: 12px 14px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-body .qa-sec { margin: 10px 0; }
.sheet-body .empty { text-align: center; color: var(--m-muted); padding: 40px 0; font-size: 13px; }
.qa-esc { background: #fff4f4; border: 1px solid #ffd5d5; color: #c0271f; border-radius: 10px; padding: 9px 11px; font-size: 12.5px; line-height: 1.5; margin: 4px 0 8px; }
.qa-hd { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--m-muted); margin: 6px 0 10px; cursor: pointer; user-select: none; -webkit-user-select: none; }
.qa-hd:active { color: var(--m-primary); }
.qa-hd .qa-line { flex: 1; height: 1px; background: var(--m-border); }
.qa-hd .qa-arrow { font-size: 11px; transition: transform .2s ease; }
.qa-history.open .qa-hd .qa-arrow { transform: rotate(180deg); }
.qa-list { display: none; }
.qa-history.open .qa-list { display: block; }
.qa-item { background: #fff; border: 1px solid var(--m-border); border-radius: 14px; padding: 11px 13px; margin-bottom: 9px; cursor: pointer; }
.qa-item:active { background: #f6f8ff; }
.qa-q { font-size: 13.5px; font-weight: 600; color: var(--m-text); display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.qa-a { font-size: 12.5px; color: var(--m-muted); display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; line-height: 1.55; }
.qa-badge { flex: none; width: 18px; height: 18px; border-radius: 6px; background: #e9edff; color: #4a5cf0; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.qa-badge.a { background: #e7f8ef; color: #0e9f6e; }
.qa-time { font-size: 11px; color: #a6aec2; margin-top: 6px; text-align: right; }
/* 回答反馈：有帮助 / 待改进 */
.qa-fb { display: flex; gap: 8px; margin-top: 9px; }
.qa-btn { flex: 1; border: 1px solid var(--m-border); background: #f7f9fc; color: var(--m-muted); font-size: 12px; padding: 6px 0; border-radius: 9px; cursor: pointer; transition: .15s; line-height: 1; }
.qa-btn:active { transform: scale(.96); }
.qa-btn.on.up, .qa-btn.up.on { background: #e7f8ef; border-color: #b5e6cd; color: #0e9f6e; font-weight: 600; }
.qa-btn.on.down, .qa-btn.down.on { background: #fdeeee; border-color: #f2caca; color: #d0483c; font-weight: 600; }
/* ---- 历史记录：AI 问答 / 辅导员线上对话 两个折叠区块 ---- */
.qa-sec { margin: 12px 0; }
.qa-sec-hd { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--m-muted); margin: 6px 0 8px; cursor: pointer; user-select: none; -webkit-user-select: none; }
.qa-sec-hd:active { color: var(--m-primary); }
.qa-sec-hd .qa-line { flex: 1; height: 1px; background: var(--m-border); }
.qa-sec-hd .qa-arrow { font-size: 11px; transition: transform .2s ease; }
.qa-sec.open .qa-arrow { transform: rotate(180deg); }
.qa-sec-hd .qa-export { flex: none; margin-left: 2px; border: 1px solid var(--m-border); background: #fff; color: var(--m-primary); font-size: 11px; padding: 3px 9px; border-radius: 9px; cursor: pointer; }
.qa-sec-hd .qa-export:active { transform: scale(.96); background: #f2f6ff; }
.qa-sec.open .qa-list { display: block; }

/* 教职工档案抽屉：两类记录默认收起，点标题展开 */
.drawer-sec.ds-sec .ds-hd { cursor: pointer; user-select: none; -webkit-user-select: none; display: flex; align-items: center; gap: 8px; }
.drawer-sec.ds-sec .ds-hd:active { color: var(--m-primary); }
.drawer-sec.ds-sec .ds-count { font-size: 12px; font-weight: 400; color: var(--m-muted); }
.drawer-sec.ds-sec .ds-arrow { font-size: 11px; color: var(--m-muted); transition: transform .2s ease; margin-left: auto; }
.drawer-sec.ds-sec.open .ds-arrow { transform: rotate(180deg); }
.drawer-sec.ds-sec .ds-list { display: none; }
.drawer-sec.ds-sec.open .ds-list { display: block; }
/* 对话折叠卡片（学生端 / 教职工抽屉通用） */
.conv-card { background: #fff; border: 1px solid var(--m-border); border-radius: 14px; margin-bottom: 9px; overflow: hidden; }
.conv-card-hd { display: flex; align-items: center; gap: 8px; padding: 11px 13px; cursor: pointer; user-select: none; -webkit-user-select: none; }
.conv-card-title { flex: 1; font-size: 13px; font-weight: 600; color: var(--m-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-card-time { font-size: 11px; color: #a6aec2; flex: none; }
.conv-card-tag { font-size: 11px; color: #0e9488; background: #e7f8f5; border-radius: 8px; padding: 2px 7px; flex: none; }
.conv-card-arrow { font-size: 11px; color: var(--m-muted); transition: transform .2s ease; flex: none; }
.conv-card.open .conv-card-arrow { transform: rotate(180deg); }
.conv-card-body { display: none; padding: 0 13px 12px; }
.conv-card.open .conv-card-body { display: block; }
.conv-bubble { position: relative; padding: 8px 12px; border-radius: 10px; margin: 7px 0; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.conv-bubble .conv-who { display: block; font-size: 10.5px; color: var(--m-muted); margin-bottom: 3px; }
.conv-bubble.u { background: #eaf1ff; }
.conv-bubble.b { background: #f3f5fa; }
.conv-bubble.a { background: #e7f8f5; border: 1px solid #cdeee8; color: #0b5d54; }
/* 教职工抽屉内导出链接 */
.ds-export { flex: none; margin-left: 2px; font-size: 12px; font-weight: 500; color: var(--m-primary); border: 1px solid var(--m-border); background: #fff; padding: 2px 9px; border-radius: 9px; cursor: pointer; }
.ds-export:active { transform: scale(.96); }
/* 学生端无顶栏：聊天区占满剩余空间 */
body.student .chat-box { height: calc(100dvh - 190px); }
.chip.soft { background: #f1f3f9; color: var(--m-muted); }
.chip.ok { background: #e7f8ef; color: var(--m-ok); }
.chip.warn { background: #fff3e0; color: var(--m-warn); }

/* 看板统计（2 列） */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--m-card); border-radius: 14px; padding: 14px; box-shadow: 0 4px 18px rgba(30,45,90,.05); position: relative; overflow: hidden; }
.stat .v { font-size: 22px; font-weight: 800; color: var(--m-primary); line-height: 1.1; }
.stat .v.r { color: var(--m-danger); } .stat .v.w { color: var(--m-warn); } .stat .v.g { color: var(--m-ok); }
.stat .l { font-size: 12px; color: var(--m-muted); margin-top: 4px; }
.stat .ic { position: absolute; right: 10px; top: 10px; font-size: 18px; opacity: .35; }

/* 区块标题 */
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 10px; }
.sec-title h3 { margin: 0; font-size: 15px; }

/* 组织架构信息卡（学生端「我的」） */
.org-card { background: linear-gradient(135deg, #fff, #f7f9ff); border: 1px solid var(--m-border); border-radius: 14px; padding: 4px 16px; margin-bottom: 14px; }
.org-card .org-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--m-border); }
.org-card .org-row:last-child { border-bottom: 0; }
.org-card .org-k { width: 76px; font-size: 12.5px; color: var(--m-muted); flex: none; }
.org-card .org-v { font-size: 14.5px; font-weight: 600; color: var(--m-text); }
.org-card .org-v.empty { color: var(--m-muted); font-weight: 400; padding: 0; text-align: left; } /* 抵消全局 .empty 的 padding:40px 0 / 居中，否则「未设置」行被撑到 120px+ */
.org-card .org-hint { padding: 10px 0; font-size: 12.5px; color: var(--m-warn); }
/* 资料卡分组小标题（基本信息 / 辅导员） */
.org-card .org-sub { display: flex; align-items: center; gap: 6px; padding: 12px 0 4px; font-size: 12px; font-weight: 700; color: var(--m-primary); letter-spacing: .5px; }
.org-card .org-sub::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--m-border), transparent); }
/* 辅导员未设置的简洁空态 */
.org-card .org-none { padding: 8px 0 12px; font-size: 12.5px; color: var(--m-muted); }

/* 列表项头像 */
.row .ava { width: 36px; height: 36px; border-radius: 50%; background: #eaf1ff; color: var(--m-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none; margin-right: 11px; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-size: 15px; font-weight: 600; }
.row .d { font-size: 12px; color: var(--m-muted); margin-top: 2px; }

/* 管辖范围说明卡（教职工「我的」） */
.juris { background: #f7f9fc; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.juris .t { font-size: 12px; color: var(--m-muted); margin-bottom: 6px; }
.juris .scope { font-size: 15px; font-weight: 700; color: var(--m-text); line-height: 1.5; }
.juris .scope .tag { display: inline-block; background: #eaf1ff; color: var(--m-primary); border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 600; margin: 0 6px 6px 0; }

/* 教职工「我的」页紧凑布局（仅作用于教职工端，不影响学生端） */
.me-view .juris { margin-bottom: 9px; padding: 10px 14px; }
.me-view .juris .t { margin-bottom: 4px; }
.me-view .m-card { padding: 13px 14px; margin-bottom: 9px; }
.me-view .org-card { margin-bottom: 0; padding: 1px 14px; }
.me-view .org-row { padding: 9px 0; }
.me-view .org-k { width: 70px; }
.me-view .sec-title { margin: 1px 1px 8px; }
.me-view .m-btn { margin-bottom: 9px; }

/* 预警页统计条与筛选 chips（教职工端） */
.alert-stats { display: flex; gap: 8px; margin-bottom: 10px; }
.alert-stats .astat { flex: 1; background: #f7f9fc; border-radius: 10px; padding: 8px 0 7px; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; border: 1.5px solid transparent; }
.alert-stats .astat:active { background: #eef1f8; }
.alert-stats .astat.on { border-color: var(--m-primary); background: #eef1ff; }
.alert-stats .astat.on span { color: var(--m-primary); font-weight: 600; }
.alert-stats .astat b { display: block; font-size: 17px; line-height: 1.2; }
.alert-stats .astat span { font-size: 11.5px; color: var(--m-muted); }
.alert-stats .astat.r b { color: var(--m-danger); }
.alert-stats .astat.g b { color: #0e9f6e; }
.alert-filters { display: block; margin-bottom: 10px; }
.alert-filters .af-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.alert-filters .af-row + .af-row { margin-top: 7px; }
.alert-filters .f-chip { border: 1px solid var(--m-border); background: #fff; color: var(--m-muted); font-size: 12px; padding: 5px 11px; border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.alert-filters .f-chip.on { background: var(--m-primary); border-color: var(--m-primary); color: #fff; font-weight: 600; }

/* 桌面端登录卡横向特征（保持原有）已在上方媒体查询处理 */

/* ==================== 应用导航宫格（学生/教职工端） ==================== */
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; padding: 6px 0 4px; }
.app-grid .empty { grid-column: 1 / -1; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app-tile:active .tile-ico { transform: scale(.94); }
.app-tile .tile-ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; transition: transform .15s ease; }
.app-tile .tile-name { font-size: 12px; color: var(--m-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-search { margin-top: 14px; }
.app-search input { width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--m-border);
  background: #f5f7fb; padding: 0 16px; font-size: 13.5px; color: var(--m-text); box-sizing: border-box; }
.app-search input:focus { outline: none; border-color: var(--m-primary); background: #fff; }
/* 应用导航分类胶囊 */
.app-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.app-cats:empty { display: none !important; }
.app-cat { padding: 5px 14px; border-radius: 999px; font-size: 12.5px; color: var(--m-text-2, #667);
  background: #f5f7fb; border: 1px solid var(--m-border); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: all .15s ease; user-select: none; }
.app-cat.on { color: #fff; background: var(--m-primary, #3b5bdb); border-color: var(--m-primary, #3b5bdb); font-weight: 600; }

/* ---------------- 自定义学校选择器（替代原生 select，样式与输入框一致） ---------------- */
.school-select { width: 100%; height: 46px; border: 1px solid var(--m-border); border-radius: 12px;
  padding: 0 14px; font-size: 15px; background: #fff; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--m-text); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.school-select:active { border-color: var(--m-primary); }
.school-select .chev { flex: none; width: 16px; height: 16px; color: var(--m-muted); }
.school-select .ph { color: var(--m-muted); }
.school-select.locked { background: #f2f5fc; border-color: #dfe6f5; color: var(--m-primary); font-weight: 600; }
.school-select.locked .chev { display: none; }

/* ---------------- 选择学校底部弹层 ---------------- */
.sheet-mask { position: fixed; inset: 0; background: rgba(20,30,60,.45); z-index: 70;
  display: none; align-items: flex-end; justify-content: center; }
.sheet-mask.show { display: flex; }
.sheet { width: 100%; max-width: 480px; background: #fff; border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: sheetUp .22s ease; }
@keyframes sheetUp { from { transform: translateY(45%); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.sheet-title { font-size: 15px; font-weight: 700; text-align: center; margin-bottom: 12px; color: var(--m-text); }
.sheet-list { max-height: 46vh; overflow-y: auto; margin-bottom: 12px; }
.sheet-item { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 12px; border-radius: 12px; font-size: 15px; color: var(--m-text);
  -webkit-tap-highlight-color: transparent; }
.sheet-item:active { background: #f2f5fb; }
.sheet-item.active { color: var(--m-primary); font-weight: 600; background: #f2f5fb; }
.sheet-item .check { flex: none; font-weight: 700; }
.sheet .m-btn { margin: 0; }
/* 关键修复：遮罩内嵌面板不要被旧规则 translateY(100%) 推到屏幕外（否则遮罩出现但面板永远不可见） */
.sheet-mask .sheet { transform: none; }

/* ==================== 物品进销存 · 移动端扫码核销浮层 ==================== */
.scan-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(20,28,48,.92);
  display: flex; flex-direction: column; color: #fff; }
.scan-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top)); }
.scan-title { font-size: 16px; font-weight: 700; }
.scan-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16);
  color: #fff; font-size: 16px; cursor: pointer; flex: none; }
.scan-close:active { background: rgba(255,255,255,.28); }
.scan-body { flex: 1; overflow-y: auto; padding: 4px 16px calc(20px + env(safe-area-inset-bottom)); }
.scan-viewfinder { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 46vh; margin: 6px auto 14px;
  background: #000; border-radius: 16px; overflow: hidden; }
.scan-viewfinder video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-reticle { position: absolute; inset: 18%; border: 2px solid rgba(255,255,255,.85); border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.32); }
.scan-reticle::before, .scan-reticle::after { content: ''; position: absolute; width: 22px; height: 22px; border: 3px solid var(--m-primary); }
.scan-reticle::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.scan-reticle::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.scan-hint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 12.5px;
  color: rgba(255,255,255,.85); padding: 0 12px; }
.scan-hint.scanning { color: var(--m-primary); font-weight: 600; }
.scan-actions { display: flex; gap: 10px; }
.scan-actions .m-btn { background: #fff; color: var(--m-text); }
.scan-actions .m-btn.ghost { background: rgba(255,255,255,.14); color: #fff; }
.scan-actions .m-btn:disabled { opacity: .5; }
.scan-manual { display: flex; gap: 10px; margin-top: 12px; }
.scan-manual input { flex: 1; height: 44px; border: 1px solid rgba(255,255,255,.25); border-radius: 12px;
  padding: 0 14px; font-size: 15px; background: rgba(255,255,255,.08); color: #fff; }
.scan-manual input::placeholder { color: rgba(255,255,255,.5); }
.scan-manual input:focus { outline: none; border-color: var(--m-primary); }
.scan-result { margin-top: 14px; }
.scan-result .empty { color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); border-radius: 14px; }
.claim-card { background: #fff; color: var(--m-text); border-radius: 16px; padding: 16px; }
.claim-card__name { font-size: 17px; font-weight: 700; }
.claim-stock { margin: 10px 0 14px; font-size: 14px; }
.claim-stock b { font-size: 18px; }
.claim-card .field { margin-bottom: 12px; }
.claim-card .field input { color: var(--m-text); background: #fbfcfe; }
.scan-claimer { font-size: 12.5px; color: var(--m-muted); margin: 2px 0 4px; }
.claim-ok { text-align: center; background: #fff; color: var(--m-text); border-radius: 16px; padding: 24px 16px; }
.claim-ok__ic { width: 48px; height: 48px; border-radius: 50%; background: #e7f8ef; color: var(--m-ok);
  font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.claim-ok b { color: var(--m-primary); }
.tag.tag--danger { display: inline-block; background: #fdeaea; color: var(--m-danger);
  border-radius: 7px; padding: 1px 7px; font-size: 11px; font-weight: 700; vertical-align: middle; }

/* ---------- 物品领用中心：申请 / 我的申请 / 扫码核销 ---------- */
.inv-tabs-m { display: flex; gap: 6px; padding: 0 16px 10px; }
.inv-tab-m { flex: 1; height: 38px; border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.75); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.inv-tab-m.active { background: var(--m-primary); border-color: var(--m-primary); color: #fff; }
.apply-card, .app-card { background: #fff; color: var(--m-text); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.apply-card__t { font-size: 16.5px; font-weight: 700; }
.apply-card__d { font-size: 12.5px; color: var(--m-muted); margin: 4px 0 12px; }
.apply-card .field { margin-bottom: 12px; }
.apply-card .field label { display: block; font-size: 12.5px; color: var(--m-muted); margin-bottom: 5px; font-weight: 600; }
.apply-card .field input, .apply-card .field select, .apply-card .field textarea {
  width: 100%; border: 1px solid #e2e6f0; border-radius: 10px; padding: 10px 12px; font-size: 14.5px;
  color: var(--m-text); background: #fbfcfe; font-family: inherit; box-sizing: border-box; }
.apply-card .field textarea { resize: vertical; }
.apply-card .field input[readonly] { background: #f1f3f8; color: var(--m-muted); }
.apply-ok { background: #e7f8ef; color: var(--m-ok); border-radius: 12px; padding: 10px 14px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 12px; text-align: center; }
.app-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.app-card__top b { font-size: 15.5px; }
.app-card__row { font-size: 13px; color: var(--m-text); margin: 3px 0; word-break: break-all; }
.app-card__row.muted { color: var(--m-muted); font-size: 12px; }
.app-card .m-btn { width: 100%; margin-top: 10px; }
.mine-tip { font-size: 12px; color: var(--m-muted); margin-top: 8px; }
.mine-loading, .mine-empty { text-align: center; color: rgba(255,255,255,.7); background: rgba(255,255,255,.06);
  border-radius: 14px; padding: 28px 16px; font-size: 14px; line-height: 1.7; }
.mine-empty__ic { font-size: 30px; margin-bottom: 6px; }
.st { display: inline-block; border-radius: 7px; padding: 2px 8px; font-size: 11px; font-weight: 700; flex: none; }
.st-pending { background: #fff4e0; color: #b26a00; }
.st-approved { background: #e7f8ef; color: #0e9f6e; }
.st-rejected { background: #fdeaea; color: var(--m-danger); }
.st-redeemed { background: #e8eefc; color: #2f5bd8; }
.apply-ref { background: #f4f7fe; border-radius: 10px; padding: 10px 12px; font-size: 12.5px;
  color: var(--m-text); line-height: 1.7; margin: 10px 0; }
.scan-warn { background: #fdeaea; color: var(--m-danger); border-radius: 12px; padding: 10px 14px;
  font-size: 12.5px; line-height: 1.7; margin-top: 12px; }

/* ---------- 领用申请表 · 形态优化（R65） ---------- */
.inv-tabs-m { background: rgba(255,255,255,.1); border-radius: 12px; padding: 4px; gap: 4px; }
.inv-tab-m { border: 0; background: transparent; border-radius: 9px; height: 34px; color: rgba(255,255,255,.7); }
.inv-tab-m.active { background: #fff; color: var(--m-primary); box-shadow: 0 2px 6px rgba(0,0,0,.18); }

/* 流程指示：申请 → 审批 → 核销 */
.apply-flow { display: flex; background: #fff; border-radius: 16px; padding: 14px 8px 12px; margin-bottom: 12px;
  box-shadow: 0 4px 18px rgba(30,45,90,.05); }
.apply-flow .step { flex: 1; text-align: center; position: relative; font-size: 11.5px; color: var(--m-muted); line-height: 1.4; }
.apply-flow .step .dot { width: 24px; height: 24px; border-radius: 50%; background: #eef1f8; color: var(--m-muted);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 5px; position: relative; z-index: 1; }
.apply-flow .step.on { color: var(--m-primary); font-weight: 600; }
.apply-flow .step.on .dot { background: var(--m-primary); color: #fff; }
.apply-flow .step.done .dot { background: #e7f8ef; color: var(--m-ok); }
.apply-flow .step::after { content: ''; position: absolute; top: 12px; left: calc(50% + 18px);
  width: calc(100% - 36px); height: 2px; background: #eef1f8; }
.apply-flow .step:last-child::after { display: none; }

/* 申请表单卡片 */
.apply-form { background: #fff; color: var(--m-text); border-radius: 16px; padding: 16px;
  box-shadow: 0 4px 18px rgba(30,45,90,.05); margin-bottom: 16px; }
.apply-form .sec-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px;
  margin-bottom: 4px; justify-content: flex-start; }
.apply-form .field input, .apply-form .field select, .apply-form .field textarea {
  width: 100%; border: 1px solid var(--m-border); border-radius: 11px; padding: 11px 13px; font-size: 15px;
  color: var(--m-text); background: #fbfcfe; font-family: inherit; box-sizing: border-box; outline: none; }
.apply-form .field input:focus, .apply-form .field select:focus, .apply-form .field textarea:focus {
  border-color: var(--m-primary); background: #fff; }
.apply-form .field input[readonly] { background: #f1f3f8; color: var(--m-muted); }
.apply-form .sec-title .bar { width: 4px; height: 15px; border-radius: 2px; background: var(--m-primary); flex: none; }
.apply-form .apply-card__d { margin: 2px 0 14px; }
.apply-form .field { margin-bottom: 14px; }
.apply-form .field label { display: flex; align-items: center; gap: 4px; }
.apply-form .field label .req { color: var(--m-danger); font-weight: 700; }
.apply-form .field select { appearance: none; -webkit-appearance: none;
  background: #fbfcfe url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%238a94a6' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right: 34px; }
.apply-form textarea { min-height: 76px; }

/* 数量步进器 */
.qty-row { display: flex; align-items: center; gap: 10px; }
.qty-row button { width: 40px; height: 42px; flex: none; border: 1px solid var(--m-border); border-radius: 10px;
  background: #fbfcfe; font-size: 19px; color: var(--m-text); cursor: pointer; line-height: 1; }
.qty-row button:active { background: #eef1f8; }
.qty-row input { flex: 1; text-align: center; font-weight: 700; font-size: 16px; }

/* 双列字段 */
.field-2col { display: flex; gap: 10px; }
.field-2col .field { flex: 1; min-width: 0; }

.apply-foot { text-align: center; font-size: 12px; color: var(--m-muted); margin-top: 10px; }
.apply-stock { font-size: 12px; color: var(--m-ok); margin-top: -8px; margin-bottom: 12px; }

/* 我的库存（物品负责人）卡片容器 */
.stock-item { margin-bottom: 12px; }
.stock-item .sec-title { margin: 12px 2px 6px; }
.stock-item .org-card { margin-bottom: 0; }

/* 待我审批（物品负责人手机端审批） */
.appr-list { margin-bottom: 8px; }
.appr-card { background: #fff; border: 1px solid var(--border-strong, #e6e9f0); border-radius: 12px; padding: 12px 13px; margin-bottom: 10px; }
.appr-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.appr-card__top b { font-size: 14.5px; }
.appr-card__row { font-size: 13px; color: #303545; margin: 3px 0; }
.appr-actions { display: flex; gap: 10px; margin-top: 10px; }
.m-btn--sm { height: 34px; padding: 0 16px; font-size: 13px; flex: 1; }
.m-btn--sm.approve { background: var(--m-primary, #2f5bd8); color: #fff; border: 0; }
.m-btn--sm.ghost { background: #fff; color: var(--m-danger, #dc2f3a); border: 1px solid var(--m-danger, #dc2f3a); }

/* 进销存浮层：物品负责人专属「我的库存」入口 */
.scan-stock-btn { margin-left: auto; margin-right: 10px; height: 30px; padding: 0 14px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 13px; cursor: pointer; flex: none; }
.scan-stock-btn:active { background: rgba(255,255,255,.24); }
/* ==================== 公寓评比（移动端） ==================== */
.dorm-items { margin: 4px 0 12px; }
.dorm-cap { font-size: 13px; font-weight: 600; color: var(--m-text); margin: 2px 0 8px; }
.di-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px; background: #f8fafd; border: 1px solid #eef1f7; border-radius: 12px; margin-bottom: 8px; }
.di-info { flex: 1; min-width: 0; }
.di-name { font-size: 14.5px; font-weight: 600; color: var(--m-text); }
.di-meta { font-size: 11.5px; color: var(--m-muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.di-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #eef2fc; color: var(--m-primary); font-size: 10.5px; font-weight: 600; }
.di-ctrl { display: flex; align-items: center; gap: 8px; flex: none; }
.di-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--m-border); background: #fff;
  color: var(--m-primary); font-size: 18px; font-weight: 700; line-height: 1; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
  -webkit-tap-highlight-color: transparent; }
.di-btn:active { background: #eef2fc; border-color: var(--m-primary); }
.di-input { width: 54px; height: 38px; border: 1px solid var(--m-border); border-radius: 10px; text-align: center;
  font-size: 15px; font-weight: 600; color: var(--m-text); background: #fff; box-sizing: border-box;
  appearance: textfield; -moz-appearance: textfield; }
.di-input::-webkit-outer-spin-button, .di-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.di-input:focus { outline: none; border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }
.dorm-submit-bar { position: sticky; bottom: calc(var(--m-nav-h, 56px) + var(--safe-b, 0px) + 8px); z-index: 5; margin: 12px 0 4px; }
.dorm-submit-bar .m-btn { box-shadow: 0 6px 20px rgba(30,45,90,.22); }

.dorm-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-thumb { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--m-border); background: #f2f4f8; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .rm { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: rgba(30,40,60,.78); color: #fff; font-size: 13px; line-height: 20px; text-align: center; cursor: pointer; }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 14px 0 16px; }
.podium .pod { flex: 1; text-align: center; }
.podium .medal { font-size: 26px; line-height: 1; }
.podium .pn { font-size: 13.5px; font-weight: 700; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pb { font-size: 11px; color: var(--m-muted); }
.podium .ps { font-size: 17px; font-weight: 800; color: var(--m-primary); margin-top: 2px; }
.podium .pod-1 .ps { color: #e0a106; }
.podium .pod-1 .pn { font-size: 15px; }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--m-border); }
.rank-row:last-child { border-bottom: 0; }
.rank-row .rk { width: 26px; height: 26px; border-radius: 50%; background: #eef1f7; color: var(--m-muted); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.rank-row.top .rk { background: var(--m-primary); color: #fff; }
.rank-row .rn { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; }
.rank-row .rs { font-size: 16px; font-weight: 800; color: var(--m-primary); }
.rank-row.top .rs { color: #e0a106; }
.rank-row .rc { font-size: 11px; color: var(--m-muted); width: 44px; text-align: right; flex: none; }

.dorm-rec { padding: 12px 2px; border-bottom: 1px solid var(--m-border); }
.dorm-rec:last-child { border-bottom: 0; }
.dorm-rec .meta { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }


/* ---- 公寓评比 · 楼栋/房间点选（R111） ---- */
.dorm-bchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.dbchip { border: 1px solid var(--m-border); background: #fff; color: var(--m-text); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.dbchip.on { background: var(--m-primary); border-color: var(--m-primary); color: #fff; }
.dorm-room-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.rchip { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--m-border); border-radius: 10px; background: #fff; color: var(--m-text); padding: 11px 4px; font-size: 13.5px; font-weight: 600; cursor: pointer; min-width: 0; }
.rchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rchip .rk-done { flex: none; font-size: 11px; font-weight: 700; }
.rchip.on { border-color: var(--m-primary); background: #eef2ff; color: var(--m-primary); box-shadow: 0 0 0 1px var(--m-primary) inset; }
.rchip.done { border-color: var(--m-ok); background: #f0fdf4; color: var(--m-ok); }
.rchip.done.on { border-color: var(--m-ok); background: #dcfce7; color: var(--m-ok); box-shadow: 0 0 0 1px var(--m-ok) inset; }

/* ---- 公寓评比 · 分页与聚焦单间（R112） ---- */
.dorm-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 2px; }
.dorm-pager .m-muted { font-size: 13px; }
.dorm-pager .m-btn { min-width: 76px; }
.dorm-focus-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--m-card); border: 1px solid var(--m-primary); border-radius: 10px; margin-bottom: 8px; }
.dorm-focus-bar .fb-t { font-size: 14px; font-weight: 700; color: var(--m-primary); }

/* ---- 公寓评比 · 预设分值下拉（R114 移动端） ---- */
.di-sel-wrap { width: 100%; }
.dorm-items .di-sel { width: 100%; padding: 9px 10px; border: 1px solid var(--m-border); border-radius: 9px; font-size: 14px; background: #fff; color: var(--m-text); }
.di-def { margin-top: 6px; font-size: 12.5px; color: var(--m-muted); line-height: 1.5; background: var(--m-card); border-radius: 8px; padding: 7px 9px; white-space: pre-wrap; }

/* ---- 公寓评比 · 评分项堆叠布局与聚焦条优化（R115） ---- */
.di-row.has-sel { flex-direction: column; align-items: stretch; gap: 8px; }
.di-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.di-head .di-name { min-width: 0; }
.dorm-items .di-sel { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 32px; }
.di-def.set { color: var(--m-text); background: #eef2ff; }
.dorm-focus-bar .fb-t { flex: 1; min-width: 0; }
.dorm-focus-bar .m-btn { flex: none; width: auto; padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }

/* ---- 监管 · 组织架构筛选 + 标签 + 跟进记录（R116） ---- */
.sup-filter { display: flex; gap: 8px; }
.sup-filter select { flex: 1; min-width: 0; padding: 9px 8px; border: 1px solid var(--m-border); border-radius: 9px; font-size: 13px; background: #fff; color: var(--m-text); }
.sup-search { display: flex; gap: 8px; margin-top: 8px; }
.sup-search input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid var(--m-border); border-radius: 9px; font-size: 14px; }
.stu-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2.5px 7px; border-radius: 999px; line-height: 1.4; }
.tag-focus { background: #e7f0ff; color: #2b59d6; border: 1px solid #c9dcff; }
.tag-alert { background: #fdecec; color: #d6453f; border: 1px solid #f6c9c6; }
.stu-badge { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #f1f3f7; color: var(--m-text); display: inline-flex; align-items: center; }
.stu-badge.warn { background: #fff4e0; color: #c47a08; }
.drawer-sec { border-top: 1px solid var(--m-border); padding: 14px 0; }
.drawer-sec:first-child { border-top: 0; }
.drawer-sec h4 { margin: 0 0 10px; font-size: 14.5px; color: var(--m-text); display: flex; align-items: center; justify-content: space-between; }
.tag-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-edit .tag-chip.cur { cursor: pointer; }
.tag-edit .tag-chip.cur .x { margin-left: 2px; font-weight: 700; }
.tag-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-preset { font-size: 12px; padding: 4px 10px; border: 1px dashed var(--m-border); border-radius: 999px; color: var(--m-text); background: #fff; cursor: pointer; }
.tag-preset.on { background: #e7f0ff; border-color: #2b59d6; color: #2b59d6; }
.tag-add { display: flex; gap: 6px; margin-top: 8px; }
.tag-add input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--m-border); border-radius: 9px; font-size: 13px; }
.fu-list { display: flex; flex-direction: column; gap: 10px; }
.fu-item { border: 1px solid var(--m-border); border-radius: 10px; padding: 10px; background: #fff; }
.fu-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fu-type { font-size: 12px; font-weight: 700; color: #2b59d6; background: #e7f0ff; padding: 2px 8px; border-radius: 6px; }
.fu-meta { font-size: 11.5px; color: var(--m-muted); }
.fu-del { font-size: 12px; color: #d6453f; background: none; border: 0; padding: 2px 4px; }
.fu-content { font-size: 13.5px; color: var(--m-text); margin-top: 6px; line-height: 1.5; white-space: pre-wrap; }
.fu-add textarea { width: 100%; min-height: 64px; border: 1px solid var(--m-border); border-radius: 10px; padding: 9px 10px; font-size: 13.5px; resize: vertical; box-sizing: border-box; }
.fu-add .fu-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.fu-add select { flex: 1; min-width: 0; padding: 8px 8px; border: 1px solid var(--m-border); border-radius: 9px; font-size: 13px; }

/* ---- 小册子（原监管）· 后台风格改版（R117） ---- */
.bk-head { margin: 2px 2px 12px; }
.bk-head-t { font-size: 19px; font-weight: 800; color: #14213d; letter-spacing: -.3px; }
.bk-head-s { font-size: 12.5px; color: #8792ab; margin-top: 2px; }
.bk-card { background: #fff; border: 1px solid #e5e9f2; border-radius: 12px; box-shadow: 0 1px 2px rgba(20,33,61,.05); margin-bottom: 12px; overflow: hidden; }
.bk-card-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #e5e9f2; flex-wrap: wrap; }
.bk-card-title { font-size: 14.5px; font-weight: 600; color: #14213d; flex: none; }
.bk-card-sub { font-size: 11.5px; color: #8792ab; flex: 1; min-width: 0; text-align: right; }
/* 小屏下头部说明文字换行展示，避免与标题/计数挤在一行 */
@media (max-width: 430px) {
  .bk-card-sub { flex-basis: 100%; text-align: left; order: 3; }
  .bk-card-head { gap: 6px 8px; padding: 11px 14px; }
}
.bk-count { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: #eef2fe; color: #2749b3; font-size: 11.5px; font-weight: 700; }
.bk-card-body { padding: 12px 14px; }
.bk-filters { display: flex; gap: 8px; }
.bk-filter { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bk-filter > span { font-size: 11.5px; color: #8792ab; }
.bk-filter select { width: 100%; box-sizing: border-box; padding: 8px 6px; border: 1px solid #d3d9e6; border-radius: 8px; font-size: 12.5px; background: #fff; color: #14213d; }
.bk-searchrow { display: flex; gap: 8px; margin-top: 10px; }
.bk-searchrow input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #d3d9e6; border-radius: 8px; font-size: 13.5px; color: #14213d; }
.bk-searchrow input:focus, .bk-filter select:focus { outline: none; border-color: #2f5bd8; }
.bk-btn { flex: none; padding: 0 14px; border: 1px solid #d3d9e6; border-radius: 8px; background: #fff; color: #4a5878; font-size: 13px; font-weight: 500; }
.bk-btn:active { border-color: #2f5bd8; color: #2f5bd8; }
.bk-kpi { background: #fff; border: 1px solid #e5e9f2; border-radius: 12px; box-shadow: 0 1px 2px rgba(20,33,61,.05); padding: 13px 14px; position: relative; overflow: hidden; }
.bk-kpi-label { font-size: 12px; color: #8792ab; display: flex; align-items: center; gap: 5px; }
.bk-kpi-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c3cde4; }
.bk-kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -.5px; margin-top: 5px; color: #14213d; line-height: 1.15; }
.bk-kpi-value.d { color: #dc2f3a; } .bk-kpi-value.w { color: #b96f00; } .bk-kpi-value.g { color: #17925a; }
.bk-kpi-ic { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; }
.bk-kpi-link { cursor: pointer; -webkit-tap-highlight-color: rgba(47,84,235,.08); transition: transform .12s ease, box-shadow .12s ease; }
.bk-kpi-link:active { transform: scale(.97); }
.bk-kpi-link .bk-kpi-label { color: #2f54eb; }
.bk-kpi-link .bk-kpi-label::before { background: #2f54eb; }
.bk-kpi-arrow { margin-left: auto; font-size: 15px; font-weight: 700; color: #2f54eb; }
.bk-kpi-ic.p { background: #eef2fe; } .bk-kpi-ic.d { background: #fdedee; } .bk-kpi-ic.w { background: #fdf3e2; } .bk-kpi-ic.g { background: #e8f7ef; }
.bk-list { padding: 2px 14px; }
.bk-row { display: flex; align-items: flex-start; gap: 11px; padding: 13px 0; border-bottom: 1px solid #eef1f7; cursor: pointer; }
.bk-row:last-child { border-bottom: 0; }
.bk-ava { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(140deg, #4f7dea, #2f5bd8); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.bk-main { flex: 1; min-width: 0; }
.bk-t { font-size: 14.5px; font-weight: 600; color: #14213d; }
.bk-t .sid { font-size: 12px; color: #8792ab; font-weight: 500; margin-left: 5px; }
.bk-d { font-size: 12px; color: #8792ab; margin-top: 2px; }
.bk-arrow { flex: none; color: #b6bfd3; font-size: 18px; line-height: 36px; }
/* 标签徽标配色对齐后台 tag */
.tag-chip.tag-focus { background: #eef2fe; color: #2749b3; border-color: #dde5fd; }
.tag-chip.tag-alert { background: #fdedee; color: #dc2f3a; border-color: #f8d4d2; }
.stu-badge { background: #f1f3f7; color: #4a5878; }
.stu-badge.warn { background: #fdf3e2; color: #b96f00; }

/* ---------------- 「被呼叫」铃铛 + 下拉 ---------------- */
/* 线性 SVG 图标按钮：与状态行文字同一色系，融入界面而非突兀的 emoji */
.bell-btn { position: relative; margin-left: auto; width: 34px; height: 34px; border: 1px solid #e2e7f1; background: #fff; color: #5a6b8c; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .12s ease, color .12s ease; }
.bell-btn:active { background: #f3f6fc; color: #2f54eb; }
.bell-btn.has-unread { color: #dc2f3a; border-color: #f3c2c6; background: #fdf2f3; }
.bell-btn .bell-badge { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: #dc2f3a; color: #fff; font-size: 11px; line-height: 16px; text-align: center; font-weight: 700; box-shadow: 0 0 0 2px #fff; }
.bell-btn .bell-ic { display: block; }
.bell-dropdown { position: absolute; top: 46px; right: 10px; left: 10px; max-height: 60vh; overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 12px 34px rgba(20,33,61,.18); z-index: 30; padding: 6px; }
.bell-dropdown .cc-item { padding: 11px 12px; border-radius: 10px; cursor: pointer; }
.bell-dropdown .cc-item:active { background: #f3f6fc; }
.bell-dropdown .cc-item-top { display: flex; align-items: center; gap: 6px; }
.bell-dropdown .cc-item-name { font-size: 14px; font-weight: 600; color: #14213d; }
.bell-dropdown .cc-dot { width: 8px; height: 8px; border-radius: 50%; background: #dc2f3a; margin-left: auto; }
.bell-dropdown .cc-item-msg { font-size: 12.5px; color: #5a6b8c; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-dropdown .cc-item-time { font-size: 11px; color: #aab2c5; margin-top: 2px; }
.bell-dropdown .cc-empty { padding: 18px; text-align: center; color: #aab2c5; font-size: 13px; }

/* ---------------- 辅导员双向对话弹层 ---------------- */
.cc-mask { position: fixed; inset: 0; background: rgba(15,23,42,.42); z-index: 60; }
.cc-modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.96); width: min(440px, 92vw); max-height: 84vh; background: #fff; border-radius: 16px; z-index: 61; display: flex; flex-direction: column; overflow: hidden; opacity: 0; transition: opacity .16s ease, transform .16s ease; box-shadow: 0 20px 50px rgba(15,23,42,.28); }
.cc-modal.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.cc-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px; border-bottom: 1px solid #eef1f7; }
.cc-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cc-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(140deg, #16b8a6, #0e9488); color: #fff; display: grid; place-items: center; font-size: 17px; flex: none; }
.cc-title #ccStudent { font-size: 15px; font-weight: 700; color: #14213d; }
.cc-sub { font-size: 12px; color: #8792ab; margin-top: 1px; }
.cc-close { border: 0; background: #f1f3f7; color: #4a5878; width: 30px; height: 30px; border-radius: 50%; font-size: 15px; cursor: pointer; flex: none; }
/* 弹层消息区：flex 纵向布局，用户消息靠右收窄、客服/辅导员消息靠左，避免全宽挤压 */
.cc-messages { flex: 1; min-height: 0; overflow: auto; padding: 14px; background: #f6f8fc; display: flex; flex-direction: column; gap: 10px; }
.cc-messages .msg-wrap { max-width: 86%; margin: 0; }
.cc-messages .msg-wrap.user { align-items: flex-end; }
.cc-messages .msg-wrap.user .msg { width: max-content; max-width: 82%; border-bottom-right-radius: 5px; padding: 10px 14px; font-size: 14.5px; }
.cc-messages .msg-wrap.bot .msg, .cc-messages .msg-wrap.agent .msg { width: max-content; max-width: 86%; padding: 10px 13px; font-size: 14px; line-height: 1.6; }
.cc-composer { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid #eef1f7; }
.cc-composer input { flex: 1; border: 1px solid #e2e7f1; border-radius: 20px; padding: 10px 14px; font-size: 14px; outline: none; }
.cc-composer .send-round { flex: none; }

/* agent（辅导员）消息气泡：左侧，青绿主题，与学生/AI 区分 */
.msg-wrap.agent { display: flex; flex-direction: column; align-items: flex-start; margin: 8px 0; }
.msg-wrap.agent .msg-meta { font-size: 11.5px; color: #6b7a99; margin-bottom: 3px; display: flex; align-items: center; gap: 6px; }
.msg-wrap.agent .msg-avatar.cc { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(140deg, #16b8a6, #0e9488); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.msg-wrap.agent .agent-name { color: #0e9488; font-weight: 700; }
.msg-wrap.agent .msg { max-width: 78%; background: linear-gradient(135deg, #14b8a6, #0d9488); color: #fff; border: none; border-radius: 14px 14px 14px 4px; padding: 9px 13px; font-size: 14px; line-height: 1.5; word-break: break-word; box-shadow: 0 2px 6px rgba(13, 148, 136, .22); }
/* 智能体消息的「智能体」小标签：与真人辅导员明确区分 */
.ai-tag { flex: none; font-size: 10px; font-weight: 700; color: #4f6ef2; background: #eef1fe; border: 1px solid #ccd4fb; border-radius: 4px; padding: 0 4px; line-height: 15px; }
/* 转接阶段分隔条：划分「智能体问答」与「辅导员真人对话」两个阶段 */
.counselor-divider { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; font-size: 11.5px; font-weight: 700; color: #0e9488; white-space: nowrap; }
.counselor-divider .cd-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #a9dfd8); min-width: 12px; }
.counselor-divider .cd-line:last-child { background: linear-gradient(90deg, #a9dfd8, transparent); }
.counselor-divider.ended { color: #9aa5b8; font-weight: 600; }
.counselor-divider.ended .cd-line { background: linear-gradient(90deg, transparent, #d4dbe6); }
.counselor-divider.ended .cd-line:last-child { background: linear-gradient(90deg, #d4dbe6, transparent); }
/* 「辅导员已接入」横幅内的结束按钮 */
.counselor-banner .cb-text { flex: 1; min-width: 0; }
.counselor-banner .cb-end-btn { flex: none; margin-left: auto; border: 1px solid #0e9488; color: #0e9488; background: #fff; border-radius: 14px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; }
.counselor-banner .cb-end-btn:active { background: #e7f8f5; }
/* 导员弹层头部「结束会话」按钮 */
.cc-head .cc-end { border: 1px solid #e5484d; color: #e5484d; background: #fff; border-radius: 14px; padding: 4px 10px; font-size: 12px; font-weight: 700; margin-left: auto; }

/* ---------------- 学生端「辅导员已接入」横幅 ---------------- */
.counselor-banner { margin: 8px 12px 0; padding: 9px 12px; border-radius: 10px; background: linear-gradient(135deg, #e7f8f5, #eaf3fe); color: #0b5d54; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; border: 1px solid #cdeee8; }

/* ---------------- 聊天内嵌图表（AI 输出的统计/分析图表） ---------------- */
.cchart-list { margin: 6px 0 2px; display: flex; flex-direction: column; gap: 10px; }
.cchart { background: #fff; border: 1px solid #eef1f6; border-radius: 12px; padding: 10px 12px; box-shadow: 0 2px 8px rgba(31, 41, 71, .06); }
.cchart-title { font-size: 12.5px; font-weight: 700; color: #1f2b4a; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.cchart-title::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: #4f6ef2; }
.cchart-box { width: 100%; overflow-x: auto; }
.cchart-box svg { display: block; max-width: 100%; height: auto; }

/* ---- 敏感词预警配置（R155：默认收拢 + 角色新增权限开关） ---- */
.sens-card { padding-bottom: 12px; }
.sens-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.sens-head .sec-title h3 { margin: 0; }
.sens-toggle { flex: none; border: 1px solid var(--m-border, #e9edf4); background: #f7f9fc; color: var(--m-primary, #3b5bdb); border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 600; cursor: pointer; }
.sens-toggle .sens-chev { display: inline-block; margin-left: 2px; }
.sens-hint { font-size: 11.5px; margin: 10px 0 2px; line-height: 1.6; }
.sens-toolbar { display: flex; justify-content: flex-end; margin: 10px 0 4px; }
.sens-add-btn { border: 0; background: #eef2ff; color: var(--m-primary, #3b5bdb); border-radius: 9px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sens-form { margin-top: 10px; padding: 12px; background: #f8fafd; border: 1px solid var(--m-border, #e9edf4); border-radius: 12px; }
.sens-form .field { margin-bottom: 10px; }
.sens-form .control { height: 38px; border: 1px solid var(--m-border, #e9edf4); border-radius: 9px; padding: 0 10px; background: #fff; display: flex; align-items: center; }
.sens-form .control input, .sens-form .control select { width: 100%; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--m-text, #1f2b4a); }
.sens-cfg { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--m-border, #e9edf4); }
.sens-cfg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sens-cfg-t { font-size: 13px; font-weight: 700; }
.sens-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 8px; margin: 12px 0; }
.sens-role { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 7px 9px; border: 1px solid var(--m-border, #e9edf4); border-radius: 9px; background: #fff; cursor: pointer; min-width: 0; }
.sens-role input { flex: none; width: 15px; height: 15px; accent-color: var(--m-primary, #3b5bdb); }
.sens-role span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sens-role input:disabled { opacity: .5; }
.sens-save { border: 0; background: var(--m-primary, #3b5bdb); color: #fff; border-radius: 9px; padding: 9px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; width: 100%; }
/* 移动端开关（style.css 后台版本不随 H5 加载，这里补一份） */
.switch { position: relative; display: inline-block; width: 38px; height: 21px; cursor: pointer; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #c8cfdd; border-radius: 999px; transition: background .18s; }
.switch .slider::before { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s; }
.switch input:checked + .slider { background: var(--m-primary, #3b5bdb); }
.switch input:checked + .slider::before { transform: translateX(17px); }
