/* =========================================================
   虾博士 工作系统 · Editorial AI Workspace
   深蓝黑 · 低饱和冷色 · 局部青蓝高亮 · 极细描边 · 高信息密度

   八条原则(改任何样式前先看一遍):
   1 深色但不死黑   2 科技感来自层级不是发光   3 一屏一个视觉焦点
   4 左对齐优先     5 12 栏栅格贯穿           6 8px 间距体系
   7 状态色只做小面积提示                      8 内容优先,装饰退后
   ========================================================= */
:root {
  /* 背景 */
  --bg: #07121b;
  --bg-2: #0b1823;
  --panel: rgba(12, 28, 40, 0.72);
  --panel-hover: rgba(16, 36, 50, 0.86);
  --panel-solid: #10222f;

  /* 描边:极细,靠明度差分层,不靠阴影 */
  --line: rgba(100, 200, 230, 0.12);
  --line-strong: rgba(90, 215, 245, 0.28);
  --hairline: rgba(120, 180, 210, 0.10);

  /* 高亮 */
  --accent: #00e8f0;
  --accent-2: #69c9f0;
  --accent-deep: #193e5d;

  /* 状态:只做小面积提示 */
  --green: #28c99a;
  --amber: #f2b84b;
  --red: #ff5b64;

  /* 文字:不要所有文字都纯白 */
  --text: rgba(255, 255, 255, 0.95);
  --text-2: rgba(226, 240, 248, 0.78);
  --muted: rgba(196, 218, 232, 0.64);
  --faint: rgba(176, 202, 218, 0.44);

  /* 圆角:四级 + 胶囊,系统需要一点硬度 */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --sidebar-w: 240px;
  --gutter: 40px;

  --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.30);
  --glow: 0 0 24px rgba(0, 225, 240, 0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Alibaba PuHuiTi 3.0", "HarmonyOS Sans SC", "MiSans",
    "Source Han Sans SC", "Noto Sans SC", Inter, "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- 背景纹理:看得到气氛,看不清图案(透明度 3–8%) ---- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 200, 230, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 200, 230, 0.045) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 18% 0%, rgba(25, 62, 93, 0.55), transparent 70%),
    radial-gradient(45% 40% at 90% 8%, rgba(0, 120, 140, 0.18), transparent 72%),
    radial-gradient(70% 50% at 50% 108%, rgba(11, 24, 35, 0.9), transparent 70%);
}

#app { display: flex; min-height: 100vh; }

/* =========================================================
   左侧导航
   ========================================================= */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 12px 16px;
  background: linear-gradient(180deg, rgba(11, 24, 35, 0.92), rgba(7, 18, 27, 0.92));
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 24px; }
.logo {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: linear-gradient(145deg, var(--accent), var(--accent-2) 70%);
  display: grid; place-items: center; font-weight: 700; color: #04222a;
  font-size: 15px; letter-spacing: .5px;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: .2px; }
.brand-sub { color: var(--muted); font-size: 12px; }

nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
nav::-webkit-scrollbar { width: 4px; }
nav::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: var(--r-pill); }

.nav-group {
  margin: 20px 12px 8px; font-size: 11px; font-weight: 500;
  color: var(--faint); letter-spacing: .14em; text-transform: uppercase;
}
.nav-group:first-child { margin-top: 0; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 8px 12px;
  text-align: left; background: transparent; color: var(--text-2);
  border: 1px solid transparent; border-radius: var(--r-sm);
  cursor: pointer; font-size: 14px; font-weight: 400;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
/* 只管功能图标。人像(.person)是整张画满的插画,别被这条压成 18px 线条图。 */
.nav-item svg:not(.person) {
  width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.emp-av .person, .st-av .person { width: 100%; height: 100%; }
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
/* 当前项:亮一级 + 1px 青蓝描边,不整块发光 */
.nav-item.active {
  background: rgba(0, 232, 240, 0.07);
  border-color: rgba(0, 232, 240, 0.30);
  color: var(--text);
}
.nav-item.active .emp-role { color: var(--accent); font-weight: 600; }
.nav-item.active .emp-fn { color: var(--text-2); }

.emp-av {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  color: var(--emp, var(--accent-2));
  background: color-mix(in srgb, var(--emp, #69c9f0) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--emp, #69c9f0) 24%, transparent);
}
.emp-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.emp-role {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.emp-fn {
  font-size: 11.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.user-box {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03); margin-bottom: 8px;
}
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--muted); }
.logout-btn {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: var(--r-xs); padding: 4px 10px; cursor: pointer; font-size: 12px;
  transition: all .16s ease;
}
.logout-btn:hover { color: var(--red); border-color: rgba(255, 91, 100, .45); }
.badge {
  display: inline-block; font-size: 11px; color: var(--muted);
  padding: 4px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
}

/* ---- 移动端顶栏 ---- */
.mobile-bar { display: none; }
.nav-scrim { display: none; }

/* =========================================================
   主内容区
   ========================================================= */
.content {
  flex: 1; min-width: 0;
  padding: 32px var(--gutter) 64px;
  overflow-y: auto; max-height: 100vh;
}
@media (min-width: 1800px) { :root { --gutter: 56px; } }

.view-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 32px;
}
.view-head h1 {
  font-size: 28px; margin: 0; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.25;
}
.view-head p { color: var(--muted); margin: 8px 0 0; font-size: 13px; max-width: 72ch; }

/* ---- 12 栏栅格 ---- */
.grid { display: grid; gap: 20px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1180px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .grid.cols-4, .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
}

/* ---- 卡片:普通卡片不发光 ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  transition: border-color .18s ease, background .18s ease;
}
.card:hover { border-color: var(--line-strong); background: var(--panel-hover); }
.card h3 {
  margin: 0 0 16px; font-size: 13px; color: var(--muted);
  font-weight: 500; letter-spacing: .04em;
}

/* ---- KPI:重点永远是数字 ---- */
.stat {
  display: flex; flex-direction: column; gap: 6px;
  min-height: 104px; justify-content: center;
}
.stat .num {
  font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat .num.doing { color: var(--amber); }
.stat .num.blocked { color: var(--red); }
.stat .num.done { color: var(--green); }
.stat .label { color: var(--muted); font-size: 12.5px; }

/* =========================================================
   表单
   ========================================================= */
label.field { display: block; margin-bottom: 20px; }
label.field > span {
  display: block; margin-bottom: 8px; font-size: 12px;
  color: var(--text-2); font-weight: 500;
}
input, select, textarea {
  width: 100%; padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text); font-size: 13.5px; font-family: inherit;
  transition: border-color .16s ease, background .16s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(0, 232, 240, .45);
  background: rgba(0, 232, 240, 0.05);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
select option { background: var(--panel-solid); color: var(--text); }
.fhint { color: var(--muted); font-size: 11.5px; margin-top: 6px; }
/* 密码框「显示/隐藏」开关 */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 60px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 6px 8px; cursor: pointer;
  color: var(--muted); font-size: 12px; font-family: inherit;
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--accent); outline: none; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 180px; }
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--faint); font-size: 12px; margin: 20px 0;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--hairline);
}

.upload-drop {
  border: 1px dashed var(--line); border-radius: var(--r-sm);
  padding: 24px; text-align: center; color: var(--muted); font-size: 13px;
  transition: all .16s ease;
}
.upload-drop:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .03); }
.upload-ic { font-size: 20px; opacity: .5; display: block; margin-bottom: 8px; }
.upload-link { color: var(--accent); cursor: pointer; }
.rec-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rec-time {
  font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.rec-file { width: auto; padding: 8px; font-size: 12.5px; }

.ptag-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ptag {
  padding: 5px 12px; border-radius: var(--r-pill); font-size: 12.5px;
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  cursor: pointer; transition: all .16s ease;
}
.ptag:hover { border-color: var(--line-strong); }
.ptag.on { background: rgba(0, 232, 240, .12); border-color: rgba(0, 232, 240, .4); color: var(--accent); }
.ptag-input { width: auto; min-width: 160px; flex: 1; }

/* =========================================================
   按钮:一个可视区域只有一个主高亮
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--accent); color: #04222a;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .16s ease; text-decoration: none;
}
.btn:hover { background: #24f0f6; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost {
  background: transparent; color: var(--text-2); border-color: var(--line);
}
.btn.ghost:hover { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, .04); }
.btn.small { padding: 7px 14px; font-size: 12.5px; border-radius: var(--r-xs); }
.pill { border-radius: var(--r-pill); }

/* =========================================================
   列表 / 榜单:所有行同一条垂直基线
   ========================================================= */
.list { display: flex; flex-direction: column; }
.item {
  padding: 16px 4px;
  border-bottom: 1px solid var(--hairline);
  transition: background .16s ease;
}
.list > .item:last-child { border-bottom: none; }
.item:hover { background: rgba(255, 255, 255, 0.02); }
.item-title {
  font-size: 14px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.item-meta {
  color: var(--muted); font-size: 12.5px; margin-top: 4px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.item-meta b { color: var(--text-2); font-weight: 600; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-xs);
  font-size: 11px; color: var(--text-2);
  border: 1px solid var(--hairline); background: rgba(255, 255, 255, .03);
}
.muted { color: var(--muted); }
.empty {
  padding: 40px 24px; text-align: center; color: var(--muted); font-size: 13px;
  border: 1px dashed var(--hairline); border-radius: var(--r-md);
}

/* ---- 看板 ---- */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1180px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .board { grid-template-columns: minmax(0, 1fr); } }
.column {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 16px; min-height: 160px;
}
.column h3 {
  margin: 0 0 12px; font-size: 12.5px; color: var(--text-2);
  font-weight: 500; display: flex; align-items: center; justify-content: space-between;
}
.col-count { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.task-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 8px;
  cursor: grab; transition: border-color .16s ease;
}
.task-card:hover { border-color: var(--line-strong); }
.mtg-owner { color: var(--accent-2); }

/* ---- 标签页 ---- */
.tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--hairline); margin-bottom: 24px;
}
.tab {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 10px 14px; cursor: pointer;
  font-size: 13px; font-family: inherit; transition: all .16s ease;
}
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

/* =========================================================
   对话 / 弹窗 / 反馈
   ========================================================= */
.chat-log { display: flex; flex-direction: column; gap: 12px; max-height: 52vh; overflow-y: auto; }
.msg {
  padding: 12px 16px; border-radius: var(--r-sm); font-size: 13.5px;
  line-height: 1.65; max-width: 82%;
}
.msg.me { align-self: flex-end; background: rgba(0, 232, 240, .12); border: 1px solid rgba(0, 232, 240, .25); }
.msg.ai { align-self: flex-start; background: rgba(255, 255, 255, .04); border: 1px solid var(--hairline); }
.src { color: var(--muted); font-size: 11.5px; margin-top: 6px; }

.modal-mask {
  position: fixed; inset: 0; z-index: 80; display: flex;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(3, 9, 14, .72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.modal {
  width: 100%; max-width: 460px; background: var(--panel-solid);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow);
}
.modal h3 { margin: 0; font-size: 17px; font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 12px);
  padding: 12px 22px; border-radius: var(--r-pill);
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 13px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 90;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255, 91, 100, .5); color: #ffd9db; }

.spinner {
  display: inline-block; width: 13px; height: 13px; vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, .18); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   登录
   ========================================================= */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 400px; padding: 40px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.login-card .logo { width: 44px; height: 44px; border-radius: var(--r-sm); margin-bottom: 24px; }
.login-card h1 { font-size: 22px; margin: 0 0 8px; font-weight: 600; letter-spacing: -0.02em; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 28px; }
.login-card .btn { width: 100%; margin-top: 8px; padding: 13px; }
.login-err { color: var(--red); font-size: 12.5px; min-height: 18px; margin-top: 12px; }

/* =========================================================
   技能 / 设置 / 权限 / 图谱
   ========================================================= */
.skill-card { cursor: pointer; }
.skill-card:hover { border-color: var(--line-strong); }
.settings-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
.perm-wrap { margin-top: 12px; }
.perm-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.perm-box {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  padding: 8px 12px; border: 1px solid var(--hairline); border-radius: var(--r-xs);
  color: var(--text-2); cursor: pointer;
}
.perm-box:hover { border-color: var(--line-strong); }
.perm-box input { width: auto; }
.g-wrap {
  position: relative; width: 100%; height: 72vh; min-height: 420px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden;
}
#g-canvas { display: block; }
.g-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.g-lg { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); }
.g-lg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* =========================================================
   视频知识长文
   ========================================================= */
.vk-article { max-width: 78ch; }
.vk-head { margin-bottom: 24px; }
.vk-head-main { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; }
.vk-title { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.vk-byline { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.vk-summary-tag {
  display: inline-block; font-size: 11px; color: var(--accent);
  border: 1px solid rgba(0, 232, 240, .3); border-radius: var(--r-xs);
  padding: 2px 8px; margin-bottom: 12px;
}
.vk-summary { font-size: 15px; line-height: 1.7; color: var(--text-2); }
.vk-section-title {
  font-size: 12px; color: var(--faint); letter-spacing: .12em;
  text-transform: uppercase; margin: 40px 0 16px;
}
.vk-points { display: flex; flex-direction: column; gap: 12px; }
.vk-point { display: flex; gap: 14px; align-items: flex-start; }
.vk-num {
  font-size: 12px; color: var(--accent-2); font-variant-numeric: tabular-nums;
  min-width: 22px; padding-top: 3px;
}
.vk-point-txt { flex: 1; line-height: 1.65; color: var(--text-2); }
.vk-chapters { display: flex; flex-direction: column; gap: 28px; }
.vk-chapter-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.vk-chapter-body { color: var(--text-2); line-height: 1.75; white-space: pre-wrap; }
.vk-raw { margin-top: 40px; }
.vk-raw-body {
  color: var(--muted); font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap; max-height: 340px; overflow-y: auto;
  border-left: 2px solid var(--hairline); padding-left: 16px;
}

/* =========================================================
   AI 数字员工工位
   ========================================================= */
.staff-bar {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 2px solid var(--emp, var(--accent));
  border-radius: var(--r-md); padding: 20px 24px; margin-bottom: 24px;
}
.st-av {
  width: 48px; height: 48px; border-radius: var(--r-sm); flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
  color: var(--emp, var(--accent-2));
  background: color-mix(in srgb, var(--emp, #69c9f0) 18%, transparent);
}
.st-main { flex: 1; min-width: 0; }
.st-l1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-name { font-weight: 600; font-size: 15px; }
.st-badge {
  font-size: 11px; padding: 3px 10px; border-radius: var(--r-pill);
  color: var(--muted); border: 1px solid var(--hairline);
}
.st-badge.on { color: var(--accent); border-color: rgba(0, 232, 240, .32); }
.st-badge.busy { color: var(--green); border-color: rgba(40, 201, 154, .38); font-weight: 500; }
.st-duty { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.st-chip {
  font-size: 11.5px; padding: 4px 10px; border-radius: var(--r-xs); color: var(--muted);
  border: 1px solid var(--hairline); background: rgba(255, 255, 255, .025);
}
.st-chip b { color: var(--text); font-size: 13px; margin-right: 5px; font-variant-numeric: tabular-nums; }
.st-chip.warn { color: var(--red); border-color: rgba(255, 91, 100, .3); }
.st-chip.warn b { color: var(--red); }
.st-abil {
  font-size: 11px; padding: 4px 10px; border-radius: var(--r-pill);
  color: var(--emp, var(--accent-2));
  background: color-mix(in srgb, var(--emp, #69c9f0) 12%, transparent);
}
.st-acts { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.st-rename {
  background: transparent; border: 1px solid var(--hairline); color: var(--muted);
  border-radius: var(--r-xs); padding: 2px 8px; font-size: 11px; cursor: pointer;
}
.st-rename:hover { color: var(--accent); border-color: var(--line-strong); }

/* 派活面板 */
.st-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 20px; margin-bottom: 24px;
}
.st-chat { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.st-msg { font-size: 13.5px; line-height: 1.65; padding: 10px 14px; border-radius: var(--r-sm); max-width: 88%; }
.st-msg.me { align-self: flex-end; background: rgba(0, 232, 240, .12); border: 1px solid rgba(0, 232, 240, .25); }
.st-msg.ai { align-self: flex-start; background: rgba(255, 255, 255, .04); border: 1px solid var(--hairline); }
.st-steps { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.st-input { display: flex; gap: 8px; margin-top: 16px; }
.st-input input { flex: 1; }

/* 值班设置 */
.duty-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 0; border-top: 1px solid var(--hairline);
}
.duty-on { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.duty-on input { width: auto; }
.duty-desc { flex: 1; min-width: 180px; font-size: 12.5px; color: var(--muted); }
.duty-time { width: 84px; text-align: center; padding: 8px; }
.duty-last { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }

/* =========================================================
   员工头像 + 在忙状态
   ========================================================= */
.emp-av, .st-av { position: relative; }
.person { width: 100%; height: 100%; display: block; --face-bg: #16303f; }
.person .p-head { transform-origin: 20px 26px; }
.emp-av img, .st-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 头像盒子不能 overflow:hidden —— 那会把外圈光圈和状态绿点一起裁掉。
   改成用 clip-path 只裁里面的画面,外面留给光圈。 */
.emp-av .person, .emp-av img { clip-path: inset(0 round 11px); }
.st-av .person, .st-av img { clip-path: inset(0 round var(--r-sm)); }
.emp-av:has(.person), .st-av:has(.person),
.emp-av:has(img), .st-av:has(img) { background: transparent; box-shadow: none; }
.st-av .st-no, .st-av .st-cam { z-index: 2; }
.st-no {
  position: absolute; right: -2px; bottom: -2px; font-style: normal;
  font-size: 10px; font-weight: 600; line-height: 1; padding: 2px 5px;
  border-radius: 6px; background: var(--panel-solid); color: var(--emp, var(--accent));
  border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.st-cam {
  position: absolute; inset: 0; display: grid; place-items: center; font-style: normal;
  font-size: 11px; font-weight: 600; color: var(--text); background: rgba(3, 9, 14, .6);
  opacity: 0; transition: opacity .16s ease; border-radius: inherit;
}
.st-av:hover .st-cam { opacity: 1; }

/* 在忙:一圈光圈在转 + 轻轻点头 + 绿点。装饰退后,只做小面积提示。 */
.emp-av > *, .st-av > * { position: relative; z-index: 1; }
.nav-item.working .emp-av::before,
.staff-bar.working .st-av::before {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; z-index: 0;
  background: conic-gradient(from 0deg, transparent 0deg,
    color-mix(in srgb, var(--emp, #69c9f0) 85%, transparent) 90deg,
    var(--green) 190deg, transparent 300deg);
  animation: emp-halo 2.6s linear infinite;
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.staff-bar.working .st-av::before { inset: -4px; }
@keyframes emp-halo { to { transform: rotate(360deg); } }
@keyframes emp-nod {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30%      { transform: translateY(-1.2px) rotate(-3deg); }
  60%      { transform: translateY(0.6px) rotate(2deg); }
}
@keyframes emp-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: .55; }
}
.nav-item.working .person .p-head, .staff-bar.working .person .p-head,
.nav-item.working .emp-av img, .staff-bar.working .st-av img {
  animation: emp-nod 2.2s ease-in-out infinite;
}
.nav-item.working .emp-av::after, .staff-bar.working .st-av::after {
  content: ""; position: absolute; right: -2px; top: -2px; z-index: 2;
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 2px var(--bg-2);
  animation: emp-dot 1.5s ease-in-out infinite;
}

/* 操作痕迹 */
.st-trace {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 12.5px; color: var(--text-2);
}
.st-tdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--emp, var(--accent-2)); }
.staff-bar.working .st-tdot { background: var(--green); animation: emp-dot 1.5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .nav-item.working .emp-av::before, .staff-bar.working .st-av::before,
  .nav-item.working .person .p-head, .staff-bar.working .person .p-head,
  .nav-item.working .emp-av img, .staff-bar.working .st-av img,
  .nav-item.working .emp-av::after, .staff-bar.working .st-av::after,
  .staff-bar.working .st-tdot, body::after { animation: none; }
}

/* =========================================================
   移动端
   ========================================================= */
@media (max-width: 860px) {
  :root { --gutter: 20px; }
  .mobile-bar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 40; padding: 12px 16px;
    background: rgba(7, 18, 27, .94); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  #app { flex-direction: column; }
  .mnav-btn {
    width: 36px; height: 36px; display: grid; place-items: center;
    background: transparent; border: 1px solid var(--line);
    border-radius: var(--r-xs); color: var(--text-2); cursor: pointer;
  }
  .mnav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
  .mlogo {
    width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
    background: linear-gradient(145deg, var(--accent), var(--accent-2) 70%);
    color: #04222a; font-weight: 700; font-size: 12px;
  }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease;
    width: 268px; height: 100vh;
  }
  .sidebar.open { transform: translateX(0); }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(3, 9, 14, .6); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .nav-scrim.show { opacity: 1; pointer-events: auto; }
  .content { max-height: none; padding-top: 24px; }
  .view-head h1 { font-size: 23px; }
  .staff-bar { flex-wrap: wrap; padding: 16px; }
  .st-acts { flex-direction: row; width: 100%; }
}
