/* 知产智航高校一体化服务平台 全局样式
 * 所有页面只引这一个文件：变量 + 布局 + 组件（按钮/输入/卡片/表格/徽标/空状态/加载态/提示条/弹层）。
 * 断点：>1100px 桌面（1366 宽是主要验收宽度）；700-1100px 平板；<700px 手机。
 */

:root {
  --brand: #1f6feb;
  --brand-strong: #1858c4;
  --brand-soft: #e8f0fe;
  --text: #1f2328;
  --text-2: #4b5563;
  --muted: #6b7280;
  --line: #d8dee6;
  --line-soft: #eaeef3;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ok: #1a7f37;
  --ok-soft: #e6f4ea;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --danger: #cf222e;
  --danger-soft: #fdecee;
  --info: #0b6bcb;
  --info-soft: #e6f0fb;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --font: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }

p { margin: 0 0 .75em; }

code, .mono { font-family: var(--mono); font-size: .92em; }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------------------------------------------------------------- 布局 */

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.brand-env {
  font-size: 11px;
  font-weight: 500;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 999px;
  padding: 1px 8px;
}

.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  color: var(--text-2);
}
.nav-links a:hover { background: var(--line-soft); text-decoration: none; }
.nav-links a.active { color: var(--brand); background: var(--brand-soft); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  min-width: 0;
}
.user-chip .uname { font-weight: 600; color: var(--text); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { padding: 24px 0 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin: 0; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }

/* ---------------------------------------------------------------- 卡片 */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card p:last-child { margin-bottom: 0; }

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
  min-width: 0;
}
.entry-card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.entry-card h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.entry-card .desc { color: var(--text-2); font-size: 13px; margin: 0; }
.entry-card .go { color: var(--brand); font-size: 13px; font-weight: 600; }

.entry-card.is-disabled { opacity: .6; pointer-events: none; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--line-soft); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { cursor: not-allowed; opacity: .6; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--line-soft); }

.btn-danger { color: var(--danger); border-color: #f0c2c7; background: var(--danger-soft); }
.btn-danger:hover { background: #fbd9dd; }

.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }

.btn.is-loading { pointer-events: none; }
.btn .spinner { width: 14px; height: 14px; border-width: 2px; }

/* ---------------------------------------------------------------- 表单 */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--danger); min-height: 0; }

.input, .textarea, .select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.input.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input::placeholder, .textarea::placeholder { color: #9aa3af; }

.field-row { display: grid; gap: 0 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.checkline { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); }
.checkline input[type="checkbox"] { margin-top: 3px; }

/* ---------------------------------------------------------------- 徽标 */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  background: var(--line-soft);
  color: var(--text-2);
  border: 1px solid transparent;
}
.badge-primary { background: var(--brand-soft); color: var(--brand-strong); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-outline { background: transparent; border-color: var(--line); color: var(--text-2); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------------------------------------------------------------- 提示条 */

.alert {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  margin-bottom: 14px;
}
.alert .alert-text { min-width: 0; }
.alert-title { font-weight: 600; }
.alert-error { background: var(--danger-soft); border-color: #f0c2c7; color: #8b1a23; }
.alert-warn { background: var(--warn-soft); border-color: #f0dca0; color: #6b4a00; }
.alert-ok { background: var(--ok-soft); border-color: #b7e0c2; color: #125c29; }
.alert-info { background: var(--info-soft); border-color: #bcd6f3; color: #0b4f96; }

/* ---------------------------------------------------------------- 表格 */

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { background: #f7f9fc; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fafbfd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- 空状态 / 加载态 */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty .empty-title { color: var(--text-2); font-weight: 600; font-size: 14px; }
.empty .empty-desc { font-size: 13px; max-width: 460px; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 16px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------------- 登录 / 注册 */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* 不设 background：让 body 上的背景照片透上来。
   * 原先这里是 background: linear-gradient(...)，会整块盖住页面背景。 */
  background: transparent;
}

.auth-main {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 56px;
  min-width: 0;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .lead { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.auth-card .foot { margin-top: 16px; font-size: 13px; color: var(--text-2); text-align: center; }

.auth-side {
  display: none;
  width: 320px;
  padding: 8px 0 0 8px;
  color: var(--text-2);
  font-size: 13px;
}
.auth-side ul { padding-left: 18px; margin: 0; }
.auth-side li { margin-bottom: 6px; }

.auth-shell { display: flex; gap: 32px; align-items: flex-start; width: 100%; max-width: 820px; justify-content: center; }

.site-foot { padding: 16px 0 28px; text-align: center; color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- 工具类 */

.muted { color: var(--muted); }
.small { font-size: 12px; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.break { word-break: break-all; }
.nowrap { white-space: nowrap; }

/* 徽标/按钮尺寸不超过容器 */
.card, .entry-card, .auth-card { overflow-wrap: anywhere; }

/* 简易弹层（toast） */
.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  background: #1f2937;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: var(--shadow);
}
.toast.error { background: #8b1a23; }
.toast.ok { background: #125c29; }

/* 挂件占位（客服挂件由后续任务实现，这里留底部安全间距） */
body.has-widget { padding-bottom: 0; }

/* ---------------------------------------------------------------- 工作台 / 方案 / 报告 */

.alert-icon { flex: 0 0 auto; font-weight: 700; }

.req { color: var(--danger); font-weight: 700; }

.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }

/* 类别/筛选胶囊 */
.class-picker, .filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 30px;
  min-width: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.class-input { max-width: 110px; min-height: 32px; }

/* 关键词标签框 */
.tag-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.tag-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 13px;
}
.tag button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
}
.tag button:hover { background: rgba(0, 0, 0, .08); }
.tag-input { flex: 1 1 160px; min-width: 120px; border: 0; outline: none; font: inherit; font-size: 14px; background: transparent; padding: 4px; }

/* 工作台两栏 */
.studio-layout { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.studio-form-card { position: sticky; top: 72px; }
.studio-result { min-width: 0; }

/* 方案卡片 */
.proposal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.proposal-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.proposal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.proposal-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.proposal-title h3 { margin: 0; font-size: 18px; }
.proposal-title .seq { color: var(--muted); font-size: 12px; font-weight: 600; }
.proposal-body { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.proposal-svg { flex: 0 0 auto; }
.proposal-info { flex: 1 1 240px; min-width: 0; }
.meaning { margin: 0 0 10px; }
.kv { display: flex; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.kv .k { flex: 0 0 64px; color: var(--muted); }
.kv .v { min-width: 0; }
.proposal-actions { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }

.svg-box {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  overflow: hidden;
  max-width: 100%;
}
.svg-box svg { display: block; width: 100%; height: 100%; }
.svg-box.is-empty { background: #f7f8fa; padding: 8px; text-align: center; }

.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dot { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.color-dot i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .12); display: inline-block; }

/* 内联报告 */
.report-inline { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.report-inline summary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; cursor: pointer; list-style: none; }
.report-inline summary::-webkit-details-marker { display: none; }
.report-inline[open] summary { margin-bottom: 10px; }

.hits-table .reason { min-width: 160px; font-size: 12px; color: var(--text-2); }

/* 完整报告 */
.report { min-width: 0; }
.report-summary { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; align-items: start; }
.report-verdict { min-width: 0; }
.report-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.metric { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: #f7f9fc; border-radius: var(--radius-sm); min-width: 0; }
.metric-k { font-size: 12px; color: var(--muted); }
.metric-v { font-weight: 600; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.bar { display: block; height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); }
.data-source-note {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 14px; padding: 8px 10px;
  background: var(--warn-soft); border: 1px solid #f0dca0; border-radius: var(--radius-sm);
  font-size: 13px; color: #6b4a00;
}
.disclaimer { margin: 10px 0 0; padding: 10px 12px; background: #f7f8fa; border-left: 3px solid var(--line); color: var(--text-2); font-size: 12px; line-height: 1.7; }

/* 设计对话 */
.dialog-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.msg { max-width: 92%; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; }
.msg-user { align-self: flex-end; background: var(--brand-soft); color: #123a78; }
.msg-system { align-self: flex-start; background: #f3f4f6; color: var(--text-2); }
.msg-meta { font-size: 11px; opacity: .7; margin-bottom: 2px; }
.msg-body { white-space: pre-wrap; word-break: break-word; }

/* 下单弹层里的方案预览 */
.order-preview { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.order-preview > div:last-child { flex: 1 1 240px; min-width: 0; }

/* 弹层 */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); }
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
  padding: 20px;
  min-width: 0;
}
.modal-wide { max-width: 920px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; }

/* 订单时间线 */
.timeline { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; }
.timeline-item { display: flex; gap: 10px; position: relative; padding: 0 0 14px 0; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.timeline-dot { flex: 0 0 auto; width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; background: var(--brand); }
.timeline-item.is-todo .timeline-dot { background: var(--line); }
.timeline-item.is-todo .badge { opacity: .7; }

/* 订单筛选 */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

/* 查重页 */
.compare-layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.demo-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.demo-item {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; text-align: left; cursor: pointer; min-width: 0;
}
.demo-item:hover { border-color: var(--brand); background: var(--brand-soft); }
.demo-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 查重页：图片上传与图文双报告 */
.name-input-row { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.name-input-row .input { flex: 1 1 190px; min-width: 0; }
.name-input-row .btn { flex: 0 0 auto; white-space: nowrap; }

.image-field { margin-top: 4px; }
.image-drop {
  margin-top: 8px; padding: 12px; border: 1px dashed var(--line);
  border-radius: var(--radius-sm); background: #fbf9f4; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.image-drop:hover, .image-drop.is-dragover { border-color: var(--brand); background: var(--brand-soft); }
.image-drop.is-invalid { border-color: var(--danger); background: var(--danger-soft); }
.image-drop:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.image-placeholder {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  text-align: center; padding: 10px 6px;
}
.image-placeholder[hidden], .image-preview-wrap[hidden] { display: none; }
.image-placeholder strong { font-size: 13px; }
.image-preview-wrap { display: flex; gap: 12px; align-items: center; min-width: 0; }
.image-preview {
  width: 104px; height: 104px; object-fit: contain; background: #fff;
  border: 1px solid var(--line-soft); border-radius: 6px; flex: 0 0 auto;
}
.image-preview-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.image-preview-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-preview-info .row { flex-wrap: wrap; gap: 6px; }

.dual-status {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); background: var(--surface);
}
.dual-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dual-item.is-combined { border-left: 1px dashed var(--line); padding-left: 12px; }
.dual-k { font-size: 12px; color: var(--muted); }

.image-report {
  margin-top: 16px; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fdfbf6;
}
.image-report-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.image-report-head h4 { margin: 0; }
.image-report-head p { margin-top: 3px; }
.image-summary { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; min-width: 0; }
.image-report-thumb {
  width: 104px; height: 104px; object-fit: contain; background: #fff;
  border: 1px solid var(--line-soft); border-radius: 6px; flex: 0 0 auto;
}
.image-summary-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px;
  border: 1px solid var(--line-soft); border-radius: 999px;
  background: var(--surface); font-size: 12px; color: var(--text-2);
  max-width: 100%; overflow-wrap: anywhere;
}
.image-color-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .12); display: inline-block; flex: 0 0 auto;
}

.image-match-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.image-match {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--surface);
}
.image-match-rank {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-strong);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.image-match-main { flex: 1 1 auto; min-width: 0; }
.image-match-main p { margin: 4px 0 0; color: var(--text-2); }
.image-match-score { flex: 0 0 112px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.image-match-score strong { font-family: var(--font-display); font-size: 18px; color: var(--brand-strong); }
.image-match-score .bar { width: 100%; }

/* ---------------------------------------------------------------- 运营端 */

.pool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 8px;
}
.pool-item:hover { border-color: var(--brand); }
.pool-main { min-width: 0; flex: 1 1 320px; }

.conv-detail { border-top: 1px dashed var(--line); padding-top: 12px; }
.conv-messages { max-height: 420px; }

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .studio-layout, .compare-layout { grid-template-columns: minmax(0, 1fr); }
  .studio-form-card { position: static; }
}

@media (max-width: 900px) {
  .auth-side { display: none; }
  .report-summary { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .wrap { padding: 0 14px; }
  .page { padding: 16px 0 48px; }
  h1 { font-size: 19px; }
  .grid, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .topbar .wrap { min-height: 52px; padding-top: 6px; padding-bottom: 6px; gap: 8px; }
  .brand { margin-right: 0; }
  .user-chip { order: 3; width: 100%; justify-content: space-between; }
  .nav-links { order: 4; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; gap: 2px; }
  .nav-links a { padding: 6px; }
  .auth-main { padding: 20px 12px 36px; }
  .auth-card { padding: 20px 16px; }
  .btn { height: 38px; }
  .table { min-width: 480px; }
  .proposal-body { flex-direction: column; }
  .proposal-svg .svg-box { width: 140px !important; height: 140px !important; }
  .proposal-actions .btn { flex: 1 1 auto; }
  .modal { padding: 12px 8px; }
  .modal-panel { padding: 16px 14px; }
  .report-metrics { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dialog-list { max-height: 220px; }
  .msg { max-width: 100%; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .name-input-row .btn { width: 100%; }
  .dual-status { grid-template-columns: 1fr; }
  .dual-item.is-combined { border-left: 0; border-top: 1px dashed var(--line); padding-left: 0; padding-top: 8px; }
  .image-summary { flex-direction: column; }
  .image-report-thumb { width: 100%; height: auto; max-height: 220px; }
  .image-match { align-items: flex-start; flex-wrap: wrap; }
  .image-match-score { flex: 1 1 100%; align-items: flex-start; padding-left: 34px; }
}
