:root {
  --navy: #17324d;
  --teal: #0f766e;
  --ink: #23303c;
  --muted: #6b7887;
  --line: #dfe6ee;
  --soft: #f5f8fa;
  --green: #12805c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f2f5f4;
  color: var(--ink);
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

a { color: var(--teal); }

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.topbar .brand span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #2b8a70; font-size: 15px; }
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #cfe0d9; }
.topbar button { background: rgba(255,255,255,.12); border: 0; color: #fff; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.topbar button:hover { background: rgba(255,255,255,.2); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 20px 60px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; box-shadow: 0 10px 30px rgba(23,50,77,.05); }
.card + .card { margin-top: 20px; }

h1 { font-size: 20px; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 4px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }

.grid2 { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

.drop {
  border: 2px dashed #c6d3cb; background: #f8fbf9; border-radius: 14px; min-height: 260px;
  display: grid; place-items: center; text-align: center; cursor: pointer; padding: 16px; color: #71857a;
  transition: .15s;
}
.drop:hover, .drop.over { border-color: var(--teal); background: #f2faf6; }
.drop img { max-width: 100%; max-height: 250px; border-radius: 8px; object-fit: contain; }
.drop .icon { width: 54px; height: 54px; border-radius: 16px; background: #e3f0e9; color: var(--green); display: grid; place-items: center; font-size: 24px; margin: 0 auto 10px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
input[type=text], input[type=password], input[type=search] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-family: inherit;
  outline: none; background: #fff;
}
input:focus { border-color: var(--teal); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--teal); color: #fff; border: 0; border-radius: 11px; padding: 11px 20px;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.btn:hover { background: #0c635c; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: #eef3f1; color: var(--navy); }
.btn.ghost:hover { background: #e3ece8; }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 9px; }

.candidates { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; }
.candidate {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 12px; cursor: pointer; background: #fff; transition: .12s;
}
.candidate:hover { border-color: #9dc3b4; background: #f7fbf9; }
.candidate.active { border-color: var(--teal); background: #effaf4; box-shadow: 0 0 0 2px rgba(15,118,110,.12); }
.candidate .radio { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #b6c4bd; margin-top: 4px; flex: none; }
.candidate.active .radio { border-color: var(--teal); background: radial-gradient(circle, var(--teal) 0 3px, #fff 4px); }
.candidate .path { font-size: 12px; color: var(--muted); word-break: break-all; }
.candidate .label { font-weight: 700; font-size: 13.5px; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 20px; background: #eef3f1; color: #4a6b5c; margin-left: 6px; }
.badge.hit { background: #e2f5ea; color: #166b4a; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.chip:hover { border-color: var(--teal); color: var(--teal); }

.selected { background: #f0f7f4; border: 1px solid #cfe4da; border-radius: 11px; padding: 10px 12px; font-size: 13px; word-break: break-all; }
.selected b { display: block; margin-bottom: 3px; }

.progress { height: 8px; background: #e6ecef; border-radius: 6px; overflow: hidden; margin: 10px 0 6px; }
.progress > div { height: 100%; background: linear-gradient(90deg, #12805c, #2aa37a); width: 0; transition: width .4s; }
.stage { font-size: 12.5px; color: var(--muted); }

table.jobs { width: 100%; border-collapse: collapse; font-size: 13px; }
table.jobs th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.jobs td { padding: 11px 10px; border-bottom: 1px solid #eef2f5; vertical-align: middle; }
table.jobs tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.pill.done { background: #e5f6ec; color: #15724c; }
.pill.run { background: #e6eefb; color: #2f5fa8; }
.pill.wait { background: #f5efdf; color: #866a2b; }
.pill.fail { background: #fbe8e6; color: #a14b41; }

.error { background: #fdecea; border: 1px solid #f4c9c4; color: #9c3d33; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-top: 10px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12.5px; }

.login { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #e6f2ec, #f4f7f5 60%); }
.login .box { width: 360px; background: #fff; border-radius: 20px; padding: 30px 28px; box-shadow: 0 20px 50px rgba(23,50,77,.12); }
.login h1 { font-size: 19px; margin-bottom: 2px; }
.login .sub { margin-bottom: 20px; }
.login .btn { width: 100%; margin-top: 6px; }

/* ---------- 平台 / 方式 切换 ---------- */
.switches{display:flex;gap:26px;flex-wrap:wrap;margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.switch{display:flex;align-items:center;gap:6px}
.switch .lbl{font-size:12px;color:var(--muted);font-weight:700;margin-right:4px}
.switch button{border:1px solid var(--line);background:#fff;padding:7px 14px;border-radius:10px;font:inherit;font-size:13px;cursor:pointer;color:#4b5a67}
.switch button:hover{border-color:#9dc3b4}
.switch button.on{background:var(--teal);border-color:var(--teal);color:#fff;font-weight:700}

/* ---------- 面包屑 ---------- */
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:4px;font-size:12.5px;margin-bottom:10px;min-height:22px}
.crumbs .crumb{cursor:pointer;color:var(--teal);padding:1px 4px;border-radius:5px}
.crumbs .crumb:hover{background:#eaf5f0}
.crumbs .sep{color:#b9c6c0}

/* ---------- 类目树 ---------- */
.treelist{border:1px solid var(--line);border-radius:12px;max-height:430px;overflow:auto;background:#fff}
.treenode{display:grid;grid-template-columns:1fr 92px 62px;gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid #eef2f5;cursor:pointer}
.treenode:last-child{border-bottom:0}
.treenode:hover{background:#f7fbf9}
.tzh{font-weight:700;font-size:13.5px;color:var(--ink);line-height:1.3}
.tru{font-size:11.5px;color:var(--muted);line-height:1.3;word-break:break-word}
.tmeta{font-size:11.5px;color:#8b9a93;text-align:right}
.tact{text-align:right;font-size:12.5px}
.treenode .enter{color:var(--teal)}
.treenode .pick{color:var(--green);font-weight:700}
.treefoot{display:flex;align-items:center;gap:12px;margin-top:10px}

/* ---------- 删除按钮 ---------- */
.btn.small.danger{background:#fbeae7;color:#a4473b;margin-left:6px}
.btn.small.danger:hover{background:#f7ded9}
.btn.small.danger[disabled]{opacity:.4;cursor:not-allowed}

/* ---------- 批量操作工具栏 ---------- */
.jobtools{display:flex;align-items:center;gap:10px;margin:2px 0 12px;flex-wrap:wrap}
.jobtools .muted{margin-right:auto}
table.jobs input[type=checkbox]{width:15px;height:15px;cursor:pointer;accent-color:#0f766e}
table.jobs input[type=checkbox][disabled]{cursor:not-allowed;opacity:.35}

/* ---------- 搜索结果里的中俄对照 ---------- */
.candidate .ruinline{font-weight:400;font-size:12px;color:var(--muted);margin-left:8px}
.candidate .pathru{font-size:11.5px;color:#93a19a;word-break:break-all;line-height:1.35;margin-top:1px}

/* ---------- 下拉选择 ---------- */
.field select{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font:inherit;font-size:14px;background:#fff;color:var(--ink);cursor:pointer}
.field select:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px rgba(15,118,110,.12)}

/* ---------- 粘贴提示 ---------- */
.drop kbd{display:inline-block;padding:1px 6px;border:1px solid #c9d6d0;border-bottom-width:2px;border-radius:5px;background:#fff;font:inherit;font-size:11.5px;color:#40514a;line-height:1.5}

/* ---------- 已贴图片：右上角移除按钮 ---------- */
.drop{position:relative}
.drop.hasfile{cursor:default;padding:12px}
.drop.hasfile{display:flex;align-items:center;justify-content:center}
.imgwrap{position:relative;display:inline-block;max-width:100%}
.drop.hasfile img{max-width:100%;max-height:280px;border-radius:10px;display:block;box-shadow:0 2px 10px rgba(23,50,77,.12)}
.imgclose{position:absolute;top:8px;right:8px;width:28px;height:28px;border-radius:50%;border:0;background:rgba(23,50,77,.78);color:#fff;font-size:17px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.imgclose:hover{background:#b3453a}

/* ---------- 双平台对比栏 ---------- */
.cmpbar{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.cmpslot{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:9px 11px;background:#fbfdfc;min-height:44px;cursor:pointer;position:relative}
.cmpslot.filled{background:#f2faf6;border-color:#b9dccd}
.cmpslot .tag{font-size:10.5px;font-weight:700;color:#fff;background:var(--teal);border-radius:6px;padding:2px 7px;flex:none}
.cmpslot .tag.oz{background:#2f5fd0}
.cmpslot .val{font-size:12.5px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmpslot .val.empty{color:#93a19a}
.cmpslot .rm{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#a4b2ab;font-size:15px;cursor:pointer;padding:2px 6px;border-radius:6px}
.cmpslot .rm:hover{background:#fbeae7;color:#a4473b}
.cmphint{grid-column:1/-1;font-size:11.5px;color:#93a19a}

/* ---------- 语言勾选 ---------- */
.langbox{display:flex;gap:18px;align-items:center;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}
.langbox .chk{display:flex;align-items:center;gap:7px;font-size:13.5px;color:var(--ink);cursor:pointer;font-weight:400}
.langbox input{width:15px;height:15px;accent-color:#0f766e;cursor:pointer}

/* ---------- 多选类目 ---------- */
.pickbar{display:flex;align-items:center;gap:8px;margin-top:10px;padding:9px 11px;border:1px solid #b9dccd;background:#f2faf6;border-radius:10px;flex-wrap:wrap}
.pickbar #pickInfo{font-size:12.5px;color:var(--teal);font-weight:700;margin-right:auto}
.candidate .pickchk{width:16px;height:16px;accent-color:#0f766e;cursor:pointer;flex:none;margin-right:2px}

/* ---------- 搜索结果的单选/多选合一 ---------- */
.candidate.picked { border-color: var(--teal); background: #effaf4; box-shadow: 0 0 0 2px rgba(15,118,110,.12); }
.candidate.picked .radio { border-color: var(--teal); background: var(--teal); position: relative; }
.candidate.picked .radio::after { content: "✓"; color: #fff; font-size: 10px; font-weight: 700; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* ---------- 类目放大浏览 ---------- */
.treebar{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.treebar input{flex:1;padding:7px 10px;border:1px solid var(--line);border-radius:9px;font:inherit;font-size:12.5px;outline:none}
.treebar input:focus{border-color:var(--teal)}
.treemodal{position:fixed;inset:0;background:rgba(18,32,42,.55);display:none;z-index:90;padding:24px}
.treemodal.open{display:flex;flex-direction:column}
.treemodal-head{display:flex;align-items:center;gap:12px;background:#fff;border-radius:12px 12px 0 0;padding:12px 16px}
.treemodal-head strong{font-size:14px;color:var(--ink)}
.treemodal-head .muted{margin-right:auto;font-size:12px}
.treemodal-body{background:#fff;border-radius:0 0 12px 12px;padding:14px 16px 16px;flex:1;min-height:0;display:flex;flex-direction:column}
.treemodal-body #browsePane{display:flex;flex-direction:column;flex:1;min-height:0}
.treemodal-body .treelist{flex:1;max-height:none}

/* ---------- 面包屑：上级按钮 + 空态隐藏 ---------- */
.crumbs.hidden{display:none}
.crumbs .crumb.up{font-weight:700;color:#5b7069}
.crumbs .crumb.up:hover{background:#eef3f1;color:var(--teal)}
