/* 赛勘 Lab · 产品界面样式（官网在线体验与桌面端共用） */

:root {
  --bg: #f4f6f7;
  --panel: #ffffff;
  --ink: #12181b;
  --ink-2: #45535a;
  --sub: #7c8a91;
  --line: #e8edef;
  --line-2: #dde4e7;

  --teal: #0fa3a0;
  --teal-d: #0a8583;
  --teal-dd: #076b69;
  --teal-soft: #e6f7f5;
  --teal-soft-2: #cfeff0;

  --amber: #e08a17;
  --amber-soft: #fdf3e3;
  --violet: #6a63d8;
  --violet-soft: #eeedfb;
  --rose: #d95b70;
  --rose-soft: #fdeef1;

  --radius: 12px;
  --shadow-s: 0 1px 2px rgba(18, 24, 27, .05);
  --shadow-m: 0 12px 30px -18px rgba(18, 24, 27, .35);
  --shadow-l: 0 40px 80px -40px rgba(7, 60, 59, .45);

  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ================= 布局 ================= */
.app { display: grid; grid-template-columns: 258px 1fr; height: 100vh; }

/* ================= 侧栏 ================= */
.rail {
  display: flex; flex-direction: column;
  background: #fbfcfc; border-right: 1px solid var(--line);
  padding: 14px 12px 10px; min-height: 0;
}
.rail-brand { display: flex; align-items: center; gap: 8px; padding: 2px 4px 0; text-decoration: none; }
.rb-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rb-name { font-size: 14.5px; font-weight: 700; letter-spacing: .1px; color: var(--ink); white-space: nowrap; }
.rb-name b { color: var(--teal-d); }
.rb-ver { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--sub); }
.rb-ver b { font-weight: 500; font-family: var(--mono); }
.rb-mode {
  font-size: 10px; color: var(--teal-dd);
  background: var(--teal-soft); border: 1px solid var(--teal-soft-2);
  border-radius: 4px; padding: 0 5px; white-space: nowrap;
}

.new-project {
  margin: 12px 2px 9px; height: 33px; width: calc(100% - 4px);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #12b3af, var(--teal));
  color: #fff; border: 0; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 20px -14px rgba(15, 163, 160, .9);
  transition: transform .16s, filter .16s;
}
.new-project:hover { transform: translateY(-1px); filter: brightness(1.03); }

.rail-del {
  display: flex; align-items: center; gap: 5px;
  margin: -3px 2px 2px; padding: 4px 6px;
  border: 0; border-radius: 6px; background: none;
  font: inherit; font-size: 11.5px; color: var(--sub);
  cursor: pointer; transition: color .15s, background .15s;
}
.rail-del:hover { color: #c0392b; background: rgba(192, 57, 43, .08); }
.rail-del[hidden] { display: none; }
.rail-del svg { flex: none; }


.rail-search {
  display: flex; align-items: center; gap: 7px;
  margin: 4px 2px 12px; padding: 0 9px; height: 34px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--sub);
}
.rail-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-size: 12.5px; color: var(--ink);
}
.rail-search input::-webkit-search-cancel-button { display: none; }

.rail-label {
  display: flex; justify-content: space-between;
  font-size: 10.5px; letter-spacing: .7px; color: #9aa7ad;
  padding: 4px 6px 8px;
}
.proj-list { flex: 1; overflow-y: auto; min-height: 0; padding: 0 2px 8px; }
.proj-list::-webkit-scrollbar { width: 6px; }
.proj-list::-webkit-scrollbar-thumb { background: #e2e8ea; border-radius: 3px; }

.proj-item {
  position: relative; cursor: pointer;
  border-radius: 9px; padding: 9px 10px 9px 13px; margin-bottom: 3px;
  transition: background .15s;
}
.proj-item::before {
  content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 3px;
  border-radius: 2px; background: var(--pc, var(--teal)); opacity: .28;
}
.proj-item:hover { background: #f2f6f7; }
.proj-item.on { background: var(--teal-soft); }
.proj-item.on::before { opacity: 1; }
.pi-name { font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-meta { font-size: 10.5px; color: var(--sub); font-family: var(--mono); margin-top: 2px; display: flex; gap: 8px; }
.proj-item.on .pi-name { color: var(--teal-dd); }

.rail-foot { border-top: 1px solid var(--line); padding: 10px 4px 2px; }
.storage-line { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--sub); }
.rail-acts { display: flex; gap: 12px; margin-top: 7px; }
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-size: 11.5px; color: var(--ink-2);
}
.link-btn:hover { color: var(--teal-d); }

/* ================= 主区 ================= */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  height: 58px; flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.rail-toggle { display: none; border: 0; background: none; color: var(--ink-2); padding: 6px; cursor: pointer; }
.topbar-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; overflow: hidden; }
.crumb { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb-code {
  font-family: var(--mono); font-size: 10.5px; color: var(--teal-dd);
  background: var(--teal-soft); border-radius: 4px; padding: 2px 6px; white-space: nowrap;
  flex: none;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.support-btn { flex: none; position: relative; }
.top-icon { height: 30px; padding: 0 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; }
.top-icon svg { display: block; }
.sk-btn-dot {
  position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  border-radius: 50%; background: #e5484d; border: 2px solid var(--panel);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}
.sk-btn-dot[hidden] { display: none; }
/* 顶栏版本速递：发现新版本时显示常驻版本胶囊与轻微浮动的下载图标 */
.upd-pill {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 10px;
  border: 1px solid var(--teal-soft-2); border-radius: 14px;
  background: var(--teal-soft); color: var(--teal-dd);
  font-size: 11.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.upd-pill:hover { border-color: var(--teal); background: var(--teal-soft-2); }
.upd-pill[hidden] { display: none; }
.upd-dl { display: inline-flex; width: 15px; height: 15px; animation: updDlBob 1.8s ease-in-out infinite; }
.upd-dl svg { width: 15px; height: 15px; display: block; }
@keyframes updDlBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
.topbar .seqkan-auth { flex: none; }
.topbar .seqkan-auth:empty { display: none; }

.view { flex: 1; overflow-y: auto; padding: 22px; }
.view::-webkit-scrollbar { width: 9px; }
.view::-webkit-scrollbar-thumb { background: #dde4e7; border-radius: 5px; border: 2px solid var(--bg); }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 7px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  transition: border-color .15s, color .15s, background .15s, transform .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--teal); color: var(--teal-d); }
.btn.primary {
  background: linear-gradient(180deg, #12b3af, var(--teal)); color: #fff; border-color: transparent;
  box-shadow: 0 8px 16px -12px rgba(15, 163, 160, .9);
}
.btn.primary:hover { filter: brightness(1.04); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #f1f5f6; }
.btn.danger:hover { border-color: var(--rose); color: var(--rose); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ================= 统计 ================= */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px; box-shadow: var(--shadow-s);
}
.stat b { display: block; font-size: 21px; letter-spacing: -.4px; line-height: 1.25; }
.stat span { font-size: 11.5px; color: var(--sub); }
.stat.teal b { color: var(--teal-d); }

/* ================= Tabs ================= */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  position: relative; border: 0; background: none; cursor: pointer;
  padding: 9px 12px 12px; font-size: 13px; color: var(--sub); font-weight: 600;
}
.tab:hover { color: var(--ink-2); }
.tab.on { color: var(--ink); }
.tab.on::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  background: var(--teal); border-radius: 2px;
}
.tab .cnt { font-family: var(--mono); font-size: 10.5px; color: var(--sub); margin-left: 5px; }

/* ================= 实验卡片 ================= */
.exp-list { display: grid; gap: 14px; }
.exp-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-s); overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.exp-card:hover { border-color: var(--line-2); box-shadow: 0 10px 26px -22px rgba(18, 24, 27, .45); }
.exp-card.is-hot { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 163, 160, .12); }

.exp-head { display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px 12px; }
.exp-badge {
  flex: none; margin-top: 1px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px;
  border-radius: 5px; padding: 3px 7px;
  background: var(--teal-soft); color: var(--teal-dd);
}
.exp-badge.b-amber { background: var(--amber-soft); color: #a3650c; }
.exp-badge.b-violet { background: var(--violet-soft); color: #4a44ad; }
.exp-badge.b-rose { background: var(--rose-soft); color: #b03b51; }
.exp-title-wrap { flex: 1; min-width: 0; }
.exp-title { font-size: 14.5px; font-weight: 700; }
.exp-sub { font-size: 11.5px; color: var(--sub); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.exp-sub .mono { font-family: var(--mono); }
.exp-acts { display: flex; gap: 4px; }
.icon-btn {
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; background: none; border-radius: 6px; color: var(--sub); cursor: pointer;
}
.icon-btn:hover { background: #f1f5f6; color: var(--rose); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 12px; }
.chip { font-size: 10.5px; color: var(--ink-2); background: #f4f7f8; border-radius: 4px; padding: 2px 7px; }
.chip b { font-weight: 600; color: var(--sub); margin-right: 3px; }

.exp-body { border-top: 1px solid var(--line); background: #fdfefe; padding: 12px 16px 14px; }
.zone {
  border: 1.5px dashed var(--teal-soft-2); border-radius: 9px;
  background: linear-gradient(180deg, rgba(230, 247, 245, .5), rgba(230, 247, 245, .12));
  padding: 13px; text-align: center; cursor: pointer;
  transition: background .16s, border-color .16s;
}
.zone:hover, .zone.is-hot { border-color: var(--teal); background: var(--teal-soft); }
.zone-main { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--teal-d); font-weight: 600; }
.zone-sub { font-size: 10.5px; color: var(--sub); margin-top: 3px; }
.zone svg { flex: none; }

.files { margin-top: 10px; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-radius: 7px;
  border-bottom: 1px dashed var(--line);
}
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #f7fafb; }
.file-ic {
  flex: none; width: 30px; height: 30px; border-radius: 7px;
  display: grid; place-items: center; overflow: hidden;
  background: #eef3f5; color: var(--ink-2);
  font-family: var(--mono); font-size: 8.5px; font-weight: 700;
}
.file-ic img { width: 100%; height: 100%; object-fit: cover; }
.cat-img .file-ic { background: #e8f2ff; color: #2f7ad6; }
.cat-doc .file-ic { background: #fdeef1; color: #c04a5f; }
.cat-sheet .file-ic { background: #e9f8f0; color: #1f8a5c; }
.cat-raw .file-ic { background: #f1eefb; color: #5a51c4; }
.cat-zip .file-ic { background: #fdf4e4; color: #a3650c; }
.file-main { flex: 1; min-width: 0; }
.file-name { font-family: var(--mono); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-orig { font-size: 10.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-orig s { opacity: .7; }
.file-meta { flex: none; font-size: 10.5px; color: var(--sub); font-family: var(--mono); text-align: right; }
.file-flag { flex: none; font-size: 9.5px; color: var(--teal-dd); background: var(--teal-soft); border-radius: 4px; padding: 1px 5px; }
.file-flag.dup { color: #a3650c; background: var(--amber-soft); }

/* ================= 全部数据 ================= */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.seg { display: flex; background: #eef2f3; border-radius: 8px; padding: 2px; }
.seg button {
  border: 0; background: none; padding: 5px 11px; border-radius: 6px;
  font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-s); font-weight: 600; }
.toolbar .spacer { flex: 1; }

.data-table { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-s); }
.dt-head, .dt-row { display: grid; grid-template-columns: 34px 1fr 150px 92px 84px 46px; align-items: center; gap: 10px; padding: 9px 14px; }
.dt-head { font-size: 10.5px; color: var(--sub); background: #fafbfb; border-bottom: 1px solid var(--line); letter-spacing: .4px; }
.dt-row { border-bottom: 1px solid #f2f5f6; font-size: 12px; }
.dt-row:last-child { border-bottom: 0; }
.dt-row:hover { background: #f9fbfb; }
.dt-row .file-ic { width: 26px; height: 26px; border-radius: 6px; }
.dt-name { font-family: var(--mono); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-sub { font-size: 10.5px; color: var(--sub); }
.dt-act { text-align: right; }

/* ================= 记录 ================= */
.record {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 34px; max-width: 820px; box-shadow: var(--shadow-s);
}
.rec-head h2 { font-size: 21px; letter-spacing: -.3px; }
.rec-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--sub); margin-top: 8px; font-family: var(--mono); }
.rec-goal { margin-top: 16px; padding: 12px 14px; background: #f7fafb; border-left: 3px solid var(--teal); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--ink-2); }
.rec-sec { margin-top: 26px; }
.rec-sec h3 { font-size: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.rec-sec h3 span { font-family: var(--mono); font-size: 10.5px; color: var(--sub); font-weight: 400; margin-left: 8px; }
.rec-exp { margin-bottom: 18px; }
.rec-exp-h { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 700; }
.rec-exp-h em { font-family: var(--mono); font-size: 10.5px; font-style: normal; color: var(--teal-dd); background: var(--teal-soft); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.rec-exp-meta { font-size: 11.5px; color: var(--sub); margin: 4px 0 6px; font-family: var(--mono); }
.rec-exp ul li { font-size: 12px; color: var(--ink-2); font-family: var(--mono); padding: 2px 0 2px 12px; position: relative; }
.rec-exp ul li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--teal-soft-2); }
.rec-note { font-size: 12px; color: var(--sub); margin-top: 6px; }

/* 记录正文 / 版本 / 审计 */
.rec-body {
  margin-top: 10px; padding: 12px 14px; background: #fbfdfd; border: 1px solid var(--line);
  border-radius: 8px; font-size: 12.5px; line-height: 1.85; color: var(--ink-2); white-space: pre-wrap;
}
.rec-exp-acts { margin-left: auto; display: flex; gap: 10px; font-weight: 400; }
.rec-exp-acts .link-btn { font-size: 11.5px; }
.audit-list { display: flex; flex-direction: column; }
.audit-row { display: flex; gap: 12px; font-size: 11.5px; padding: 6px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.audit-row:last-child { border-bottom: 0; }
.audit-time { font-family: var(--mono); color: var(--sub); flex: none; }
.audit-act { color: var(--teal-dd); font-weight: 600; flex: none; }
.audit-detail { color: var(--ink-2); min-width: 0; word-break: break-all; }
.exp-rec {
  font-size: 11px; color: var(--sub); line-height: 1.65; margin: 0 0 10px;
  padding: 8px 10px; background: #fbfdfd; border: 1px dashed var(--line); border-radius: 7px;
}
.exp-rec span { color: var(--teal-dd); font-weight: 600; margin-right: 6px; font-size: 10px; }
.ed-body { min-height: 170px; line-height: 1.8; }
.ver-list { max-height: 54vh; overflow: auto; }
.ver-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.ver-item:last-child { border-bottom: 0; }
.ver-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.ver-head .link-btn { font-size: 11.5px; }
.ver-item summary { font-size: 11.5px; color: var(--sub); cursor: pointer; margin-top: 4px; }
.ver-item pre {
  background: #f7fafb; border: 1px solid var(--line); border-radius: 7px; padding: 10px;
  font-size: 11.5px; line-height: 1.7; white-space: pre-wrap; margin-top: 6px; max-height: 220px; overflow: auto;
}
.ver-meta { font-size: 11px; color: var(--sub); margin-top: 6px; font-family: var(--mono); }

/* ================= 空状态 ================= */
.empty {
  background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 52px 24px; text-align: center;
}
.empty .eic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; background: var(--teal-soft); color: var(--teal-d); display: grid; place-items: center; }
.empty h3 { font-size: 15px; }
.empty p { font-size: 12.5px; color: var(--sub); margin-top: 6px; }
.empty .btn { margin-top: 16px; }

/* ================= 拖拽遮罩 ================= */
.drop-mask {
  position: fixed; inset: 0; z-index: 80; display: none;
  background: rgba(7, 107, 105, .12);
  backdrop-filter: blur(2px);
  align-items: center; justify-content: center;
}
.drop-mask.on { display: flex; }
.drop-mask-in {
  background: #fff; border: 2px dashed var(--teal); border-radius: 16px;
  padding: 34px 46px; text-align: center; color: var(--teal-d);
  box-shadow: var(--shadow-l);
}
.drop-mask-in b { display: block; font-size: 15px; margin: 10px 0 4px; }
.drop-mask-in span { font-size: 11.5px; color: var(--sub); }

/* ================= 弹窗 ================= */
.modal-root { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal-root[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(12, 20, 22, .42); backdrop-filter: blur(2px); }
.modal {
  position: relative; width: 100%; max-width: 520px; max-height: 88vh;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-l);
  display: flex; flex-direction: column; overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal-head { display: flex; align-items: center; padding: 16px 18px 12px; }
.modal-head h3 { font-size: 15px; flex: 1; }
.modal-x { border: 0; background: none; color: var(--sub); cursor: pointer; padding: 4px; border-radius: 6px; }
.modal-x:hover { background: #f1f5f6; color: var(--ink); }
.modal-body { padding: 4px 18px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fafbfb; }

.field { margin-bottom: 13px; }
.field > label { display: block; font-size: 11.5px; color: var(--ink-2); font-weight: 600; margin-bottom: 5px; }
.field > label em { font-style: normal; color: var(--rose); margin-left: 3px; }
.field input[type=text], .field input[type=date], .field textarea, .field select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px;
  font-size: 13px; color: var(--ink); background: #fff; outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 163, 160, .12);
}
.field textarea { resize: vertical; min-height: 66px; }
.field .hint { font-size: 10.5px; color: var(--sub); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-opt {
  border: 1px solid var(--line-2); background: #fff; border-radius: 8px;
  padding: 9px 6px; font-size: 12px; color: var(--ink-2); cursor: pointer;
  text-align: center; transition: border-color .15s, background .15s, color .15s;
}
.type-opt:hover { border-color: var(--teal-soft-2); }
.type-opt.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dd); font-weight: 600; }

/* ================= Toast ================= */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 8px;
  background: #12292b; color: #eafcf9;
  border-radius: 9px; padding: 10px 14px; font-size: 12.5px;
  box-shadow: 0 18px 34px -20px rgba(0, 0, 0, .7);
  animation: toastIn .22s ease-out;
  max-width: 340px;
}
.toast .t-dot { width: 6px; height: 6px; border-radius: 50%; background: #4be0c8; flex: none; }
.toast.warn .t-dot { background: #ffc46b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ================= 图片预览 ================= */
.preview-img { max-width: 100%; max-height: 62vh; border-radius: 8px; display: block; margin: 0 auto; background: #f4f6f7; }
.preview-meta { font-family: var(--mono); font-size: 11px; color: var(--sub); margin-top: 12px; text-align: center; }

/* ================= 自适应 ================= */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: 268px;
    transform: translateX(-102%); transition: transform .22s ease;
    box-shadow: 30px 0 60px -40px rgba(0, 0, 0, .5);
  }
  .app.rail-open .rail { transform: none; }
  .rail-toggle { display: grid; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .view { padding: 16px; }
  .dt-head, .dt-row { grid-template-columns: 30px 1fr 92px 46px; }
  .dt-head .c-hide, .dt-row .c-hide { display: none; }
  .record { padding: 22px 20px; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-right .btn span { display: none; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
}

/* ================= 软件更新弹窗 ================= */
.upd-mask { position: fixed; inset: 0; z-index: 12000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 26, 32, .42); backdrop-filter: blur(3px); animation: updFade .16s ease-out; }
.upd-mask[hidden] { display: none !important; }
.upd-card { width: 100%; max-width: 476px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 70px rgba(8, 32, 40, .26); animation: updUp .2s cubic-bezier(.2, .9, .3, 1); }
.upd-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 0; }
.upd-ico { width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #14b8b4, #0a8280); box-shadow: 0 10px 20px -10px rgba(15, 163, 160, .85); }
.upd-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.upd-tt h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.upd-tt p { margin: 0; font-size: 12px; color: var(--sub); }
.upd-x { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--sub); font-size: 18px; line-height: 1; cursor: pointer; }
.upd-x:hover { background: #f1f5f6; color: var(--ink); }
.upd-body { padding: 16px 20px 2px; }
.upd-tag { display: inline-block; margin-bottom: 8px; padding: 2px 9px; border-radius: 999px; font-size: 11px; color: var(--teal-dd); background: var(--teal-soft); }
.upd-notes { max-height: 168px; overflow: auto; padding: 12px 14px; border: 1px solid #edf2f3; border-radius: 10px; background: #f8fbfb; font-size: 12.5px; line-height: 1.78; color: var(--ink-2); white-space: pre-wrap; }
.upd-prog { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.upd-prog[hidden] { display: none !important; }
.upd-bar { flex: 1; height: 6px; border-radius: 3px; background: #e8f0f0; overflow: hidden; }
.upd-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #14b8b4, #0a8280); transition: width .22s ease; }
.upd-pct { min-width: 40px; text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--sub); }
.upd-hint { margin: 10px 0 4px; font-size: 11.5px; line-height: 1.6; color: #94a3a9; }
.upd-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; }
.upd-foot .btn { height: 36px; padding: 0 18px; border-radius: 9px; }
@keyframes updFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes updUp { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .upd-mask { padding: 14px; } .upd-notes { max-height: 140px; } }

/* ================= SDK 登录/注册弹窗配色统一 ================= */
.ska-primary { background: linear-gradient(135deg, #14b8b4, #0a8280) !important; border: 0 !important; color: #fff !important; box-shadow: 0 12px 24px -14px rgba(15, 163, 160, .95) !important; }
.ska-primary:hover { filter: brightness(1.06); }
.ska-primary:disabled { opacity: .72; }
.ska-links button { color: var(--teal-d) !important; }
.ska-tabs button.on { color: var(--teal-d) !important; border-color: var(--teal) !important; background: var(--teal-soft) !important; }
.ska-card input:focus, .ska-card select:focus, .ska-card textarea:focus { border-color: var(--teal) !important; box-shadow: 0 0 0 3px rgba(15, 163, 160, .14) !important; outline: none !important; }

/* ================= 更新弹窗动效 ================= */
.upd-ico { position: relative; }
.upd-ico::after { content: ''; position: absolute; inset: -4px; border-radius: 14px; border: 2px solid rgba(15, 163, 160, .35); opacity: 0; animation: updRing 2.4s ease-out infinite; }
@keyframes updRing { 0% { transform: scale(.92); opacity: .55; } 70% { transform: scale(1.22); opacity: 0; } 100% { opacity: 0; } }
.upd-bar i { background-image: linear-gradient(90deg, #0fa3a0 0%, #4fded6 45%, #0fa3a0 100%); background-size: 220px 100%; animation: updShine 1.5s linear infinite; }
@keyframes updShine { from { background-position: -110px 0; } to { background-position: 220px 0; } }
.upd-mask.is-busy .upd-ico svg { animation: updSpin 1.6s ease-in-out infinite; }
@keyframes updSpin { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.upd-mask.is-busy .upd-hint::after { content: ' ...'; animation: updDots 1.2s steps(4) infinite; }
@keyframes updDots { 0% { opacity: .2; } 50% { opacity: 1; } 100% { opacity: .2; } }

/* ================= 导出格式选择 ================= */
.exp-list { display: flex; flex-direction: column; gap: 8px; }
.exp-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line-2); border-radius: 9px;
  transition: border-color .15s, background .15s, transform .15s;
}
.exp-item:hover { border-color: var(--teal); background: var(--teal-soft); transform: translateY(-1px); }
.ei-ico {
  flex: none; width: 38px; height: 30px; display: grid; place-items: center;
  border-radius: 6px; background: var(--teal-soft); color: var(--teal-d);
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
}
.exp-item:hover .ei-ico { background: #fff; }
.ei-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ei-tx b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.ei-tx em { font-style: normal; font-size: 11.5px; color: var(--sub); }

/* ================= 打印样式（PDF 导出） ================= */
#printSheet { display: none; }
@media print {
  body > * { display: none !important; }
  body > #printSheet { display: block !important; }
  #printSheet {
    padding: 0; color: #111; font-family: "Microsoft YaHei", -apple-system, sans-serif;
    font-size: 11pt; line-height: 1.7;
  }
  #printSheet h1 { font-size: 18pt; margin: 0 0 4pt; }
  #printSheet h2 { font-size: 13pt; margin: 14pt 0 3pt; }
  #printSheet .ps-meta, #printSheet .ps-sub { color: #666; font-size: 9.5pt; }
  #printSheet .ps-goal { background: #f2fbfa; padding: 6pt; border-radius: 3pt; }
  #printSheet ul { margin: 3pt 0 0 16pt; }
  #printSheet li { font-size: 9.5pt; }
  #printSheet .ps-foot { color: #999; font-size: 9pt; margin-top: 18pt; }
  #printSheet p { margin: 2pt 0; }
  @page { margin: 16mm; }
}

/* ================= 深色主题 ================= */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1416;
  --panel: #141d20;
  --ink: #e7eef0;
  --ink-2: #b3c2c7;
  --sub: #8a9aa1;
  --line: #223035;
  --line-2: #2c3d43;
  --teal: #1fb3af;
  --teal-d: #45c9c4;
  --teal-dd: #7de0db;
  --teal-soft: #12302f;
  --teal-soft-2: #1c4a48;
  --amber-soft: #36290f;
  --violet-soft: #252250;
  --rose-soft: #3a1d24;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-m: 0 12px 30px -18px rgba(0, 0, 0, .8);
  --shadow-l: 0 40px 80px -40px rgba(0, 0, 0, .9);
}
[data-theme="dark"] .rail { background: #101a1c; }
[data-theme="dark"] .rail-search { background: #0f1719; }
[data-theme="dark"] .proj-item:hover { background: #1a2629; }
[data-theme="dark"] .rail-label { color: var(--sub); }
[data-theme="dark"] .proj-list::-webkit-scrollbar-thumb { background: #2a3a3f; }
[data-theme="dark"] .topbar { background: rgba(17, 26, 28, .9); }
[data-theme="dark"] .view::-webkit-scrollbar-thumb { background: #2a3a3f; }
[data-theme="dark"] .btn { background: #172124; }
[data-theme="dark"] .btn.ghost { background: transparent; }
[data-theme="dark"] .btn.ghost:hover, [data-theme="dark"] .icon-btn:hover,
[data-theme="dark"] .modal-x:hover, [data-theme="dark"] .upd-x:hover { background: #1b2629; }
[data-theme="dark"] .chip { background: #1b2629; }
[data-theme="dark"] .exp-body { background: #131c1f; }
[data-theme="dark"] .zone {
  background: linear-gradient(180deg, rgba(18, 48, 47, .45), rgba(18, 48, 47, .1));
}
[data-theme="dark"] .file-row:hover { background: #182326; }
[data-theme="dark"] .file-ic { background: #1b2629; }
[data-theme="dark"] .cat-img .file-ic { background: #14263a; color: #6aa9ea; }
[data-theme="dark"] .cat-doc .file-ic { background: #331a20; color: #e88396; }
[data-theme="dark"] .cat-sheet .file-ic { background: #122b22; color: #5fc394; }
[data-theme="dark"] .cat-raw .file-ic { background: #1e1b38; color: #9d95ee; }
[data-theme="dark"] .cat-zip .file-ic { background: #2d2413; color: #d9a75c; }
[data-theme="dark"] .seg { background: #1a2528; }
[data-theme="dark"] .seg button.on { background: #223034; }
[data-theme="dark"] .dt-head { background: #162023; }
[data-theme="dark"] .dt-row { border-bottom-color: #1e2b2f; }
[data-theme="dark"] .dt-row:hover { background: #182326; }
[data-theme="dark"] .rec-goal { background: #162023; }
[data-theme="dark"] .rec-body, [data-theme="dark"] .exp-rec, [data-theme="dark"] .ver-item pre { background: #131c1f; }
[data-theme="dark"] .drop-mask-in { background: var(--panel); }
[data-theme="dark"] .modal { background: var(--panel); }
[data-theme="dark"] .modal-foot { background: #162023; }
[data-theme="dark"] .field input[type=text], [data-theme="dark"] .field input[type=date],
[data-theme="dark"] .field textarea, [data-theme="dark"] .field select { background: #0f1719; }
[data-theme="dark"] .type-opt { background: #172124; }
[data-theme="dark"] .preview-img { background: #0f1719; }
[data-theme="dark"] .upd-card { background: var(--panel); }
[data-theme="dark"] .upd-notes { background: #131c1f; border-color: var(--line); }
[data-theme="dark"] .upd-bar { background: #213034; }
[data-theme="dark"] .exp-item { background: #172124; }
[data-theme="dark"] .exp-item:hover .ei-ico { background: #172124; }

/* 深色主题下的客服窗口（提高优先级，覆盖 chat.js 注入的样式） */
html[data-theme="dark"] .sk-panel { background: #141d20; border-color: #223035; }
html[data-theme="dark"] .sk-body { background: #0f1719; }
html[data-theme="dark"] .sk-msg.agent { background: #172124; border-color: #223035; color: var(--ink); }
html[data-theme="dark"] .sk-msg.sys { background: #1b2629; color: var(--sub); }
html[data-theme="dark"] .sk-foot { background: #141d20; border-top-color: #223035; }
html[data-theme="dark"] .sk-in textarea { background: #0f1719; border-color: #2c3d43; color: var(--ink); }
html[data-theme="dark"] .sk-att { background: #172124; border-color: #2c3d43; color: #9fb0b6; }
html[data-theme="dark"] .sk-msg.agent .sk-file { background: #1e2b2f; color: var(--ink); }
html[data-theme="dark"] .sk-again { background: #172124; }
html[data-theme="dark"] .sk-note { background: #172124; border-color: #2c3d43; color: var(--ink); }
html[data-theme="dark"] .sk-note .sk-note-tx { color: var(--ink-2, #b3c2c7); }

/* ================= 启动动画 ================= */
.boot {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg, #f5f6f7);
  transition: opacity .38s ease, visibility .38s;
}
html[data-theme="dark"] .boot { background: #0f1517; }
.boot.is-out { opacity: 0; visibility: hidden; }
.boot-inner { display: flex; flex-direction: column; align-items: center; animation: bootIn .55s cubic-bezier(.2, .8, .3, 1) both; }
.boot-mark { position: relative; line-height: 0; }
.boot-mark img { width: 62px; height: 62px; border-radius: 15px; box-shadow: 0 16px 40px rgba(10, 130, 128, .28); }
.boot-mark::after {
  content: ''; position: absolute; inset: -8px; border-radius: 22px;
  border: 2px solid rgba(15, 163, 160, .32);
  animation: bootPulse 1.9s ease-out infinite;
}
.boot-name { margin-top: 18px; font-size: 19px; font-weight: 700; letter-spacing: .2px; color: var(--ink, #12181b); }
.boot-name b { color: var(--teal, #0fa3a0); }
.boot-sub { margin-top: 5px; font-size: 12px; letter-spacing: 1px; color: var(--sub, #7c8a91); }
.boot-bar { width: 128px; height: 3px; margin-top: 20px; border-radius: 3px; background: rgba(15, 163, 160, .16); overflow: hidden; }
.boot-bar i {
  display: block; width: 42%; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #14b8b4, #0aa79f);
  animation: bootBar 1.05s ease-in-out infinite;
}
@keyframes bootIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bootPulse { 0% { transform: scale(.92); opacity: .75; } 72% { transform: scale(1.3); opacity: 0; } 100% { opacity: 0; } }
@keyframes bootBar { 0% { transform: translateX(-105%); } 100% { transform: translateX(320%); } }
