:root {
  --bg: #fbf8ff;
  --bg-2: #f4eeff;
  --card: #ffffff;
  --line: #eee7fb;
  --line-2: #e2d8f8;
  --brand: #8b7cf6;
  --brand-d: #6c5ce0;
  --brand-l: #f1ecff;
  --brand-l2: #e6ddfd;
  --ink: #2c2745;
  --ink-2: #6b6588;
  --ink-3: #a29cba;
  --ok: #3fae86;
  --warn: #e0a33c;
  --bad: #e4698a;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 10px 30px rgba(124, 106, 224, 0.09);
  --shadow-sm: 0 3px 12px rgba(124, 106, 224, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(680px 420px at 8% -6%, #efe6ff 0%, rgba(239, 230, 255, 0) 62%),
    radial-gradient(560px 360px at 96% 4%, #ffe9f4 0%, rgba(255, 233, 244, 0) 60%),
    radial-gradient(700px 500px at 50% 106%, #eaf3ff 0%, rgba(234, 243, 255, 0) 64%);
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 22px 20px 60px; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.logo {
  width: 46px; height: 46px;
  border-radius: 16px;
  background: linear-gradient(150deg, #fff 0%, var(--brand-l) 100%);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  flex: none;
  overflow: hidden;
  padding: 2px;
}
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 13px; }
.brand h1 { font-size: 17px; margin: 0; letter-spacing: .3px; font-weight: 600; }
.brand p { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); }
.spacer { flex: 1; }

.userchip {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}

/* ---------- 步骤条 ---------- */
.steps {
  display: flex; align-items: center; gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow-x: auto;
}
.step {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  cursor: pointer;
  transition: .18s;
  border: 1px solid transparent;
}
.step .dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-l);
  color: var(--brand-d);
  font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
}
.step.active { background: var(--brand-l); color: var(--brand-d); border-color: var(--line-2); }
.step.active .dot { background: var(--brand); color: #fff; }
.step.done .dot { background: #dff3ea; color: var(--ok); }
.step-sep { color: var(--line-2); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card h2 { font-size: 15px; margin: 0 0 4px; font-weight: 600; }
.card .sub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 16px; }

/* ---------- 拖拽区 ---------- */
.drop {
  border: 2px dashed var(--line-2);
  border-radius: var(--r-lg);
  padding: 42px 20px;
  text-align: center;
  background: linear-gradient(180deg, #fdfbff, #faf6ff);
  transition: .2s;
  cursor: pointer;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-l); }
.drop .big { font-size: 15px; font-weight: 600; margin: 12px 0 6px; }
.drop .hint { font-size: 12.5px; color: var(--ink-3); }

/* ---------- 表单 ---------- */
label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: #fdfcff;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: .16s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(139, 124, 246, .13);
}
textarea { resize: vertical; min-height: 78px; line-height: 1.65; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: .16s;
}
.btn:hover { border-color: var(--brand); color: var(--brand-d); background: var(--brand-l); }
.btn.primary {
  background: linear-gradient(135deg, #9c8dff, #7b68ee);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 106, 224, .28);
}
.btn.primary:hover { filter: brightness(1.05); transform: translateY(-1px); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 6px 13px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ---------- 芯片 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: .16s;
  user-select: none;
}
.chip:hover { border-color: var(--brand); color: var(--brand-d); }
.chip.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); font-weight: 500; }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat {
  background: linear-gradient(160deg, #fff, #faf7ff);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  text-align: center;
}
.stat b { display: block; font-size: 21px; font-weight: 600; color: var(--brand-d); letter-spacing: .5px; }
.stat span { font-size: 11.5px; color: var(--ink-3); }

.bar { height: 10px; border-radius: 999px; background: var(--brand-l); overflow: hidden; }
.bar > i {
  display: block; height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a99bff, #7b68ee);
  transition: width .35s ease;
}

/* ---------- 列表 ---------- */
.list { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.line-item { display: flex; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.line-item:last-child { border-bottom: 0; }
.line-item .t { color: var(--ink-3); font-size: 11.5px; width: 96px; flex: none; font-variant-numeric: tabular-nums; }
.line-item .zh { color: var(--ink-2); width: 42%; flex: none; }
.line-item .en { color: var(--ink); flex: 1; }
.line-item.bad { background: #fff6f8; }

/* 校对表 */
.check-table { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.check-row { display: grid; grid-template-columns: 92px 1fr 1fr 46px; gap: 0; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row > div { padding: 9px 12px; font-size: 12.8px; }
.check-row .c-time { color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; background: #fdfbff; }
.check-row .c-zh { color: var(--ink-2); border-left: 1px solid var(--line); }
.check-row .c-en { color: var(--ink); border-left: 1px solid var(--line); }
.check-row .c-en[contenteditable]:focus { outline: none; background: var(--brand-l); }
.check-row.flag .c-en { background: #fff6f8; }
.check-head { background: #faf7ff; font-weight: 600; color: var(--ink-2); font-size: 12px; }
.check-scroll { max-height: 480px; overflow-y: auto; }

.c-ops {
  border-left: 1px solid var(--line);
  display: flex; gap: 4px; align-items: center; justify-content: center;
  padding: 6px 0 !important;
}
.op {
  width: 20px; height: 20px; border-radius: 7px;
  border: 1px solid var(--line-2); background: #fff;
  color: var(--ink-3); font-size: 13px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; padding: 0;
  transition: .15s; font-family: inherit;
}
.op:hover { border-color: var(--brand); color: var(--brand-d); background: var(--brand-l); }
.op.del:hover { border-color: var(--bad); color: var(--bad); background: #fdeaef; }

/* ---------- 模态 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(44, 39, 69, .3);
  backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--r-lg);
  width: 100%; max-width: 720px;
  max-height: 86vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(60, 46, 110, .22);
  overflow: hidden;
}
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- 杂项 ---------- */
.muted { color: var(--ink-3); font-size: 12.5px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: var(--brand-l); color: var(--brand-d); }
.pill.ok { background: #e3f5ec; color: var(--ok); }
.pill.warn { background: #fdf1de; color: var(--warn); }
.pill.bad { background: #fdeaef; color: var(--bad); }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(12px);
  background: #fff; border: 1px solid var(--line-2);
  padding: 11px 20px; border-radius: 999px;
  box-shadow: 0 12px 34px rgba(88, 68, 160, .2);
  font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hide { display: none !important; }
.footer { text-align: center; color: var(--ink-3); font-size: 11.5px; margin-top: 26px; }

.spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.96); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
.view { animation: pop .22s ease; }

@media (max-width: 720px) {
  .row, .row-3, .stats { grid-template-columns: 1fr 1fr; }
  .check-row { grid-template-columns: 64px 1fr 46px; }
  .check-row .c-time { grid-column: 1; grid-row: 1; }
  .check-row .c-zh { grid-column: 2; grid-row: 1; }
  .check-row .c-ops { grid-column: 3; grid-row: 1; }
  .check-row .c-en { grid-column: 1 / 3; grid-row: 2; border-left: 0; border-top: 1px dashed var(--line); }
  .check-head .c-en { display: none; }
}
