/* ============================================================
   SuiteForge 设计系统 v2 —— 深色专业工作台
   ============================================================ */
* { box-sizing: border-box; margin: 0; }

:root {
  /* 背景层级 */
  --bg-0: #0a0c14;
  --bg-1: #10131f;
  --bg-2: #161a2c;
  --bg-3: #1e2340;
  --bg-4: #262c4e;
  /* 文字 */
  --text-1: #f2f4ff;
  --text-2: #b6bcd6;
  --text-3: #7a82a3;
  /* 品牌 */
  --brand: #7c6cff;
  --brand-2: #4fd1ff;
  --brand-soft: rgba(124, 108, 255, .14);
  --brand-glow: rgba(124, 108, 255, .35);
  /* 语义 */
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --info: #62b9ff;
  /* 兼容旧变量名 */
  --bg: var(--bg-0); --panel: var(--bg-1); --panel2: var(--bg-2);
  --line: var(--bg-4); --txt: var(--text-1); --muted: var(--text-3);
  --acc: var(--brand); --acc2: var(--brand-2);
  /* 尺寸 */
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 18px; --radius: var(--radius-md);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.2);
  --shadow-md: 0 8px 30px rgba(0,0,0,.28);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.4);
  --transition: .2s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 基础 ---------- */
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg-0); color: var(--text-1);
  font: 15px/1.65 "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--brand-glow); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* 背景光晕 */
.bg-glow { position: fixed; inset: -20% -20% auto; height: 70vh; pointer-events: none; filter: blur(50px); z-index: 0; opacity: .8;
  background:
    radial-gradient(700px 340px at 15% 0%, rgba(124,108,255,.18), transparent),
    radial-gradient(800px 400px at 85% 8%, rgba(79,209,255,.12), transparent),
    radial-gradient(500px 300px at 50% 20%, rgba(52,211,153,.05), transparent);
}

/* ---------- 顶栏 ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 0 26px; height: 58px;
  background: rgba(10,12,20,.78); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(38,44,78,.6);
}
.brand { font-weight: 800; font-size: 17px; letter-spacing: .3px; display: flex; align-items: center; }
.brand .logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; margin-right: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 14px; box-shadow: 0 4px 14px var(--brand-glow); }
.brand em { font-style: normal; font-weight: 400; color: var(--text-3); font-size: 12.5px; margin-left: 8px; }
.topbar nav { display: flex; gap: 4px; }
.nav-btn { background: none; border: 1px solid transparent; color: var(--text-3); padding: 7px 15px; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 500; transition: var(--transition); }
.nav-btn:hover { color: var(--text-1); background: var(--bg-2); }
.nav-btn.active { color: var(--text-1); background: var(--bg-3); border-color: var(--bg-4); }
.top-meta { margin-left: auto; color: var(--text-3); font-size: 12px; letter-spacing: .2px; }

/* ---------- 布局 ---------- */
.view { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 28px 24px 150px; }
.hidden { display: none !important; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 44px 10px 38px; }
.hero h1 { font-size: 38px; line-height: 1.28; font-weight: 800; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(92deg, var(--brand) 10%, var(--brand-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-3); max-width: 620px; margin: 14px auto 20px; font-size: 15px; line-height: 1.7; }
.hero-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero-tags span { font-size: 12px; font-weight: 500; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--bg-4); padding: 5px 14px; border-radius: 99px; transition: var(--transition); }
.hero-tags span:hover { border-color: var(--brand); color: var(--text-1); transform: translateY(-1px); }
.hero.compact { padding: 20px 10px 10px; } .hero.compact h1 { font-size: 26px; } .hero.compact p { margin-top: 8px; }

/* ---------- 卡片 / 步骤 ---------- */
.card { background: var(--bg-1); border: 1px solid rgba(38,44,78,.8); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: border-color var(--transition), box-shadow var(--transition); }
.card:hover { border-color: rgba(124,108,255,.25); }
.wizard { display: flex; flex-direction: column; gap: 20px; max-width: 920px; margin: 0 auto; }
.step { padding: 24px 26px; }
.step h2 { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; letter-spacing: .2px; }
.step h2 small { margin-left: auto; color: var(--text-3); font-weight: 400; font-size: 13px; }
.step h2 i { font-style: normal; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 3px 10px var(--brand-glow); }

/* ---------- 上传区 ---------- */
.dropzone { border: 1.5px dashed var(--bg-4); border-radius: var(--radius-md); padding: 34px 28px; text-align: center; color: var(--text-3); cursor: pointer; transition: var(--transition); }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); color: var(--text-1); background: var(--brand-soft); }
.dropzone.drag { box-shadow: 0 0 0 3px var(--brand-glow); }
.dz-icon { font-size: 28px; margin-bottom: 8px; opacity: .7; }
.dropzone small { color: var(--text-3); }
.dropzone.compact { padding: 18px; font-size: 13px; }
.thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.thumb { position: relative; width: 96px; border-radius: 10px; overflow: visible; border: 1px solid var(--bg-4); }
.thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; display: block; }
.thumb .badge { position: absolute; left: 0; top: 0; font-size: 10px; font-weight: 600; background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #fff; padding: 2px 7px; border-radius: 10px 0 8px 0; z-index: 2; }
.thumb .rm { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--bg-4); background: var(--bg-3); color: var(--text-2); cursor: pointer; font-size: 11px; display: grid; place-items: center; transition: var(--transition); z-index: 2; }
.thumb .rm:hover { background: var(--err); color: #fff; border-color: var(--err); }
.ref-roles-hint { width: 100%; font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin-bottom: 2px; }
.ref-roles-hint b { color: var(--text-2); font-weight: 600; }
.ref-roles { display: flex; gap: 3px; padding: 5px 4px 2px; flex-wrap: wrap; }
.ref-role { font-size: 10px; color: var(--text-3); background: var(--bg-2); border: 1px solid var(--bg-4); border-radius: 99px; padding: 1px 7px; cursor: pointer; user-select: none; transition: var(--transition); }
.ref-role:hover { border-color: var(--brand); color: var(--text-1); }
.ref-role.on { color: #fff; border-color: var(--brand); background: rgba(124,108,255,.3); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 7px; }
.ta-label { display: flex; align-items: center; gap: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--bg-2); border: 1px solid var(--bg-4); color: var(--text-3); border-radius: 99px; padding: 7px 16px; cursor: pointer; font-size: 13px; font-weight: 500; transition: var(--transition); }
.chip:hover { border-color: var(--brand); color: var(--text-1); }
.chip.on { color: #fff; background: linear-gradient(135deg, rgba(124,108,255,.4), rgba(79,209,255,.28)); border-color: var(--brand); box-shadow: 0 2px 10px var(--brand-glow); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
select, input[type=text], input[type=password], input[type=email], input[type=number], textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--bg-4); color: var(--text-1); border-radius: 10px; padding: 10px 13px; font: inherit; font-size: 14px; transition: border-color var(--transition), box-shadow var(--transition); }
textarea { resize: vertical; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,108,255,.18); }
select:hover, input:hover, textarea:hover { border-color: var(--text-3); }
.hint { color: var(--text-3); font-size: 12px; margin-top: 5px; line-height: 1.5; }
.adv summary { cursor: pointer; color: var(--text-3); font-size: 13px; font-weight: 500; transition: color var(--transition); }
.adv summary:hover { color: var(--text-1); }
.adv .pad { padding-top: 14px; }
.chk { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-1); background: var(--bg-2); border: 1px solid var(--bg-4); border-radius: 10px; padding: 10px 13px; margin-bottom: 14px; cursor: pointer; transition: var(--transition); }
.chk:hover { border-color: var(--brand); }
.chk input { width: 15px; height: 15px; accent-color: var(--brand); }
.chk.inline { margin: 0; padding: 6px 10px; font-size: 12.5px; }

/* ---------- 按钮 ---------- */
.mini-btn { background: var(--bg-2); border: 1px solid var(--bg-4); color: var(--text-1); border-radius: 9px; padding: 5px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block; transition: var(--transition); }
.mini-btn:hover { border-color: var(--brand); background: var(--bg-3); }
.mini-btn.primary { background: linear-gradient(90deg, var(--brand), var(--brand-2)); border: 0; color: #fff; box-shadow: 0 2px 10px var(--brand-glow); }
.mini-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--brand-glow); }
.mini-btn.ghost { background: transparent; color: var(--brand-2); border-style: dashed; padding: 8px 14px; }
.mini-btn.danger { color: var(--err); border-color: rgba(248,113,113,.4); }
.mini-btn.danger:hover { background: rgba(248,113,113,.12); }
.mini-btn.wide { width: 100%; text-align: center; padding: 10px; font-size: 13.5px; }
.mini-btn[disabled] { opacity: .5; cursor: wait; transform: none; }

.cta-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 15; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px 14px;
  background: rgba(10,12,20,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgba(38,44,78,.6); pointer-events: none; }
.cta-bar > * { pointer-events: auto; }
.cta { background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #fff; font-size: 16px; font-weight: 700; border: 0; border-radius: 14px; padding: 14px 38px; cursor: pointer; box-shadow: 0 10px 34px var(--brand-glow); transition: var(--transition); letter-spacing: .3px; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 14px 42px var(--brand-glow); }
.cta:active { transform: translateY(0); }
.cta.sm { padding: 10px 22px; font-size: 14px; box-shadow: none; }
.cta-est { color: var(--text-3); font-size: 12.5px; }

/* ---------- 槽位网格 ---------- */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.slot-card { position: relative; border: 1px solid var(--bg-4); background: var(--bg-2); border-radius: var(--radius-md); padding: 13px; cursor: pointer; transition: var(--transition); }
.slot-card:hover { border-color: var(--text-3); transform: translateY(-1px); }
.slot-card input { display: none; }
.slot-card b { display: block; font-size: 14px; font-weight: 600; }
.slot-card small { color: var(--text-3); font-size: 11.5px; line-height: 1.45; display: block; margin-top: 4px; min-height: 32px; }
.slot-card .slot-size { position: absolute; right: 10px; top: 10px; font-size: 10px; color: var(--text-3); background: var(--bg-3); padding: 1px 6px; border-radius: 5px; }
.slot-card.on { border-color: var(--brand); background: linear-gradient(160deg, rgba(124,108,255,.16), rgba(79,209,255,.07)); box-shadow: 0 0 0 1px var(--brand) inset, 0 4px 16px rgba(124,108,255,.12); }
.slot-card.on::after { content: '✓'; position: absolute; right: 10px; bottom: 8px; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.slot-card.custom { border-style: dashed; border-color: var(--bg-4); }
.slot-card.custom.on { border-style: solid; }
.slot-card.custom .cc-acts { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; opacity: 0; transition: .15s; }
.slot-card.custom:hover .cc-acts { opacity: 1; }
.cc-acts button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--bg-4); background: var(--bg-1); color: var(--text-3); font-size: 11px; cursor: pointer; display: grid; place-items: center; transition: var(--transition); }
.cc-acts button:hover { color: var(--text-1); border-color: var(--brand); }
.slot-card.add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1.5px dashed var(--bg-4); background: transparent; color: var(--text-3); cursor: pointer; min-height: 96px; transition: var(--transition); }
.slot-card.add-card span { font-size: 22px; line-height: 1; opacity: .6; }
.slot-card.add-card:hover { color: var(--text-1); border-color: var(--brand); background: var(--brand-soft); }
.slot-edit { display: flex; flex-direction: column; gap: 7px; }
.slot-edit input, .slot-edit textarea { font-size: 12.5px; padding: 6px 9px; }
.slot-edit .se-row { display: flex; gap: 6px; justify-content: flex-end; }
.slots.locked { opacity: .6; pointer-events: none; }
.custom-add { margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.custom-row { display: grid; grid-template-columns: 200px 1fr 30px; gap: 8px; margin-top: 8px; align-items: center; }
.custom-row .rm { background: none; border: 0; color: var(--err); cursor: pointer; }

/* ---------- 生成墙 ---------- */
.result-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.result-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.back { background: none; border: 1px solid var(--bg-4); color: var(--text-3); border-radius: 9px; padding: 7px 13px; cursor: pointer; font-size: 13px; transition: var(--transition); }
.back:hover { color: var(--text-1); border-color: var(--brand); }
.r-meta { color: var(--text-3); font-size: 13px; line-height: 1.6; }
.r-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.st { margin-left: 8px; padding: 3px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.st-running, .st-queued { color: var(--warn); background: rgba(251,191,36,.12); }
.st-done { color: var(--ok); background: rgba(52,211,153,.14); }
.st-error, .st-partial { color: var(--err); background: rgba(248,113,113,.14); }
.st-planning { color: var(--brand-2); background: rgba(79,209,255,.14); }
.st-awaiting { color: var(--brand-2); background: rgba(79,209,255,.14); }
.st-awaitingReview { color: var(--warn); background: rgba(251,191,36,.14); }
.st-stopped, .st-cancelled { color: var(--text-3); background: rgba(122,130,163,.14); }

.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cell { background: var(--bg-1); border: 1px solid rgba(38,44,78,.8); border-radius: var(--radius-md); overflow: hidden; transition: var(--transition); }
.cell:hover { border-color: rgba(124,108,255,.3); box-shadow: var(--shadow-md); }
.cell-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; }
.cell-status { margin-left: auto; color: var(--text-3); font-size: 11px; }
.cell-fb { color: var(--warn); background: rgba(251,191,36,.12); border-radius: 6px; padding: 1px 6px; font-size: 10.5px; cursor: help; }
.cell img { width: 100%; display: block; cursor: zoom-in; aspect-ratio: 1; object-fit: cover; }
.cell-ph { aspect-ratio: 1; background: linear-gradient(100deg, var(--bg-2) 40%, var(--bg-3) 50%, var(--bg-2) 60%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }
.cell.s-failed .cell-ph { animation: none; }
.cell-err { padding: 18px; font-size: 12px; color: var(--err); min-height: 120px; word-break: break-all; line-height: 1.6; }
.cell.s-done { border-color: rgba(52,211,153,.4); }
.cell.s-cancelled { opacity: .7; }
.cell-cancelled { display: grid; place-items: center; aspect-ratio: 1; color: var(--text-3); font-size: 13px; }
.vers { display: flex; gap: 4px; padding: 8px 12px 0; flex-wrap: wrap; }
.ver { background: var(--bg-2); border: 1px solid var(--bg-4); color: var(--text-3); border-radius: 99px; font-size: 11px; padding: 2px 10px; cursor: pointer; transition: var(--transition); }
.ver:hover { border-color: var(--brand); }
.ver.on { color: #fff; border-color: var(--brand); background: rgba(124,108,255,.28); }
.cell-acts { display: flex; gap: 6px; padding: 9px 12px; justify-content: flex-end; }
.cell-acts a, .cell-acts button { background: var(--bg-2); border: 1px solid var(--bg-4); color: var(--text-1); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; text-decoration: none; display: grid; place-items: center; transition: var(--transition); font-size: 13px; }
.cell-acts a:hover, .cell-acts button:hover { border-color: var(--brand); background: var(--bg-3); }
.cell-acts button[data-retry], .cell-acts button[data-cancel] { width: auto; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.cell-acts button[data-cancel] { color: var(--err); border-color: rgba(248,113,113,.35); }
.cell-acts button:disabled { opacity: .4; cursor: default; }
.spin { width: 12px; height: 12px; border: 2px solid var(--bg-4); border-top-color: var(--brand-2); border-radius: 50%; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* 参考图条 */
.ref-strip { display: flex; gap: 5px; align-items: center; padding: 8px 12px 0; flex-wrap: wrap; }
.ref-strip img { width: 26px; height: 26px; object-fit: cover; border-radius: 6px; border: 1px solid var(--bg-4); background: #fff; cursor: help; transition: var(--transition); }
.ref-strip img:hover { transform: scale(1.3); border-color: var(--brand); z-index: 2; }
.ref-strip img.ref-base { border: 1.5px solid var(--brand-2); }
.ref-strip span { font-size: 10.5px; color: var(--text-3); }
.ref-strip span.warn { color: var(--warn); }

/* L3 创意方案（可编辑） */
.plan-box { padding: 8px 12px 0; }
.plan-box label { display: block; font-size: 10.5px; font-weight: 600; color: var(--brand-2); margin-bottom: 4px; cursor: help; letter-spacing: .3px; }
.plan-box textarea { font-size: 11.5px; line-height: 1.5; padding: 8px 10px; border-radius: 8px; background: rgba(79,209,255,.05); border-color: rgba(79,209,255,.25); color: var(--text-1); }
.plan-box textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(79,209,255,.15); outline: none; }

/* 底图先行 */
.base-toggle { margin-bottom: 14px; background: linear-gradient(135deg, rgba(124,108,255,.12), rgba(79,209,255,.06)); border-color: var(--brand); }
.cell-base { color: var(--brand-2); background: rgba(79,209,255,.14); border-radius: 6px; padding: 1px 6px; font-size: 10.5px; font-weight: 600; }
.gate { display: flex; gap: 20px; align-items: center; background: linear-gradient(135deg, rgba(124,108,255,.14), rgba(79,209,255,.08)); border: 1px solid var(--brand); border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 18px; box-shadow: 0 6px 24px rgba(124,108,255,.1); }
.gate img { width: 168px; height: 168px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--bg-4); cursor: zoom-in; flex: none; }
.gate h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.gate p { color: var(--text-3); font-size: 13px; margin-bottom: 12px; line-height: 1.6; }
.gate-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* L3 方案预览闸门 */
.gate.review { display: block; }
.review-head p { margin-bottom: 10px; }
.review-head .gate-btns { margin-bottom: 4px; }
.review-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; max-height: 46vh; overflow: auto; padding-right: 4px; }
.rv-item { background: var(--bg-1); border: 1px solid var(--bg-4); border-radius: var(--radius-md); padding: 12px 14px; }
.rv-item label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--brand-2); margin-bottom: 6px; }
.rv-item .rv-edit { font-style: normal; font-size: 10px; color: var(--ok); border: 1px solid rgba(52,211,153,.4); border-radius: 99px; padding: 0 7px; font-weight: 500; }
.rv-item textarea { font-size: 12.5px; line-height: 1.65; min-height: 110px; }
.rv-structured .rv-field { display: flex; gap: 6px; margin-bottom: 6px; align-items: flex-start; }
.rv-field-label { flex: none; width: 34px; font-size: 11px; font-weight: 600; color: var(--brand-2); padding-top: 7px; text-align: right; }
.rv-field textarea { flex: 1; font-size: 12px; line-height: 1.55; min-height: 40px; }

/* ---------- 历史 ---------- */
.hist-title { margin-bottom: 16px; font-size: 20px; font-weight: 700; }
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hist-card { background: var(--bg-1); border: 1px solid rgba(38,44,78,.8); border-radius: var(--radius-md); overflow: hidden; cursor: pointer; transition: var(--transition); }
.hist-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hist-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.hist-ph { width: 100%; height: 150px; background: var(--bg-2); }
.hist-info { padding: 12px 14px; } .hist-info b { font-size: 14px; font-weight: 600; display: block; }
.hist-info small { color: var(--text-3); font-size: 12px; }
.pad { padding: 20px; }

/* ---------- 换底色 ---------- */
.bg-wrap { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.bg-side { padding: 20px; }
.bg-side h3 { font-size: 14px; font-weight: 700; margin: 18px 0 8px; } .bg-side h3:first-child { margin-top: 0; }
.bg-side h4 { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin: 14px 0 6px; }
.bg-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bg-picks .hint { width: 100%; }
.bg-picks img.pick { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; border: 1.5px solid var(--bg-4); cursor: pointer; transition: var(--transition); }
.bg-picks img.pick:hover { border-color: var(--brand-2); }
.bg-picks img.pick.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.tabs.small { margin: 4px 0 10px; }
.tabs.small .tab { padding: 6px; font-size: 12px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--bg-4); vertical-align: -2px; background: #fff; }
.tab { flex: 1; background: var(--bg-2); border: 1px solid var(--bg-4); color: var(--text-3); padding: 9px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 500; transition: var(--transition); }
.tab:hover { border-color: var(--brand); color: var(--text-1); }
.tab.on { color: #fff; border-color: var(--brand); background: linear-gradient(135deg, rgba(124,108,255,.3), rgba(79,209,255,.15)); }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.sw { aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--bg-4); cursor: pointer; padding: 0; transition: var(--transition); }
.sw:hover { transform: scale(1.15); }
.sw.on { outline: 2px solid var(--brand); outline-offset: 1px; }
.field.row { display: flex; justify-content: space-between; align-items: center; }
.pick { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
input[type=color] { width: 36px; height: 26px; border: 1px solid var(--bg-4); background: none; padding: 0 2px; border-radius: 6px; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--brand); }
.seg-status { font-size: 12px; color: var(--text-3); min-height: 22px; margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.bg-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.bg-stage { padding: 18px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.checker { background: conic-gradient(var(--bg-3) 0 25%, var(--bg-2) 0 50%, var(--bg-3) 0 75%, var(--bg-2) 0) 0 0 / 24px 24px; border-radius: var(--radius-md); border: 1px solid var(--bg-4); line-height: 0; position: relative; }
#bgCanvas { width: min(620px, 56vw); border-radius: var(--radius-md); display: block; }
#bgCmp { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: var(--radius-md); pointer-events: none; }
.cmp-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brand-2); left: 50%; pointer-events: none; box-shadow: 0 0 8px rgba(79,209,255,.8); }
#cmp { width: min(620px, 56vw); accent-color: var(--brand-2); margin-top: 2px; }
.row2 { display: flex; gap: 8px; }
.row2 .mini-btn { flex: 1; }

/* ---------- 通用模态对话框 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5,6,12,.75); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(4px); }
.modal-box { background: var(--bg-1); border: 1px solid var(--bg-4); border-radius: var(--radius-lg); padding: 24px 26px; width: min(460px, 92vw); box-shadow: var(--shadow-lg); }
.modal-box h3 { font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.modal-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-acts .mini-btn { padding: 9px 20px; font-size: 13.5px; }

/* ---------- 灯箱 & Toast ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5,6,12,.92); display: grid; place-items: center; backdrop-filter: blur(4px); }
.lightbox img { max-width: 88vw; max-height: 84vh; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.lb-bar { position: absolute; top: 18px; right: 22px; display: flex; gap: 10px; }
.lb-bar a { color: #fff; text-decoration: none; background: var(--bg-2); border: 1px solid var(--bg-4); padding: 7px 14px; border-radius: 9px; font-size: 13px; transition: var(--transition); }
.lb-bar a:hover { border-color: var(--brand); }
.lb-close { background: var(--bg-2); border: 1px solid var(--bg-4); color: #fff; font-size: 18px; cursor: pointer; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; transition: var(--transition); }
.lb-close:hover { border-color: var(--err); color: var(--err); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--bg-3); color: #fff; padding: 11px 20px; border-radius: var(--radius-md); border: 1px solid var(--bg-4); opacity: 0; pointer-events: none; transition: .3s cubic-bezier(.4,0,.2,1); z-index: 99; max-width: 80vw; font-size: 13.5px; box-shadow: var(--shadow-md); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- 模特形象配置 ---------- */
.model-config { border: 1px solid var(--bg-4); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 15px; background: var(--bg-2); }
.model-config-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.model-config-head > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.model-preview { margin-top: 4px; font-size: 12px; color: var(--text-3); background: var(--bg-1); border: 1px dashed var(--bg-4); border-radius: 8px; padding: 8px 11px; line-height: 1.6; }
.model-preview b { color: var(--brand-2); font-weight: 600; }

/* ---------- 效果回流反馈 ---------- */
.fb-btn { font-size: 13px; }
.fb-btn.on-good { border-color: var(--ok) !important; background: rgba(52,211,153,.2) !important; }
.fb-btn.on-bad { border-color: var(--err) !important; background: rgba(248,113,113,.2) !important; }
.suggest-panel { background: var(--bg-1); border: 1px solid var(--bg-4); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 16px; }
.suggest-item { font-size: 13px; line-height: 1.65; padding: 6px 0; border-bottom: 1px solid var(--bg-4); }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item.warn { color: var(--warn); }
.suggest-item.ok { color: var(--ok); }
.suggest-item.info { color: var(--text-3); }

/* ---------- 批量平台 ---------- */
.pv-platforms { margin-bottom: 16px; }
.pv-platforms label { display: block; font-size: 13px; font-weight: 500; color: var(--text-3); margin-bottom: 8px; }

/* ---------- 生成墙工具条与轨迹 ---------- */
.wall-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.wall-toolbar-acts { display: flex; gap: 8px; }
.cell-chk { display: grid; place-items: center; width: 30px; height: 30px; cursor: pointer; }
.cell-chk input { width: 14px; height: 14px; accent-color: var(--brand); }
.cell-trace, .cell-editp { padding: 10px 12px; border-top: 1px solid var(--bg-4); font-size: 12px; }
.trace-row { display: flex; gap: 8px; margin-bottom: 5px; align-items: baseline; }
.trace-row span { color: var(--text-3); flex: none; width: 44px; font-size: 11px; }
.trace-row code { color: var(--brand-2); font-size: 11px; }
.trace-prompt summary { cursor: pointer; color: var(--brand-2); font-size: 11px; font-weight: 600; margin-top: 6px; }
.trace-prompt pre { font-size: 10.5px; line-height: 1.55; color: var(--text-3); background: var(--bg-2); border: 1px solid var(--bg-4); border-radius: 8px; padding: 9px 11px; margin-top: 6px; max-height: 200px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.cell-editp textarea { font-size: 11.5px; line-height: 1.55; background: var(--bg-2); }

/* ---------- 运行预览 ---------- */
.wf-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(135deg, rgba(124,108,255,.12), rgba(79,209,255,.06)); border: 1px solid var(--brand); border-radius: var(--radius-md); padding: 10px 15px; margin-bottom: 14px; font-size: 13px; }
#pvSlots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: start; }
@media (max-width: 960px) { #pvSlots { grid-template-columns: 1fr; } }
.pv-card { padding: 16px 18px; margin-bottom: 0; min-width: 0; }
.pv-card .pv-prompt { min-height: 120px; }
.pv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pv-head b { font-size: 14px; font-weight: 600; }
.pv-head small { color: var(--text-3); font-size: 11px; }
.pv-prompt { font-size: 12px; line-height: 1.65; background: var(--bg-2); border: 1px solid var(--bg-4); }
.pv-src { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pv-src-tag { font-size: 10.5px; font-weight: 500; color: var(--brand-2); background: rgba(79,209,255,.08); border: 1px solid rgba(79,209,255,.25); border-radius: 99px; padding: 1px 8px; cursor: help; }
.pv-lint { margin-bottom: 14px; }

/* ---------- 工作流编辑器 ---------- */
.wf-card { cursor: pointer; }
.wf-card .hist-info b { margin-bottom: 2px; }
.wf-acts { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.wf-editor { display: grid; grid-template-columns: 240px 1fr 272px; gap: 14px; align-items: start; }
.wf-left { padding: 14px; }
.wf-left-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.wf-left-foot { margin-top: 10px; }
.wf-slot-item { display: flex; align-items: center; gap: 6px; padding: 9px 11px; border: 1px solid var(--bg-4); border-radius: 9px; margin-bottom: 6px; cursor: pointer; background: var(--bg-2); font-size: 13px; transition: var(--transition); }
.wf-slot-item:hover { border-color: var(--text-3); }
.wf-slot-item.on { border-color: var(--brand); background: linear-gradient(160deg, rgba(124,108,255,.14), rgba(79,209,255,.06)); }
.wf-slot-item.off { opacity: .5; }
.wf-slot-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-slot-acts { display: flex; gap: 3px; opacity: 0; transition: .15s; }
.wf-slot-item:hover .wf-slot-acts { opacity: 1; }
.wf-slot-acts button { width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--bg-4); background: var(--bg-1); color: var(--text-3); font-size: 10px; cursor: pointer; display: grid; place-items: center; padding: 0; transition: var(--transition); }
.wf-slot-acts button:hover { color: var(--text-1); border-color: var(--brand); }
.wf-center { padding: 20px; max-height: none; }
.wf-center h3 { font-size: 14px; font-weight: 700; }
.wf-layer textarea { font-size: 12.5px; line-height: 1.6; }
.wf-right { padding: 16px; position: sticky; top: 76px; }
.wf-right h3 { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text-2); }
.wf-var { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--bg-4); font-size: 12px; }
.wf-var code { background: var(--bg-2); border: 1px solid var(--bg-4); border-radius: 5px; padding: 1px 7px; font-size: 11px; color: var(--brand-2); }
.wf-var span { color: var(--text-2); flex: 1; }
.wf-lint-item { font-size: 12px; padding: 9px 11px; border-radius: 8px; margin-bottom: 6px; line-height: 1.55; }
.wf-lint-item b { display: block; font-size: 11px; font-weight: 700; }
.wf-lint-item small { color: var(--text-3); }
.wf-lint-item.err { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); }
.wf-lint-item.err b { color: var(--err); }
.wf-lint-item.warn { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); }
.wf-lint-item.warn b { color: var(--warn); }
.wf-lint-item.info { background: rgba(98,185,255,.1); border: 1px solid rgba(98,185,255,.3); }
.wf-lint-item.info b { color: var(--info); }

/* ---------- 动画 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* backwards：动画结束后移除 transform，避免残留 transform 把 .view 变成 fixed 子元素的包含块（导致 CTA 栏锚定错位压卡片） */
.view > * { animation: fadeUp .4s cubic-bezier(.4,0,.2,1) backwards; }
.view > *:nth-child(2) { animation-delay: .06s; }
.view > *:nth-child(3) { animation-delay: .12s; }
.view > *:nth-child(4) { animation-delay: .18s; }
.view > *:nth-child(5) { animation-delay: .24s; }
.modal-box { animation: fadeUp .25s cubic-bezier(.4,0,.2,1) backwards; }

/* ---------- 移动端 ---------- */
@media (max-width: 760px) {
  .slots { grid-template-columns: 1fr 1fr; }
  .grid3, .grid2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .hero { padding: 28px 10px 24px; }
  .custom-row { grid-template-columns: 1fr; }
  .bg-wrap { grid-template-columns: 1fr; }
  #bgCanvas { width: 100%; }
  .wf-editor { grid-template-columns: 1fr; }
  .wf-right { position: static; }
  .review-list { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; gap: 12px; }
  .brand em { display: none; }
  .top-meta { display: none; }
  .view { padding: 20px 14px 140px; }
  .step { padding: 18px 16px; }
  .user-area .quota-chip { display: none; } /* 移动端省空间 */
}

/* ---------- 登录 ---------- */
#viewLogin { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.login-card { width: 380px; max-width: calc(100vw - 40px); background: var(--bg-1); border: 1px solid var(--bg-4); border-radius: var(--radius-lg); padding: 36px 32px; box-shadow: var(--shadow-lg), 0 0 60px var(--brand-glow); }
.login-brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.login-brand .logo { color: var(--brand); }
.login-card h2 { font-size: 22px; margin: 0 0 6px; }
.login-sub { font-size: 13px; color: var(--text-3); margin-bottom: 22px; }
.login-err { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: var(--err); font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }

/* ---------- 用户区 ---------- */
.user-area { display: flex; align-items: center; gap: 8px; }
.user-chip { font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--bg-4); border-radius: 999px; padding: 5px 12px; }
.quota-chip { font-size: 12px; font-weight: 700; color: var(--ok); background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); border-radius: 999px; padding: 4px 10px; }

/* ---------- 尾卡画幅选择 ---------- */
.aspect-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.aspect-row > label { font-size: 13px; color: var(--text-3); font-weight: 600; }
.aspect-row .chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 商品详情/编辑 ---------- */
.pd-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.pd-head h1 { flex: 1; margin: 0; min-width: 200px; }
.pd-acts { display: flex; gap: 8px; }
.pd-grid { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .pd-grid { grid-template-columns: 1fr; } }
.pd-refs .thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-refs .thumb { width: 100%; }
.pd-refs .thumb img { width: 100%; border-radius: 10px; border: 1px solid var(--bg-4); display: block; }
.pd-form h2, .pd-refs h2 { margin: 0 0 14px; font-size: 16px; }
.pd-form h2 small, .pd-refs h2 small { color: var(--text-3); font-weight: 400; }
.pd-more { margin-top: 12px; border: 1px solid var(--bg-4); border-radius: 10px; padding: 10px 14px; }
.pd-more summary { cursor: pointer; font-size: 13px; color: var(--text-2); font-weight: 600; }
.pd-save-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.pd-specs { margin-top: 16px; border-top: 1px dashed var(--bg-4); padding-top: 14px; }
.pd-specs h2 { font-size: 14px; margin: 0 0 10px; }

/* ---------- 商品库视图 ---------- */
.prod-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.prod-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--bg-4); border-radius: 10px; margin-bottom: 8px; }
.prod-row:hover { border-color: var(--brand); }
.prod-row .pr-info { flex: 1; min-width: 0; }
.prod-row .pr-info b { display: block; font-size: 14px; margin-bottom: 3px; }
.prod-row .pr-meta { font-size: 12px; color: var(--text-3); }
.prod-row .pr-acts { display: flex; gap: 6px; }

/* ---------- 模式切换（套图/尾卡） ---------- */
.mode-switch { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.mode-btn { padding: 9px 20px; border-radius: 10px; border: 1px solid var(--bg-4); background: var(--bg-2); color: var(--text-3); font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.mode-btn:hover { border-color: var(--brand); color: var(--text-1); }
.mode-btn.on { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: var(--brand); box-shadow: 0 3px 12px var(--brand-glow); }
.mode-note { font-size: 12px; color: var(--text-3); }

/* ---------- 商品选择 ---------- */
.prod-pick-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prod-picked { font-size: 13px; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--brand); border-radius: 8px; padding: 6px 12px; }
.prod-picked b { color: var(--text-1); }
.prod-pick-modal { max-height: 60vh; overflow-y: auto; }
.prod-pick-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--bg-4); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: var(--transition); }
.prod-pick-item:hover { border-color: var(--brand); background: var(--brand-soft); }
.prod-pick-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.prod-pick-item .pp-name { flex: 1; font-size: 13px; font-weight: 600; }
.prod-pick-item .pp-meta { font-size: 11px; color: var(--text-3); }

/* ---------- AI 清洗详情（导入档案卡） ---------- */
.imp-cleaned-box { border: 1px solid var(--bg-4); border-radius: 10px; padding: 10px 14px; margin-top: 12px; }
.imp-cleaned-box summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); }
.imp-cleaned-body { margin-top: 10px; }
.imp-cleaned-sec { font-size: 11px; color: var(--text-3); font-weight: 600; margin: 10px 0 6px; text-transform: uppercase; letter-spacing: .5px; }
.imp-noise { font-size: 12px; color: var(--text-3); text-decoration: line-through; padding: 3px 0; opacity: .75; }

/* ---------- 链接导入 ---------- */
.import-input-row { display: flex; gap: 10px; }
.import-input-row input { flex: 1; }
.import-status { margin-top: 12px; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.import-status .spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--bg-4); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.import-err { margin-top: 12px; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: var(--err); font-size: 13px; padding: 10px 12px; border-radius: 8px; line-height: 1.6; }
.imp-refs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.imp-refs img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; border: 1px solid var(--bg-4); cursor: zoom-in; }
.imp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.imp-col h3 { font-size: 13px; color: var(--text-3); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.imp-points { display: flex; flex-direction: column; gap: 6px; }
.imp-point { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 10px; background: var(--bg-2); border: 1px solid var(--bg-4); border-radius: 8px; cursor: pointer; transition: var(--transition); }
.imp-point:hover { border-color: var(--brand); }
.imp-point.off { opacity: .45; text-decoration: line-through; }
.imp-point .pt-chk { color: var(--ok); font-weight: 700; }
.imp-profile { font-size: 13px; line-height: 1.7; }
.imp-profile .pv-row { display: flex; gap: 8px; margin-bottom: 4px; }
.imp-profile .pv-k { color: var(--text-3); min-width: 64px; flex-shrink: 0; }
.imp-profile .pv-v { color: var(--text-1); }
.imp-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.imp-history { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.imp-hist-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--bg-4); border-radius: 8px; cursor: pointer; transition: var(--transition); }
.imp-hist-row:hover { border-color: var(--brand); }
.imp-hist-row .h-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-hist-row .h-meta { color: var(--text-3); font-size: 11.5px; flex-shrink: 0; }
.imp-badge { font-size: 10.5px; font-weight: 600; border-radius: 99px; padding: 2px 8px; flex-shrink: 0; }
.imp-badge.ok { color: var(--ok); background: rgba(52,211,153,.12); }
.imp-badge.mid { color: #fbbf24; background: rgba(251,191,36,.12); }
.imp-badge.low { color: var(--err); background: rgba(248,113,113,.12); }

/* ---------- 用户管理表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 12px 14px; color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--bg-4); background: var(--bg-2); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--bg-4); color: var(--text-1); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--bg-2); }
.tbl .mini-btn { margin-right: 6px; }
