/* ==========================================================================
   shell.css —— 所有内页共用的左侧图标栏（与工作台完全一致）
   用法：<link rel="stylesheet" href="/static/shell.css">
        <script src="/static/shell.js" defer></script>
   说明：脚本自动注入侧栏、改写顶栏左侧为面包屑，页面本身结构不动。
   ========================================================================== */

body{padding-left:var(--rail-w)}
/* Electron 无边框窗的拖拽条占 32px，侧栏同步下移 */
body.shell{padding-top:32px}
body.shell .rail{top:32px;height:calc(100% - 32px)}

/* ---------------- 左侧图标栏 ---------------- */
.rail{
  position:fixed;left:0;top:0;bottom:0;width:var(--rail-w);z-index:70;
  background:var(--rail-bg);display:flex;flex-direction:column;align-items:center;
  padding:14px 0 12px;gap:6px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",
              "Microsoft YaHei UI","Microsoft YaHei","Noto Sans SC",sans-serif;
  -webkit-user-select:none;user-select:none;
}
.rail .lg{width:36px;height:36px;border-radius:9px;margin-bottom:14px;display:block;
  -webkit-user-drag:none}
.rail a,.rail button{
  width:42px;height:42px;border-radius:11px;display:grid;place-items:center;
  color:var(--rail-ink);text-decoration:none;border:0;background:none;cursor:pointer;
  transition:background .14s,color .14s;position:relative;padding:0;
}
.rail a:hover,.rail button:hover{background:var(--rail-hover);color:var(--rail-ink-on)}
.rail a.on{background:var(--brand);color:#fff;box-shadow:0 4px 12px rgba(var(--brand-rgb),.35)}
.rail a.on:hover{background:var(--brand)}
.rail svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round}
.rail .sp{flex:1}
.rail .sep{width:26px;height:1px;background:var(--rail-line);margin:7px 0;flex:none}
.rail .tt{position:absolute;left:52px;top:50%;transform:translateY(-50%) scale(.96);
  background:var(--rail-tip);color:#fff;font-size:12.5px;padding:5px 9px;border-radius:6px;
  white-space:nowrap;opacity:0;pointer-events:none;transition:.12s;z-index:80;
  box-shadow:0 6px 18px rgba(0,0,0,.28);font-weight:500;letter-spacing:.2px}
.rail a:hover .tt,.rail button:hover .tt{opacity:1;transform:translateY(-50%) scale(1)}
/* 侧栏角标（待办数） */
.rail .bdg{position:absolute;top:3px;right:3px;min-width:16px;height:16px;padding:0 4px;
  border-radius:8px;background:var(--rail-badge);color:#fff;font-size:11px;font-weight:700;
  line-height:16px;text-align:center;box-shadow:0 0 0 2px var(--rail-bg)}

/* ---------------- 顶栏：左侧改面包屑，右侧保留工具与用户 ---------------- */
.topbar .brand,
.topbar .vline,
.topbar .nav{display:none!important}
/* 旧的顶栏工具按钮：授权管理/审批已在「审批中心」，退出已在左栏底部，避免同一功能两处入口 */
.topbar .tools #grtBtn,
.topbar .tools #reqBtn,
.topbar .tools #outBtn{display:none!important}

/* 页面标识（顶栏、设置页 head 共用） */
.pgt{display:flex;align-items:center;gap:9px;flex:none;min-width:0}
.pgt .pi{
  width:29px;height:29px;border-radius:8px;background:var(--brand-soft);flex:none;
  display:grid;place-items:center;
}
.pgt .pi svg{width:16px;height:16px;fill:none;stroke:var(--brand);
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pgt .tx{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.pgt b{font-size:14px;font-weight:660;color:var(--text-strong);letter-spacing:.1px;
  white-space:nowrap}
.pgt small{font-size:11.5px;color:var(--text-3);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;max-width:44vw;display:block}

/* 统一的用户区 */
.topbar .usr{display:flex;align-items:center;gap:8px;flex:none;min-width:0;
  margin-left:4px;padding-left:12px;border-left:1px solid var(--border);
  font-size:13px;color:var(--text-nav);white-space:nowrap}
.topbar .usr b{font-size:13px;font-weight:600;color:var(--text-strong);
  max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar .av,.topbar .avatar{width:27px;height:27px;border-radius:50%;flex:none;
  display:grid;place-items:center;color:#fff;font-size:11.5px;font-weight:650;
  letter-spacing:0;overflow:hidden;line-height:1}

/* 顶栏窄屏收窄 */
@media (max-width:980px){
  .pgt small{display:none}
  .topbar .usr b{max-width:80px}
}


/* ==========================================================================
   主动提醒：左栏铃铛 + 右侧抽屉
   类名统一 rm 前缀 —— 上游 ui.css/board.css 已占用 .ft/.item 等短名，
   本文件再引入 .ft 这类名字会被静默压成 16px，排查极费时。
   ========================================================================== */
.rail .rmbell{position:relative}
.rail .rmbell .bdg{background:var(--rail-badge)}
.rail .rmbell.warn .bdg{background:var(--warn)}
.rail .rmbell.quiet .bdg{display:none}
.rail .rmbell.hot svg{animation:rmPulse 2.4s ease-in-out infinite}
@keyframes rmPulse{0%,100%{opacity:1}50%{opacity:.45}}

.rmmask{position:fixed;inset:0;background:rgba(16,24,40,.34);z-index:120;
  opacity:0;pointer-events:none;transition:opacity .18s}
.rmmask.on{opacity:1;pointer-events:auto}

.rmpanel{position:fixed;top:0;right:0;bottom:0;width:396px;max-width:92vw;z-index:121;
  background:var(--surface);box-shadow:var(--sh-3);display:flex;flex-direction:column;
  transform:translateX(102%);transition:transform .22s cubic-bezier(.22,.7,.3,1);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",
              "Microsoft YaHei UI","Microsoft YaHei","Noto Sans SC",sans-serif;
  color:var(--text);border-left:1px solid var(--border)}
.rmpanel.on{transform:none}

.rmpanel .rmh{display:flex;align-items:center;gap:9px;padding:15px 16px 13px;
  border-bottom:1px solid var(--divider)}
.rmpanel .rmh b{font-size:14.5px;font-weight:650}
.rmpanel .rmh .rmcnt{font-size:11.5px;font-weight:600;padding:2px 8px;border-radius:999px;
  background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}
.rmpanel .rmh .rmcnt.hot{background:var(--danger-soft);color:var(--danger);
  border-color:var(--danger-line)}
.rmpanel .rmh .sp{flex:1}
.rmpanel .rmx{width:28px;height:28px;border:0;background:none;border-radius:7px;
  cursor:pointer;color:var(--text-3);display:grid;place-items:center}
.rmpanel .rmx:hover{background:var(--surface-2);color:var(--text)}
.rmpanel .rmx svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round}

.rmpanel .rmb{flex:1;overflow:auto;padding:10px 12px 16px}
.rmpanel .rmb::-webkit-scrollbar{width:9px}
.rmpanel .rmb::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:5px;
  border:2px solid var(--surface)}

.rmg{border:1px solid var(--border);border-radius:10px;margin-bottom:9px;
  overflow:hidden;background:var(--surface)}
.rmg .rmgt{display:flex;align-items:center;gap:8px;padding:9px 11px;cursor:pointer;
  border-bottom:1px solid var(--divider);background:var(--surface-2)}
.rmg .rmgt:hover{background:var(--surface-3)}
.rmg .rmdot{width:7px;height:7px;border-radius:50%;flex:none}
.rmg.lv-urgent .rmdot{background:var(--danger)}
.rmg.lv-warn .rmdot{background:var(--warn)}
.rmg.lv-info .rmdot{background:var(--brand)}
.rmg .rmgt b{font-size:12.8px;font-weight:640}
.rmg .rmgt .rmn{font-size:11px;font-weight:700;color:#fff;background:var(--text-3);
  border-radius:999px;padding:1px 7px;min-width:18px;text-align:center}
.rmg.lv-urgent .rmgt .rmn{background:var(--danger)}
.rmg.lv-warn .rmgt .rmn{background:var(--warn)}
.rmg.lv-info .rmgt .rmn{background:var(--brand)}
.rmg .rmgt .rmmore{margin-left:auto;font-size:11.5px;color:var(--text-3);white-space:nowrap}

.rmr{display:flex;align-items:baseline;gap:8px;padding:8px 11px;text-decoration:none;
  color:inherit;border-top:1px solid var(--divider);font-size:12.2px}
.rmr:first-of-type{border-top:0}
.rmr:hover{background:var(--brand-soft)}
.rmr .rmno{font-family:ui-monospace,Consolas,monospace;font-size:11.8px;font-weight:640;
  color:var(--text);white-space:nowrap;max-width:150px;overflow:hidden;
  text-overflow:ellipsis;flex:none}
.rmr .rmsub{color:var(--text-3);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.rmr .rmat{color:var(--text-3);font-size:11.5px;white-space:nowrap;flex:none}
.rmg.lv-urgent .rmr .rmat{color:var(--danger);font-weight:600}

.rmpanel .rmf{padding:11px 14px;border-top:1px solid var(--divider);display:flex;
  align-items:center;gap:8px;font-size:11.5px;color:var(--text-3);background:var(--surface-2)}
.rmpanel .rmf .sp{flex:1}
.rmpanel .rmf a{color:var(--brand);text-decoration:none;font-weight:600}
.rmpanel .rmf a:hover{text-decoration:underline}

.rmempty{padding:44px 20px;text-align:center;color:var(--text-3);font-size:12.5px}
.rmempty b{display:block;font-size:14px;color:var(--ok);margin-bottom:6px}
.rmempty .rmok{width:38px;height:38px;border-radius:50%;background:var(--ok-soft);
  display:grid;place-items:center;margin:0 auto 10px}
.rmempty .rmok svg{width:19px;height:19px;fill:none;stroke:var(--ok);stroke-width:2.2;
  stroke-linecap:round;stroke-linejoin:round}
