/* ===== 设计令牌 ===== */
:root {
  --text: #1a1d27;
  --muted: #7b8299;
  --primary: #5b5bd6;
  --primary-deep: #4747c2;
  --grad: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
  --green: #10b981; --red: #ef4444; --amber: #f59e0b;
  --border: rgba(255,255,255,.55);
  --border-dark: rgba(180,185,210,.35);
  --radius: 16px; --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(90,100,160,.07);
  --shadow: 0 8px 24px rgba(90,100,160,.12);
  --shadow-lg: 0 20px 50px rgba(90,100,160,.18);
  --ring: 0 0 0 3px rgba(99,102,241,.2);
  --glass: rgba(255,255,255,.62);
  --glass-strong: rgba(255,255,255,.82);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }

/* ===== 背景：多色柔和渐变 ===== */
body {
  margin: 0; color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #eef0f9;
  min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 15% 10%,  rgba(199,210,254,.75), transparent),
    radial-gradient(ellipse 55% 50% at 85%  5%,  rgba(221,214,254,.70), transparent),
    radial-gradient(ellipse 60% 60% at 50% 95%,  rgba(186,230,255,.55), transparent),
    radial-gradient(ellipse 50% 45% at 90% 80%,  rgba(167,243,208,.45), transparent),
    radial-gradient(ellipse 55% 45% at  5% 85%,  rgba(254,215,170,.40), transparent);
}

a { color: inherit; text-decoration: none; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 4px; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
h3 { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px; }
.container { max-width: 900px; margin: 0 auto; padding: 20px 16px 60px; position: relative; z-index: 1; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .right { margin-left: auto; }
.inline { display: inline; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 1px 0 rgba(180,185,215,.2);
}
.brand { font-weight: 800; font-size: 15px; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.brand-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--grad); box-shadow: 0 3px 10px rgba(99,102,241,.45);
  display: inline-flex; align-items: center; justify-content: center;
}
.topbar nav { margin-left: auto; display: flex; gap: 2px; align-items: center; font-size: 14px; }
.topbar nav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); transition: all .15s; font-weight: 500; }
.topbar nav a:hover { color: var(--primary); background: rgba(99,102,241,.09); }

/* ===== 卡片（玻璃态） ===== */
.card {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.8);
}
.section { margin-bottom: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 14px 0 20px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-dark);
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  padding: 8px 16px; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500;
  transition: all .15s ease; box-shadow: var(--shadow-sm);
}
.btn:hover { background: rgba(255,255,255,.92); transform: translateY(-1px); box-shadow: var(--shadow); border-color: rgba(150,160,210,.4); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 4px 16px rgba(99,102,241,.38); }
.btn.primary:hover { box-shadow: 0 6px 22px rgba(99,102,241,.5); filter: brightness(1.06); }
.btn.green { background: var(--green); border: none; color: #fff; box-shadow: 0 4px 14px rgba(16,185,129,.3); }
.btn.red { background: var(--red); border: none; color: #fff; }
.btn.danger { color: var(--red); border-color: rgba(254,202,202,.8); background: rgba(255,255,255,.7); }
.btn.danger:hover { background: rgba(254,242,242,.9); }
.btn.sm { padding: 4px 12px; font-size: 13px; border-radius: 8px; }
.btn.wide { width: 100%; }
.link { background: none; border: none; color: var(--primary); cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--red); }

/* ===== 表单 ===== */
label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 500; color: var(--muted); }
input, textarea, select {
  display: block; width: 100%; margin-top: 5px; padding: 9px 12px;
  border: 1px solid rgba(180,185,215,.4); border-radius: 10px;
  font: inherit; color: var(--text);
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); background: rgba(255,255,255,.92); }
input[type=file] { border: 1.5px dashed rgba(150,160,220,.5); background: rgba(238,240,255,.35); padding: 14px; cursor: pointer; }
input[type=file]:hover { border-color: var(--primary); background: rgba(238,240,255,.55); }
label.checkbox { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 400; }
label.checkbox input { width: auto; display: inline; margin: 0; accent-color: var(--primary); }
.row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.row label { flex: 1; min-width: 150px; margin-bottom: 0; }
.row.gap { gap: 10px; }

/* ===== 上传进度条 ===== */
.progress { display: none; align-items: center; gap: 10px; width: 100%; margin-top: 10px; }
.progress-track { flex: 1; height: 6px; background: rgba(180,185,220,.25); border-radius: 99px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0%; border-radius: 99px;
  background: var(--grad); transition: width .2s ease;
}
.progress-text { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.file-info { display: block; margin-top: 6px; }

/* ===== 文件队列上传 ===== */
.upload-batches { list-style: none; padding: 0; margin: 0 0 10px; }
.upload-batch { padding: 9px 0; border-bottom: 1px solid rgba(180,185,215,.25); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upload-batch:last-child { border-bottom: none; }
.upload-batch-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upload-batch-name { font-size: 13.5px; word-break: break-all; }
.upload-batch-progress { display: none; width: 100%; align-items: center; gap: 8px; padding: 4px 0 2px; }
.upload-batch-progress .progress-track { flex: 1; }
.upload-batch-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ===== 提示条 ===== */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; backdrop-filter: blur(8px); }
.alert.err { background: rgba(254,242,242,.8); color: #b91c1c; border-color: rgba(254,202,202,.7); }
.alert.ok  { background: rgba(236,253,245,.8); color: #047857; border-color: rgba(167,243,208,.7); }
.alert.warn { background: rgba(255,251,235,.8); color: #92400e; border-color: rgba(253,230,138,.7); }

/* ===== 登录卡片 ===== */
.auth-card {
  max-width: 380px; margin: 9vh auto; padding: 38px 34px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 22px; text-align: center;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.9);
}
.auth-card h1 { font-size: 26px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-card form { text-align: left; margin-top: 22px; }

/* ===== 筛选栏（下拉按钮版） ===== */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; align-items: flex-start;
}
.filter-dropdown { position: relative; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 99px;
  background: rgba(255,255,255,.72); border: 1px solid rgba(180,185,215,.4);
  font-size: 13px; font-weight: 500; color: var(--text);
  cursor: pointer; transition: all .15s; white-space: nowrap;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.filter-btn:hover { background: rgba(255,255,255,.92); border-color: rgba(99,102,241,.3); color: var(--primary); }
.filter-active .filter-btn { background: var(--grad); border: none; color: #fff; box-shadow: 0 3px 12px rgba(99,102,241,.3); }
.filter-active .filter-btn .chevron { stroke: #fff; }
.chevron { transition: transform .2s; flex-shrink: 0; }
.filter-dropdown[open] .chevron { transform: rotate(180deg); }
.filter-panel {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 160px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: var(--shadow-lg); border-radius: 14px;
  animation: pop .14s ease;
}
.filter-option {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text);
  transition: background .1s; margin: 0; white-space: nowrap;
}
.filter-option:hover { background: rgba(99,102,241,.08); color: var(--primary); }
.filter-option input[type=radio], .filter-option input[type=checkbox] {
  width: 14px; height: 14px; display: inline; margin: 0; flex-shrink: 0;
  accent-color: var(--primary);
}

/* 旧版扁平 pill（备用） */
.client-filter, .member-filter {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center;
}
.member-filter { margin-bottom: 18px; padding-top: 2px; }
.filter-pill {
  padding: 5px 14px; border-radius: 99px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(180,185,215,.35);
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--muted); cursor: pointer; transition: all .15s;
}
.filter-pill:hover { background: rgba(255,255,255,.9); color: var(--primary); border-color: rgba(99,102,241,.3); }
.filter-pill.active { background: var(--grad); border: none; color: #fff; box-shadow: 0 3px 12px rgba(99,102,241,.3); }

/* ===== 项目网格 ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }
.project-card { overflow: hidden; padding: 0; display: block; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(255,255,255,.8); }
.project-card.archived { opacity: .55; filter: grayscale(.4); }
.thumb-box { height: 144px; }
.thumb-box .thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.empty {
  display: flex; align-items: center; justify-content: center; height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(199,210,254,.3), rgba(221,214,254,.3));
}
/* ===== 成员多选 ===== */
.member-pick-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 220px; overflow-y: auto;
  border: 1px solid rgba(180,185,215,.3); border-radius: 10px; padding: 6px;
  background: rgba(255,255,255,.5);
}
.member-pick-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 400; color: var(--text);
  transition: background .12s; margin: 0;
}
.member-pick-item:hover { background: rgba(99,102,241,.07); }
.member-pick-item input[type=checkbox] { width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--primary); margin: 0; display: inline; }
.member-pick-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-body { padding: 13px 15px; display: flex; flex-direction: column; gap: 2px; }

/* ===== 标签 ===== */
.tag {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 500;
  padding: 2px 10px; border-radius: 99px;
  background: rgba(240,241,248,.9); color: var(--muted);
  vertical-align: middle; white-space: nowrap;
  border: 1px solid rgba(200,205,230,.4);
}
.tag.blue  { background: rgba(238,242,255,.9); color: var(--primary-deep); border-color: rgba(180,185,255,.3); }
.tag.green { background: rgba(236,253,245,.9); color: #047857; border-color: rgba(110,231,183,.3); }
.tag.red   { background: rgba(254,242,242,.9); color: #b91c1c; border-color: rgba(254,202,202,.4); }
.tag.gray  { background: rgba(243,244,249,.9); }
.tag.sm    { font-size: 11px; padding: 1px 8px; }
.copy-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(180,185,215,.4);
  background: rgba(255,255,255,.7); color: var(--primary); cursor: pointer;
  padding: 0; vertical-align: middle; transition: all .15s;
}
.copy-icon-btn:hover { background: rgba(99,102,241,.1); border-color: var(--primary); }

/* ===== 时间线 ===== */
.timeline-title { margin-top: 28px; }
.timeline { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.node-card { display: block; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; border-left: 3px solid transparent; }
.node-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-left-color: var(--primary); }
.node-card.draft { border-style: dashed; opacity: .82; }
.node-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumbs img {
  width: 96px; height: 72px; object-fit: cover; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.6); transition: transform .15s;
  box-shadow: var(--shadow-sm);
}
.node-card:hover .thumbs img { transform: scale(1.03); }
.thumbs .more { align-self: center; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.node-foot { margin-top: 10px; }
.redesign-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--amber); font-size: 13px; font-weight: 600; margin: 8px 0;
}
.redesign-divider::before, .redesign-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(245,210,120,.6), transparent); }

/* ===== 大版本卡片组（V1/V2…，下挂多个子卡片）===== */
.version-group {
  border: 1.5px solid rgba(129,140,248,.55);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(222,226,255,.7), rgba(236,239,255,.4));
  padding: 0; overflow: hidden;
  box-shadow: 0 8px 26px rgba(99,102,241,.13);
}
.version-group-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(99,102,241,.26), rgba(168,139,250,.18));
  border-bottom: 1.5px solid rgba(129,140,248,.45);
}
.version-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 28px; padding: 0 10px;
  font-size: 15px; font-weight: 800; letter-spacing: .02em;
  color: #fff; background: var(--grad, linear-gradient(135deg,#6366f1,#a78bfa));
  border-radius: 9px; box-shadow: 0 3px 10px rgba(99,102,241,.3);
}
.version-group-title { font-weight: 700; font-size: 15px; color: var(--text); }
.version-group-count { margin-left: auto; }
/* 子卡片：左侧缩进 + 一条淡淡的竖线，区分"子版块"与"大版本" */
.version-group-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 14px 28px; position: relative; }
.version-group-body::before {
  content: ''; position: absolute; left: 13px; top: 16px; bottom: 16px;
  width: 1px; background: rgba(150,160,210,.28);
}

/* 折叠子卡片（手风琴）*/
.vg-item {
  position: relative;
  border: 1px solid rgba(180,185,225,.45); border-radius: 12px;
  background: rgba(255,255,255,.72); overflow: hidden;
  transition: border-color .15s;
}
.vg-item::before { /* 连接到竖线的小横杆 */
  content: ''; position: absolute; left: -15px; top: 21px; width: 13px; height: 1px;
  background: rgba(150,160,210,.28);
}
.vg-item.feedback-item { border-left: 3px solid var(--amber, #f59e0b); background: rgba(255,251,240,.75); }
.vg-item.feedback-item.is-submission { border-left-color: var(--primary, #6366f1); background: rgba(238,241,255,.72); }

/* 定稿完整版：整组绿色强调，方便一眼识别交付/结算 */
.version-group.is-final { border-color: rgba(16,185,129,.6); background: linear-gradient(180deg, rgba(214,245,233,.7), rgba(236,253,245,.4)); }
.version-group.is-final .version-group-head { background: linear-gradient(90deg, rgba(16,185,129,.24), rgba(52,211,153,.14)); border-bottom-color: rgba(16,185,129,.42); }
.version-group.is-final .version-badge { background: linear-gradient(135deg,#10b981,#34d399); box-shadow: 0 3px 10px rgba(16,185,129,.32); }

/* 悬浮"回到最新版本"按钮 —— 与玻璃拟态卡片风格统一 */
.scroll-bottom-btn {
  position: fixed; right: 16px; bottom: 88px; z-index: 46;
  width: 40px; height: 40px; border-radius: 14px;
  background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 6px 18px rgba(99,102,241,.16); cursor: pointer;
  font-size: 17px; line-height: 1; color: var(--primary, #6366f1);
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  opacity: .82; transition: opacity .15s, transform .12s;
}
.scroll-bottom-btn:hover { opacity: 1; transform: translateY(-2px); }

/* 开启通知小条 */
.push-chip {
  position: fixed; left: 16px; bottom: 88px; z-index: 46;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 6px 18px rgba(99,102,241,.16);
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  font-size: 13px; font-weight: 600; color: var(--primary-deep, #4338ca);
}
.push-chip:hover { background: rgba(255,255,255,.75); }
.vg-item.has-new { border-color: #ef4444; }
.vg-item-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 14px; cursor: pointer; user-select: none;
}
.vg-item-head:hover { background: rgba(99,102,241,.05); }
.vg-chevron {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: rgba(99,102,241,.14); color: var(--primary, #6366f1);
  font-size: 13px; transition: transform .15s ease;
}
.vg-item.open .vg-chevron { transform: rotate(90deg); }
.vg-meta { margin-left: auto; white-space: nowrap; }
.vg-item-body { display: none; padding: 0 14px 13px; }
.vg-item.open .vg-item-body { display: block; }
.vg-item .fb-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.6; margin: 4px 0 8px; }
.vg-item .fb-files { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
@media (max-width: 640px) {
  .vg-meta { margin-left: 0; white-space: normal; flex-basis: 100%; }
}

/* 需求/反馈头卡 */
.req-head-card {
  border: 1px dashed rgba(99,102,241,.4);
  border-radius: 14px; padding: 14px 16px;
  background: rgba(255,255,255,.6);
}
.req-head-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--primary-deep, #4338ca); }
.req-files { display: flex; flex-direction: column; gap: 6px; }
.req-file {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 7px 12px; border-radius: 10px;
  background: rgba(238,240,255,.6); border: 1px solid rgba(180,185,230,.35); font-size: 13px;
}
.req-file-name { flex: 1; min-width: 0; word-break: break-all; }
.req-file-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* 反馈子卡片（文字+附件，无快照）*/
.feedback-card {
  border: 1px solid rgba(245,210,120,.55);
  border-left: 3px solid var(--amber, #f59e0b);
  border-radius: 14px; padding: 12px 16px;
  background: rgba(255,251,240,.7);
}
.feedback-card .fb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.feedback-card .fb-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.6; }
.feedback-card .fb-files { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }

/* ===== 大图画廊（统一尺寸 + object-fit:contain + 浅灰背景）===== */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 16px 0; }
.gallery figure {
  margin: 0;
  background: rgba(238,239,248,.85); /* 浅灰底色，显示图片边界 */
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: var(--shadow-sm);
}
.gallery figure > a { display: block; height: 200px; } /* 仅图片链接固定高度，不波及操作按钮 */
.gallery img {
  width: 100%; height: 100%;
  object-fit: contain; /* 等比缩放，不裁剪，空白处显示浅灰 */
  display: block;
  transition: transform .18s ease;
}
.gallery figure > a:hover img { transform: scale(1.03); }
.gallery figcaption { margin-top: 6px; padding: 0 4px; word-break: break-all; }

/* ===== 列表 ===== */
.filelist, .memberlist, .comments { list-style: none; padding: 0; margin: 0 0 12px; }
.filelist li, .memberlist li { padding: 9px 0; border-bottom: 1px solid rgba(180,185,215,.25); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filelist li:last-child, .memberlist li:last-child { border-bottom: none; }
.filelist .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ===== 评论 ===== */
.comments li { padding: 14px 0; border-bottom: 1px solid rgba(180,185,215,.25); }
.comments li:last-child { border-bottom: none; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comments p { margin: 6px 0 0 36px; white-space: pre-wrap; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ===== 表格 ===== */
.table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid rgba(180,185,215,.2); font-size: 14px; }
.table tr:last-child td { border-bottom: none; }
.table th { background: rgba(240,242,252,.5); font-weight: 600; font-size: 13px; color: var(--muted); }
.table tbody tr { transition: background .12s; }
.table tr:hover td { background: rgba(255,255,255,.4); }

/* ===== 下拉弹层 ===== */
.dropdown { position: relative; }
.dropdown summary { list-style: none; cursor: pointer; }
.dropdown summary::-webkit-details-marker { display: none; }
.form-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 320px; z-index: 30;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: var(--shadow-lg); border-radius: var(--radius);
  animation: pop .14s ease;
}
.dropdown.up .form-pop { bottom: calc(100% + 8px); top: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }

/* 居中弹层（用户改名/标签等，避免在表格里被遮挡看不见）*/
.form-pop.pop-center {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  right: auto; bottom: auto; width: 300px; max-width: calc(100vw - 32px);
  animation: none; z-index: 9999;
  box-shadow: 0 24px 70px rgba(15,18,45,.45);
}
/* 本版本反馈入口（折叠态）：虚线弱化，和正式子卡片区分 */
.fb-composer-item { border-style: dashed; background: rgba(248,249,255,.72); }

/* ===== 用户管理：行内展开授权项目 ===== */
.ux-toggle {
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
  border: 1px solid rgba(150,160,210,.4); background: rgba(99,102,241,.1);
  color: var(--primary, #6366f1); font-size: 12px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
}
.ux-toggle.open { transform: rotate(90deg); }
.users-table td.ux-toggle-cell { width: 36px; }
.user-detail > td { background: rgba(99,102,241,.04); border-radius: 0 0 10px 10px; }
.ux-proj-head { margin: 4px 2px 8px; }
.ux-proj-list { display: flex; flex-direction: column; gap: 6px; }
.ux-proj {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 10px;
  background: rgba(255,255,255,.7); border: 1px solid rgba(180,185,220,.35);
}
.ux-proj.suspended { opacity: .65; background: rgba(245,245,248,.7); }
.ux-proj-name { font-weight: 600; flex: 1; min-width: 120px; }
.ux-proj-act { margin-left: auto; }

/* ===== 用户管理表：移动端自适应（卡片化，避免横向拖动）===== */
@media (max-width: 720px) {
  .users-table thead { display: none; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: auto; }
  .users-table tr.user-row {
    border: 1px solid rgba(180,185,215,.45); border-radius: 12px;
    margin-bottom: 10px; padding: 4px 2px; background: rgba(255,255,255,.55);
  }
  .users-table tr.user-row td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 7px 12px; border: none; text-align: right; min-width: 0;
  }
  .users-table tr.user-row td::before {
    content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 600;
    text-align: left; flex-shrink: 0; white-space: nowrap;
  }
  .users-table tr.user-row td.ux-toggle-cell { justify-content: flex-start; padding-bottom: 0; }
  .users-table tr.user-row td.ux-toggle-cell::before { content: ""; }
  .users-table tr.user-row td.row.gap { flex-wrap: wrap; justify-content: flex-end; }
  .user-detail { margin: -6px 0 12px; }
  .user-detail > td { display: block; padding: 10px; }
  .ux-proj { font-size: 13px; }
}


/* ===== 快照凭据 ===== */
.snapshot { background: rgba(238,240,255,.55); }
.snapshot code {
  display: block; background: rgba(220,224,255,.5); padding: 8px 10px; border-radius: 8px;
  word-break: break-all; font-size: 12px; color: var(--primary-deep);
  border: 1px solid rgba(180,185,255,.3);
}

/* ===== 客户拖拽排序列表 ===== */
.client-sort-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.client-sort-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,.55); border: 1px solid rgba(180,185,215,.25);
  transition: background .12s;
}
.client-sort-item.dragging { opacity: .45; background: rgba(99,102,241,.08); }
.client-sort-item:hover { background: rgba(255,255,255,.8); }
.drag-handle {
  color: var(--muted); cursor: grab; flex-shrink: 0;
  display: flex; align-items: center; padding: 2px;
}
.drag-handle:active { cursor: grabbing; }
.client-sort-name { font-size: 14px; font-weight: 500; flex: 1; }

/* ===== 汉堡菜单 ===== */
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 6px; border-radius: 8px;
  background: rgba(255,255,255,.5); border: 1px solid var(--border-dark);
  cursor: pointer; margin-left: auto; flex-shrink: 0;
}
.hamburger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--text); transition: all .2s;
}
.nav-mobile {
  display: none; flex-direction: column;
  position: fixed; top: 57px; left: 0; right: 0; z-index: 49;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-dark);
  box-shadow: 0 8px 24px rgba(90,100,160,.12);
  padding: 8px 0;
}
.nav-mobile a, .nav-mobile button {
  display: block; padding: 12px 20px; font-size: 15px; font-weight: 500;
  color: var(--text); border: none; background: none; cursor: pointer;
  text-align: left; width: 100%; transition: background .12s;
}
.nav-mobile a:hover, .nav-mobile button:hover { background: rgba(99,102,241,.07); }
.nav-mobile.open { display: flex; }
.nav-backdrop {
  display: none; position: fixed; inset: 0; z-index: 48;
  background: transparent; cursor: default;
}
.nav-backdrop.open { display: block; }

/* ===== 移动端 / 平板 ===== */
@media (max-width: 860px) {
  .nav-desktop { display: none !important; }
  .hamburger { display: flex; } /* margin-left 由 nav-uname 接管（见 nav-uname 部分）*/
}
@media (max-width: 640px) {
  .container { padding: 14px 12px 80px; } /* 底部留空给固定按钮 */
  .page-head { flex-direction: column; }
  /* 移动端：下拉弹层固定在屏幕内，避免被推到视口外（含向上展开的"新建节点"） */
  .form-pop,
  .dropdown.up .form-pop {
    position: fixed; left: 12px; right: 12px; width: auto;
    top: 12vh; bottom: auto;
    max-height: 74vh; overflow-y: auto;
    z-index: 60;
    /* 不透明背景 + 阴影，提升可读性 */
    background: #ffffff;
    border: 1px solid rgba(150,155,200,.5);
    box-shadow: 0 20px 60px rgba(15,18,45,.45);
  }
  /* 仅「创建节点」弹窗：用自身超大投影压暗四周，与页面内容明显分层。
     投影不拦截点击，弹窗内容照常可点，点暗处仍可正常关闭。 */
  .create-node-dropdown .form-pop {
    box-shadow: 0 0 0 100vmax rgba(12,15,35,.55), 0 20px 60px rgba(15,18,45,.5);
  }
  .wide-mobile { width: 100%; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand-text { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure > a { height: 140px; } /* 移动端稍低 */
  .comments p { margin-left: 0; }
  .table { font-size: 13px; }
  .table th, .table td { padding: 8px 10px; }
}

/* ===== 固定底部「新建节点」按钮 ===== */
.create-node-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  padding: 12px 16px env(safe-area-inset-bottom, 18px);
  display: flex; justify-content: center;
  background: linear-gradient(to bottom, transparent, rgba(238,240,249,.96) 38%);
  /* 不设 pointer-events:none，避免移动端子元素无法点击 */
}
.create-node-dropdown {
  width: 100%; max-width: 380px;
}
.create-node-dropdown > summary.btn { width: 100%; }

/* 顶栏用户名徽章（桌面：紧接导航右侧；移动：汉堡左侧，margin-left:auto 推开）*/
.nav-uname {
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
  padding: 4px 10px;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(180,185,215,.3);
  border-radius: 8px;
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .nav-uname { margin-left: auto; }
  .hamburger { margin-left: 0 !important; }
}

/* ===== 节点文件卡片（非图片成果）===== */
.file-card-box {
  height: 200px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: rgba(230,232,248,.6);
  border-radius: 10px 10px 0 0;
}
.file-card-icon { font-size: 48px; line-height: 1; }
.file-card-ext { font-weight: 600; letter-spacing: .04em; }
@media (max-width: 640px) {
  .file-card-box { height: 140px; }
  .file-card-icon { font-size: 36px; }
}

/* ===== 灯箱 ===== */
.lb-overlay {
  display: none; position: fixed; inset: 0; z-index: 9990;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lb-overlay.open { display: flex; }
.lb-img {
  max-width: calc(100vw - 140px); max-height: 85vh;
  object-fit: contain; border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  cursor: default;
  transition: filter .25s ease;
}
/* 加载中：缩略图占位时轻微模糊 + 居中转圈，原图加载完成后清晰显示 */
.lb-overlay.lb-busy .lb-img { filter: blur(8px); }
.lb-overlay.lb-busy::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff;
  border-radius: 50%; animation: lbspin .8s linear infinite; pointer-events: none;
}
@keyframes lbspin { to { transform: rotate(360deg); } }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); border: none; color: #fff;
  font-size: 28px; width: 48px; height: 80px; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s; z-index: 1;
}
.lb-nav:hover { background: rgba(255,255,255,.3); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-controls {
  position: absolute; top: 14px; right: 14px;
  display: flex; align-items: center; gap: 8px;
}
.lb-counter { color: rgba(255,255,255,.6); font-size: 13px; }
.lb-btn {
  color: #fff !important;
  border-color: rgba(255,255,255,.3) !important;
  background: rgba(255,255,255,.14) !important;
  backdrop-filter: none !important;
}
.lb-btn:hover { background: rgba(255,255,255,.28) !important; }
.lb-close {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  font-size: 16px; width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lb-close:hover { background: rgba(255,255,255,.3); }
@media (max-width: 640px) {
  .lb-img { max-width: calc(100vw - 80px); }
  .lb-prev { left: 4px; width: 36px; }
  .lb-next { right: 4px; width: 36px; }
}

/* ===== 评论文件引用 ===== */
.comment-refs { margin: 8px 0 0 36px; display: flex; flex-direction: column; gap: 6px; }
.ref-file-card {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 12px; border-radius: 10px;
  background: rgba(238,240,255,.6);
  border: 1px solid rgba(180,185,230,.35);
  font-size: 13px;
}
.ref-file-icon { flex-shrink: 0; }
.ref-file-name { flex: 1; min-width: 0; word-break: break-all; color: var(--text); }
.ref-file-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ref-section-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 4px;
}
/* 评论附件（随评论上传的文件） */
.comment-files { margin: 8px 0 0 36px; display: flex; flex-direction: column; gap: 6px; }
.comment-attach-label { display: inline-flex; align-items: center; cursor: pointer; margin: 4px 0; }
/* 已选附件文件名列表（发表前即显示，便于核对） */
.attach-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.attach-list .attach-head { margin-bottom: 2px; }
.attach-list .attach-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(238,240,255,.6); border: 1px solid rgba(180,185,230,.35);
  font-size: 13px;
}
.attach-list .attach-name { flex: 1; min-width: 0; word-break: break-all; color: var(--text); }
.attach-list .attach-size { flex-shrink: 0; white-space: nowrap; }
.attach-list .attach-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.attach-list .attach-rm { font-size: 12.5px; }

@media (max-width: 640px) {
  .comment-refs { margin-left: 0; }
  .comment-files { margin-left: 0; }
}

/* ===== 节点新动态提示（新评论 / 状态更新未读）===== */
.new-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 9px; border-radius: 999px;
  color: #fff; background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239,68,68,.5);
  animation: newPulse 1.8s infinite;
}
@keyframes newPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.45); }
  70%  { box-shadow: 0 0 0 7px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.node-card.has-new { border-left-color: #ef4444; }
.node-card.has-new:hover { border-left-color: #ef4444; }

/* ===== 全局水印 ===== */
.watermark {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; /* 完全不影响点击和交互 */
  background-repeat: repeat;
  background-size: 220px 130px;
  user-select: none; -webkit-user-select: none;
}
