/* ============ 新领航·视觉AI智维平台 — 主题（对齐原版企业级 UI） ============ */
:root {
  /* 主色：对齐参考平台的专业蓝（原版按钮蓝） */
  --brand: #2B6BE4;
  --brand-600: #1F5BD0;
  --brand-weak: #EAF1FE;
  --brand-weak-2: #F5F8FF;
  --navy: #141B34;          /* 顶栏 logo 深色胶囊 */
  --bg: #F5F7FA;
  --panel: #FFFFFF;
  --text: #1D2129;
  --text-2: #4E5969;
  --muted: #86909C;
  --border: #E5E8EF;
  --border-2: #F0F2F5;
  --shadow-sm: 0 1px 2px rgba(20, 30, 60, .04);
  --shadow: 0 1px 3px rgba(20, 30, 60, .05), 0 6px 16px rgba(20, 30, 60, .05);
  --shadow-lg: 0 16px 48px rgba(20, 30, 60, .16);
  --ok: #00B42A; --ok-weak: #E8FFEA;
  --amber: #FF7D00; --amber-weak: #FFF3E8;
  --err: #F53F3F; --err-weak: #FFECE8;
  --blue: var(--brand);
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d7dce5; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c0c7d4; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.02fr .98fr; background: var(--bg); }
.login-left {
  position: relative; color: #fff; padding: 56px 60px; overflow: hidden;
  background: linear-gradient(150deg, #101A38 0%, #1B2C60 55%, #2B6BE4 145%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-left::after {
  content: ""; position: absolute; right: -140px; bottom: -140px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(120, 160, 255, .22), transparent 70%); border-radius: 50%;
}
.login-left .brand { display: flex; align-items: center; gap: 13px; font-size: 21px; font-weight: 800; letter-spacing: .5px; position: relative; z-index: 1; }
.login-left .logo { width: 46px; height: 46px; border-radius: 11px; background: rgba(255,255,255,.92); object-fit: contain; padding: 5px; }
.login-left h1 { font-size: 34px; line-height: 1.35; margin: 30px 0 14px; font-weight: 800; position: relative; z-index: 1; }
.login-left p { color: #C7D2F0; font-size: 14.5px; max-width: 440px; position: relative; z-index: 1; margin: 0; }
.login-left .feats { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; position: relative; z-index: 1; }
.login-left .feats div { display: flex; align-items: center; gap: 11px; color: #E4E9FA; font-size: 14px; }
.login-left .feats .dot { width: 7px; height: 7px; border-radius: 50%; background: #8FA4FF; flex: none; }
.login-left .foot { color: #AEB9E6; font-size: 12.5px; position: relative; z-index: 1; }
.login-right { background: #fff; display: grid; place-items: center; padding: 40px; }
.login-card { width: 360px; max-width: 100%; }
.login-card h2 { font-size: 22px; margin: 0 0 6px; font-weight: 700; }
.login-card .sub { color: var(--muted); margin-bottom: 28px; font-size: 13px; }
.login-card .field { margin-bottom: 16px; }
.login-card label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; font-weight: 600; }
.login-card input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text); outline: none; transition: .15s;
}
.login-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.login-tip { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- 顶栏（深色 logo 胶囊，对齐原版） ---------- */
.appbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 22px; gap: 18px; position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 2px rgba(20,30,60,.03);
}
.appbar .brand {
  display: inline-flex; align-items: center; gap: 9px; background: transparent; color: var(--navy);
  font-weight: 700; font-size: 14px; padding: 7px 15px 7px 9px; border-radius: 9px; letter-spacing: .3px;
}
.appbar .brand .logo {
  width: 24px; height: 24px; border-radius: 6px; background: rgba(255,255,255,.95);
  object-fit: contain; padding: 2px;
}
.appbar .spacer { flex: 1; }
.thumb { width: 52px; height: 38px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border, #e5e9f2); background: #f3f5f9; cursor: pointer; flex: none; }
.appbar .nav { display: flex; gap: 2px; }
.appbar .nav a { padding: 7px 14px; border-radius: 7px; color: var(--text-2); font-weight: 600; font-size: 13px; transition: .15s; }
.appbar .nav a:hover { background: var(--bg); }
.appbar .nav a.active { background: var(--brand-weak); color: var(--brand-600); }
.appbar .user { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }
.appbar .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-weak); color: var(--brand-600); display: grid; place-items: center; font-weight: 700; font-size: 13px; }

/* ---------- 布局 ---------- */
.page { padding: 22px 26px 40px; max-width: 1340px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.page-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.page-head .desc { color: var(--muted); font-size: 13px; margin-top: 5px; }
/* 下拉小菜单（清除标注 / 撤销 AI 预标注） */
.menu-wrap { position: relative; display: inline-block; }
.menu-wrap .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 230px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; }
.menu-wrap .menu a { display: block; padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; }
.menu-wrap .menu a:hover { background: var(--brand-weak); color: var(--brand-600); }
.menu-wrap .menu a .muted { font-size: 12px; }

/* 标注页「标准类别」建议条：点击才真正加入项目类别表（保证下拉框里每个类别都有模型） */
.cat-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: #FAFBFF; }
.cat-suggest .muted { font-size: 12px; margin-right: 2px; }
.cat-suggest .chip {
  border: 1px solid #C7D2FE; background: #EEF2FF; color: var(--brand-600);
  font-size: 12px; padding: 3px 9px; border-radius: 999px; cursor: pointer; transition: .15s;
}
.cat-suggest .chip:hover { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

/* ---------- 卡片 / 网格 ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1080px) { .cols-4 { grid-template-columns: repeat(2, 1fr); } .cols-3 { grid-template-columns: 1fr; } }

/* 项目卡片首页（对齐原版：渐变头 + 描述 + 类别 + 底部 meta） */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.proj-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-sm); transition: .2s; cursor: pointer; position: relative; display: flex; flex-direction: column;
}
.proj-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #C9D8F8; }
.proj-card .head { height: 84px; padding: 15px 18px; color: #fff; display: flex; flex-direction: column; justify-content: center; position: relative; }
.proj-card .head::after { content: ""; position: absolute; right: -34px; top: -34px; width: 120px; height: 120px; background: rgba(255,255,255,.10); border-radius: 50%; }
.proj-card .head .ptype {
  font-size: 11.5px; font-weight: 600; align-self: flex-start; background: rgba(255,255,255,.22);
  padding: 2px 8px; border-radius: 5px; margin-bottom: 7px; backdrop-filter: blur(2px);
}
.proj-card .head .pname { font-size: 15px; font-weight: 800; letter-spacing: .3px; }
.proj-card .body { padding: 13px 18px 14px; flex: 1; display: flex; flex-direction: column; }
.proj-card .pdesc { color: var(--muted); font-size: 12.5px; line-height: 1.6; min-height: 40px; margin-bottom: 10px; }
.proj-card .catlabel { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.proj-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; min-height: 24px; }
.proj-card .foot {
  margin-top: auto; padding-top: 11px; border-top: 1px dashed var(--border-2);
  display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px;
}
.proj-card .foot .ops { display: flex; gap: 4px; }
.proj-card .foot .ops button {
  background: transparent; border: none; color: var(--muted); width: 26px; height: 26px; border-radius: 6px; font-size: 13px; transition: .15s;
}
.proj-card .foot .ops button:hover { background: #F2F4F8; color: var(--text); }
.new-card {
  border: 1.5px dashed #C6D3EE; background: var(--brand-weak-2); display: grid; place-items: center;
  min-height: 200px; color: var(--brand-600); font-weight: 700; border-radius: 10px; cursor: pointer; transition: .18s;
}
.new-card:hover { background: var(--brand-weak); border-color: var(--brand); }
.new-card .plus { font-size: 30px; line-height: 1; margin-bottom: 6px; }

/* 统计块（图标 + 数值，对齐原版） */
.stat { padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.stat .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; font-size: 18px; flex: none; }
.stat .v { font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .3px; line-height: 1.2; }
.stat .l { color: var(--muted); font-size: 12.5px; }

/* ---------- 徽章 / 标签 ---------- */
.badge { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; line-height: 1.8; white-space: nowrap; }
.badge.green { background: var(--ok-weak); color: #009A29; }
.badge.blue { background: var(--brand-weak); color: var(--brand-600); }
.badge.amber { background: var(--amber-weak); color: #C46300; }
.badge.gray { background: #F2F3F5; color: var(--muted); }
.badge.red { background: var(--err-weak); color: #D92E2E; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; background: #F2F4F8; color: var(--text-2); margin: 0 6px 6px 0; white-space: nowrap; }
/* 类别 pill（蓝描边，对齐原版「① 湿滑」样式） */
.tag.cat { background: #fff; border: 1px solid #C9D8F8; color: var(--brand-600); font-weight: 600; }
.tag.cat i { font-style: normal; color: var(--muted); margin-right: 4px; font-size: 11px; }

/* ---------- 按钮 ---------- */
.btn { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; transition: .15s; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* 全局铁律：按钮/标签/徽标/类别 pill 文字一律不折行（2026-09-23 用户拍板） */
button, .btn, .badge, .tag, .chip, .pill { white-space: nowrap; }
.btn:hover { border-color: #B9CBEE; color: var(--brand-600); background: #FBFCFE; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: #F2F4F8; color: var(--text); }
.btn.danger { color: var(--err); border-color: #F7C6C6; }
.btn.danger:hover { background: var(--err-weak); color: #D92E2E; }
.btn.sm { padding: 5px 12px; font-size: 12.5px; border-radius: 6px; }
.btn.link { border: none; background: transparent; color: var(--brand); padding: 2px 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.form-row { display: flex; gap: 14px; margin-bottom: 16px; }
.form-row > div { flex: 1; }
label.fld { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; font-weight: 600; }
input.in, select.in, textarea.in { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; color: var(--text); outline: none; transition: .15s; font-family: inherit; }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
select.in.tinted { background: var(--brand-weak); border-color: #C9D8F8; color: var(--brand-600); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: none; background: #fff; padding: 7px 15px; font-weight: 600; color: var(--text-2); font-size: 13px; transition: .15s; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--brand-weak); color: var(--brand-600); }
/* 表单内联行（对齐原版「模型架构 | 任务类型 | GPU机型」） */
.fieldrow { display: flex; gap: 10px; margin-bottom: 14px; }
.fieldrow > div { flex: 1; }

/* ---------- 弹窗 ---------- */
/* 2026-09-22 修复：grid place-items:center 会让超高弹窗上沿溢出视口且无法滚动到（"上半截没有"）。
   改 flex + margin:auto —— 弹窗矮时居中，超高时贴顶且遮罩可整体滚动，顶部永远可达。
   2026-09-22 二次修复（矮窗口下半截不见）：
   ① max-height 用 100dvh-48px（90vh + 上下 padding 在矮视口会超出屏幕，底部按钮被截）
   ② 弹窗改 flex 列布局：标题/底部按钮常驻，只有 .mbody 内部滚动 —— 按钮永远可见 */
.mask { position: fixed; inset: 0; background: rgba(20,30,60,.42); display: flex; overflow-y: auto; z-index: 50; padding: 24px 20px; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); width: 540px; max-width: 100%; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: hidden; margin: auto; display: flex; flex-direction: column; }
.modal.wide { width: 920px; }
.modal h3 { margin: 0; padding: 16px 22px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex: none; }
.modal .mbody { padding: 20px 22px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.modal .mfoot { padding: 13px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex: none; background: #fff; }
.x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; transition: .15s; font-weight: 400; }
.x:hover { color: var(--text); }
.req::before { content: "*"; color: var(--err); margin-right: 3px; }

/* ---------- 项目内页（2026-09-22：去掉左侧白栏，单栏全宽，返回链接放进主页面顶部） ---------- */
.proj-inner { min-height: calc(100vh - 56px); }
.back-row { margin-bottom: 8px; }
.back-row a { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.back-row a:hover { color: var(--brand); }
.content { padding: 20px 24px 40px; overflow: auto; background: var(--bg); }

/* ---------- 流程步骤条（对齐原版：图标 + 计数，横线连接） ---------- */
.flowbar { display: flex; align-items: stretch; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.flow-step { flex: 1; display: flex; align-items: center; gap: 11px; position: relative; }
.flow-step .fn { width: 34px; height: 34px; border-radius: 9px; background: #F2F4F8; color: var(--muted); display: grid; place-items: center; font-size: 16px; flex: none; transition: .2s; }
.flow-step.done .fn { background: var(--ok-weak); color: var(--ok); }
.flow-step.cur .fn { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-weak); }
.flow-step .t { font-weight: 700; color: var(--text); font-size: 13px; }
.flow-step .s { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.flow-step .ln { flex: 1; height: 1px; background: linear-gradient(90deg, #DCE3F0, #EDF1F8); margin: 0 14px; }
.flow-step:last-child .ln { display: none; }

/* 信息条（蓝） / 成功条（绿），对齐原版「下一步建议」「数据集已就绪」 */
.banner { border-radius: 9px; padding: 11px 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.banner.info { background: var(--brand-weak); border: 1px solid #D3E0FB; color: var(--brand-600); }
.banner.ok { background: var(--ok-weak); border: 1px solid #BDF0C6; color: #007F22; }
.banner .bi { font-size: 15px; }
.next-tip { background: var(--brand-weak); border: 1px solid #D3E0FB; border-radius: 9px; padding: 11px 15px; color: var(--brand-600); font-weight: 600; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; font-size: 13px; }

/* ---------- 表格 ---------- */
table.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
table.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 11px 15px; background: #FAFBFC; border-bottom: 1px solid var(--border); letter-spacing: .3px; white-space: nowrap; }
table.tbl td { padding: 11px 15px; border-bottom: 1px solid var(--border-2); font-size: 13px; color: var(--text-2); vertical-align: middle; }
table.tbl tbody tr:hover { background: #FAFBFF; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td b, table.tbl td .strong { color: var(--text); font-weight: 600; }
.tbl-plain { box-shadow: none; }
.rowline { display: flex; align-items: center; gap: 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.g { background: var(--ok); } .dot.r { background: var(--err); } .dot.b { background: var(--brand); } .dot.a { background: var(--amber); }

/* ---------- 标注工作台（对齐原版：顶部操作条 + 胶片条 + 缩放 + 右侧图例） ---------- */
.anno-bar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 10px 10px 0 0; padding: 9px 14px; border-bottom: none; }
.anno-bar .spacer { flex: 1; }
.anno-bar .title { font-weight: 700; font-size: 13px; }
.anno-bar .title .sub { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 8px; }

/* ---------- 在线标注：页头 + 工具条 + 三栏画布 ---------- */
/* 三栏占满剩余高度（工具条高度由内容决定，不再是写死的一屏减多少） */
.anno-page { display: flex; flex-direction: column; height: calc(100vh - 128px); min-height: 620px; }
.head-actions { display: flex; gap: 10px; }
.head-actions .btn { white-space: nowrap; }
/* 标注工具条：所有控件**同一行**；.spacer 把「清空画布 / 清除该图标注」推到右侧成组，间距 12px 不拥挤 */
.toolbar-card { flex: none; margin-bottom: 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.toolrow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: nowrap; }
.toolrow .spacer { flex: 1; }
.toolrow .fld { display: flex; align-items: center; gap: 8px; }
.toolrow .lbl { color: var(--muted); font-size: 13px; white-space: nowrap; }
/* 统一行内控件高度，避免 select/input/button 高矮不齐显得乱 */
.toolrow .btn { height: 32px; padding: 0 13px; font-size: 13px; flex: none; white-space: nowrap; }
.toolrow .seg button { padding: 0 14px; height: 30px; }
.toolrow select.in, .toolrow input.in { height: 32px; padding: 0 10px; font-size: 13px; }
.toolrow select.in { width: 150px; }
.toolrow input.in { width: 132px; }
/* 推理页控制行紧凑变体：控件多，必须塞进 ~840px 内容区（1100px 窗口） */
.toolrow.compact { gap: 8px; padding: 12px; }
.toolrow.compact .fld { min-width: 0; }
.toolrow.compact .slider { flex: none; }
.toolrow.compact .slider input[type=range] { width: 72px; }
.toolrow.compact select.in.grow { width: auto; flex: 1 1 120px; min-width: 96px; }
.toolrow.compact select.in.fixed { width: 84px; flex: 0 0 84px; }
/* 标准类别建议行贴在工具条卡片内部（用上边框分隔，不再是原来悬空的一条） */
.toolbar-card .cat-suggest { border-top: 1px solid var(--border); border-bottom: none; padding: 9px 16px; }

.anno { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px 1fr 276px; gap: 6px; }
/* B2 三栏宽度可调：分隔条（列宽由组件内联 style 控制，此处仅为外观与交互态） */
.anno .splitter { cursor: col-resize; border-radius: 4px; min-height: 0; align-self: stretch; }
.anno .splitter:hover { background: var(--brand-weak); }
body.col-resizing { cursor: col-resize !important; user-select: none; -webkit-user-select: none; }
body.col-resizing .anno canvas { pointer-events: none; }
.anno .pane { background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.anno .pane h4 { margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.anno .pane h4 .cnt { color: var(--muted); font-weight: 500; font-size: 12px; font-variant-numeric: tabular-nums; }
.anno .pane .scroll { overflow: auto; flex: 1; }
.anno .task { padding: 8px 12px; border-bottom: 1px solid var(--border-2); cursor: pointer; display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.anno .task:hover { background: var(--bg); }
.anno .task.on { background: var(--brand-weak); }
.anno .task .no { color: var(--brand-600); font-weight: 700; font-variant-numeric: tabular-nums; width: 44px; flex: none; }
.anno .task .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.anno .canvas-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; background: #F1F3F8; }
.anno .filmstrip { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--border); overflow-x: auto; }
.anno .filmstrip .fs-item { width: 56px; height: 38px; border-radius: 5px; border: 2px solid transparent; background: #E9EDF5; overflow: hidden; flex: none; cursor: pointer; object-fit: cover; }
.anno .filmstrip .fs-item.on { border-color: var(--brand); }
.anno .filmstrip .pager { margin-left: auto; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; flex: none; }
.anno .stage { flex: 1; display: grid; place-items: center; overflow: auto; padding: 14px; position: relative; }
.anno canvas { background: #fff; box-shadow: var(--shadow); max-width: 100%; border-radius: 4px; }
.anno .zoom { position: absolute; left: 14px; bottom: 12px; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.94); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-size: 12.5px; color: var(--text-2); box-shadow: var(--shadow-sm); }
.anno .zoom button { border: none; background: transparent; color: var(--text-2); font-size: 13px; width: 22px; height: 22px; border-radius: 5px; }
.anno .zoom button:hover { background: #F2F4F8; }
.anno .ann-head { font-size: 12.5px; color: var(--muted); padding: 8px 14px; border-bottom: 1px solid var(--border-2); }
.anno .ann-row { padding: 9px 14px; border-bottom: 1px solid var(--border-2); display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.anno .ann-row:hover { background: var(--brand-weak-2); }
/* 选中联动：点画布上的框 → 右侧列表对应行滚动定位并高亮（双向） */
.anno .ann-row.sel { background: var(--brand-weak); box-shadow: inset 3px 0 0 var(--brand-600, #4D6BFE); }
.anno .ann-row .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 7px; }
.anno .ann-row .eye { color: var(--muted); cursor: pointer; }
.anno .swatch { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 12.5px; }
.anno .swatch:hover { background: #F5F7FB; }
.anno .swatch.on { background: var(--brand-weak); color: var(--brand-600); font-weight: 600; }

/* ---------- 训练日志终端 ---------- */
.term { background: #0B0F1A; color: #CBD8F5; font-family: "SFMono-Regular", Consolas, "Courier New", monospace; font-size: 12.5px; border-radius: 10px; padding: 16px; height: clamp(200px, calc(100vh - 300px), 430px); height: clamp(200px, calc(100dvh - 300px), 430px); overflow: auto; line-height: 1.75; }
.term .ok { color: #5EE0A0; } .term .warn { color: #FFD479; } .term .dim { color: #7C89A8; } .term .ln { white-space: pre; }
.term-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.live { display: inline-flex; align-items: center; gap: 5px; background: var(--ok-weak); color: #007F22; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 20px; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; }

/* ---------- 推理结果工作台 ---------- */
.infer-grid { display: grid; grid-template-columns: 1fr 372px; gap: 16px; }
.slider { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-2); }
.slider input[type=range] { width: 96px; accent-color: var(--brand); }
.slider .val { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; min-width: 30px; }
/* ---------- 推理与回流（对齐参考平台：控制行 + 三页签 + 左大图/右结果等高） ---------- */
.infer-tabs { margin-bottom: 14px; }
.infer-grid { display: grid; grid-template-columns: 1fr 348px; gap: 16px; align-items: stretch; height: calc(100vh - 330px); min-height: 440px; }
.infer-stage-card { display: flex; flex-direction: column; overflow: hidden; min-height: 0; padding: 0; }
.infer-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto; padding: 14px; background: #F1F3F8; }
.infer-stage canvas { background: #fff; box-shadow: var(--shadow); max-width: 100%; border-radius: 4px; }
.infer-side { display: flex; flex-direction: column; overflow: hidden; min-height: 0; padding: 0; }
.infer-side h4 { margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.infer-side .scroll { overflow: auto; flex: 1; padding: 12px 14px 0; }
.infer-ops { flex: none; padding: 12px 14px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* ---------- 新建训练弹窗（参考平台版式：参数网格 + 增强开关排） ---------- */
.grp-label { font-size: 13px; font-weight: 700; color: var(--text); margin: 14px 0 8px; padding-left: 9px; border-left: 3px solid var(--brand); }
.param-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 4px; }
.param-grid .fld { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.param-grid .in { height: 32px; font-size: 13px; }
.aug-row { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 4px 2px 2px; }
.sw8 { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.sw8 i { width: 32px; height: 18px; border-radius: 9px; background: #C9D2E5; position: relative; transition: .15s; flex: none; }
.sw8 i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(15,35,95,.25); }
.sw8.on { color: var(--text); font-weight: 600; }
.sw8.on i { background: var(--brand); }
.sw8.on i::after { left: 16px; }
.det-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: #fff; transition: .15s; }
.det-item:hover { border-color: #C9D8F8; background: var(--brand-weak-2); }
/* 识别结果选中态：点画布框或点结果项互相同步定位 */
.det-item.sel { border-color: var(--brand-600, #4D6BFE); background: var(--brand-weak); box-shadow: inset 3px 0 0 var(--brand-600, #4D6BFE); }
.det-item .sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.det-item .nm { font-weight: 700; color: var(--text); font-size: 13px; }
.det-item .cf { color: var(--muted); font-size: 12px; }
.det-item .ops { margin-left: auto; display: flex; gap: 6px; }
.det-del { text-decoration: line-through; opacity: .45; }
.imgbar { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 2px; }
.imgbar .ib { width: 62px; height: 42px; border-radius: 6px; border: 2px solid transparent; background: #E9EDF5; flex: none; cursor: pointer; object-fit: cover; }
.imgbar .ib.on { border-color: var(--brand); }

/* ---------- Toast ---------- */
.toasts { position: fixed; top: 68px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--brand); box-shadow: var(--shadow-lg); padding: 11px 16px; border-radius: 8px; min-width: 220px; font-size: 13px; color: var(--text); animation: toastIn .2s ease; }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--amber); }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* ---------- 杂项 ---------- */
.muted { color: var(--muted); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.empty { text-align: center; color: var(--muted); padding: 40px; font-size: 13px; }
.tag-group { display: flex; flex-wrap: wrap; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border-2); font-size: 13px; }
.kv b { color: var(--text-2); font-weight: 600; }
.progress { height: 7px; background: #EDF0F5; border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #5B90F0); border-radius: 6px; transition: width .4s; }
.pill { font-size: 12px; padding: 2px 10px; border-radius: 20px; background: #F2F4F8; color: var(--text-2); font-weight: 600; }
.pill.link { background: var(--brand-weak); color: var(--brand-600); }
.mini-list { padding: 4px 0; }
.mini-list .mi { display: flex; align-items: center; gap: 9px; padding: 8px 14px; font-size: 12.5px; border-bottom: 1px solid var(--border-2); }
.mini-list .mi:last-child { border-bottom: none; }
.mini-list .mi .sp { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ============ 产品化改造 2026-09-22：全局侧导航 + 工作台 ============ */
.shell { display: flex; min-height: 100vh; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-col .appbar { width: 100%; }
.sidenav {
  width: 196px; flex: none; background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 10px; position: sticky; top: 0; height: 100vh; box-sizing: border-box;
}
.sidenav .sbrand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; color: var(--text); padding: 2px 6px 14px; line-height: 1.25; }
.sidenav .sbrand .logo { width: 26px; height: 26px; border-radius: 6px; flex: none; }
.side-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: .15s; }
.side-item .sic { display: grid; place-items: center; width: 16px; height: 16px; }
.side-item:hover { background: var(--bg); color: var(--text); }
.side-item.on { background: var(--brand-weak); color: var(--brand-600); }
.sidenav .sfoot { margin-top: auto; padding: 10px 6px 2px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-sm); }
.stat-card .ic { width: 38px; height: 38px; border-radius: 9px; background: var(--brand-weak); color: var(--brand-600); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.stat-card .num { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat-card .lbl { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.wb-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; align-items: start; }
.mcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mcard { padding: 14px; }
@media (max-width: 1100px) { .wb-grid { grid-template-columns: 1fr; } .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* 数据集标注页：当前选中项目行高亮 */
table.tbl tbody tr.row-on { background: #F0F3FF; }
table.tbl tbody tr.row-on td:first-child { box-shadow: inset 3px 0 0 var(--brand-600,#4D6BFE); }

/* ===== 模型库（对齐参考平台卡片 + 详情弹窗） ===== */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.model-card { background: #fff; border: 1px solid var(--border-2); border-radius: 10px; padding: 16px; cursor: pointer;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.model-card:hover { border-color: var(--brand); box-shadow: 0 4px 16px rgba(77,107,254,.10); transform: translateY(-2px); }
.mc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mc-name { font-weight: 700; font-size: 13px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-algo { font-size: 12px; color: var(--brand-600, #3A55D9); background: #F0F3FF; border-radius: 4px; padding: 1px 8px; display: inline-block; margin-top: 4px; }
.mc-meta { font-size: 12px; color: var(--text-2); margin-top: 10px; }
.mc-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-2); }
.mc-metrics .metric .v { font-weight: 700; font-size: 13px; color: #1D2129; }
.mc-metrics .metric .k { font-size: 11px; color: var(--text-2); margin-top: 2px; }

.ms-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ms-card { border: 1px solid var(--border-2); border-radius: 8px; padding: 12px 14px; }
.ms-card .v { font-weight: 800; font-size: 22px; color: #1D2129; }
.ms-card .k { font-size: 11.5px; color: var(--text-2); margin-top: 4px; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chart-card { border: 1px solid var(--border-2); border-radius: 8px; padding: 12px 14px; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-title { font-size: 12.5px; font-weight: 600; color: #1D2129; margin-bottom: 8px; }
.chart-box { width: 100%; height: 200px; }

/* ===== 用户管理：授权多选 pill ===== */
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { font-size: 12.5px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-2);
  color: var(--text-2); cursor: pointer; user-select: none; transition: all .15s ease; }
.check-pill:hover { border-color: var(--brand); color: var(--brand-600, #3A55D9); }
.check-pill.on { background: #F0F3FF; border-color: var(--brand); color: var(--brand-600, #3A55D9); font-weight: 600; }

@media (max-width: 900px) { .ms-grid, .chart-grid { grid-template-columns: 1fr; } .mc-metrics { grid-template-columns: repeat(2, 1fr); } }

/* ===== UI 细节规范（2026-09-22 第四批）：按钮按场景统一尺寸 ===== */
/* 表格内操作按钮：一律 28px 高小按钮，忽略混用的 sm/primary 类差 */
table.tbl .btn { padding: 4px 12px; font-size: 12.5px; border-radius: 6px; line-height: 1.55; }
/* 工具栏按钮：与 32px 下拉框/输入框同高 */
.toolrow .btn { height: 32px; padding: 0 14px; font-size: 12.5px; border-radius: 6px; }
/* 弹窗底部按钮：同一尺寸，主按钮在右 */
.mfoot { display: flex; justify-content: flex-end; gap: 8px; }
.mfoot .btn { min-width: 72px; justify-content: center; }
/* 卡片操作区按钮统一 */
.mcard .btn, .model-card .btn { padding: 4px 12px; font-size: 12.5px; border-radius: 6px; }

/* ===== 驾驶舱可点击节点/统计卡（2026-09-22 第五批） ===== */
.flow-step.clickable { cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.flow-step.clickable:hover { background: #F0F3FF; border-color: var(--brand); transform: translateY(-1px); }
.card.stat.clickable { cursor: pointer; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.card.stat.clickable:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(77,107,254,.10); transform: translateY(-2px); }
.card.stat.clickable .l { color: var(--brand-600, #3A55D9); }

/* ===== 灵动化打磨（2026-09-22 第六批）：柔和阴影 / 微交互 / 页面过渡 ===== */
body { background: linear-gradient(180deg, #F7F9FD 0%, #F2F5FA 100%); }
.card { border-radius: 12px; box-shadow: 0 1px 2px rgba(29,37,59,.04), 0 6px 20px rgba(77,107,254,.05); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.card:hover { box-shadow: 0 2px 6px rgba(29,37,59,.06), 0 10px 28px rgba(77,107,254,.09); }
.btn { transition: all .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, #4D6BFE, #6C8CFF); box-shadow: 0 2px 8px rgba(77,107,254,.26); }
.btn.primary:hover { background: linear-gradient(135deg, #3F5CE8, #5B7BFF); box-shadow: 0 4px 14px rgba(77,107,254,.34); }
.badge, .tag, .chip { transition: all .15s ease; }
.modal { animation: popIn .2s cubic-bezier(.2,.8,.3,1.1) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
/* ⚠️ 这里不能加 animation-fill-mode:both/forwards —— Chromium 会把动画结束态的 transform
   永久保留成 identity matrix，使 .page 成为 containing block，页内 position:fixed 的弹窗遮罩
   被困在页面盒子里（矮窗口下弹窗底部被截、遮罩盖不住顶栏）。动画结束回到自然态即可（视觉等价） */
.page, .proj-inner .content > div { animation: pageIn .24s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.side-item { transition: all .18s ease; }
.side-item:hover { transform: translateX(2px); }
.side-item.on { background: linear-gradient(90deg, #EEF2FF 0%, #F6F8FF 100%); box-shadow: inset 3px 0 0 var(--brand); }
.stat .ic, .stat-card .ic { background: linear-gradient(135deg, #EAF0FF, #F6F9FF); }
.mask { animation: fadeIn .18s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== 标注器：状态色边 / 面板按钮区 / 缩放控件 ===== */
.thumb.st-ok { border: 2px solid #34A853; }
.thumb.st-todo { border: 2px solid #E8A33D; }
.thumb.st-na { border: 2px solid #C9CFDA; filter: grayscale(.6); opacity: .75; }
.anno .filmstrip .fs-item.st-ok { border-color: #34A853; }
.anno .filmstrip .fs-item.st-todo { border-color: #E8A33D; }
.anno .filmstrip .fs-item.st-na { border-color: #C9CFDA; filter: grayscale(.6); opacity: .75; }
.anno .filmstrip .fs-item.on { box-shadow: 0 0 0 2px var(--brand); border-color: var(--brand); filter: none; opacity: 1; }
.pane h4 { display: flex; align-items: center; gap: 8px; }
.pane h4 .cnt { margin-left: 0; }
.pane-acts { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.pane-acts .btn { padding: 3px 10px; font-size: 12px; border-radius: 6px; }
.zoom-num { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; }
.anno .stage { overflow: auto; }

.pane h4 { white-space: nowrap; }
.pane-acts { flex: none; }
.pane-acts .btn { white-space: nowrap; flex: none; padding: 3px 8px; }
.pane h4 .cnt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }

/* ===== 标注器平移模式与模式提示（2026-09-22 第七批） ===== */
.anno .stage.is-pan { cursor: grab; }
.anno .stage.is-pan:active { cursor: grabbing; }
.anno .stage.is-pan canvas { pointer-events: none; }
.anno .stage.is-rect canvas { cursor: crosshair; }
.mode-hint { font-size: 11.5px; color: var(--text-2); font-weight: 400; margin-left: 8px; }
