:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e6e8ee;
  --text: #1b1f27;
  --muted: #6b7280;
  --brand: #2f6bff;
  --brand-2: #1d4ed8;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  height: 60px; padding: 0 24px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }

/* 侧栏导航 */
.side-nav { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 6px; }
.side-nav a {
  font-size: 15px; color: #374151; padding: 13px 16px; border-radius: 10px; font-weight: 500;
}
.side-nav a:hover { background: #f5f7fb; color: var(--brand-2); }
.side-nav a.active { background: #eaf0ff; color: var(--brand-2); font-weight: 600; }
.brand .logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #4f8bff, #2f6bff);
  color: #fff; display: grid; place-items: center; font-size: 14px;
}
.brand-name { white-space: nowrap; }
.brand .logo-img { width: 28px; height: 28px; border-radius: 8px; display: block; object-fit: contain; }
.auth-logo { width: 52px; height: 52px; border-radius: 13px; margin: 0 auto 10px; display: block; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  padding: 8px 14px; border-radius: 8px; color: #374151; font-weight: 500;
}
.nav a:hover { background: #f2f4f8; }
.nav a.active { background: #eaf0ff; color: var(--brand-2); }
.topbar .spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #e8edff; color: var(--brand-2);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.avatar-img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line);
}
.avatar-row { display: flex; gap: 18px; align-items: center; }
.avatar-big {
  width: 88px; height: 88px; border-radius: 50%; background: #e8edff; color: var(--brand-2);
  display: grid; place-items: center; font-size: 32px; font-weight: 700; object-fit: cover;
  border: 1px solid var(--line); flex: 0 0 88px; overflow: hidden;
}
.avatar-big img, img.avatar-big { object-fit: cover; }

.notice-modal { max-width: 520px; }
.notice-body p { margin: 0 0 12px; line-height: 1.8; color: #374151; }
.notice-body .notice-hello { font-size: 17px; font-weight: 600; color: var(--text); }
.notice-body .notice-sign { text-align: right; color: var(--muted); margin-bottom: 4px; }
.notice-foot { padding: 0 18px 18px; }
.notice-foot .btn { width: 100%; height: 42px; }
.role-tag {
  font-size: 12px; padding: 1px 8px; border-radius: 999px;
  background: #eef2ff; color: #4338ca; font-weight: 600;
}
.role-tag.seller { background: #ecfdf5; color: #047857; }
.role-tag.admin { background: #fef3c7; color: #b45309; }

.role-switch {
  display: inline-flex; background: #f1f3f7; border-radius: 8px; padding: 2px; gap: 2px;
}
.role-switch .rs {
  border: none; background: transparent; height: 26px; padding: 0 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: #6b7280;
}
.role-switch .rs:hover { color: #374151; }
.role-switch .rs.on { background: #fff; color: var(--brand-2); box-shadow: 0 1px 2px rgba(0,0,0,.1); }

/* ===== 身份标识卡：现代渐变胶囊 ===== */
.idcard {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 11px 0 8px;
  border-radius: 999px;
  vertical-align: middle; margin-left: 8px;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: .2px;
  white-space: nowrap; border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .2s ease;
}
.idcard:hover { transform: translateY(-1px); }
.idcard-icon { width: 12px; height: 12px; flex: 0 0 12px; fill: currentColor; opacity: .95; }
.idcard-text { position: relative; z-index: 2; }

/* 顶级档：实心渐变 + 光晕 + 渐变流动 */
.idcard[data-c="red"] {
  color: #fff; overflow: hidden;
  background: linear-gradient(120deg, #ff7a7a 0%, #ff2d55 45%, #ff6a3d 100%);
  background-size: 220% 220%;
  box-shadow: 0 2px 10px rgba(255, 45, 85, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.idcard[data-c="gold"] {
  color: #4a2b00; overflow: hidden;
  background: linear-gradient(120deg, #ffe08a 0%, #ffb020 55%, #ffe08a 100%);
  background-size: 220% 220%;
  box-shadow: 0 2px 10px rgba(255, 176, 32, .32), inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* 中间档：浅色底 + 同色描边，克制但精致 */
.idcard[data-c="purple"] { color: #6a45f5; background: rgba(124, 92, 255, .1); border-color: rgba(124, 92, 255, .22); }
.idcard[data-c="green"] { color: #0a8f61; background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .22); }
.idcard[data-c="gray"] { color: #6b7280; background: rgba(107, 114, 128, .08); border-color: rgba(107, 114, 128, .16); }

.idcard.lg { height: 34px; padding: 0 18px 0 13px; font-size: 17px; gap: 8px; margin-left: 0; border-radius: 999px; }
.idcard.lg .idcard-icon { width: 17px; height: 17px; flex-basis: 17px; }

.badge-cell .idcard { height: 22px; font-size: 11.5px; padding: 0 9px 0 7px; margin: 2px 4px 2px 0; }
.idcard.manual { outline: 1px dashed rgba(17, 24, 39, .28); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .idcard[data-c="red"], .idcard[data-c="gold"] { animation: mh-grad 7s ease-in-out infinite; }
  .idcard[data-c="gold"] { animation-duration: 9s; }
  .idcard[data-c="red"]::after, .idcard[data-c="gold"]::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 70%);
    transform: translateX(-130%);
    animation: mh-sweep 5.5s ease-in-out infinite;
  }
  .idcard[data-c="gold"]::after { animation-delay: 1.4s; }
}

@keyframes mh-sweep {
  0%, 55% { transform: translateX(-130%); }
  85%, 100% { transform: translateX(130%); }
}

@keyframes mh-grad {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 顶级标识的细小光粒（吸附在胶囊内） */
.idcard-particles {
  position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none;
  border-radius: inherit;
}
.idcard-particles > i {
  position: absolute; bottom: 1px; width: 3px; height: 3px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, .9) 45%, rgba(255, 255, 255, 0) 72%);
  opacity: 0; animation: mh-rise 3.4s linear infinite; will-change: transform, opacity;
}
.idcard[data-c="gold"] .idcard-particles > i {
  background: radial-gradient(circle, #fffdf0 0%, rgba(255, 240, 180, .95) 45%, rgba(255, 240, 180, 0) 72%);
}
.idcard-particles > i:nth-child(1) { left: 12%; animation-delay: 0s; animation-duration: 3.2s; }
.idcard-particles > i:nth-child(2) { left: 30%; animation-delay: .8s; animation-duration: 4.1s; }
.idcard-particles > i:nth-child(3) { left: 48%; animation-delay: 1.6s; animation-duration: 3.6s; }
.idcard-particles > i:nth-child(4) { left: 66%; animation-delay: .4s; animation-duration: 4.4s; }
.idcard-particles > i:nth-child(5) { left: 82%; animation-delay: 1.2s; animation-duration: 3.5s; }

@keyframes mh-rise {
  0% { transform: translate3d(0, 6px, 0) scale(.5); opacity: 0; }
  20% { opacity: .95; }
  70% { opacity: .5; }
  100% { transform: translate3d(5px, -22px, 0) scale(1.1); opacity: 0; }
}

.points-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: #fff7e6; color: #b45309; border: 1px solid #fde3ae;
}
.points-pill.zero { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.points-pill.earn { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.points-pill { background: #eef3ff; color: #2f6bff; border-color: #d8e3ff; }
.points-pill.earn { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.coins-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: #fff7e6; color: #b45309; border: 1px solid #fde3ae;
}

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: #fafbfd; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat b { font-size: 20px; }
.badge-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.badge-label { display: inline-block; width: 68px; color: var(--muted); font-size: 13px; }
.badge-cell .idcard { margin: 2px 4px 2px 0; }
.table-wrap { overflow-x: auto; }
.badge-cell .idcard-text { font-size: 12px; padding: 2px 12px; }

.doc h3 { margin: 18px 0 8px; font-size: 16px; }
.doc h3:first-child { margin-top: 0; }
.doc p { margin: 0 0 10px; color: #374151; line-height: 1.85; }
.doc ul { margin: 0 0 12px; padding-left: 20px; color: #374151; line-height: 1.9; }
.doc li { margin-bottom: 4px; }
.doc b { color: var(--text); }

/* 发布需求：参考链接行 */
.link-row {
  display: grid; grid-template-columns: 96px 110px 1fr; gap: 10px; align-items: center;
}
.link-row > label { font-weight: 600; font-size: 13px; color: var(--text); }
.link-row select, .link-row input {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: #fff;
  outline: none; transition: .15s;
}
.link-row select { padding: 9px 8px; }
.link-row input:focus, .link-row select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }

.grid-4 { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 14px; }

/* 唯一数字 ID */
.side-id { font-size: 12px; color: #9aa3b2; margin-top: 3px; letter-spacing: .3px; }
.req-id { font-size: 12px; color: #9aa3b2; font-weight: 500; background: #f3f4f6; border-radius: 6px; padding: 1px 6px; margin-right: 6px; }

/* 留言 */
.cm-list { display: flex; flex-direction: column; gap: 12px; }
.cm-item { display: flex; gap: 10px; }
.cm-avatar {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #eaf0ff;
  color: var(--brand-2); display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.cm-main { flex: 1; min-width: 0; }
.cm-head { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.cm-body { font-size: 13.5px; color: #374151; margin-top: 3px; white-space: pre-wrap; word-break: break-word; }

/* 邀请 */
.invite-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.invite-chip { font-size: 12px; background: #f3f4f6; border-radius: 999px; padding: 3px 10px; color: #4b5563; }
.invite-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.invite-row:last-child { border-bottom: none; }
.invite-main b { font-size: 14px; }

/* 玩易圈 */
.feed-composer textarea {
  width: 100%; min-height: 92px; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; resize: vertical; outline: none; font-size: 14px;
}
.feed-composer textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.1); }
.post-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.post-previews .prev { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; }
.post-previews .prev img { width: 100%; height: 100%; object-fit: cover; }
.post-previews .x {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; line-height: 18px; font-size: 13px;
}
.composer-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin-bottom: 14px;
}
.post-head { display: flex; align-items: center; gap: 10px; }
.post-avatar {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: #eaf0ff;
  color: var(--brand-2); display: grid; place-items: center; font-weight: 700; overflow: hidden;
}
.post-avatar img, img.post-avatar { object-fit: cover; }
.post-who { flex: 1; min-width: 0; }
.post-name { font-weight: 600; font-size: 14px; }
.post-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.post-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.post-body { margin-top: 12px; font-size: 14px; line-height: 1.75; color: #1f2937; white-space: pre-wrap; word-break: break-word; }
.post-imgs { display: grid; gap: 6px; margin-top: 12px; grid-template-columns: repeat(2, 1fr); max-width: 560px; }
.post-imgs.n1 { grid-template-columns: 1fr; max-width: 420px; }
.post-imgs.n3 { grid-template-columns: repeat(3, 1fr); }
.post-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.post-imgs.n1 .post-img { aspect-ratio: auto; max-height: 420px; object-fit: contain; background: #f3f4f6; }
.post-foot { display: flex; gap: 8px; margin-top: 12px; }
.post-comments { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.post-comments .cm-item + .cm-item { margin-top: 10px; }

/* 站内信入口 */
.inbox-btn {
  position: relative; width: 34px; height: 34px; border-radius: 9px; color: #4b5563;
  display: grid; place-items: center; margin-right: 10px;
}
.inbox-btn:hover { background: #f2f4f8; color: var(--brand-2); }
.inbox-btn .dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; box-shadow: 0 0 0 2px #fff;
}

/* 站内信列表 */
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: none; }
.notif.unread { background: #f8faff; margin: 0 -16px; padding: 14px 16px; border-radius: 10px; }
.notif-ic { font-size: 19px; line-height: 1.2; }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 14px; }
.notif-body { font-size: 13px; color: #4b5563; margin-top: 3px; white-space: pre-wrap; }

/* 样品库 */
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sample-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sample-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #f3f4f6; }
.sample-imgs img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.sample-body { padding: 12px 14px 14px; }
.sample-title { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.sample-meta { display: flex; align-items: center; gap: 10px; margin: 8px 0; }

.req-item { position: relative; }
.req-del { flex: 0 0 auto; margin-left: 10px; }
.btn.danger { color: #b91c1c; border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }

/* 详细要求的固定标签 */
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag-picker .pick {
  height: 30px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: #4b5563; font-size: 13px; transition: .12s;
}
.tag-picker .pick:hover { border-color: #c7d6ff; color: var(--brand-2); background: #f7f9ff; }
.tag-picker .pick.on {
  background: #eaf0ff; border-color: #c7d6ff; color: var(--brand-2); font-weight: 600;
}

/* 需求详情里的参考链接 */
.ref-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ref-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: #eef4ff; color: #2547c7; border: 1px solid #d6e2ff;
}
.ref-link:hover { background: #e3ecff; }
.ref-link.ref-text { cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }

@media (max-width: 768px) {
  .link-row { grid-template-columns: 1fr; gap: 6px; }
  .link-row > label { margin-top: 4px; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .filters { flex-direction: column; align-items: stretch; gap: 8px; }
  .filters input[type="search"] { flex: none; width: 100%; }
  .filters select { width: 100%; }
  .seg { justify-content: space-between; }
  .seg button { flex: 1; }
  .filter-count { margin-left: 0; text-align: right; }
}

.container { max-width: 1420px; margin: 0 auto; padding: 26px 28px; }

/* ===== 常驻个人信息卡 ===== */
.layout { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 28px; align-items: start; }
.layout-main { min-width: 0; }
.side-card { position: sticky; top: 76px; padding: 22px 20px; }
.side-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.side-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 56px;
  background: #e8edff; color: var(--brand-2); display: grid; place-items: center;
  font-weight: 700; font-size: 21px; border: 1px solid var(--line);
}
.side-name { font-weight: 700; font-size: 17.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.side-role { font-size: 13px; color: var(--muted); margin-top: 3px; }
.side-points {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 14px;
  background: linear-gradient(135deg, #fff8e8, #fffdf8); border: 1px solid #fde3ae;
}
.side-wallet { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.wallet-cell {
  padding: 14px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px;
}
.wallet-cell span { font-size: 12.5px; }
.wallet-cell b { font-size: 25px; line-height: 1.1; font-weight: 700; letter-spacing: -.5px; }
.wallet-cell.points { background: linear-gradient(135deg, #eef3ff, #f7f9ff); border: 1px solid #d8e3ff; }
.wallet-cell.points span, .wallet-cell.points b { color: #2f6bff; }
.wallet-cell.coins { background: linear-gradient(135deg, #fff5e6, #fffdf7); border: 1px solid #fde3ae; }
.wallet-cell.coins span, .wallet-cell.coins b { color: #b45309; }
.side-points span { font-size: 12px; color: #b45309; }
.side-points b { font-size: 22px; color: #b45309; line-height: 1; }
.side-badges { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.side-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); justify-content: space-between; }
.side-row .idcard { margin-left: 0; }
.side-links { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 10px; }
.side-links a { font-size: 13px; color: #4b5563; padding: 6px 8px; border-radius: 8px; }
.side-links a:hover { background: #f5f7fb; color: var(--brand-2); }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.page-title { font-size: 20px; font-weight: 700; margin: 0; }
.page-sub { color: var(--muted); margin: 4px 0 0; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; font-weight: 600; white-space: nowrap;
}
.btn:hover { background: #f7f8fa; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { color: var(--red); border-color: #fecaca; background: #fff5f5; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.card-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card-head h3 { margin: 0; font-size: 15px; }
.card-body { padding: 18px; }

.req-list { display: grid; gap: 14px; }
.req-item {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: .15s;
}
.req-item:hover { border-color: #c7d2fe; box-shadow: var(--shadow); }
.req-item .main { flex: 1; min-width: 0; }
.req-item h4 { margin: 0; font-size: 15px; }
.req-title-row { display: flex; align-items: center; gap: 10px; }
.status { flex: 0 0 auto; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; }
.status.open { color: #0a8f61; background: rgba(16, 185, 129, .1); }
.status.closed { color: #6b7280; background: #f1f3f7; }
.req-item p {
  margin: 4px 0 0; color: var(--muted); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.req-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 9px; font-size: 12.5px; color: var(--muted);
}
.req-meta .sep { color: #cbd5e1; }
.req-meta .meta-points { color: #b45309; font-weight: 600; }
.req-meta .meta-mine { color: #0a8f61; font-weight: 600; }
.req-meta .idcard { margin-left: 0; }
.row-arrow { font-size: 22px; color: #c8cfdb; line-height: 1; }
.req-foot { margin-top: 14px; font-size: 12px; color: #9aa3b2; }

/* 广场筛选栏 */
.filters {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 14px;
}
.filters input[type="search"] {
  flex: 1 1 220px; min-width: 160px; height: 34px;
  border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; outline: none;
}
.filters input[type="search"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.filters select {
  height: 34px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 8px; background: #fff; outline: none;
}
.seg { display: inline-flex; background: #eef1f6; border-radius: 9px; padding: 3px; }
.seg button {
  border: none; background: transparent; height: 28px; padding: 0 12px;
  border-radius: 7px; font-size: 13px; font-weight: 600; color: #6b7280;
}
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5563; cursor: pointer; }
.filter-count { margin-left: auto; font-size: 12px; color: var(--muted); }

/* 表单两列 / 资料键值 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.kv-grid span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.kv-grid b { font-weight: 600; font-size: 14px; color: var(--text); word-break: break-all; }

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
}
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 6px; background: #f3f4f6; color: #4b5563; }
.tag.blue { background: #eaf0ff; color: #2547c7; }
.tag.green { background: #ecfdf5; color: #047857; }
.tag.amber { background: #fffbeb; color: #b45309; }
.tag.red { background: #fef2f2; color: #b91c1c; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 10px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date],
.field input[type=number], .field input[type=url],
.field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: #fff;
  outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.field textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; padding: 30px; }
.auth-card h1 { font-size: 20px; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.tabs { display: flex; gap: 6px; background: #f3f4f6; padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.tabs button { flex: 1; height: 32px; border: none; background: transparent; border-radius: 7px; font-weight: 600; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.tabs-inline {
  display: inline-flex; gap: 4px; background: #eceff5; padding: 4px; border-radius: 10px;
}
.tabs-inline button {
  border: none; background: transparent; height: 34px; padding: 0 18px; border-radius: 8px;
  font-weight: 600; color: #6b7280; cursor: pointer;
}
.tabs-inline button.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tabs-inline b { font-weight: 700; opacity: .6; margin-left: 4px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: #4b5563; font-size: 13px;
}
.chip:hover { background: #f7f8fa; }
.chip.on { background: #eaf0ff; border-color: #c7d6ff; color: var(--brand-2); font-weight: 600; }
.alert { padding: 10px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; }
.alert.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.ok { background: #ecfdf5; color: #047857; border: 1px solid #bbf7d0; }

.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sub-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.sub-card .thumb {
  height: 170px; background: #0f172a center/cover no-repeat; position: relative; cursor: pointer;
  display: grid; place-items: center; color: #94a3b8; font-size: 13px; overflow: hidden;
}
.sub-card .thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.sub-card .info { position: relative; padding: 12px 14px; background: #fff; }
.sub-card .info h5 { margin: 0 0 4px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-card .info .small { color: var(--muted); font-size: 12px; }
.sub-card .actions { display: flex; gap: 8px; padding: 0 14px 14px; }

.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.kv { display: flex; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.kv b { color: var(--text); font-weight: 600; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 100;
  display: grid; place-items: center; padding: 24px;
}
.modal {
  background: #fff; border-radius: 14px; max-width: 900px; width: 100%; max-height: 90vh;
  overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.modal .m-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal .m-body { padding: 16px 18px; }
.modal img.preview, .modal video { max-width: 100%; max-height: 62vh; display: block; margin: 0 auto; border-radius: 8px; }
.modal .close { border: none; background: transparent; font-size: 22px; color: var(--muted); line-height: 1; }

.wm-wrap { position: relative; display: inline-block; }
.wm-overlay {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
}
.wm-overlay span {
  display: grid; place-items: center; font-size: 13px; color: rgba(255,255,255,.55);
  transform: rotate(-18deg); white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.tbl th { color: var(--muted); font-weight: 600; background: #fafbfc; }
@media (min-width: 769px) {
  table.tbl td:last-child { white-space: nowrap; }
  table.tbl td:last-child .btn { margin-right: 4px; }
}
.table-scroll { overflow-x: auto; }
.table-scroll table.tbl { min-width: 1120px; }

/* 审核统计条 */
.stat-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 14px;
}
.stat-cell span { display: block; font-size: 12px; color: var(--muted); }
.stat-cell b { font-size: 20px; line-height: 1.4; }

/* 审核台卡片 */
.rv-card {
  display: flex; gap: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; margin-bottom: 12px;
}
.rv-thumb {
  width: 150px; height: 110px; flex: 0 0 150px; border-radius: 10px; overflow: hidden;
  background: #0f172a; display: grid; place-items: center; color: #94a3b8; font-size: 12px; cursor: pointer;
}
.rv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rv-body { flex: 1; min-width: 0; }
.rv-title { font-weight: 700; font-size: 15px; margin-bottom: 5px; }
.rv-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.rv-desc { font-size: 13px; color: #374151; margin: 8px 0; white-space: pre-wrap; }
.rv-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ai-checks { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ai-chk {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px;
  background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb;
}
.ai-chk.ok { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.ai-chk.bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

@media (max-width: 768px) {
  .rv-card { flex-direction: column; }
  .rv-thumb { width: 100%; height: 160px; flex: none; }
}
@media (min-width: 769px) {
  table.tbl th, table.tbl td { white-space: nowrap; }
}

.progress { height: 6px; background: #eef1f5; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px;
  z-index: 200; opacity: 0; transition: .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

.drop {
  border: 2px dashed #cbd5e1; border-radius: 12px; padding: 26px; text-align: center; color: var(--muted);
  background: #fafbff; cursor: pointer;
}
.drop.hover { border-color: var(--brand); background: #eef4ff; color: var(--brand-2); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 14px; }
  .side-card { position: static; padding: 14px; }
  .side-head { margin-bottom: 12px; }
  .side-links { flex-direction: row; flex-wrap: wrap; gap: 4px; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .nav a { padding: 8px 10px; }
  .container { padding: 16px; }
}

/* ================= 手机适配 ================= */
@media (max-width: 768px) {
  body { font-size: 15px; }
  .topbar {
    flex-wrap: wrap; height: auto; padding: 10px 12px 8px; gap: 8px;
    -webkit-tap-highlight-color: transparent;
  }
  .brand { font-size: 15px; }
  .brand .logo { width: 26px; height: 26px; }
  .nav {
    order: 3; width: 100%; margin-left: 0; overflow-x: auto; white-space: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 12px; font-size: 14px; }
  .topbar .spacer { display: none; }
  .userbox { margin-left: auto; gap: 8px; }
  .userbox > span:not(.avatar):not(.role-tag):not(.role-switch) { display: none; }
  .avatar { width: 28px; height: 28px; }
  .role-switch .rs { height: 30px; padding: 0 12px; font-size: 13px; }

  .container { padding: 14px 12px 32px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-title { font-size: 18px; }
  .page-head .btn, .page-head a.btn { width: 100%; }

  .btn { height: 42px; font-size: 15px; border-radius: 10px; }
  .btn.sm { height: 38px; padding: 0 14px; }

  .req-item { flex-direction: column; gap: 10px; padding: 14px; }
  .req-item .btn { width: 100%; }
  .req-item h4 { font-size: 16px; }
  .req-item p { white-space: normal; }

  .sub-grid { grid-template-columns: 1fr; }
  .sub-card .thumb { height: 200px; }

  /* 表格变卡片 */
  table.tbl, table.tbl thead, table.tbl tbody, table.tbl tr, table.tbl th, table.tbl td { display: block; }
  table.tbl thead { display: none; }
  table.tbl tr {
    border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 6px 12px; background: #fff;
  }
  table.tbl td { border: none; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; }
  table.tbl td::before { content: attr(data-label); color: var(--muted); font-weight: 600; flex: 0 0 72px; }
  table.tbl td:last-child { padding-top: 10px; }

  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { max-height: 94vh; border-radius: 14px 14px 0 0; }
  .modal img.preview, .modal video { max-height: 60vh; }

  .auth-wrap { padding: 16px; align-items: start; padding-top: 40px; }
  .auth-card { padding: 22px 18px; max-width: 100%; }

  .tabs-inline { width: 100%; }
  .tabs-inline button { flex: 1; padding: 0 8px; font-size: 14px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; height: 34px; }

  .field input[type=text], .field input[type=email], .field input[type=password],
  .field input[type=date], .field select, .field textarea { font-size: 16px; padding: 11px 12px; }
  .drop { padding: 22px 14px; }

  .card-head { flex-wrap: wrap; }
  .detail-grid { gap: 12px; }
}

@media (max-width: 420px) {
  .nav a { padding: 7px 10px; font-size: 13px; }
  .req-item h4 { font-size: 15px; }
  .sub-card .thumb { height: 170px; }
}

/* ===== 手机端：侧栏压缩为横排菜单 ===== */
@media (max-width: 768px) {
  .side-card { padding: 14px 14px 10px; }
  .side-head { gap: 12px; margin-bottom: 12px; }
  .side-avatar { width: 46px; height: 46px; flex: 0 0 46px; font-size: 18px; }
  .side-name { font-size: 16px; max-width: 60vw; }
  .side-role { font-size: 12px; }
  .side-wallet { gap: 8px; margin-bottom: 12px; }
  .wallet-cell { padding: 10px 12px; }
  .wallet-cell b { font-size: 19px; }
  .side-badges { margin-bottom: 2px; }
  .side-nav {
    flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px;
    padding: 12px 0 6px; margin-top: 2px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a {
    white-space: nowrap; padding: 9px 14px; font-size: 14px; background: #f5f7fb; border-radius: 999px;
  }
  .side-nav a.active { background: #eaf0ff; }
  .layout { gap: 14px; }
  .brand-name { font-size: 15px; }
}
/* ===== 手机端横向溢出修正 ===== */
@media (max-width: 768px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side-card { max-width: 100%; overflow: hidden; }
  .side-nav { max-width: 100%; }
  .filters { flex-wrap: wrap; }
  .filters input[type=search], .filters input[type=text], .filters select { flex: 1 1 100%; min-width: 0; }
  .container { overflow-x: hidden; }
  .layout-main { min-width: 0; }
}
/* 分段控件不被压扁 */
.seg button, .tabs button, .chips .chip { white-space: nowrap; }
@media (max-width: 768px) {
  .seg { width: 100%; display: flex; }
  .seg button { flex: 1; white-space: nowrap; }
  .chips { flex-wrap: wrap; }
}
/* ===== 手机端卡片行改为竖排 ===== */
@media (max-width: 768px) {
  .invite-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .invite-row > div:last-child { display: flex; gap: 8px; }
  .invite-row .btn { flex: 1; }
  .sample-grid { grid-template-columns: 1fr; }
  .post-imgs, .post-imgs.n1 { max-width: 100%; grid-template-columns: 1fr; }
  .ai-checks { gap: 4px; }
}
/* ===== 手机端表格：取消横向滚动与最小宽度 ===== */
@media (max-width: 768px) {
  .table-scroll { overflow-x: visible; }
  .table-scroll table.tbl { min-width: 0; width: 100%; }
  table.tbl td { white-space: normal; }
}
/* 已签约标识与审核信息栅格 */
.cert-tag { font-size: 11px; padding: 1px 7px; vertical-align: middle; }
.rv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.rv-grid > div { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.rv-grid span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.rv-grid b { font-size: 13.5px; font-weight: 600; }
@media (max-width: 768px) { .rv-grid { grid-template-columns: 1fr 1fr; } }
/* 无 type 属性的 input 同样撑满（如手机号/微信号输入框） */
.field input:not([type]) {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px;
  background: #fff; outline: none; transition: .15s;
}
.field input:not([type]):focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }