/* 医共体药械管理平台原型 —— 样式 */
:root {
  --primary: #1A5276;
  --accent: #2E86C1;
  --accent-light: #D6EAF8;
  --surface: #EDF3F8;
  --text: #1C2833;
  --muted: #5D6D7E;
  --line: #D0DDE8;
  --danger: #C0392B;
  --warn: #D4875A;
  --ok: #1E8449;
  --bg: #F4F7FA;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { color: var(--accent); text-decoration: none; cursor: pointer; }

/* ── 登录页 ── */
#login-screen {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(135deg, #14324F 0%, #1A5276 55%, #2E86C1 100%);
  display: flex; align-items: center; justify-content: center;
}
.btn-login {
  width: 100%; height: 42px; margin-top: 26px; border: none; border-radius: 6px;
  background: var(--primary); color: #fff; font-size: 15px; cursor: pointer;
}
.btn-login:hover { background: #21618C; }
.login-tip { margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }

/* ── 应用框架 ── */
#app { display: none; height: 100vh; }
#app.on { display: flex; }
.sidebar {
  width: 220px; background: #16324C; color: #c8d6e4; flex-shrink: 0;
  display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar .brand {
  padding: 18px 16px; color: #fff; font-size: 15px; font-weight: bold;
  border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 8px;
}
.sidebar .brand .dot {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.menu-group { padding: 8px 0; }
.menu-group > .g-title {
  padding: 8px 16px 4px; font-size: 11px; color: #7f9bb5; letter-spacing: 1px;
}
.menu-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px 9px 18px;
  font-size: 13.5px; cursor: pointer; border-left: 3px solid transparent; color: #c8d6e4;
}
.menu-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu-item.active { background: rgba(46,134,193,.25); border-left-color: var(--accent); color: #fff; font-weight: bold; }
.menu-item .badge {
  margin-left: auto; background: var(--danger); color: #fff; border-radius: 8px;
  font-size: 11px; padding: 1px 7px; min-width: 20px; text-align: center;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 54px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 20px; gap: 14px; flex-shrink: 0;
}
.topbar .crumb { font-size: 14px; color: var(--muted); }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.role-switch { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.role-switch select {
  height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px;
  font-size: 13px; color: var(--text); background: #fff; outline: none;
}
.content { flex: 1; overflow-y: auto; padding: 20px 24px 40px; }

/* ── 通用组件 ── */
.page-title { font-size: 18px; font-weight: bold; color: var(--primary); margin-bottom: 4px; }
.page-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 16px 18px; margin-bottom: 16px;
}
.card h3 { font-size: 14.5px; color: var(--primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h3 .more { margin-left: auto; font-weight: normal; font-size: 12.5px; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th {
  background: var(--accent); color: #fff; font-weight: 500; padding: 8px 10px;
  text-align: left; white-space: nowrap;
}
table.grid td { padding: 8px 10px; border-bottom: 1px solid #E8EFF5; vertical-align: middle; }
table.grid tr:hover td { background: #F7FAFD; }
table.grid .num { text-align: right; font-variant-numeric: tabular-nums; }

.tag {
  display: inline-block; border-radius: 4px; padding: 1px 7px; font-size: 11.5px; margin-right: 4px;
  border: 1px solid transparent; white-space: nowrap;
}
.tag.jicai { background: #FDF3E7; color: #9C5A1B; border-color: #EFD9BE; }
.tag.yibao { background: #EAF4FB; color: #1F618D; border-color: #CFE3F2; }
.tag.vbp-n { background: #E8F6EF; color: #1E8449; border-color: #CDEADD; }
.tag.gray { background: #F2F4F6; color: #6B7B8C; border-color: #E1E6EB; }
.tag.orange { background: #FDF3E7; color: #B9770E; border-color: #F0DFC3; }
.tag.red { background: #FBEAE8; color: #922B21; border-color: #F2CFCA; }
.tag.blue { background: #EAF2F8; color: #1A5276; border-color: #CBDCEB; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.status .ico { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.st-doing .ico { background: var(--warn); }
.st-doing { color: #9C5A1B; }
.st-done .ico { background: var(--ok); }
.st-done { color: #1E8449; }
.st-back .ico { background: var(--danger); }
.st-back { color: #922B21; }
.st-wait .ico { background: #AEB6BF; }
.st-wait { color: #5D6D7E; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  border-radius: 6px; padding: 7px 16px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #21618C; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: #2471A3; }
.btn.danger { background: #fff; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: #FBEAE8; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=text], .toolbar select {
  height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px;
  font-size: 13px; outline: none; background: #fff;
}
.toolbar input[type=text] { width: 220px; }
.toolbar .spacer { flex: 1; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.fi label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.fi label .req { color: var(--danger); margin-left: 2px; }
.fi input, .fi select, .fi textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px;
  font-size: 13.5px; outline: none; font-family: inherit;
}
.fi input:focus, .fi select:focus, .fi textarea:focus { border-color: var(--accent); }
.fi textarea { resize: vertical; min-height: 64px; }

.hint-box {
  background: var(--surface); border: 1px dashed var(--accent); border-radius: 6px;
  padding: 10px 14px; font-size: 12.5px; color: var(--primary); margin-top: 8px; line-height: 1.8;
}

/* 工作台 */
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; cursor: pointer;
}
.stat-card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(46,134,193,.12); }
.stat-card .ico {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; flex-shrink: 0;
}
.stat-card .n { font-size: 24px; font-weight: bold; color: var(--primary); line-height: 1.1; }
.stat-card .t { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* 流程进度图 */
.flow-steps { display: flex; align-items: flex-start; overflow-x: auto; padding: 6px 0 2px; }
.fstep { display: flex; flex-direction: column; align-items: center; min-width: 86px; flex: 1; position: relative; }
.fstep .b {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; background: #E5EAEF; color: #8395A7; border: 2px solid #E5EAEF; z-index: 1;
}
.fstep .t { font-size: 11.5px; color: var(--muted); margin-top: 6px; text-align: center; line-height: 1.3; }
.fstep .who { font-size: 10.5px; color: #95A5B6; margin-top: 1px; }
.fstep::before {
  content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: #E5EAEF;
}
.fstep:first-child::before { display: none; }
.fstep.done .b { background: var(--ok); border-color: var(--ok); color: #fff; }
.fstep.done::before { background: var(--ok); }
.fstep.cur .b { background: #fff; border-color: var(--warn); color: var(--warn); box-shadow: 0 0 0 4px #FDF3E7; }
.fstep.cur .t { color: var(--warn); font-weight: bold; }
.fstep.skip .b { opacity: .55; text-decoration: line-through; }

/* 时间线 */
.timeline { border-left: 2px solid var(--line); margin: 8px 0 4px 8px; padding-left: 18px; }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item .dot {
  position: absolute; left: -25px; top: 3px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--accent);
}
.tl-item.back .dot { background: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.tl-item .h { font-size: 13px; font-weight: 600; }
.tl-item .m { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.6; }
.tl-item .time { font-size: 11.5px; color: #95A5B6; margin-top: 2px; }

/* ── 制式表格（A4 镜像） ── */
.sheet-wrap { background: #8C9BAB; padding: 26px 10px; border-radius: 8px; }
.sheet {
  background: #fff; width: 794px; max-width: 100%; margin: 0 auto; padding: 46px 52px 40px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); position: relative; font-size: 13px;
}
.sheet h2 { text-align: center; font-size: 20px; letter-spacing: 2px; color: #000; font-family: "SimSun","STSong",serif; }
.sheet .doc-no { text-align: right; font-size: 12px; color: #333; margin: 6px 0 2px; }
.sheet table.form { width: 100%; border-collapse: collapse; margin-top: 12px; }
.sheet table.form td, .sheet table.form th {
  border: 1px solid #444; padding: 7px 9px; font-size: 13px; color: #111; height: 34px;
}
.sheet table.form .lbl { background: #F5F5F0; width: 96px; white-space: nowrap; font-family: "SimSun",serif; }
.sheet .items-head td { background: #F5F5F0; text-align: center; font-weight: 600; }
.sheet .sign-row td { height: 52px; vertical-align: bottom; padding-bottom: 6px; }
.sheet .foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 16px; }
.sheet .anno-note { border-top: 1px dashed #999; margin-top: 14px; padding-top: 8px; font-size: 12px; }
/* 可批注单元格 */
.cell-anno { position: relative; cursor: pointer; }
.cell-anno:hover { background: #FFF9EC; }
.cell-anno .pin {
  position: absolute; top: -1px; right: -1px; width: 0; height: 0;
  border-left: 12px solid transparent; border-top: 12px solid var(--warn);
}
.sheet-tools { display: flex; align-items: center; gap: 10px; margin: 0 auto 14px; width: 794px; max-width: 100%; }
.sheet-tools .chk { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }

/* 批注弹层 */
.anno-pop {
  position: fixed; z-index: 60; width: 280px; background: #fff; border: 1px solid var(--warn);
  border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 12px; display: none;
}
.anno-pop.on { display: block; }
.anno-pop .ph { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.anno-pop textarea {
  width: 100%; height: 64px; border: 1px solid var(--line); border-radius: 6px; padding: 8px;
  font-size: 12.5px; outline: none; resize: none; font-family: inherit;
}
.anno-pop .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20,40,60,.45); z-index: 50;
  display: none; align-items: center; justify-content: center;
}
.modal-mask.on { display: flex; }
.modal {
  background: #fff; border-radius: 10px; width: 520px; max-width: 92vw; max-height: 86vh;
  overflow-y: auto; padding: 22px 24px;
}
.modal h3 { font-size: 15.5px; color: var(--primary); margin-bottom: 14px; }
.modal .m-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.upload-zone {
  border: 2px dashed var(--line); border-radius: 8px; padding: 26px; text-align: center;
  color: var(--muted); font-size: 13px; cursor: pointer; background: #FAFCFE;
}
.upload-zone:hover { border-color: var(--accent); color: var(--accent); }
.upload-zone .big { font-size: 26px; margin-bottom: 6px; }
.import-preview { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.9; }

/* 预警色块 */
.lv1 { background: #FDF3E7; color: #9C5A1B; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.lv2 { background: #FBE0D4; color: #A04000; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.lv3 { background: #F5B7B1; color: #641E16; border-radius: 4px; padding: 2px 8px; font-size: 12px; font-weight: bold; }

/* 简易柱状图 */
.bars { display: flex; align-items: flex-end; gap: 26px; height: 190px; padding: 10px 6px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-col .bar { width: 60%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent), #5DA7D0); min-height: 6px; }
.bar-col .bar.warn { background: linear-gradient(180deg, var(--warn), #E09A6E); }
.bar-col .v { font-size: 12.5px; font-weight: bold; color: var(--primary); }
.bar-col .n { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* 组织树 */
.tree { font-size: 13.5px; line-height: 2; }
.tree .node { cursor: pointer; padding: 2px 8px; border-radius: 4px; display: inline-block; }
.tree .node:hover { background: var(--surface); }
.tree .node.sel { background: var(--accent-light); color: var(--primary); font-weight: 600; }
.tree .indent1 { padding-left: 26px; }

/* ── 打印样式：只打印制式表格 ── */
@media print {
  body * { visibility: hidden; }
  .sheet, .sheet * { visibility: visible; }
  .sheet {
    position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; padding: 10mm 12mm;
  }
  .sheet-wrap { background: none; padding: 0; }
  .cell-anno:hover { background: transparent; }
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C4D0DA; border-radius: 4px; }

/* ══════════ V2 追加样式 ══════════ */

.mini-bars { display: flex; align-items: flex-end; gap: 8px; height: 84px; padding: 0 4px; flex: 1; }
.mini-bars .mb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.mini-bars .mbar { width: 62%; border-radius: 3px 3px 0 0; background: var(--accent-light); }
.mini-bars .mbar.hot { background: var(--accent); }
.mini-bars span { font-size: 10px; color: #95A5B6; }
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbars .hb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.hbars .hb span { width: 58px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars .track { flex: 1; height: 8px; background: #EDF1F5; border-radius: 4px; overflow: hidden; }
.hbars .fill { height: 100%; background: linear-gradient(90deg, var(--accent), #5DA7D0); border-radius: 4px; }
.hbars .hb b { color: var(--primary); min-width: 18px; }
.hbars.big .hb { font-size: 13px; }
.hbars.big .track { height: 14px; }

/* 采供状态机 */
.stage-chain { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.stg {
  font-size: 11.5px; padding: 3px 9px; border-radius: 4px; background: #F0F3F6; color: #8395A7; white-space: nowrap;
}
.stg.done { background: #E8F6EF; color: #1E8449; }
.stg.cur { background: #FDF3E7; color: #B9770E; font-weight: bold; box-shadow: inset 0 0 0 1px #EFD9BE; }
.stage-chain i { color: #B0BCC8; font-style: normal; font-size: 11px; }

/* 流程图：条件节点菱形 + 触发条件 */
.fstep.cond .b { border-radius: 4px; transform: rotate(45deg); width: 26px; height: 26px; margin: 2px; }
.fstep.cond .b * { transform: rotate(-45deg); }
.fstep.cond .t::after { content: "（超阈值触发）"; font-size: 9.5px; color: #B9770E; display: block; }
.fstep.cond.done .t::after, .fstep.cond.skip .t::after { content: "（未触发/已过）"; color: #95A5B6; }

/* 表格：字号密度 + 斑马纹 + 固定表头 */
table.grid { font-size: 14px; }
table.grid th { position: sticky; top: 0; z-index: 2; }
table.grid tbody tr:nth-child(even) td { background: #FAFCFE; }
table.grid tbody tr:hover td { background: #F2F8FC; }
table.grid td.num { font-weight: 600; font-variant-numeric: tabular-nums; }
.empty-hint { color: var(--muted); text-align: center; padding: 14px 0; }

/* 图例条 */
.legend-bar {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 9px 14px; margin-bottom: 12px;
  font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.legend-bar .lg-t { color: var(--primary); font-weight: bold; }

/* 空状态引导卡 */
.empty-state { text-align: center; padding: 34px 0 26px; }
.empty-state .big { font-size: 40px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 16px; font-size: 13.5px; }

/* 批注悬浮气泡 + 定位闪烁 */
.cell-anno[data-tip] { position: relative; }
.cell-anno[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  background: #3B4754; color: #fff; font-size: 11.5px; line-height: 1.5;
  padding: 7px 11px; border-radius: 6px; white-space: nowrap; max-width: 420px;
  overflow: hidden; text-overflow: ellipsis; z-index: 30; pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.cell-anno.flash { animation: flashCell 1.6s ease; }
@keyframes flashCell {
  0% { background: #FDEBD0; box-shadow: inset 0 0 0 2px var(--warn); }
  60% { background: #FDEBD0; }
  100% { background: #FFF9EC; }
}

/* 企微消息卡片 */
.wx-card { border: 1px solid #E3E8EE; border-radius: 10px; overflow: hidden; background: #F7F8FA; }
.wx-card .wx-app {
  padding: 8px 12px; font-size: 12px; color: var(--muted);
  display: flex; justify-content: space-between; background: #fff; border-bottom: 1px solid #EDF0F4;
}
.wx-card .wx-body { padding: 12px; background: #fff; margin: 8px; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.wx-card .wx-body b { font-size: 13.5px; color: var(--text); display: block; margin-bottom: 5px; }
.wx-card .wx-body p { font-size: 13px; color: var(--text); line-height: 1.6; }
.wx-card .wx-meta { color: #95A5B6; font-size: 11.5px; margin-top: 4px; }
.wx-btns { display: flex; gap: 10px; margin-top: 10px; border-top: 1px solid #F0F2F5; padding-top: 9px; }
.wx-btns span {
  flex: 1; text-align: center; font-size: 12.5px; color: #4A7DB5; cursor: pointer;
}
.wx-btns span:first-child { border-right: 1px solid #F0F2F5; }

/* 页面切换动效 */
#content { animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: .35; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ── V3：考核监测四维看板 ── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.kpi-card h4 {
  font-size: 13.5px; color: var(--primary); padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}
.kpi-row { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.kpi-row span { color: var(--muted); flex: 1; }
.kpi-row b { font-size: 15px; color: var(--primary); font-variant-numeric: tabular-nums; }
.kpi-row b.bad { color: var(--danger); }
.kpi-row i { font-style: normal; font-size: 11px; color: #95A5B6; white-space: nowrap; }

/* ── V3.1：角色全景节点链 ── */
.chain-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.chain-row .chain-name { width: 68px; font-size: 13px; font-weight: bold; color: var(--primary); flex-shrink: 0; }
.chain-row .stage-chain { flex: 1; overflow-x: auto; padding: 2px 0; }
.chain-row .stg { white-space: nowrap; }

/* ── V4：页面水印 ── */
#wm {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr);
  overflow: hidden;
}
#wm span {
  transform: rotate(-22deg); font-size: 13px; font-weight: bold;
  color: rgba(26, 82, 118, .055); white-space: nowrap; text-align: center;
  padding: 30px 20px; user-select: none;
}
@media print { #wm { display: none; } }

/* ── V5：轻量 UI 抛光 ── */
.card { transition: box-shadow .15s ease, border-color .15s ease; }
.card:hover { box-shadow: 0 2px 12px rgba(26, 82, 118, .07); }
table.grid th { font-weight: 600; letter-spacing: .3px; }
.page-title { letter-spacing: .5px; }
.btn { transition: all .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* ── V6：菜单选配标注 ── */
.menu-group > .g-title .m-tag {
  font-size: 9px; background: rgba(255,255,255,.14); color: #9FB6CC;
  border-radius: 3px; padding: 1px 5px; margin-left: 5px; vertical-align: 1px;
}

/* ── V7：机构徽章 / 跨机构打标 / 边界页 ── */
.org-badge {
  background: var(--surface); border: 1px solid var(--line); color: var(--primary);
  border-radius: 6px; padding: 3px 10px; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
}
.org-badge::before { content: ""; font-size: 12px; }
.fstep .cross {
  font-size: 9.5px; color: #1A5276; background: #D6EAF8; border-radius: 3px;
  padding: 0 4px; margin-top: 2px; display: inline-block;
}

/* ══════════ UI 2.0 升级（追加覆盖） ══════════ */

/* 登录页：左右分栏 */
#login-screen { background: #E9EFF4; }
.login-card .logo { display: none; }
.login-card .btn-login { background: linear-gradient(135deg, #1A5276, #2E86C1); }

/* 侧边栏精致化 */
.sidebar .brand {
  background: linear-gradient(120deg, rgba(46,134,193,.28), rgba(46,134,193,.04));
  padding: 16px; font-size: 14.5px; letter-spacing: .5px;
}
.menu-group > .g-title { letter-spacing: 1.2px; padding-left: 18px; }
.menu-item { border-radius: 0 6px 6px 0; margin-right: 8px; }
.menu-item.active {
  background: linear-gradient(90deg, rgba(46,134,193,.32), rgba(46,134,193,.10));
  box-shadow: inset 0 0 0 1px rgba(46,134,193,.25);
}
.sidebar::-webkit-scrollbar-thumb { background: #2A4560; }

/* 顶栏：铃铛 + 头像 */
.bell {
  position: relative; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--muted); margin-left: auto;
}
.bell:hover { border-color: var(--accent); color: var(--accent); }
.bell .tag.orange { position: absolute; top: -8px; right: -10px; padding: 0 6px; font-size: 10.5px; }
.uinfo { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #1A5276, #2E86C1); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold;
}
.uinfo .meta { line-height: 1.25; }
.uinfo .meta b { display: block; font-size: 13px; color: var(--text); }
.uinfo .meta span { font-size: 11px; color: var(--muted); }

/* 全局组件升级 */
.card h3 { position: relative; padding-left: 12px; }
.card h3::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px;
  border-radius: 2px; background: linear-gradient(180deg, var(--accent), #5DA7D0);
}
.card h3 .more { margin-left: auto; padding-left: 12px; }
.btn.primary, .btn.accent {
  background: linear-gradient(135deg, #1A5276, #2E86C1);
  border: none; box-shadow: 0 2px 8px rgba(26,82,118,.25);
}
.btn.accent { background: linear-gradient(135deg, #2E86C1, #5DA7D0); }
.btn.primary:hover, .btn.accent:hover { filter: brightness(1.08); box-shadow: 0 4px 12px rgba(26,82,118,.32); }
table.grid th { background: linear-gradient(180deg, #2E86C1, #2471A3); }
.empty-state .big {
  width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  font-size: 32px; border: 1px solid var(--line);
}

/* Toast 升级 */
#toast { display: flex; align-items: center; gap: 9px; padding: 10px 20px 10px 14px; }
#toast::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7FC8F8; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(127,200,248,.25);
}

/* 返回顶部 */
#backtop {
  position: fixed; right: 26px; bottom: 30px; z-index: 45; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--primary);
  font-size: 16px; cursor: pointer; box-shadow: 0 4px 14px rgba(20,45,70,.15);
  opacity: 0; pointer-events: none; transition: all .2s;
}
#backtop.on { opacity: 1; pointer-events: auto; }
#backtop:hover { background: var(--primary); color: #fff; }

/* 演示动线引导条 */

/* ══════════ UI 3.0 减法改版（大气化） ══════════ */
body { font-size: 15px; }
.page-title { font-size: 20px; letter-spacing: .3px; margin-bottom: 6px; }
.page-sub { font-size: 13px; margin-bottom: 20px; }
.content { padding: 26px 30px 48px; }
.card {
  border: none; border-radius: 10px; padding: 20px 22px; margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(16,40,64,.06), 0 8px 24px rgba(16,40,64,.05);
}
.card h3 { font-size: 15px; }
.card[style*="border-left"], .card[style*="border-color"] {
  border: none !important;
  box-shadow: 0 1px 4px rgba(16,40,64,.06), 0 8px 24px rgba(16,40,64,.05);
}
.stat-card { border: none; border-radius: 10px; box-shadow: 0 1px 4px rgba(16,40,64,.06), 0 8px 24px rgba(16,40,64,.05); }
.stat-card .ico { background: var(--surface) !important; color: var(--primary) !important; border-radius: 10px; }
.stat-card .n { font-size: 28px; font-weight: 700; }
.stat-card .t { font-size: 13px; }
.kpi-card { border: none; border-radius: 10px; box-shadow: 0 1px 4px rgba(16,40,64,.06), 0 8px 24px rgba(16,40,64,.05); }
/* hint 弱化为灰字说明 */
.hint-box {
  background: none; border: none; padding: 10px 2px 0; margin-top: 8px;
  font-size: 12px; color: #8494A4; line-height: 1.8;
}
.hint-box b { color: #6B7B8C; }
/* 表格呼吸感 */
table.grid td { padding: 11px 12px; }
table.grid th { padding: 10px 12px; }
/* 侧栏减重 */
.sidebar .brand { background: none; font-size: 15px; }
.menu-group { padding: 4px 0 10px; }
.menu-group > .g-title { font-size: 10.5px; color: #6E8299; padding: 7px 18px 5px; letter-spacing: 1.2px; }
.menu-item { padding: 8px 16px 8px 18px; font-size: 13.5px; }
/* 引导/图例/关系卡弱化 */
.guide-bar { background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; padding: 8px 14px; }
.legend-bar {
  background: none; border: none; border-top: 1px solid var(--line); border-radius: 0;
  padding: 8px 2px 0; margin: 0 0 16px; font-size: 12px; color: #8494A4;
}
/* 工作台欢迎区与页脚 */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 2px 0 18px; flex-wrap: wrap; }
.hero .h-title { font-size: 24px; font-weight: 700; color: var(--primary); letter-spacing: .5px; }
.hero .h-sub { font-size: 13px; color: var(--muted); margin-top: 7px; }
.hero .h-actions { display: flex; gap: 10px; }
.hero .h-actions .btn { padding: 11px 24px; font-size: 14px; }
.quick-links { display: flex; gap: 24px; font-size: 13px; color: #8494A4; margin: -4px 0 18px; flex-wrap: wrap; }
.quick-links a { color: var(--accent); font-weight: 500; }
/* 页面标题行（大标题 + 右侧主操作） */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .page-title, .page-head .page-sub { margin-bottom: 0; }
.page-head .page-sub { margin-top: 6px; }
.head-actions { display: flex; gap: 10px; padding-bottom: 2px; }
/* 标签柔化 */
.tag.jicai { background: #FBF3E8; color: #8A5A22; border-color: #EEDDC4; }
.tag.red { background: #FBEBE8; color: #8C3A2E; border-color: #EFCFC8; }
.tag.orange { background: #FDF3E8; color: #8A5A22; border-color: #EEDDC4; }
.tag.blue { background: #EEF4F9; color: #1F5A80; border-color: #D8E6EF; }
.tag.vbp-n { background: #EDF7F1; color: #1E6E44; border-color: #D2EADC; }
.tag.gray { background: #F1F4F6; color: #6B7B8C; border-color: #E2E8EC; }
.tag.yibao { background: #EEF4F9; color: #1F5A80; border-color: #D8E6EF; }
.btn { border-radius: 7px; }

/* 列表总数标注 */
.list-total {
  text-align: right; font-size: 12px; color: #8494A4;
  padding: 10px 2px 0; border-top: 1px solid #F0F4F7; margin-top: 6px;
}

/* ══════════ UI 4.0 青橡树主题（模仿 SoybeanAdmin / #646cff） ══════════ */
:root {
  --primary: #646cff;
  --accent: #646cff;
  --accent-light: rgba(100, 108, 255, .12);
  --surface: #F7FAFC;
  --bg: #F7FAFC;
  --text: #1F1F1F;
  --muted: #6B7A8C;
  --secondary: #6B7A8C;
  --line: #E5EAF0;
  --danger: #f5222d;
  --warn: #faad14;
  --ok: #52c41a;
}
body { font-size: 14px; }

/* 侧边栏：浅色 */
.sidebar { background: #fff; color: #3B434D; box-shadow: 2px 0 8px 0 rgb(29 35 41 / .05); border-right: 1px solid #EFF2F6; }
.sidebar .brand { color: #1F1F1F; font-size: 15px; font-weight: 700; background: none; letter-spacing: 0; }
.sidebar .brand .dot { background: #646cff; color: #fff; }
.menu-group > .g-title { color: #9AA6B2; }
.menu-group > .g-title .m-tag { background: rgba(100,108,255,.12); color: #646cff; }
.menu-item { color: #3B434D; }
.menu-item:hover { background: #F5F7FB; color: #646cff; }
.menu-item.active { background: rgba(100,108,255,.10); color: #646cff; border-left-color: #646cff; font-weight: 600; box-shadow: none; }
.menu-item .badge { background: #f5222d; }

/* 顶栏与页脚 */
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #EFF2F6; box-shadow: 0 1px 2px rgb(0 21 41 / .04); }
.topbar .crumb b { color: #1F1F1F; }
.topbar .crumb, .topbar .crumb b { font-size: 13.5px; }
.org-badge { background: rgba(100,108,255,.08); border-color: rgba(100,108,255,.18); color: #646cff; }
.bell:hover { border-color: #646cff; color: #646cff; }
.avatar { background: #646cff; }
.app-footer {
  height: 44px; display: flex; align-items: center; justify-content: flex-end;
  padding: 0 24px; font-size: 12px; color: #9AA6B2; border-top: 1px solid #F0F3F7; background: #fff; flex-shrink: 0;
}

/* Chrome 风多标签栏 */
.tabbar {
  height: 44px; background: #F4F6FA; border-bottom: 1px solid #E9EDF3;
  display: flex; align-items: flex-end; padding: 6px 10px 0; gap: 6px;
  flex-shrink: 0; overflow-x: auto; overflow-y: hidden;
}
.tab {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 8px 8px 0 0; font-size: 13px; color: #5B6672; cursor: pointer;
  background: #ECEFF5; border: 1px solid #E4E9F0; border-bottom: none;
  white-space: nowrap; position: relative; user-select: none;
}
.tab:hover { color: #646cff; }
.tab.on { background: #fff; color: #646cff; font-weight: 600; }
.tab.on::before { content: ""; position: absolute; top: -1px; left: 12px; right: 12px; height: 2px; background: #646cff; border-radius: 2px; }
.tab .x { width: 16px; height: 16px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: #98A3AF; }
.tab .x:hover { background: #E1E6EF; color: #5B6672; }

/* 卡片与标题 */
.card { border-radius: 8px; box-shadow: 0 1px 2px rgb(0 21 41 / .06); padding: 18px 20px; }
.card h3 { font-size: 15px; color: #1F1F1F; }
.card h3::before { background: #646cff; }
.card[style*="border-left"], .card[style*="border-color"] { box-shadow: 0 1px 2px rgb(0 21 41 / .06); }
.page-title { font-size: 24px; color: #1F1F1F; font-weight: 600; }
.page-sub { font-size: 12.5px; }

/* 指标芯片：统一紫蓝 tint */
.stat-card, .kpi-card { border-radius: 8px; box-shadow: 0 1px 2px rgb(0 21 41 / .06); }
.stat-card .ico { background: rgba(100,108,255,.12) !important; color: #646cff !important; }
.stat-card .n { font-size: 22px; font-weight: 700; }
.stat-card .t { font-size: 12px; }
.hero .h-title { font-size: 22px; color: #1F1F1F; }

/* 按钮：实心主色，无渐变 */
.btn { border-radius: 6px; }
.btn.primary { background: #646cff !important; border-color: #646cff !important; box-shadow: none; }
.btn.accent { background: #2080f0 !important; border-color: #2080f0 !important; box-shadow: none; }
.btn.primary:hover { background: #5A5FE8 !important; filter: none; }
.btn.accent:hover { background: #1B6FD0 !important; filter: none; }
.btn.danger { border-color: #f5222d; color: #f5222d; }
.btn.danger:hover { background: #FEF0F0; }
.btn-login { background: #646cff; }

/* 表格：浅头 */
table.grid { font-size: 14px; }
table.grid th { background: #F7FAFC; color: #4B5560; font-weight: 600; box-shadow: inset 0 -1px 0 #E5EAF0; }
table.grid tbody tr:hover td { background: #F9FAFF; }
table.grid tbody tr:nth-child(even) td { background: #FCFDFE; }

/* Tag 换 tone 柔色 */
.tag.jicai  { background: rgba(250,173,20,.12);  color: #B07A0A; border-color: rgba(250,173,20,.25); }
.tag.orange { background: rgba(250,173,20,.12);  color: #B07A0A; border-color: rgba(250,173,20,.25); }
.tag.red    { background: rgba(245,34,45,.08);   color: #C43540; border-color: rgba(245,34,45,.20); }
.tag.blue   { background: rgba(32,128,240,.08);  color: #2064C4; border-color: rgba(32,128,240,.20); }
.tag.vbp-n  { background: rgba(82,196,26,.10);   color: #3E9414; border-color: rgba(82,196,26,.25); }
.tag.gray   { background: #F1F4F6; color: #6B7A8C; border-color: #E2E8EC; }
.tag.yibao  { background: rgba(32,128,240,.08);  color: #2064C4; border-color: rgba(32,128,240,.20); }

/* 流程图/状态链 tone 化 */
.fstep.done .b { background: #52c41a; border-color: #52c41a; }
.fstep.done::before { background: #B9ECA4; }
.fstep.cur .b { border-color: #faad14; color: #faad14; box-shadow: 0 0 0 4px rgba(250,173,20,.12); }
.fstep.cond .t::after { color: #B07A0A; }
.stg.done { background: rgba(82,196,26,.10); color: #3E9414; }
.stg.cur { background: rgba(250,173,20,.14); color: #B07A0A; box-shadow: inset 0 0 0 1px rgba(250,173,20,.35); }
.lv1 { background: rgba(32,128,240,.10); color: #2064C4; }
.lv2 { background: rgba(250,173,20,.16); color: #96700A; }
.lv3 { background: rgba(245,34,45,.10); color: #C43540; }
.status.st-doing { color: #B07A0A; } .status.st-doing .ico { background: #faad14; }
.status.st-done { color: #3E9414; } .status.st-done .ico { background: #52c41a; }
.status.st-back { color: #C43540; } .status.st-back .ico { background: #f5222d; }

/* 图表 tone 化 */
.hbars .fill { background: #646cff; }
.mini-bars .mbar { background: #D9DCF9; }
.mini-bars .mbar.hot { background: #646cff; }
.tl-item .dot { background: #646cff; box-shadow: 0 0 0 1px #646cff; }

/* 登录页：薰衣草 + 波浪 + 居中白卡 */
#login-screen { background: #EFF0FF; display: block; padding: 0; overflow: hidden; }
.login-wave { position: absolute; bottom: -6%; width: 60%; height: 46%; border-radius: 50%; }
.login-wave.w1 { left: -12%; background: #DFE2FF; }
.login-wave.w2 { right: -12%; background: #D6DAFF; }
.login-center { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.login-card2 {
  width: 400px; max-width: 92vw; background: #fff; border-radius: 12px; padding: 34px 36px 28px;
  box-shadow: 0 12px 40px rgb(60 70 120 / .14); text-align: center;
}
.login-card2 .lg-logo {
  width: 56px; height: 56px; border-radius: 14px; background: #646cff; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 12px;
}
.login-card2 h1 { font-size: 21px; color: #1F1F1F; font-weight: 600; margin-bottom: 4px; }
.login-card2 .lg-tag { font-size: 12px; color: #646cff; background: rgba(100,108,255,.08); border-radius: 999px; padding: 4px 12px; display: inline-block; margin-bottom: 18px; }
.login-card2 label { text-align: left; }
.login-card2 .btn-login { background: #646cff; margin-top: 20px; }
.login-card2 .btn-login:hover { background: #5A5FE8; }
.lg-foot { font-size: 12px; color: #7C86C9; text-align: center; line-height: 1.9; position: relative; z-index: 2; }

/* 弹窗/引导 */
.modal { border-radius: 8px; }
.guide-bar { background: rgba(100,108,255,.06); border: 1px solid rgba(100,108,255,.18); color: #4E5AC2; }
.guide-bar a { color: #646cff; }
a { color: #646cff; }
.toolbar input[type=text]:focus, .toolbar select:focus, .fi input:focus, .fi select:focus, .fi textarea:focus { border-color: #646cff; }
#toast { background: #4E54C4; }
#toast::before { background: #B9BEFF; box-shadow: 0 0 0 3px rgba(185,190,255,.25); }
.cell-anno[data-tip]:hover::after { background: #4E54C4; }
.role-switch select:focus { border-color: #646cff; }

/* UI 4.0 补充：六列指标 / 双栏 / 待办条目 / 芯片 */
.m-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1360px) { .m-grid { grid-template-columns: repeat(3, 1fr); } }
.m-grid .stat-card { display: flex; align-items: center; gap: 12px; padding: 16px; cursor: pointer; }
.m-grid .stat-card:hover { box-shadow: 0 3px 10px rgb(60 70 120 / .10); }
.chip {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: rgba(100,108,255,.12); color: #646cff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.two-col { display: flex; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.two-col .card { margin-bottom: 0; }
.todo-item { padding: 10px 12px; border-radius: 8px; cursor: pointer; border: 1px solid #F0F3F8; margin-bottom: 8px; }
.todo-item:hover { border-color: rgba(100,108,255,.35); background: #FAFAFF; }
.todo-item .ti-main { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.todo-item .ti-main b { font-size: 13.5px; color: #1F1F1F; }
.todo-item .ti-main span { font-size: 11px; color: #9AA6B2; font-family: Consolas, monospace; }
.todo-item .ti-meta { font-size: 12px; color: #6B7A8C; margin-top: 3px; }

/* 登录表单控件（修复：card2 输入框未吃到主题样式的问题） */
.login-card2 label { display: block; text-align: left; font-size: 13px; color: #5B6672; margin: 14px 0 6px; }
.login-card2 input {
  width: 100%; height: 42px; border: 1px solid #DFE3EC; border-radius: 8px;
  padding: 0 14px; font-size: 14px; outline: none; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.login-card2 input:focus { border-color: #646cff; box-shadow: 0 0 0 3px rgba(100,108,255,.12); }
.login-card2 .login-tip { margin-top: 16px; font-size: 12px; color: #9AA6B2; text-align: center; }
.login-card2 .btn-login { height: 44px; font-size: 15px; border-radius: 8px; margin-top: 22px; }

/* ── V11：已读回执 / 漏斗 ── */
.read-bar { display: inline-block; width: 86px; height: 8px; border-radius: 999px; background: rgba(128,128,128,.12); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.read-bar .fill { height: 100%; background: #646cff; border-radius: 999px; }
.read-num { font-size: 12px; color: #6B7A8C; font-variant-numeric: tabular-nums; }
.read-num.warn { color: #B07A0A; font-weight: 600; }
.mn-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 7px 10px; border-radius: 6px; border: 1px solid #F0F3F8; }
.mn-row.ok { background: rgba(82,196,26,.06); border-color: rgba(82,196,26,.18); }
.mn-row.ok b { color: #3E9414; font-weight: 500; font-size: 12px; }
.mn-row.no { background: rgba(250,173,20,.07); border-color: rgba(250,173,20,.22); }
.mn-row.no b { color: #B07A0A; font-size: 12px; }
.fun-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.fun-name { width: 110px; font-size: 13px; color: #4B5560; text-align: right; flex-shrink: 0; }
.fun-bar-wrap { flex: 1; }
.fun-bar { height: 38px; border-radius: 6px; display: flex; align-items: center; gap: 12px; padding: 0 14px; color: #fff; min-width: 120px; }
.fun-bar b { font-size: 14px; }
.fun-bar i { font-style: normal; font-size: 11.5px; opacity: .85; }
.fun-time { width: 110px; font-size: 12px; color: #6B7A8C; flex-shrink: 0; }

/* ── V12：导出字段勾选 ── */
.exf-item {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #4B5560;
  background: #F7FAFC; border: 1px solid #E5EAF0; border-radius: 6px; padding: 5px 10px; cursor: pointer;
}
.exf-item:has(input:checked) { background: rgba(100,108,255,.08); border-color: rgba(100,108,255,.3); color: #646cff; }
.exf-item input { accent-color: #646cff; }

/* ═══ 当前停留横幅与脉冲圆点（纯 CSS，无图标） ═══ */
.cur-banner {
  display: flex; align-items: center; gap: 10px;
  background: #E8F6EF; border: 1px solid #BCE3D0; border-left: 4px solid #1E8449;
  border-radius: 8px; padding: 12px 16px; margin-bottom: 14px;
  font-size: 14.5px; color: #14532D; font-weight: 600;
}
.cur-banner.done { background: #F4F6F8; border-color: var(--line); border-left-color: #5D6D7E; color: var(--muted); font-weight: 600; }
.cur-banner.backed { background: #FDF3E7; border-color: #F2D7B6; border-left-color: #B9770E; color: #7E5109; font-weight: 600; }
.pulse-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #1E8449; flex-shrink: 0;
  animation: curPulse 1.8s ease-in-out infinite;
}
@keyframes curPulse {
  0%   { box-shadow: 0 0 0 0 rgba(30, 132, 73, .45); background: #1E8449; }
  50%  { box-shadow: 0 0 0 7px rgba(30, 132, 73, 0); background: #27AE60; }
  100% { box-shadow: 0 0 0 0 rgba(30, 132, 73, 0); background: #1E8449; }
}
.tl-item.cur-mark { background: #F0F9F3; border-radius: 6px; }
.tl-item.cur-mark .dot { background: #1E8449; animation: curPulse 1.8s ease-in-out infinite; }
