/* 名片云 · 样式表 */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e8ebf1;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0284c7;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(24, 39, 75, .05);
  --shadow-lg: 0 18px 50px rgba(24, 39, 75, .12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
.icon { flex: none; vertical-align: -2px; }
.muted-text { color: var(--faint); }

/* ---------- 启动 / 通用组件 ---------- */
.boot-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.boot-logo { width: 58px; height: 58px; border-radius: 16px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 700; box-shadow: 0 10px 30px rgba(79,70,229,.3); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent; font-size: 13px; font-weight: 600; transition: .18s; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(79,70,229,.22); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.danger-text { color: var(--danger) !important; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 8px; color: var(--muted); }
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }

.input { width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); outline: none; transition: .18s; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
textarea.input { resize: vertical; line-height: 1.6; }
.select-sm { width: auto; min-width: 130px; }
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.field-hint { display: block; font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-error { color: var(--danger); font-size: 12.5px; min-height: 20px; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; margin: 8px 0 18px; }
.check-row input { accent-color: var(--primary); width: 16px; height: 16px; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-ok { background: #e8f8f1; color: #048565; }
.badge-warn { background: #fff5e6; color: #b76a08; }
.badge-muted { background: #f1f3f7; color: #6b7280; }
.badge-danger { background: #feecec; color: #c62828; }
.badge-info { background: #e8f4fd; color: #0369a1; }
.chip { display: inline-block; padding: 2px 8px; background: #f1f3f9; border-radius: 6px; font-size: 11.5px; color: #556074; margin: 1px 3px 1px 0; }

.avatar-img, .avatar-fallback { display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; font-weight: 700; object-fit: cover; overflow: hidden; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px; }
.panel.narrow { max-width: 720px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-head h2 { font-size: 16px; font-weight: 700; }
.section-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.stat-main { display: flex; flex-direction: column; min-width: 0; }
.stat-main span { color: var(--muted); font-size: 12.5px; }
.stat-main strong { font-size: 24px; line-height: 1.3; font-weight: 700; letter-spacing: -.5px; }
.stat-main small { color: var(--faint); font-size: 11px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); background: #f8fafc; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid #f1f3f7; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fbfcff; }
.table .right { text-align: right; }
.cell-user { display: flex; align-items: center; gap: 9px; }
.cell-user b { display: block; font-size: 13px; }
.cell-user small { display: block; color: var(--faint); font-size: 11px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { display: block; color: var(--faint); font-size: 11px; }
.msg-cell { max-width: 260px; color: #4b5563; }
.row-actions { display: flex; justify-content: flex-end; gap: 12px; white-space: nowrap; }
.link-btn { border: 0; background: transparent; padding: 2px 0; color: var(--primary); font-size: 12.5px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--faint); padding: 40px 16px; text-align: center; }
.empty p { font-size: 13px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search-box { position: relative; display: flex; align-items: center; min-width: 240px; }
.search-box .icon { position: absolute; left: 11px; color: var(--faint); }
.search-box .input { padding-left: 34px; width: 260px; }

.chart { height: 208px; padding-top: 10px; }
.chart-bars { display: flex; align-items: flex-end; justify-content: space-around; height: 100%; border-bottom: 1px solid var(--line); }
.chart-col { width: 9%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.chart-bar { width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #818cf8, #4f46e5); position: relative; min-height: 10px; }
.chart-bar span { position: absolute; top: -20px; width: 100%; text-align: center; font-size: 10.5px; color: var(--muted); }
.chart-col small { font-size: 10.5px; color: var(--faint); padding-bottom: 6px; }
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; transition: .18s; }
.todo-item:hover { border-color: #c7d2fe; background: #fafaff; }
.todo-item > span:nth-child(2) { flex: 1; }
.todo-item b { display: block; font-size: 13px; }
.todo-item small { color: var(--faint); font-size: 11px; }
.todo-item > .icon { color: var(--faint); transform: rotate(180deg); }
.todo-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.todo-ico.warn { background: #fff5e6; color: #b76a08; }
.todo-ico.info { background: #eef2ff; color: var(--primary); }
.todo-ico.danger { background: #feecec; color: var(--danger); }

.welcome-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(110deg, #4f46e5, #7c3aed); color: #fff; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(79,70,229,.18); }
.welcome-banner h2 { font-size: 19px; }
.welcome-banner p { opacity: .85; font-size: 12.5px; margin-top: 4px; }
.welcome-banner .icon { opacity: .35; }
.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid #f1f3f7; }
.recent-item:last-child { border-bottom: 0; }
.recent-item > div { flex: 1; min-width: 0; }
.recent-item b { font-size: 13px; }
.recent-item b small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.recent-item p { font-size: 12px; color: #4b5563; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item > div > small { font-size: 10.5px; color: var(--faint); }
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.quick-actions a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; transition: .18s; }
.quick-actions a:hover { border-color: #c7d2fe; background: #fafaff; }
.quick-actions a > span { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.quick-actions b { display: block; font-size: 13px; }
.quick-actions small { color: var(--faint); font-size: 11px; }

/* ---------- 主框架 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex: none; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 700; flex: none; box-shadow: 0 5px 14px rgba(79,70,229,.25); }
.brand-mark.big { width: 44px; height: 44px; font-size: 22px; }
.brand-text b { display: block; font-size: 16px; letter-spacing: .5px; }
.brand-text small { display: block; font-size: 10.5px; color: var(--faint); }
.nav-group { padding: 6px 12px; flex: 1; overflow-y: auto; }
.nav-caption { font-size: 10.5px; font-weight: 600; color: var(--faint); padding: 10px 10px 8px; letter-spacing: 1px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: #566076; font-size: 13px; font-weight: 500; margin-bottom: 3px; transition: .16s; }
.nav-link:hover { background: #f6f7fb; color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-link span { flex: 1; }
.nav-dot { font-style: normal; font-size: 10.5px; background: #fee2e2; color: #dc2626; border-radius: 20px; min-width: 20px; text-align: center; padding: 1px 5px; }
.sidebar-foot { border-top: 1px solid var(--line); padding: 14px 14px; display: flex; align-items: center; gap: 6px; }
.side-user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.side-user b { display: block; font-size: 12.5px; }
.side-user small { display: block; font-size: 10.5px; color: var(--faint); }
.side-logout { border: 0; background: transparent; color: var(--faint); padding: 6px; border-radius: 7px; }
.side-logout:hover { background: #feecec; color: var(--danger); }
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 70px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 17px; font-weight: 700; }
.topbar-title p { color: var(--faint); font-size: 11.5px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.bell { position: relative; color: var(--muted); display: grid; place-items: center; }
.bell i { position: absolute; top: -5px; right: -7px; min-width: 16px; height: 16px; border-radius: 10px; background: #ef4444; color: #fff; font-size: 9.5px; font-style: normal; line-height: 16px; text-align: center; padding: 0 3px; }
.top-divider { width: 1px; height: 24px; background: var(--line); }
.top-user { display: flex; align-items: center; gap: 9px; }
.top-user b { display: block; font-size: 12.5px; }
.top-user small { display: block; font-size: 10.5px; color: var(--faint); }
.mobile-menu { display: none; }
.content { padding: 24px 28px 40px; flex: 1; }

/* ---------- 登录 ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.login-brand { background: linear-gradient(150deg, #3730a3 0%, #4f46e5 45%, #7c3aed 100%); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-brand:after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); right: -220px; bottom: -240px; box-shadow: 0 0 0 70px rgba(255,255,255,.04), 0 0 0 140px rgba(255,255,255,.03); }
.login-brand-top { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.login-brand-top .brand-mark { background: rgba(255,255,255,.18); box-shadow: none; }
.login-brand-copy { margin: auto 0; position: relative; z-index: 1; }
.login-brand-copy h2 { font-size: 40px; line-height: 1.35; letter-spacing: 1px; }
.login-brand-copy p { margin-top: 20px; max-width: 420px; font-size: 14px; line-height: 1.9; opacity: .8; }
.login-features { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.login-features div { display: flex; align-items: center; gap: 11px; font-size: 13.5px; opacity: .92; }
.login-features .icon { opacity: .8; }
.login-brand-foot { font-size: 11px; opacity: .55; margin-top: 30px; position: relative; z-index: 1; }
.login-panel { display: grid; place-items: center; padding: 40px 28px; }
.login-box { width: 100%; max-width: 390px; }
.login-mobile-brand { display: none; }
.login-box h1 { font-size: 27px; font-weight: 700; }
.login-sub { color: var(--muted); font-size: 13px; margin: 6px 0 26px; }
.login-form .btn { margin-top: 6px; height: 44px; font-size: 14px; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 11.5px; margin: 26px 0 14px; }
.login-divider:before, .login-divider:after { content: ''; flex: 1; height: 1px; background: var(--line); }
.quick-login { display: flex; flex-direction: column; gap: 8px; }
.quick-btn { display: flex; align-items: center; gap: 11px; text-align: left; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); transition: .16s; }
.quick-btn:hover { border-color: #c7d2fe; background: #fafaff; }
.quick-btn > .icon { color: var(--primary); background: var(--primary-soft); padding: 7px; border-radius: 8px; width: 32px; height: 32px; }
.quick-btn b { display: block; font-size: 12.5px; }
.quick-btn small { display: block; color: var(--faint); font-size: 10.5px; }
.login-register { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 16px; }
.login-register .link-btn { font-size: 12.5px; padding: 0 2px; }
.callout.success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.login-demo { display: block; text-align: center; color: var(--primary); font-size: 12.5px; margin-top: 18px; font-weight: 600; }
.login-hint { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--faint); font-size: 11px; text-align: center; }

/* ---------- 套餐 / 审核 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card { border: 1px solid var(--line); border-radius: 13px; padding: 20px; background: #fff; }
.plan-card.featured { border-color: #c7d2fe; box-shadow: 0 8px 22px rgba(79,70,229,.1); }
.plan-top h3 { font-size: 17px; }
.plan-price { margin: 8px 0 14px; }
.plan-price b { font-size: 28px; }
.plan-price span { color: var(--faint); font-size: 12px; }
.plan-price del { color: var(--faint); font-size: 13px; margin-left: 8px; font-weight: 500; }
.plan-price.promo b { color: #e11d48; }
.plan-rec { display: inline-block; vertical-align: 2px; margin-left: 8px; font-size: 10px; font-weight: 700; color: #4f46e5; background: #eef2ff; padding: 2px 7px; border-radius: 20px; }
.plan-card.on-promo { border-color: #fecdd3; }
.plan-card.on-promo.featured { border-color: #c7d2fe; }
.plan-promo { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -6px 0 12px; }
.promo-tag { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.promo-tag.gray { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.promo-count { color: #e11d48; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.btn-plain-danger { background: #fff; color: #dc2626; border: 1px solid #fee2e2; border-radius: 9px; padding: 8px 12px; font-size: 12.5px; cursor: pointer; }
.btn-plain-danger:hover { background: #fef2f2; border-color: #fecaca; }
.promo-fields { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.promo-fields h4 { font-size: 13px; margin-bottom: 4px; }
.plan-quota { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #f8fafc; border-radius: 9px; padding: 10px 12px; }
.plan-quota span { display: block; color: var(--muted); font-size: 11px; }
.plan-quota b { font-size: 14px; }
.plan-features { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 7px; }
.plan-features li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #4b5563; }
.plan-features .icon { color: var(--success); }
.plan-users { color: var(--faint); font-size: 11.5px; margin-bottom: 12px; }
.audit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.audit-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.audit-cover { display: flex; align-items: center; gap: 12px; padding: 18px; }
.audit-cover b { display: block; font-size: 15px; }
.audit-cover small { color: var(--muted); font-size: 11.5px; }
.audit-info { padding: 12px 18px; }
.audit-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; color: var(--muted); }
.audit-row b { color: var(--text); font-weight: 600; }
.audit-bio { font-size: 12px; color: var(--muted); margin-top: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.audit-actions { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.audit-actions .btn { flex: 1; }

.callout { display: flex; gap: 10px; align-items: flex-start; background: #f8fafc; border-left: 3px solid var(--primary); padding: 12px 14px; border-radius: 0 9px 9px 0; font-size: 12.5px; color: #4b5563; margin-bottom: 16px; }
.callout .icon { color: var(--primary); margin-top: 2px; }
.info-box { display: flex; gap: 10px; align-items: flex-start; background: #f0f6ff; border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: #475569; margin-top: 16px; }
.info-box .icon { color: var(--info); margin-top: 2px; }
.danger-zone { margin-top: 26px; border: 1px solid #fecaca; background: #fffafa; border-radius: 11px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.danger-zone b { display: block; font-size: 13px; color: #b91c1c; }
.danger-zone small { display: block; color: #9a6a6a; font-size: 11.5px; }
.switch-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; position: relative; }
.switch-row b { display: block; font-size: 13px; }
.switch-row small { display: block; color: var(--faint); font-size: 11px; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { width: 40px; height: 22px; border-radius: 20px; background: #d1d5db; position: relative; transition: .2s; flex: none; }
.switch-row i:after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-row input:checked + i { background: var(--primary); }
.switch-row input:checked + i:after { left: 21px; }

/* ---------- 名片卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 16px; }
.card-tile { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; transition: .18s; }
.card-tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tile-preview { height: 168px; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; position: relative; }
.tile-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.tile-preview b { margin-top: 10px; font-size: 16px; }
.tile-preview small { color: #4b5563; font-size: 11.5px; }
.tile-company { color: #6b7280; font-size: 11px; margin-top: 3px; }
.tile-status { position: absolute; top: 12px; right: 12px; }
.tile-content { padding: 12px 14px; }
.tile-metrics { display: flex; gap: 14px; color: var(--muted); font-size: 11.5px; margin-bottom: 10px; }
.tile-metrics span { display: inline-flex; align-items: center; gap: 4px; }
.tile-actions { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.readonly-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); font-size: 12px; }

.assign-list { display: flex; flex-direction: column; gap: 7px; max-height: 210px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.assign-card { display: flex; align-items: center; gap: 9px; padding: 7px; border-radius: 7px; cursor: pointer; }
.assign-card:hover { background: #f8fafc; }
.assign-card input { accent-color: var(--primary); }
.assign-card span { display: flex; align-items: center; gap: 8px; }
.assign-card b { font-size: 12.5px; }
.assign-card small { color: var(--faint); font-size: 11px; }
.qr-box { text-align: center; padding: 6px 0 0; }
.qr-box p { font-weight: 700; margin-top: 12px; }
.qr-box small { display: block; color: var(--faint); font-size: 11.5px; margin: 4px 0 16px; }
.qr-fallback { width: 190px; height: 190px; margin: 0 auto; display: grid; place-items: center; background: #f8fafc; border: 1px dashed var(--line); border-radius: 10px; color: var(--faint); }

/* ---------- 弹窗 / 提示 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .42); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fadeIn .18s; }
.modal { width: 100%; background: #fff; border-radius: 15px; box-shadow: 0 25px 70px rgba(15,23,42,.24); overflow: hidden; animation: popIn .2s; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 20px; max-height: 68vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fbfcfe; }
.modal-text { font-size: 13.5px; color: #4b5563; }
.modal-note { font-size: 11.5px; color: var(--faint); margin: 4px 0 12px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: translateY(10px) scale(.98); opacity: .5; } to { transform: none; opacity: 1; } }

#toast-root { position: fixed; top: 18px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 15px; box-shadow: var(--shadow-lg); font-size: 12.5px; min-width: 190px; animation: slideIn .22s; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none; }
.toast-success .toast-dot { background: var(--success); }
.toast-error .toast-dot { background: var(--danger); }
.toast-out { opacity: 0; transform: translateX(16px); transition: .25s; }
@keyframes slideIn { from { transform: translateX(18px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 名片编辑器 ---------- */
.editor-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.editor-top { height: 62px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 22px; position: sticky; top: 0; z-index: 15; }
.editor-back { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.editor-back:hover { color: var(--primary); }
.editor-title { flex: 1; }
.editor-title b { font-size: 15px; }
.editor-title span { color: var(--faint); font-size: 11.5px; margin-left: 10px; }
.editor-top-actions { display: flex; gap: 9px; }
.editor-body { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 0; flex: 1; align-items: start; }
.editor-panel { background: #fff; min-height: calc(100vh - 62px); border-right: 1px solid var(--line); }
.editor-tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); position: sticky; top: 62px; background: #fff; z-index: 10; }
.editor-tab { border: 0; background: transparent; padding: 15px 14px 13px; font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.editor-tab:hover { color: var(--primary); }
.editor-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.editor-panes { padding: 22px 26px 50px; max-width: 760px; }
.editor-pane { display: none; }
.editor-pane.active { display: block; }
.pane-intro { margin-bottom: 18px; }
.pane-intro h3 { font-size: 16px; }
.pane-intro p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-row label.btn { position: relative; overflow: hidden; cursor: pointer; }
.avatar-editor { display: flex; gap: 14px; align-items: flex-start; }
.avatar-preview { flex: none; width: 64px; height: 64px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--line); display: grid; place-items: center; }
.avatar-controls { flex: 1; min-width: 0; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; background: #f1f5f9; border-radius: 9px; }
.segmented .seg { border: 0; background: transparent; color: var(--muted); font-size: 11.5px; padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.segmented .seg.active { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 1px 4px rgba(15,23,42,.1); }
#avatar-auto, #avatar-upload { margin-top: 10px; }
#avatar-auto .field { margin-top: 8px; }
#avatar-auto .field:first-child { margin-top: 0; }
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-swatch { border: 2px solid transparent; background: #fff; border-radius: 10px; padding: 7px; text-align: center; transition: .16s; }
.theme-swatch:hover { border-color: #c7d2fe; }
.theme-swatch.active { border-color: var(--primary); background: #fafaff; }
.swatch-preview { display: block; height: 42px; border-radius: 6px; padding: 8px; text-align: left; border: 1px solid rgba(0,0,0,.04); }
.swatch-preview i { display: block; width: 26px; height: 8px; border-radius: 4px; }
.theme-swatch b { display: block; font-size: 11.5px; margin-top: 6px; font-weight: 600; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type="color"] { width: 42px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.color-row .input { flex: 1; min-width: 0; }
.color-block { background: #fafbff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.color-block h4 { display: flex; align-items: center; gap: 6px; }
.color-block h4 .icon { color: var(--primary); }
.bg-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bg-swatch { border: 2px solid transparent; background: #fff; border-radius: 9px; padding: 5px; text-align: center; transition: .16s; }
.bg-swatch:hover { border-color: #c7d2fe; }
.bg-swatch.active { border-color: var(--primary); background: #fafaff; }
.bg-swatch-preview { display: block; height: 34px; border-radius: 5px; border: 1px solid rgba(0,0,0,.06); background-size: cover !important; background-position: center !important; }
.bg-swatch small { display: block; font-size: 10.5px; margin-top: 5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-edit { display: flex; flex-direction: column; gap: 9px; margin-bottom: 10px; }
.social-edit-row { border: 1px solid var(--line); border-radius: 10px; padding: 11px; display: flex; flex-direction: column; gap: 7px; }
.social-edit-head { display: flex; justify-content: space-between; align-items: center; }
.social-edit-head b { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.social-add { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.radius-row { display: flex; align-items: center; gap: 12px; }
.radius-row span { flex: none; width: 42px; font-size: 12px; color: var(--muted); text-align: right; }
.range { width: 100%; accent-color: var(--primary); }
.radio-row { display: flex; gap: 20px; font-size: 12.5px; }
.radio-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.radio-row input { accent-color: var(--primary); }
.module-list { display: flex; flex-direction: column; gap: 8px; }
.module-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.module-row b { display: block; font-size: 13px; }
.module-row small { display: block; color: var(--faint); font-size: 11px; }
.module-row input { position: absolute; opacity: 0; }
.module-row i { width: 36px; height: 20px; background: #d1d5db; border-radius: 20px; position: relative; transition: .2s; }
.module-row i:after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; }
.module-row input:checked + i { background: var(--primary); }
.module-row input:checked + i:after { left: 19px; }
.sub-block { margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--line); }
.sub-block h4 { font-size: 13.5px; margin-bottom: 11px; }
.product-edit { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 7px; }
.product-edit-head { display: flex; justify-content: space-between; align-items: center; }
.product-edit-head b { font-size: 12px; color: var(--muted); }
.gallery-edit { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 11px; }
.gallery-edit-item { position: relative; width: 76px; height: 76px; }
.gallery-edit-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.gallery-edit-item button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #dc2626; color: #fff; border: 0; display: grid; place-items: center; }
.link-preview { display: flex; align-items: center; gap: 8px; background: #f8fafc; border: 1px dashed var(--line); border-radius: 9px; padding: 10px 12px; font-size: 12px; color: var(--muted); word-break: break-all; }
.link-preview .icon { color: var(--primary); }
.editor-preview { padding: 22px 24px 40px; position: sticky; top: 62px; }
.preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 12.5px; font-weight: 600; }
.preview-head small { color: var(--faint); font-weight: 400; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; margin-right: 4px; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.phone-frame { width: 320px; max-width: 100%; margin: 0 auto; background: #1f2937; border-radius: 36px; padding: 9px; box-shadow: 0 20px 50px rgba(15,23,42,.25); position: relative; }
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 84px; height: 18px; background: #1f2937; border-radius: 0 0 12px 12px; z-index: 2; }
.phone-screen { border-radius: 28px; overflow-y: auto; max-height: 660px; background: #fff; }
.preview-tip { text-align: center; color: var(--faint); font-size: 11px; margin-top: 12px; }

/* ---------- 访客名片页 ---------- */
.public-page { min-height: 100vh; background: radial-gradient(circle at 12% 4%, #e8efff 0, transparent 32%), radial-gradient(circle at 88% 12%, #f3eaff 0, transparent 30%), #f5f7fb; display: flex; flex-direction: column; }
.public-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(148,163,184,.2); }
.public-top-inner { max-width: 620px; margin: 0 auto; height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.public-logo { display: flex; align-items: center; gap: 8px; }
.public-logo .brand-mark { width: 28px; height: 28px; font-size: 14px; border-radius: 9px; }
.public-logo b { font-size: 14px; }
.preview-tag { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; padding: 4px 9px; border-radius: 20px; }
.public-stage { flex: 1; width: 100%; max-width: 620px; margin: 0 auto; padding: 22px 14px 36px; }
.public-foot { text-align: center; color: #94a3b8; font-size: 11px; padding: 0 16px 28px; }
.public-foot a { color: var(--primary); }
.card-page { position: relative; font-family: var(--cf); color: var(--ct); background: var(--cbg); border-radius: var(--cr); overflow: hidden; border: 1px solid rgba(255,255,255,.7); box-shadow: 0 24px 60px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.04); min-height: 560px; }
.card-page.card-preview { border: 0; border-radius: 0; box-shadow: none; min-height: 100%; }
.cp-hero { position: relative; padding: 30px 22px 22px; border-bottom: 1px solid rgba(148,163,184,.18); background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0)); }
.cp-hero::before { content: ''; position: absolute; top: -76px; right: -54px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--cacc) 22%, transparent), transparent 70%); pointer-events: none; }
.card-dark .cp-hero { background: linear-gradient(180deg, rgba(255,255,255,.06), transparent); }
.cp-hero-top { position: relative; display: flex; align-items: center; gap: 14px; text-align: left; }
.cp-hero-top .avatar-img, .cp-hero-top .avatar-fallback { margin: 0; border: 3px solid rgba(255,255,255,.72); box-shadow: 0 10px 26px rgba(15,23,42,.16); }
.card-dark .cp-hero-top .avatar-img, .card-dark .cp-hero-top .avatar-fallback { border-color: rgba(255,255,255,.16); }
.cp-hero-info { min-width: 0; }
.cp-hero h1 { font-size: 23px; font-weight: 750; line-height: 1.25; letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; }
.cp-title { font-size: 12.5px; margin-top: 5px; color: var(--cs); line-height: 1.5; overflow-wrap: anywhere; }
.cp-dot { padding: 0 3px; }
.cp-dept { font-size: 11px; color: var(--cs); margin-top: 3px; }
.cp-tags { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; margin-top: 10px; }
.cp-tags span { background: var(--cchip); color: var(--cacc); font-size: 10.5px; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.cp-welcome { position: relative; margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.58); border: 1px solid rgba(148,163,184,.16); border-left: 3px solid var(--cacc); font-size: 12.5px; line-height: 1.75; color: var(--cs); }
.card-dark .cp-welcome { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
.cp-actions { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.cp-action { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 2px 9px; border-radius: 12px; font-size: 11px; color: var(--cs); background: rgba(255,255,255,.46); border: 1px solid rgba(148,163,184,.14); transition: transform .16s, background .16s, box-shadow .16s; }
.cp-action span { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--cchip); color: var(--cacc); }
.cp-action b { font-weight: 600; }
.cp-action:hover { background: rgba(255,255,255,.85); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,23,42,.08); }
.card-dark .cp-action { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.cp-action.primary span { background: var(--cp); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--cp) 38%, transparent); }
.cp-socials { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.cp-social { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 8px 4px; border-radius: 10px; background: rgba(255,255,255,.58); border: 1px solid rgba(148,163,184,.18); color: var(--cs); font-size: 10.5px; transition: .16s; }
.card-dark .cp-social { background: rgba(255,255,255,.08); }
.cp-social:hover { border-color: var(--cacc); color: var(--cacc); transform: translateY(-1px); }
.cp-social span { display: grid; place-items: center; color: var(--cacc); flex: none; }
.cp-social b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cp-body { position: relative; padding: 14px 16px calc(var(--cgap) + 4px); display: flex; flex-direction: column; gap: var(--cgap); }
.cp-section { margin: 0; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.62); border: 1px solid rgba(148,163,184,.16); box-shadow: 0 6px 18px rgba(15,23,42,.04); }
.card-dark .cp-section { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.cp-section h3 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; margin-bottom: 12px; }
.cp-section h3 .icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--cacc); background: var(--cchip); }
.cp-bio { font-size: 12.5px; line-height: 1.85; color: var(--cs); white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-products { display: flex; flex-direction: column; gap: 9px; }
.cp-product { border: 1px solid rgba(148,163,184,.16); background: rgba(255,255,255,.6); border-radius: 12px; padding: 12px 14px; }
.card-dark .cp-product { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); }
.cp-product-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cp-product-head b { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-product-head span { flex: none; font-size: 10.5px; color: var(--cp); background: var(--cchip); padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.cp-product p { font-size: 11.5px; color: var(--cs); line-height: 1.7; margin-top: 5px; }
.cp-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cp-gallery img { width: 100%; height: 92px; object-fit: cover; border-radius: 10px; }
.cp-address { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--cchip); border-radius: 12px; padding: 12px 13px; font-size: 12px; }
.cp-address span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cp-address a { flex: none; color: var(--cp); font-weight: 700; white-space: nowrap; }
.cp-form { display: flex; flex-direction: column; gap: 12px; }
.cp-form label span { display: block; font-size: 11.8px; font-weight: 600; margin-bottom: 6px; }
.cp-form label b { color: #ef4444; }
.cp-form .input { background: rgba(255,255,255,.85); border-color: rgba(148,163,184,.3); border-radius: 10px; min-height: 42px; font-size: 12.5px; transition: border-color .16s, box-shadow .16s; }
.cp-form .input:focus { outline: none; border-color: var(--cacc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cacc) 16%, transparent); }
.card-dark .cp-form .input { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.card-dark .cp-form .input:focus { background: rgba(255,255,255,.12); }
.cp-submit { height: 44px; border: 0; border-radius: 11px; background: linear-gradient(135deg, var(--cp), var(--cacc)); color: #fff; font-weight: 700; font-size: 13.5px; margin-top: 2px; box-shadow: 0 8px 18px color-mix(in srgb, var(--cp) 30%, transparent); transition: transform .16s, filter .16s; }
.cp-submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cp-form-tip { text-align: center; color: var(--cs); font-size: 10.5px; }
.cp-success { text-align: center; padding: 24px 10px; color: var(--success); }
.cp-success h3 { font-size: 16px; margin-top: 9px; color: var(--ct); }
.cp-success p { font-size: 12px; color: var(--cs); margin-top: 5px; }
.cp-form-mock { display: flex; flex-direction: column; gap: 8px; opacity: .6; }
.cp-form-mock div { display: flex; flex-direction: column; gap: 5px; }
.cp-form-mock span { font-size: 11px; }
.cp-form-mock i { display: block; height: 34px; border: 1px dashed rgba(148,163,184,.45); border-radius: 8px; }
.cp-form-mock button { height: 38px; border: 0; border-radius: 9px; background: var(--cp); color: #fff; font-size: 12px; }
.cp-foot { text-align: center; padding: 14px; border-top: 1px solid rgba(148,163,184,.16); background: rgba(255,255,255,.34); font-size: 10.5px; color: var(--cs); }
.card-dark .cp-foot { background: rgba(255,255,255,.04); }
.cp-foot b { color: var(--cp); }

@media (max-width: 420px) {
  .public-stage { padding: 12px 8px 28px; }
  .cp-hero { padding: 24px 16px 18px; }
  .cp-hero-top { gap: 11px; }
  .cp-hero-top .avatar-img, .cp-hero-top .avatar-fallback { width: 60px !important; height: 60px !important; font-size: 20px !important; }
  .cp-hero h1 { font-size: 21px; }
  .cp-actions { gap: 5px; }
  .cp-action span { width: 36px; height: 36px; border-radius: 11px; }
  .cp-body { padding: 10px 11px calc(var(--cgap) + 4px); }
  .cp-section { padding: 14px 13px; border-radius: 13px; }
  .cp-address { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cp-address a { align-self: flex-end; }
}

@media (min-width: 760px) {
  .public-top-inner, .public-stage { max-width: 680px; }
  .public-stage { padding: 30px 20px 48px; }
  .public-stage .cp-hero { padding: 36px 32px 28px; }
  .public-stage .cp-hero h1 { font-size: 26px; }
  .public-stage .cp-body { padding: 18px 24px calc(var(--cgap) + 8px); }
  .public-stage .cp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .public-stage .cp-form label:nth-child(4), .public-stage .cp-submit, .public-stage .cp-form-tip { grid-column: 1 / -1; }
  .public-stage .cp-gallery img { height: 110px; }
}
.center-page { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.fatal-error { margin: 20px; padding: 14px; border: 1px solid #fecaca; background: #fff5f5; color: #b91c1c; border-radius: 10px; }

/* ---------- 响应式 ---------- */
/* ---------- 访客雷达 / 智能客服 ---------- */
.radar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 6px 0 18px; }
.mini-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.mini-panel h3 { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 12px; }
.mini-panel h3 .icon { color: var(--primary); }
.bar-list { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 76px 1fr 28px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row i { height: 7px; background: #eef2f7; border-radius: 6px; overflow: hidden; }
.bar-row i b { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #8b5cf6); border-radius: 6px; }
.bar-row em { font-style: normal; text-align: right; font-weight: 600; color: var(--text); }
.qa-edit .product-edit textarea { resize: vertical; }
.chat-admin { display: grid; grid-template-columns: 300px 1fr; min-height: 560px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-side { border-right: 1px solid var(--line); background: #fbfcfe; overflow-y: auto; }
.chat-side-head { padding: 14px 16px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 13px; }
.chat-side-head span { font-size: 11px; color: var(--faint); }
.conv-item { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 13px 15px; cursor: pointer; }
.conv-item:hover { background: #f4f6fb; }
.conv-item.active { background: #eef2ff; border-left: 3px solid var(--primary); padding-left: 12px; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.conv-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-top small { color: var(--faint); font-size: 10px; flex: none; }
.conv-meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.conv-meta i { background: #ef4444; color: #fff; border-radius: 10px; padding: 0 5px; font-style: normal; }
.conv-last { display: block; font-size: 11.5px; color: var(--muted); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
#chat-thread { display: flex; flex-direction: column; height: 560px; }
.chat-thread-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.chat-thread-head b { font-size: 14px; }
.chat-thread-head small { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.chat-thread-body { flex: 1; overflow-y: auto; padding: 18px; background: #fafbfe; }
.chat-line { max-width: 78%; margin-bottom: 14px; }
.chat-line-meta { display: flex; gap: 8px; align-items: center; font-size: 10.5px; color: var(--faint); margin-bottom: 4px; }
.chat-line p { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.chat-line.visitor { margin-left: auto; }
.chat-line.visitor .chat-line-meta { justify-content: flex-end; }
.chat-line.visitor p { background: var(--primary); color: #fff; border-color: var(--primary); }
.chat-line.agent p { background: #ecfdf5; border-color: #a7f3d0; }
.chat-reply { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-reply .input { flex: 1; }
.chat-widget { position: fixed; right: 20px; bottom: 22px; z-index: 80; }
.chat-fab { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(37,99,235,.35); cursor: pointer; position: relative; margin-left: auto; }
.chat-fab i { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; background: #22c55e; border: 2px solid #fff; border-radius: 50%; }
.chat-panel { position: absolute; right: 0; bottom: 66px; width: 320px; height: 430px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(15,23,42,.2); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 13px; background: var(--primary); color: #fff; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.chat-head b { display: block; font-size: 12.5px; }
.chat-head small { display: block; font-size: 10px; opacity: .8; margin-top: 2px; }
.chat-head button { margin-left: auto; border: 0; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; background: #f8fafc; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 10px; }
.chat-msg span { max-width: 86%; padding: 9px 11px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.chat-msg small { font-size: 9.5px; color: var(--faint); margin-top: 3px; }
.chat-msg.mine { align-items: flex-end; }
.chat-msg.mine span { background: var(--primary); color: #fff; border-color: var(--primary); }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; border-top: 1px solid var(--line); }
.chat-quick button { flex: none; border: 1px solid #c7d2fe; background: #f5f7ff; color: var(--primary); border-radius: 20px; padding: 5px 9px; font-size: 10.5px; cursor: pointer; }
.chat-form { display: flex; gap: 7px; padding: 9px 10px; border-top: 1px solid var(--line); }
.chat-form .input { flex: 1; height: 34px; font-size: 12px; }
.chat-form button { width: 34px; border: 0; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-body { grid-template-columns: minmax(0, 1fr) 370px; }
  .phone-frame { width: 300px; }
}
@media (max-width: 900px) {
  .grid-2, .plan-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-mobile-brand { display: flex; align-items: center; gap: 9px; font-size: 17px; margin-bottom: 28px; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .mobile-menu { display: inline-grid; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 0 16px; }
  .editor-body { grid-template-columns: 1fr; }
  .editor-panel { min-height: auto; border-right: 0; }
  .editor-preview { position: static; order: -1; padding-top: 18px; border-bottom: 1px solid var(--line); }
  .editor-tabs { top: 62px; }
  .phone-frame { width: 300px; }
  .form-grid { grid-template-columns: 1fr; }
  .radar-grid { grid-template-columns: 1fr; }
  .chat-admin { grid-template-columns: 1fr; }
  .chat-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 230px; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 13px; gap: 9px; }
  .stat-main strong { font-size: 19px; }
  .stat-icon { width: 34px; height: 34px; }
  .top-user div, .topbar-title p { display: none; }
  .top-divider { display: none; }
  .editor-top { padding: 0 12px; gap: 8px; }
  .editor-title span { display: none; }
  .editor-tab { padding: 13px 9px; font-size: 12px; }
  .editor-panes { padding: 18px 16px 40px; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .bg-grid { grid-template-columns: repeat(3, 1fr); }
  .public-stage { padding: 10px 8px 24px; }
  .cp-actions { gap: 4px; }
  .cp-action span { width: 34px; height: 34px; }
  .panel { padding: 16px; }
  .chat-widget { right: 12px; bottom: 12px; }
  .chat-panel { width: calc(100vw - 24px); height: min(430px, 70vh); }
  .conv-top small { display: none; }
}

/* ---------- 消息通知 ---------- */
.bell-wrap { position: relative; }
.bell-wrap .bell { border: 0; background: transparent; padding: 6px; color: var(--muted); display: grid; place-items: center; position: relative; border-radius: 8px; }
.bell-wrap .bell:hover { background: #f1f3f8; color: var(--primary); }
.notify-pop { position: absolute; top: 42px; right: -8px; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 50px rgba(15,23,42,.16); z-index: 60; overflow: hidden; animation: fadeIn .16s; }
.notify-pop[hidden] { display: none; }
.notify-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.notify-pop-head b { font-size: 13.5px; }
.notify-pop-head button { border: 0; background: transparent; color: var(--primary); font-size: 11.5px; cursor: pointer; }
.notify-pop-list { max-height: 330px; overflow-y: auto; }
.notify-pop-foot { display: block; text-align: center; padding: 11px; color: var(--primary); font-size: 12px; font-weight: 600; border-top: 1px solid var(--line); background: #fbfcfe; }
.notify-item { width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border: 0; border-bottom: 1px solid #f1f3f7; background: #fff; text-align: left; cursor: pointer; transition: background .15s; }
.notify-item:hover { background: #f8faff; }
.notify-item.unread { background: #f5f8ff; }
.notify-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.notify-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notify-txt b { font-size: 12.5px; color: var(--text); }
.notify-txt small { font-size: 11.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notify-txt em { font-size: 10.5px; color: var(--faint); font-style: normal; }
.notify-empty { padding: 30px 16px; text-align: center; color: var(--faint); }
.notify-empty .icon { color: #cbd5e1; }
.notify-empty p { font-size: 12px; margin-top: 8px; }
.notify-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.notify-tab { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; cursor: pointer; }
.notify-tab.active { background: var(--primary-soft); border-color: #c7d2fe; color: var(--primary); font-weight: 700; }
.notify-rows { display: flex; flex-direction: column; }
.notify-row { display: flex; gap: 12px; padding: 14px 4px; border-bottom: 1px solid #f1f3f7; }
.notify-row.unread .notify-row-main b::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; margin-left: 7px; vertical-align: 2px; }
.notify-row-main { flex: 1; min-width: 0; }
.notify-row-top { display: flex; justify-content: space-between; gap: 10px; }
.notify-row-top b { font-size: 13px; }
.notify-row-top span { font-size: 11px; color: var(--faint); white-space: nowrap; }
.notify-row-main p { font-size: 12px; color: var(--muted); margin: 4px 0 8px; overflow-wrap: anywhere; }
.notify-row-actions { display: flex; gap: 14px; align-items: center; font-size: 11.5px; }
.form-actions.left { justify-content: flex-start; }

/* ---------- 手机端资料编辑抽屉 ---------- */
.modal-mask.sheet-mask { align-items: end; padding: 0; }
.modal.sheet { width: 100%; max-width: 560px !important; border-radius: 18px 18px 0 0; max-height: 92vh; display: flex; flex-direction: column; }
.modal.sheet .modal-body { max-height: none; overflow-y: auto; flex: 1; }
.me-intro { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.me-intro b { display: block; font-size: 14px; }
.me-intro small { color: var(--faint); font-size: 11.5px; }
.me-avatar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.me-avatar-fields { margin-top: 12px; }
.me-avatar-fields .input[type="color"] { padding: 3px; height: 38px; }

/* ---------- 访客页主人入口 ---------- */
.public-top-actions { display: flex; align-items: center; gap: 8px; }
.owner-edit-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border: 1px solid #c7d2fe; background: #fff; color: var(--primary); border-radius: 20px; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.owner-edit-btn:hover { background: var(--primary-soft); }

/* ---------- 套餐与支付 ---------- */
.current-plan { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px; border-radius: 12px; background: linear-gradient(135deg, #eef2ff, #f8faff); border: 1px solid #e0e7ff; }
.cp-main h3 { font-size: 24px; margin: 4px 0; }
.cp-main h3 small { font-size: 12px; color: var(--muted); font-weight: 500; }
.cp-main p { font-size: 12.5px; color: #475569; }
.cp-main > small { font-size: 11px; color: var(--faint); }
.buy-grid .plan-card.current { border-color: #c7d2fe; box-shadow: 0 8px 22px rgba(79,70,229,.1); }
.pay-strip { display: flex; gap: 9px; align-items: flex-start; margin-top: 16px; background: #f8fafc; border-radius: 10px; padding: 12px 14px; font-size: 12px; color: var(--muted); }
.pay-strip .icon { color: var(--success); margin-top: 2px; }
.pay-summary { display: flex; gap: 20px; align-items: center; padding: 14px; border-radius: 11px; background: #f8faff; border: 1px solid #e6ebff; margin-bottom: 16px; flex-wrap: wrap; }
.pay-summary > div:first-child { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pay-summary small, .pay-summary p { display: block; color: var(--muted); font-size: 11px; }
.pay-summary b { font-size: 26px; color: var(--primary); }
.pay-qr { text-align: center; padding: 12px 0; }
.pay-qr img { width: 156px; height: 156px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pay-qr p { color: var(--muted); font-size: 11.5px; margin-top: 7px; }
.bank-info { background: #f8fafc; border-radius: 10px; padding: 12px 14px; font-size: 12px; color: var(--muted); }
.bank-info b { color: var(--text); display: block; margin-bottom: 4px; }
.bank-info p { margin: 2px 0; }
.proof-upload { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.pay-gateway { text-align: center; padding: 4px 0 6px; }
.pay-gateway-head { display: flex; align-items: center; gap: 10px; text-align: left; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.pay-gateway-head .icon { color: #059669; }
.pay-gateway-head b { display: block; font-size: 12.5px; color: #166534; }
.pay-gateway-head small { display: block; font-size: 10.5px; color: #4d7c0f; margin-top: 2px; }
.pay-gateway-qr { min-height: 196px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.pay-gateway-qr img { width: 196px; height: 196px; object-fit: contain; }
.pay-gateway-qr a { color: var(--primary); font-size: 12px; word-break: break-all; }
.pay-gateway-state { font-size: 12px; color: var(--muted); margin: 12px 0 10px; }
.pay-gateway .field-hint { margin-top: 8px; }
.proof-img, .qr-thumb { max-width: 130px; max-height: 100px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; display: block; }
.receipt { font-size: 12.5px; }
.receipt-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.receipt-head b { font-size: 14px; }
.receipt-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed #eef0f5; }
.receipt-row span { color: var(--muted); flex: none; }
.receipt-row b { text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.receipt-proof { margin-top: 12px; }
.receipt-proof span { color: var(--muted); }
.receipt-proof img { display: block; max-width: 180px; max-height: 160px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; margin-top: 7px; }

@media (max-width: 560px) {
  .notify-pop { position: fixed; top: 58px; left: 10px; right: 10px; width: auto; }
  .owner-edit-btn { padding: 5px 9px; font-size: 11px; }
  .preview-tag { display: none; }
  .modal.sheet { max-height: 94vh; }
  .current-plan { padding: 13px; }
}
