/* ============================================================
   工作流平台 · 统一视觉样式  v2
   设计原则：
   1. 一个页面里只有一种"卡片"、一种"表格"、一种"按钮"；
   2. 颜色只表达语义与层级（品牌 / 状态 / 强调），不做无意义装饰；
   3. 全部为原生 CSS，零第三方依赖；保留 v1 全部类名，功能零回归。
   ============================================================ */
:root {
  /* 文字 */
  --ink: #16232f;
  --ink-2: #415468;
  --muted: #8494a5;
  /* 线条 */
  --line: #e4eaf1;
  --line-2: #eff3f8;
  /* 背景与容器 */
  --bg: #f4f7fa;
  --bg-2: #eaf0f6;
  --card: #ffffff;
  /* 品牌：teal 单色系 */
  --brand: #0f8a7e;
  --brand-ink: #0b6b62;
  --brand-deep: #07564f;
  --brand-soft: #e8f8f4;
  --brand-ring: rgba(15, 138, 126, .16);
  /* 语义色 */
  --warn: #b45309;
  --bad: #c0261f;
  --review: #6d28d9;
  --run: #1d4ed8;
  /* 形状与质感 */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-1: 0 1px 2px rgba(16, 34, 54, .04);
  --shadow-2: 0 2px 4px rgba(16, 34, 54, .03), 0 10px 28px rgba(16, 34, 54, .06);
  --shadow-hover: 0 4px 8px rgba(16, 34, 54, .05), 0 18px 40px rgba(16, 34, 54, .10);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 380px at 12% -8%, #e6f4f1 0%, transparent 62%),
    radial-gradient(900px 320px at 100% 0%, #eef1fb 0%, transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 14px/1.65 "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand-ink); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--brand); text-decoration: underline; }
code {
  background: #eef3f6; color: var(--brand-deep);
  padding: 2px 6px; border-radius: 5px; font-size: 12px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
::selection { background: var(--brand-ring); }

/* ---------- 页头 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  padding: 11px 26px;
  background: linear-gradient(115deg, #0c1725 0%, #14283a 46%, #103a37 100%);
  color: #fff;
  box-shadow: 0 4px 22px rgba(8, 22, 36, .22);
}
.topbar::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 30%, rgba(20, 184, 166, .10) 78%, transparent 100%);
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; flex: 0 0 auto; position: relative; z-index: 1; }
.brand:hover { text-decoration: none; }
.brand .mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #2dd4bf, #0f9c8f);
  color: #05332e; font-weight: 800; font-size: 14px; letter-spacing: .3px;
  box-shadow: 0 3px 10px rgba(20, 184, 166, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand .btext { font-size: 15.5px; font-weight: 700; letter-spacing: .4px; }
.brand em { font-style: normal; font-weight: 400; font-size: 10.5px; color: #93a9bd; margin-left: 9px; letter-spacing: .5px; }

.find { display: flex; gap: 0; flex: 1 1 320px; max-width: 500px; position: relative; z-index: 1; }
.find input[type=search] {
  flex: 1; min-width: 0; padding: 9px 14px; border: 1px solid #30475a; border-right: 0;
  border-radius: 9px 0 0 9px; background: rgba(255, 255, 255, .08); color: #fff;
  font: inherit; outline: none; transition: background .18s var(--ease), border-color .18s var(--ease);
}
.find input[type=search]::placeholder { color: #9db2c4; }
.find input[type=search]:focus { background: rgba(255, 255, 255, .14); border-color: #2dd4bf; }
.find button {
  padding: 9px 18px; border: 1px solid #14b8a6; border-radius: 0 9px 9px 0;
  background: linear-gradient(135deg, #14b8a6, #0f9c8f); color: #05332e;
  font: inherit; font-weight: 700; cursor: pointer;
  transition: filter .18s var(--ease);
}
.find button:hover { filter: brightness(1.08); }
.find.big { max-width: none; margin: 8px 0 4px; }
.find.big input[type=search] {
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 9px 0 0 9px;
}
.find.big input[type=search]::placeholder { color: var(--muted); }
.find.big button { border-radius: 0 9px 9px 0; }

.topright { margin-left: auto; display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.online {
  font-size: 12px; color: #b9f3e8; background: rgba(20, 184, 166, .12);
  border: 1px solid rgba(45, 212, 191, .32); padding: 4px 11px; border-radius: 999px;
  white-space: nowrap;
}
.who { font-size: 12px; color: #c2d3e0; white-space: nowrap; }
.exit {
  font-size: 12px; color: #e6eef5; border: 1px solid #3a5266;
  padding: 5px 12px; border-radius: 8px; transition: all .18s var(--ease);
}
.exit:hover { background: rgba(255, 255, 255, .12); border-color: #5a7388; color: #fff; text-decoration: none; }

/* ---------- 导航：按用途分组 ---------- */
.nav {
  position: sticky; top: 57px; z-index: 25;
  display: flex; flex-wrap: wrap; gap: 5px 24px; align-items: center;
  padding: 9px 26px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(16, 34, 54, .03);
}
.ng { display: flex; align-items: center; gap: 2px; }
.nglabel { font-size: 10.5px; color: var(--muted); letter-spacing: 1.5px; margin-right: 7px; text-transform: uppercase; font-weight: 600; }
.nl {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2);
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.nl:hover { background: #f0f7f5; color: var(--brand-ink); text-decoration: none; transform: translateY(-1px); }
.nl.active {
  background: linear-gradient(135deg, var(--brand-soft), #dcf5ee);
  color: var(--brand-deep); font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(15, 138, 126, .16);
}
.nl .dot {
  font-style: normal; font-size: 10px; line-height: 1; font-weight: 700;
  background: #ef4444; color: #fff; border-radius: 999px; padding: 2px 5px;
  box-shadow: 0 1px 4px rgba(239, 68, 68, .4);
}

/* ---------- 变更提示条 ---------- */
.pulse { display: none; }
.pulse.on {
  display: flex; align-items: center; gap: 10px;
  margin: 12px auto 0; max-width: 1180px;
  padding: 9px 18px; border-radius: 10px;
  background: linear-gradient(90deg, #fff7ed, #fffbf4);
  border: 1px solid #fed7aa; border-left: 3px solid #f59e0b;
  color: #92400e; font-size: 13px; box-shadow: var(--shadow-1);
  animation: pulseIn .35s var(--ease);
}
@keyframes pulseIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pulse.on strong { color: #9a3412; }
.pulse.on .ptext { flex: 1; color: #a16207; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 主体 ---------- */
.wrap { max-width: 1180px; margin: 24px auto 0; padding: 0 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-2);
  position: relative;
  animation: cardIn .4s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
h1 {
  font-size: 21px; margin: 0 0 6px; letter-spacing: .2px; font-weight: 700;
  background: linear-gradient(100deg, var(--ink), var(--brand-deep));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
h2 {
  font-size: 15px; margin: 4px 0 12px; padding-left: 11px;
  border-left: 3px solid var(--brand); color: var(--ink); font-weight: 700; line-height: 1.4;
}
h1 .sub { font-weight: 400; }
.sub { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin: 0 0 12px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; color: var(--ink-2); }
.empty {
  color: var(--muted); font-size: 13px; padding: 22px 14px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius-sm); background: #fbfdfe;
}

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line-2); padding: 10px 12px; text-align: left; vertical-align: middle; }
th {
  background: #f7f9fc; color: var(--ink-2); font-weight: 700; font-size: 12px;
  letter-spacing: .3px; position: sticky; top: 0; z-index: 2;
  border-bottom: 1px solid var(--line);
}
th:first-child { border-radius: var(--radius-sm) 0 0 0; }
th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
tbody tr { transition: background .14s var(--ease); }
tbody tr:hover td, tr:hover td { background: #f6fbfa; }
tbody tr:last-child td { border-bottom: 0; }
td .sub { margin: 0; display: inline; }
.ts { width: 100px; white-space: nowrap; }
.nm { width: 128px; }
.sc { width: 100px; white-space: nowrap; }

/* ---------- 状态徽标 ---------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  border: 1px solid transparent; white-space: nowrap; font-weight: 600; line-height: 1.5;
}
.badge.ok { color: #0b5a55; background: #e4f9f1; border-color: #b3ecdc; }
.badge.run { color: #1e40af; background: #edf3ff; border-color: #c9d9fe; }
.badge.warn { color: #92400e; background: #fff7e6; border-color: #fbe2a0; }
.badge.review { color: #5b21b6; background: #f5f0ff; border-color: #ded6fe; }
.badge.bad { color: #9f1239; background: #fff0f3; border-color: #fbd0d9; }
.badge.info { color: #0b5a55; background: var(--brand-soft); border-color: #c4efe3; }
.badge.muted { color: #64748b; background: #f2f5f8; border-color: #e4e9ef; }

/* ---------- 指标卡 ---------- */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 12px; margin: 6px 0 18px; }
.metric {
  background: linear-gradient(160deg, #ffffff 0%, #f8fbfa 100%);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  box-shadow: var(--shadow-1); position: relative; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.metric::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #2dd4bf, var(--brand));
}
.metric:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.metric .n { font-size: 26px; font-weight: 800; color: var(--brand-deep); line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric .t { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- 表单 ---------- */
input[type=text], input[type=date], input[type=search], input[type=number], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d6dfe9; border-radius: 9px;
  font: inherit; background: #fff; color: var(--ink);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
input[type=password] {
  padding: 9px 12px; border: 1px solid #d6dfe9; border-radius: 9px; font: inherit;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input[type=password]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
label { display: block; font-size: 12.5px; color: var(--ink-2); margin: 10px 0 5px; font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 9px; border: 1px solid var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-ink)); color: #fff;
  cursor: pointer; font: inherit; font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 138, 126, .22);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease);
}
.btn:hover {
  filter: brightness(1.06); transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(15, 138, 126, .3); text-decoration: none; color: #fff;
}
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: #fff; color: var(--brand-ink); box-shadow: none;
  border-color: rgba(15, 138, 126, .35);
}
.btn.ghost:hover { background: var(--brand-soft); box-shadow: none; color: var(--brand-deep); }
.btn.danger { background: #fff; color: var(--bad); border-color: #f3c9c5; box-shadow: none; }
.btn.danger:hover { background: #fff2f1; color: #a51f19; box-shadow: none; }
.btn.mini { padding: 4px 10px; font-size: 12px; border-radius: 7px; font-weight: 600; box-shadow: none; }
.lnk { font-size: 12.5px; }

/* ---------- 消息条 ---------- */
.msg {
  padding: 11px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13px;
  border: 1px solid transparent; box-shadow: var(--shadow-1);
  animation: pulseIn .3s var(--ease);
}
.msg.err { background: #fff2f2; border-color: #f6cfcc; border-left: 3px solid #e5484d; color: #9f1239; }
.msg.ok { background: #e9f9f2; border-color: #b8ecdc; border-left: 3px solid var(--brand); color: #0b5a55; }
.viewers {
  margin: 0 0 12px; font-size: 12.5px; color: #92400e;
  background: #fff8e6; border: 1px solid #fbe2a0; border-left: 3px solid #f59e0b;
  border-radius: 9px; padding: 7px 12px;
}

/* ---------- 键值 / 日志 / 网格 ---------- */
.kv { display: grid; grid-template-columns: 132px 1fr; gap: 9px 16px; font-size: 13px; }
.kv .k { color: var(--muted); }
.log { font-size: 12px; color: var(--ink-2); padding: 5px 0; border-bottom: 1px dashed var(--line-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.chkbox { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 8px 0 4px; }
.chk { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; font-weight: 400; }
.chk input { width: auto; accent-color: var(--brand); }

/* ---------- 标签与分类导航 ---------- */
.tag {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  background: #f1f5f8; color: var(--ink-2); margin-right: 6px; font-weight: 600;
}
.tag.lock { background: #fff8e6; color: var(--warn); border: 1px solid #fbe2a0; }
.tag.ok { background: var(--brand-soft); color: var(--brand-ink); border: 1px solid #b3ecdc; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.5px;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); text-decoration: none; transform: translateY(-1px); }
.chip i { font-style: normal; font-size: 11px; color: var(--muted); }
.chip.off { color: var(--muted); background: #f7f9fb; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.tab {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px;
  color: var(--ink-2); background: #fff; transition: all .16s var(--ease);
}
.tab.on { background: linear-gradient(135deg, var(--brand), var(--brand-ink)); border-color: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 2px 8px rgba(15, 138, 126, .22); }
.tab:hover { text-decoration: none; border-color: var(--brand); }

/* ---------- 看板 ---------- */
.board { display: grid; grid-template-columns: repeat(7, minmax(196px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 11px 13px; min-height: 140px;
}
.col header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.col header span { font-size: 13px; font-weight: 700; color: var(--ink); }
.col header i { font-style: normal; font-size: 11px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.col.wait header span { color: var(--warn); }
.col.run header span { color: var(--run); }
.col.review header span { color: var(--review); }
.col.bad header span { color: var(--bad); }
.col.done header span { color: var(--brand-ink); }
.bcard {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px; margin-bottom: 9px; box-shadow: var(--shadow-1);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.bcard:hover { border-color: #b9dcd5; transform: translateY(-2px); box-shadow: var(--shadow-2); }
.bhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bhead b { font-size: 12.5px; color: var(--ink-2); font-weight: 700; }
.btitle { font-size: 13px; margin: 6px 0 9px; line-height: 1.5; }
.bmeta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.bmeta .red { color: var(--bad); font-weight: 700; }
.bact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
form.mini { display: inline; margin: 0; }

/* ---------- 公告流水 ---------- */
.notice { padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.notice:last-child { border-bottom: 0; }
.notice .ts { color: var(--muted); font-size: 12px; margin-right: 10px; }
.notice .who { color: var(--brand-ink); font-weight: 600; margin-right: 6px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 26px 0 44px; }

/* ---------- 上传区与内联表单 ---------- */
form.up {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 16px;
  padding-top: 14px; border-top: 1px dashed var(--line);
}
form.up label { margin: 0; white-space: nowrap; }
form.up input[type=text], form.up select { width: auto; min-width: 132px; }
form.up input[type=file] { width: auto; font-size: 12px; color: var(--ink-2); }
form.up .sub { flex-basis: 100%; margin: 6px 0 0; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; flex-wrap: wrap; }
form.inline input[type=password] { width: 140px; }
form.inline select { width: auto; }

/* ---------- 甘特图 ---------- */
.gantt { margin-top: 10px; }
.grow { margin-bottom: 12px; }
.glabel { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.gtrack { display: block; width: 100%; height: 20px; background: #f2f6f9; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.gaxis { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line-2); padding-top: 5px; margin-top: 5px; }

/* ---------- 办公文档预览 ---------- */
.ops { margin-top: 10px; font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.docword { line-height: 1.85; }
.doc-title { font-size: 21px; font-weight: 800; margin: 4px 0 14px; color: var(--ink); }
.docword h2 { font-size: 15px; margin: 18px 0 7px; border-left: 3px solid var(--brand); }
.docword h3 { font-size: 13px; margin: 14px 0 5px; }
.doc-p { margin: 0 0 9px; font-size: 13px; color: var(--ink); }
.doc-li { font-size: 13px; color: var(--ink); padding-left: 10px; }
table.doctbl { margin: 12px 0; font-size: 12px; }
table.doctbl th { background: #f1f5f8; position: static; }
table.doctbl td, table.doctbl th { border: 1px solid var(--line); padding: 6px 9px; vertical-align: top; border-radius: 0; }
.sheetname { font-size: 13px; font-weight: 700; margin: 18px 0 7px; color: var(--brand-deep); scroll-margin-top: 120px; }
iframe.pdfview { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fb; }
img.imgview { max-width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 10px; }
pre.plain { white-space: pre-wrap; word-break: break-word; background: #f7f9fb; border: 1px solid var(--line-2); border-radius: 10px; padding: 14px; font-size: 12px; line-height: 1.75; margin: 0; }
.mapwrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; padding: 12px; }
svg.mindmap { display: block; }
form.outline textarea { width: 100%; padding: 10px; border: 1px solid #d6dfe9; border-radius: 9px; font-family: inherit; font-size: 13px; line-height: 1.7; resize: vertical; }
ul.maplist { margin: 0; padding-left: 18px; font-size: 13px; line-height: 2; }

/* 给锚点留出页头高度，跳转后标题不被吸顶栏盖住 */
.card[id], .sheetname { scroll-margin-top: 120px; }

/* ---------- 效率监测 ---------- */
td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); width: 74px; }
.dot-live, .dot-off { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.dot-live { background: #2dd4bf; box-shadow: 0 0 0 3px rgba(45, 212, 191, .18); }
.dot-off { background: #cbd5e1; }
.load { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; border: 1px solid transparent; font-weight: 600; }
.load.ok { color: #0b5a55; background: #e4f9f1; border-color: #b3ecdc; }
.load.warn { color: #92400e; background: #fff7e6; border-color: #fbe2a0; }
.load.bad { color: #9f1239; background: #fff0f3; border-color: #fbd0d9; }
#eff table td.nm { white-space: nowrap; }

/* ---------- 登录页（居中聚焦） ---------- */
.auth-page { background: radial-gradient(1000px 500px at 50% -10%, #dff3ee 0%, transparent 60%), var(--bg); }
.auth-page .topbar { background: linear-gradient(115deg, #0c1725 0%, #14283a 46%, #103a37 100%); }
.auth-page .wrap { max-width: 780px; margin-top: 40px; }
.auth-page .msg { margin-bottom: 16px; }
.auth-page .card {
  padding: 0; overflow: hidden; border-radius: 18px; box-shadow: 0 20px 60px rgba(16, 34, 54, .14);
}
.auth-head {
  padding: 30px 34px 24px;
  background: linear-gradient(120deg, #0d1a29 0%, #143246 55%, #0e4a44 100%);
  color: #fff; position: relative; overflow: hidden;
}
.auth-head::after {
  content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  right: -60px; top: -90px; background: radial-gradient(circle, rgba(45, 212, 191, .28), transparent 70%);
}
.auth-head .amark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(135deg, #2dd4bf, #0f9c8f); color: #05332e;
  font-weight: 800; font-size: 17px; margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(20, 184, 166, .4), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.auth-head h1 { color: #fff; -webkit-text-fill-color: #fff; font-size: 23px; margin: 0 0 6px; }
.auth-head .sub { color: #a9c2d2; margin: 0; font-size: 12.5px; }
.auth-body { padding: 22px 34px 28px; }
.auth-body .sub { margin-bottom: 16px; }
.auth-body code { background: #e6f7f1; }
.auth-body table { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.auth-body th, .auth-body td { padding: 9px 12px; }
.auth-body tbody tr:hover td { background: #f6fbfa; }
.auth-body form.inline input[type=password] { width: 132px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 11.5px; padding: 0 34px 22px; }

/* ---------- 窄屏适配 ---------- */
@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .find { order: 3; flex-basis: 100%; max-width: none; }
  .nav { position: static; gap: 4px 16px; padding: 9px 14px; }
  .nglabel { display: none; }
  .wrap { padding: 0 12px; margin-top: 18px; }
  .card { padding: 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(7, minmax(180px, 1fr)); }
  .auth-page .wrap { margin-top: 20px; }
  .auth-head, .auth-body { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 600px) {
  .topbar { padding: 10px 12px; }
  .brand em { display: none; }
  .who { display: none; }
  .card { padding: 14px; border-radius: 12px; }
  h1 { font-size: 19px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  table { font-size: 12px; }
  th, td { padding: 8px 7px; }
  .kv { grid-template-columns: 96px 1fr; }
  .auth-head { padding: 24px 18px 20px; }
  .auth-head h1 { font-size: 20px; }
  .auth-body { padding: 18px; overflow-x: auto; }
  .auth-body table { min-width: 520px; }
}

/* ============================================================
   暗色主题  html[data-theme="dark"]
   通过覆盖 CSS 变量实现，绝大多数组件自动适配；少数硬编码处单独覆盖。
   ============================================================ */
html[data-theme="dark"] {
  --ink: #e7edf4;
  --ink-2: #aab9c9;
  --muted: #7c8ea0;
  --line: #2b3949;
  --line-2: #222e3c;
  --bg: #0e151e;
  --bg-2: #162131;
  --card: #16212e;
  --brand: #2dd4bf;
  --brand-ink: #5ee3d1;
  --brand-deep: #7ff0df;
  --brand-soft: #10332f;
  --brand-ring: rgba(45, 212, 191, .22);
  --warn: #f0b45e;
  --bad: #ff7a72;
  --review: #b9a0ff;
  --run: #7fa8ff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .28), 0 12px 30px rgba(0, 0, 0, .34);
  --shadow-hover: 0 6px 12px rgba(0, 0, 0, .34), 0 20px 44px rgba(0, 0, 0, .46);
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(1100px 380px at 12% -8%, #102a2a 0%, transparent 62%),
    radial-gradient(900px 320px at 100% 0%, #161c34 0%, transparent 58%),
    var(--bg);
  background-attachment: fixed;
}
html[data-theme="dark"] a { color: var(--brand-ink); }
html[data-theme="dark"] code { background: #20303f; color: #7ff0df; }
html[data-theme="dark"] ::selection { background: rgba(45, 212, 191, .3); }

/* 页头 / 导航 */
html[data-theme="dark"] .topbar {
  background: linear-gradient(115deg, #080f18 0%, #0f2130 46%, #0b2a28 100%);
  box-shadow: 0 4px 22px rgba(0, 0, 0, .5);
}
html[data-theme="dark"] .find input[type=search] { border-color: #33475b; }
html[data-theme="dark"] .exit { border-color: #3a5266; }
html[data-theme="dark"] .nav { background: rgba(22, 33, 46, .9); border-bottom-color: var(--line); }
html[data-theme="dark"] .nl:hover { background: #1c2b39; color: var(--brand-ink); }
html[data-theme="dark"] .nl.active {
  background: linear-gradient(135deg, #123832, #0f302b); color: var(--brand-deep);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .28);
}

/* 卡片 / 标题 / 表格 */
html[data-theme="dark"] h1 {
  background: linear-gradient(100deg, #e7edf4, #7ff0df);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html[data-theme="dark"] .empty { background: #1a2734; }
html[data-theme="dark"] th { background: #1b2836; color: var(--ink-2); border-bottom-color: var(--line); }
html[data-theme="dark"] tbody tr:hover td, html[data-theme="dark"] tr:hover td { background: #1a2a35; }

/* 徽标：暗色下降低明度、保留语义色相 */
html[data-theme="dark"] .badge.ok, html[data-theme="dark"] .load.ok {
  color: #6ee7c4; background: #10382f; border-color: #1c5a49;
}
html[data-theme="dark"] .badge.run { color: #9dbbff; background: #17284a; border-color: #2c4377; }
html[data-theme="dark"] .badge.warn, html[data-theme="dark"] .load.warn {
  color: #f0c178; background: #3a2a12; border-color: #6b4d1c;
}
html[data-theme="dark"] .badge.review { color: #c9b6ff; background: #2a1f47; border-color: #4a3a78; }
html[data-theme="dark"] .badge.bad, html[data-theme="dark"] .load.bad {
  color: #ff9d97; background: #3d1a1c; border-color: #6e2a2c;
}
html[data-theme="dark"] .badge.info { color: #6ee7c4; background: #10382f; border-color: #1c5a49; }
html[data-theme="dark"] .badge.muted { color: #aab9c9; background: #202d3b; border-color: #2f3f50; }

/* 指标卡 / 表单 / 按钮 */
html[data-theme="dark"] .metric { background: linear-gradient(160deg, #182430 0%, #14202b 100%); }
html[data-theme="dark"] .metric .n { color: var(--brand-deep); }
html[data-theme="dark"] input[type=text], html[data-theme="dark"] input[type=date],
html[data-theme="dark"] input[type=search], html[data-theme="dark"] input[type=number],
html[data-theme="dark"] input[type=password], html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #111c27; border-color: #33445a; color: var(--ink);
}
html[data-theme="dark"] .find.big input[type=search] { background: #111c27; color: var(--ink); }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6b7d90; }
html[data-theme="dark"] .btn.ghost, html[data-theme="dark"] .btn.danger { background: transparent; }
html[data-theme="dark"] .btn.danger { color: #ff9d97; border-color: #6e2a2c; }

/* 消息条 / 提示 / 标签 / 看板 */
html[data-theme="dark"] .pulse.on { background: #3a2a12; border-color: #6b4d1c; border-left-color: #f0b45e; color: #f0c178; }
html[data-theme="dark"] .pulse.on strong { color: #ffd493; }
html[data-theme="dark"] .pulse.on .ptext { color: #e0bb7c; }
html[data-theme="dark"] .msg.err { background: #3d1a1c; border-color: #6e2a2c; border-left-color: #ff7a72; color: #ff9d97; }
html[data-theme="dark"] .msg.ok { background: #10382f; border-color: #1c5a49; border-left-color: #2dd4bf; color: #6ee7c4; }
html[data-theme="dark"] .viewers { background: #3a2a12; border-color: #6b4d1c; border-left-color: #f0b45e; color: #f0c178; }
html[data-theme="dark"] .tag { background: #202d3b; color: var(--ink-2); }
html[data-theme="dark"] .tag.lock { background: #3a2a12; color: #f0c178; border-color: #6b4d1c; }
html[data-theme="dark"] .tag.ok { background: #10382f; color: #6ee7c4; border-color: #1c5a49; }
html[data-theme="dark"] .chip, html[data-theme="dark"] .tab { background: #182431; border-color: var(--line); color: var(--ink-2); }
html[data-theme="dark"] .chip.off { background: #141e29; }
html[data-theme="dark"] .col { background: #131e2a; border-color: var(--line); }
html[data-theme="dark"] .col header i { background: #1b2836; }
html[data-theme="dark"] .bcard { background: #1a2735; border-color: #2a3a4c; }
html[data-theme="dark"] .bcard:hover { border-color: #3d6d63; }

/* 文档预览 / 杂项 */
html[data-theme="dark"] table.doctbl th { background: #1b2836; }
html[data-theme="dark"] pre.plain, html[data-theme="dark"] .mapwrap,
html[data-theme="dark"] iframe.pdfview { background: #131e2a; }
html[data-theme="dark"] .dot-off { background: #3a4a5c; }
html[data-theme="dark"] .gtrack { background: #111c27; }

/* 登录页暗色：头部保持深色，表单区随主题 */
html[data-theme="dark"] .auth-page { background: radial-gradient(1000px 500px at 50% -10%, #102a2a 0%, transparent 60%), var(--bg); }
html[data-theme="dark"] .auth-page .card { box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .auth-body code { background: #10382f; color: #7ff0df; }

/* 主题切换按钮 */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: 0 0 auto; padding: 0;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px;
  background: rgba(255, 255, 255, .08); color: #dbe7f0;
  cursor: pointer; transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.theme-toggle:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); transform: translateY(-1px); }
.theme-toggle .ico { width: 17px; height: 17px; }
.theme-toggle .ico-sun { display: none; }
/* 亮色显示月亮（点了变暗），暗色显示太阳（点了变亮） */
html[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
html[data-theme="dark"] .theme-toggle .ico-sun { display: block; }

/* 滚动条 */
html[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #101922; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #33475b; border-radius: 6px; border: 2px solid #101922; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #46617a; }

/* ============================================================
   主题三档下拉：亮色 / 暗色 / 跟随系统
   ============================================================ */
.theme-select { position: relative; }
.theme-trigger {
  display: inline-flex; align-items: center; gap: 3px;
  height: 34px; padding: 0 7px 0 9px;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px;
  background: rgba(255, 255, 255, .08); color: #dbe7f0;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.theme-trigger:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .38); transform: translateY(-1px); }
.theme-trigger:focus-visible { outline: 2px solid #2dd4bf; outline-offset: 2px; }
.theme-trigger .ico { width: 17px; height: 17px; display: none; }
.theme-trigger .caret { width: 13px; height: 13px; display: block; opacity: .72; transition: transform .18s var(--ease); }
.theme-select[data-mode="light"] .ico-sun,
.theme-select[data-mode="dark"] .ico-moon,
.theme-select[data-mode="system"] .ico-auto { display: block; }
.theme-select.open .caret { transform: rotate(180deg); }

.theme-menu {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 80;
  min-width: 152px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
}
.theme-select.open .theme-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.theme-opt {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; font-size: 13px;
  text-align: left; cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.theme-opt:hover, .theme-opt:focus-visible { background: var(--brand-soft); color: var(--brand-ink); outline: none; }
.theme-opt .ico { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }
.theme-opt:hover .ico, .theme-opt.sel .ico { color: var(--brand-ink); }
.theme-opt .tick { margin-left: auto; width: 15px; height: 15px; opacity: 0; color: var(--brand); }
.theme-opt.sel .tick { opacity: 1; }
html[data-theme="dark"] .theme-menu { box-shadow: 0 14px 36px rgba(0, 0, 0, .55); }

/* ============================================================
   资料空间：Hero 引导区 + 空间导航卡 + 空间块重排
   ============================================================ */
.docs-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f4faf9 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px 20px; margin-bottom: 22px; box-shadow: var(--shadow-1);
}
.docs-hero-head { display: flex; align-items: center; gap: 16px; }
.docs-hero-icon {
  width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center;
  font-size: 26px; color: #fff; border-radius: 15px;
  background: linear-gradient(135deg, var(--brand), var(--brand-ink));
  box-shadow: 0 6px 18px rgba(15, 138, 126, .28);
}
.docs-hero-text { flex: 1 1 auto; min-width: 0; }
.docs-hero-text h1 { margin: 0 0 5px; font-size: 24px; }
.docs-hero-text p {
  margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.7; max-width: 760px;
}
.docs-hero-stat {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  padding: 6px 16px; border-left: 1px solid var(--line); text-align: center;
}
.docs-hero-stat b { font-size: 26px; line-height: 1; color: var(--brand-deep); }
.docs-hero-stat span { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* 空间导航卡网格 */
.docs-hero-nav {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 11px; margin: 20px 0 4px;
}
.space-nav-card {
  display: flex; flex-direction: column; gap: 7px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  text-decoration: none; color: var(--ink);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.space-nav-card:hover {
  transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-2);
  text-decoration: none; color: var(--ink);
}
.snc-ico {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px;
  font-size: 13px; font-weight: 800; color: var(--brand-deep); background: var(--brand-soft);
}
.snc-name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.snc-meta { font-size: 11.5px; color: var(--muted); }
.snc-meta b { color: var(--brand); font-size: 13px; }
.space-nav-card.off { background: #f7f9fb; border-style: dashed; opacity: .72; }
.space-nav-card.off:hover { transform: none; box-shadow: none; border-color: var(--line); }
.space-nav-card.off .snc-ico { color: var(--muted); background: #eef2f6; }
.lock-dot { color: var(--warn); font-size: 9px; }
.docs-search { margin-top: 16px !important; max-width: none !important; }

/* 空间块：头部 + 分区主体 */
.space-block { scroll-margin-top: 16px; margin-bottom: 20px; }
.space-block.locked { opacity: .88; }
.space-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px;
}
.space-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.space-no {
  width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 11px; font-size: 15px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-ink));
  box-shadow: 0 3px 10px rgba(15, 138, 126, .22);
}
.locked .space-no { background: linear-gradient(135deg, #9aa8b6, #b7c2cd); box-shadow: none; }
.space-title h2 { margin: 0; font-size: 18px; }
.space-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.space-head-right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.doc-count {
  font-size: 12px; color: var(--brand-deep); background: var(--brand-soft);
  padding: 4px 11px; border-radius: 999px; font-weight: 600; white-space: nowrap;
}
.space-cats { margin: 14px 0 6px; }
.cats-label {
  display: block; font-size: 11px; color: var(--muted); font-weight: 700;
  letter-spacing: .08em; margin-bottom: 2px;
}
.space-cats .chips { margin: 4px 0 0; }
.space-docs .sheetname { margin-top: 16px; }
.space-empty {
  display: flex; align-items: center; gap: 14px; padding: 22px; border-radius: 12px;
  background: #f7f9fb; color: var(--ink-2); font-size: 13px; line-height: 1.7; margin-top: 14px;
}
.se-ico { font-size: 26px; opacity: .6; }

/* 暗色适配 */
html[data-theme="dark"] .docs-hero {
  background: linear-gradient(135deg, #16212e 0%, #122420 100%); border-color: var(--line);
}
html[data-theme="dark"] .docs-hero-icon { box-shadow: 0 6px 18px rgba(45, 212, 191, .18); }
html[data-theme="dark"] .space-nav-card { background: #1a2735; }
html[data-theme="dark"] .space-nav-card:hover { background: #1d2e3d; }
html[data-theme="dark"] .space-nav-card.off { background: #141e29; }
html[data-theme="dark"] .space-nav-card.off .snc-ico { background: #202d3b; }
html[data-theme="dark"] .doc-count { color: #6ee7c4; }
html[data-theme="dark"] .space-empty { background: #131e2a; }

/* ============================================================
   全局格局增强层：覆盖全部 28 页，纯视觉、零功能改动
   ============================================================ */
/* 页面头图标化（工作台等重点页复用） */
.page-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.page-hero-ico {
  width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center;
  font-size: 22px; color: #fff; border-radius: 13px;
  background: linear-gradient(135deg, var(--brand), var(--brand-ink));
  box-shadow: 0 4px 14px rgba(15, 138, 126, .25);
}
.page-hero h1 { margin: 0 0 4px; }
.page-hero .sub { margin: 0; }
html[data-theme="dark"] .page-hero-ico { box-shadow: 0 4px 14px rgba(45, 212, 191, .18); }

/* 登录页：全功能演示入口 */
.demo-enter {
  display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; padding: 15px 18px;
  border: 1px solid var(--brand); border-radius: 13px;
  background: linear-gradient(120deg, var(--brand-soft), rgba(15, 138, 126, .05));
  text-decoration: none; color: var(--ink);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.demo-enter:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); text-decoration: none; color: var(--ink); }
.de-ico {
  width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 11px; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-ink));
  box-shadow: 0 4px 12px rgba(15, 138, 126, .25);
}
.de-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.de-text b { font-size: 14px; color: var(--brand-deep); }
.de-text small { font-size: 12px; color: var(--muted); }
.de-arrow { font-size: 20px; color: var(--brand); transition: transform .18s var(--ease); }
.demo-enter:hover .de-arrow { transform: translateX(4px); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
html[data-theme="dark"] .de-ico { box-shadow: none; }

/* 排版质感：更顺眼的行高与字重层次 */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.wrap > .card, .docs-hero { animation: cardIn .45s var(--ease) both; }
.wrap > .card:nth-child(2) { animation-delay: .05s; }
.wrap > .card:nth-child(3) { animation-delay: .1s; }
h1 { letter-spacing: -.01em; }
h2 { letter-spacing: -.005em; }

/* 表格：斑马纹 + 更清晰的行分隔 + 表头吸顶，长列表更好扫读 */
table { border-radius: var(--radius-sm); overflow: hidden; }
tbody tr:nth-child(even) td { background: rgba(15, 138, 126, .025); }
tbody tr:last-child td { border-bottom: 0; }
thead th, table > tr:first-child th { position: sticky; top: 0; z-index: 2; }
th { letter-spacing: .02em; font-size: 12px; }
td a { font-weight: 600; }

/* 指标卡：数字更大更有力 */
.metric { min-height: 88px; }
.metric .n { font-size: 30px; letter-spacing: -.02em; }

/* 徽标：更精致的内边距与字距 */
.badge { letter-spacing: .01em; padding: 3px 10px; }

/* 按钮：统一的焦点可见环（键盘可访问性） */
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.chip:focus-visible, .tab:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

/* 表单输入：更柔和的聚焦反馈 */
input[type=text], input[type=search], input[type=number], input[type=date],
input[type=password], select, textarea {
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
input[type=text]:focus, input[type=search]:focus, input[type=number]:focus,
input[type=date]:focus, input[type=password]:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px var(--brand-ring);
}

/* 空态 / 提示条：更醒目 */
.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13px; border-radius: 12px; }

/* 滚动条：全局精致化（亮色） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c9d6e0; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #9fb3c4; background-clip: padding-box; }

/* 选中文字用品牌色 */
::selection { background: var(--brand-ring); }

/* 暗色下：斑马纹、滚动条、吸顶表头同步 */
html[data-theme="dark"] tbody tr:nth-child(even) td { background: rgba(45, 212, 191, .035); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #33475b; background-clip: padding-box; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #46617a; background-clip: padding-box; }

/* 减少动效偏好：尊重系统设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 更窄屏的兜底：保证表格不撑破布局 */
@media (max-width: 640px) {
  .docs-hero-head { flex-wrap: wrap; }
  .docs-hero-stat { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; width: 100%; flex-direction: row; justify-content: center; gap: 8px; }
  .space-head { flex-direction: column; }
  .space-head-right { justify-content: flex-start; }
}

/* 入口底座 · 态势概览 */
.sit-card { border-left: 3px solid var(--brand, #2dd4bf); }
.sit-card .page-hero h2 { margin: 0 0 4px; font-size: 18px; }
.sit-card .metrics { margin: 8px 0 14px; }
.sit-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sit-links .btn { font-size: 13px; padding: 6px 14px; }

/* 今天要处理：逾期红标 + 一键直达，昨天未完成的顺延到今天 */
.today-box { margin: 4px 0 16px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; overflow: hidden; }
.today-hd { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-weight: 600; font-size: 14px; background: var(--soft, #f8fafc); }
.today-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand, #2dd4bf); color: #04201c; font-size: 12px; font-variant-numeric: tabular-nums; }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line, #e2e8f0); text-decoration: none; color: inherit; }
.todo-row:hover { background: var(--soft, #f8fafc); }
.todo-tag { flex: none; padding: 2px 8px; border-radius: 6px; background: #e0f2fe; color: #075985; font-size: 12px; }
.todo-row.overdue .todo-tag { background: #fee2e2; color: #b91c1c; }
.todo-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-empty { padding: 12px 14px; color: var(--muted, #64748b); font-size: 13px; }
html[data-theme="dark"] .today-box { border-color: #2a3844; }
html[data-theme="dark"] .today-hd, html[data-theme="dark"] .todo-row:hover { background: #182430; }
html[data-theme="dark"] .todo-row { border-top-color: #2a3844; }
html[data-theme="dark"] .todo-tag { background: #14354a; color: #7dd3fc; }
html[data-theme="dark"] .todo-row.overdue .todo-tag { background: #3f1d1d; color: #fca5a5; }

/* ============================================================
   三语切换器：ZH / EN / ES（与主题下拉同一视觉语言）
   ============================================================ */
.lang-select { position: relative; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 7px 0 10px;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px;
  background: rgba(255, 255, 255, .08); color: #dbe7f0;
  cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.lang-trigger:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .38); transform: translateY(-1px); }
.lang-trigger:focus-visible { outline: 2px solid #2dd4bf; outline-offset: 2px; }
.lang-trigger .caret { width: 13px; height: 13px; opacity: .72; transition: transform .18s var(--ease); }
.lang-select.open .lang-trigger .caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 80;
  min-width: 132px; padding: 5px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--card); box-shadow: 0 14px 36px rgba(8, 32, 44, .18);
  opacity: 0; visibility: hidden; transform: translateY(-5px);
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
}
.lang-select.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 8px 10px;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--ink); font-size: 13px; text-align: left; cursor: pointer;
}
.lang-opt::after { content: '✓'; color: var(--brand); opacity: 0; font-weight: 800; }
.lang-opt.sel::after { opacity: 1; }
.lang-opt:hover, .lang-opt:focus-visible { background: var(--brand-soft); outline: none; }
html[data-theme="dark"] .lang-menu { background: #17242e; border-color: #2c3b47; }
@media (max-width: 720px) {
  .lang-trigger { padding: 0 6px; }
  .lang-menu { right: -8px; }
}

/* ============================================================
   首屏切换器：社区图 / 工作台（对齐 Nexus 设备差异化首屏）
   ============================================================ */
.home-select {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2);
}
.home-select button {
  padding: 5px 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink-2);
  font-size: 12px; line-height: 1.4; cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.home-select button:hover { background: var(--brand-soft); }
.home-select button.sel { background: var(--card); color: var(--brand-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(8,32,44,.1); }
html[data-theme="dark"] .home-select button.sel { background: #223442; color: #5eead4; }

/* 社区结构图 */
.com-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.com-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--bg-2); font-size: 12px; color: var(--ink-2);
}
.com-chip b { color: var(--brand-ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.com-graph { display: block; width: 100%; max-width: 680px; height: auto; margin: 10px auto 4px; }
.com-graph a { cursor: pointer; }
.com-graph a:hover circle { fill: #CECBF6; }
.com-graph text { font-family: var(--font, inherit); }
@media (max-width: 720px) {
  .home-select button { padding: 5px 7px; font-size: 11px; }
  .com-chips { gap: 6px; }
}

/* ============================================================
   产品识图：四硬规则、八字段预览、人工确认
   ============================================================ */
.ocr-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 14px 0 4px; }
.ocr-rule { padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-2); }
.ocr-rule b { display: block; margin-bottom: 4px; font-size: 13px; color: var(--brand-ink); }
.ocr-rule span { font-size: 12px; line-height: 1.55; color: var(--ink-2); }
.ocr-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.ocr-form input:not([type="file"]) { flex: 1 1 190px; min-width: 150px; }
.ocr-value { max-width: 240px; word-break: break-all; }
.ocr-evidence { max-width: 240px; font-size: 12px; color: var(--ink-2); word-break: break-all; }
.ocr-assets { margin: 14px 0; padding: 12px; border-radius: 10px; background: var(--bg-2); font-size: 13px; }
.ocr-assets .sub { margin-left: 6px; }
@media (max-width: 720px) {
  .ocr-rules { grid-template-columns: 1fr; }
  .ocr-form input:not([type="file"]) { flex: 1 1 100%; }
}

/* ============================================================
   HITL 审批中心：闸门状态、事件流水
   ============================================================ */
.ocr-gate {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 12px 0; padding: 10px 13px;
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 10px; background: var(--bg-2); font-size: 13px;
}
.ocr-gate.warn { border-left-color: #f59e0b; }
.ocr-gate ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.7; }
.ocr-gate code { padding: 2px 6px; border-radius: 5px; background: var(--bg); font-size: 12px; }

/* ============================================================
   Webmail：登录框架、文件夹、邮件列表、读信、写信、配置
   ============================================================ */
.mail-wrap { display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: start; }
.mail-side {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; position: sticky; top: 14px;
}
.mail-identity { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mail-avatar {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 500;
}
.mail-id-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.mail-id-addr { font-size: 11px; color: var(--ink-2); word-break: break-all; margin-top: 2px; }
.mail-folder-title { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; margin: 16px 0 8px; }
.mail-folder {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px;
  color: var(--ink-2); text-decoration: none; font-size: 13px; margin-bottom: 3px;
}
.mail-folder:hover { background: var(--bg); color: var(--ink); }
.mail-folder.active { background: var(--brand); color: #fff; }
.mail-fico { width: 18px; text-align: center; font-size: 15px; }
.mail-count { margin-left: auto; font-size: 11px; opacity: .8; }
.mail-side-foot { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.mail-side-foot .btn { text-align: center; font-size: 13px; }
.mail-main { min-width: 0; }
.mail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mail-toolbar h2 { font-size: 18px; font-weight: 500; margin: 0; color: var(--ink); }
.mail-toolbar .sub { font-size: 12px; font-weight: 400; color: var(--ink-2); }
.mail-banner {
  padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; font-size: 13px;
  background: #fff7e6; border: 1px solid #f0c674; color: #8a5a00;
}
.mail-banner.bad { background: #fdecec; border-color: #e88; color: #a22; }
.mail-banner a { color: inherit; text-decoration: underline; }
.mail-list { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mail-row {
  display: grid; grid-template-columns: 150px 1fr 120px; gap: 12px; align-items: center;
  padding: 13px 16px; border-bottom: 1px solid var(--line); text-decoration: none;
  color: var(--ink-2); font-size: 13px;
}
.mail-row:last-child { border-bottom: none; }
.mail-row:hover { background: var(--bg); }
.mail-row.unread { background: var(--bg); color: var(--ink); font-weight: 500; }
.mail-from { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-subj { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-date { text-align: right; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.mail-empty { padding: 40px; text-align: center; color: var(--ink-2); font-size: 13px; }
.mail-read-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.mail-read-head h3 { font-size: 18px; font-weight: 500; margin: 0 0 8px; color: var(--ink); }
.mail-body { font-size: 14px; line-height: 1.9; color: var(--ink); min-height: 140px; white-space: normal; }
.mail-atts { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.mail-att { display: inline-block; padding: 4px 10px; margin: 4px 6px 0 0; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line); }
.mail-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; }
.mail-field label { color: var(--ink-2); }
.mail-field input, .mail-field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg); color: var(--ink); font-size: 16px; font-family: inherit; box-sizing: border-box;
}
.mail-field textarea { resize: vertical; line-height: 1.6; }
.mail-field label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 6px; }
.mail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.mail-actions { display: flex; gap: 10px; margin-top: 8px; }
@media (max-width: 768px) {
  .mail-wrap { grid-template-columns: 1fr; }
  .mail-side { position: static; }
  .mail-side-foot { flex-direction: row; }
  .mail-row { grid-template-columns: 1fr; gap: 4px; }
  .mail-date { text-align: left; }
  .mail-grid { grid-template-columns: 1fr; }
  .mail-toolbar { flex-wrap: wrap; }
  .mail-field input, .mail-field textarea { font-size: 16px; }
}
