/* ============================================================
   IMCHAT · 视觉主题层（在 app.css 之后加载，统一覆盖视觉细节）
   设计语言：克制的高级灰 + 微信绿点缀 + 柔和阴影 + 12px 圆角
   ============================================================ */

/* ---------------- 设计令牌 ---------------- */

:root {
  --green: #07c160;
  --green-dark: #05a04d;
  --green-soft: rgba(7, 193, 96, 0.10);
  --green-line: rgba(7, 193, 96, 0.28);
  --bubble-self: #95ec69;

  --c-bg: #eef1f6;
  --c-surface: #ffffff;
  --c-surface-2: #f7f9fc;
  --c-surface-3: #f2f5f9;
  --c-line: #e7ecf3;
  --c-line-strong: #d9e1ea;
  --c-text: #101828;
  --c-text-2: #5b6b7c;
  --c-text-3: #8d9aab;
  --c-danger: #f04438;
  --c-warn: #f79009;
  --c-vip: #b98a1f;

  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --sh-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --sh-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 8px 20px -12px rgba(16, 24, 40, 0.18);
  --sh-md: 0 2px 6px rgba(16, 24, 40, 0.06), 0 18px 40px -20px rgba(16, 24, 40, 0.24);
  --sh-lg: 0 30px 80px -30px rgba(16, 24, 40, 0.38);

  --font: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  font-size: 14px;
  letter-spacing: 0.005em;
}

::selection {
  background: rgba(7, 193, 96, 0.18);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(16, 24, 40, 0.14);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 24, 40, 0.26);
  background-clip: content-box;
}

/* ---------------- 启动页 ---------------- */

.boot {
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(7, 193, 96, 0.10), transparent 60%),
    radial-gradient(700px 500px at 85% 90%, rgba(56, 129, 255, 0.10), transparent 60%),
    #f7f9fc;
}

.boot-mark {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(150deg, #17d67a 0%, #05a850 100%);
  box-shadow: 0 18px 40px -14px rgba(7, 193, 96, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  animation: bootPulse 1.6s var(--ease) infinite;
}

.boot-text {
  color: var(--c-text-3);
  font-size: 13px;
  letter-spacing: 0.08em;
}

@keyframes bootPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.02); }
}

/* ---------------- 整体骨架 ---------------- */

.main {
  background: var(--c-bg);
  display: flex;
  height: 100%;
  width: 100%;
}

.rail {
  width: 68px;
  background: linear-gradient(180deg, #232830 0%, #15181d 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05), 12px 0 32px -24px rgba(16, 24, 40, 0.6);
  padding: 14px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 3;
}

.rail-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px -10px rgba(0, 0, 0, 0.7);
  margin-bottom: 10px;
}

.rail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.rail-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: rgba(235, 241, 248, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}

.rail-btn svg {
  width: 21px;
  height: 21px;
}

.rail-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.rail-btn:active {
  transform: scale(0.94);
}

.rail-btn.active {
  background: linear-gradient(150deg, rgba(7, 193, 96, 0.30), rgba(7, 193, 96, 0.10));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(7, 193, 96, 0.42), 0 10px 22px -14px rgba(7, 193, 96, 0.9);
}

.rail-btn.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #34e08a, #07c160);
  box-shadow: 0 0 12px rgba(7, 193, 96, 0.8);
}

.rail-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(160deg, #ff6b6b, #e5484d);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px #1b1f26, 0 4px 10px -4px rgba(229, 72, 77, 0.9);
}

.rail-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.conn-dot.on {
  background: #2fd57a;
  box-shadow: 0 0 0 4px rgba(47, 213, 122, 0.16), 0 0 12px rgba(47, 213, 122, 0.9);
}

/* ---------------- 列表栏 ---------------- */

.list {
  width: 322px;
  background: var(--c-surface);
  border-right: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  box-shadow: 6px 0 28px -22px rgba(16, 24, 40, 0.4);
  z-index: 2;
}

.list-head {
  padding: 18px 18px 10px;
  border-bottom: 1px solid transparent;
}

.list-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.list-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-text);
}

.list-actions .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--c-text-2);
}

.list-actions .icon-btn:hover {
  background: var(--c-surface-3);
  color: var(--c-text);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-md);
  background: var(--c-surface-3);
  border: 1px solid transparent;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.search-box:focus-within {
  background: #fff;
  border-color: var(--green-line);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.search-box svg {
  width: 15px;
  height: 15px;
  color: var(--c-text-3);
  flex: none;
}

.search-input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: var(--c-text);
  min-width: 0;
}

.search-input::placeholder {
  color: var(--c-text-3);
}

.list-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 12px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 10px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  position: relative;
  transition: background 0.16s var(--ease), transform 0.16s var(--ease);
}

.list-item:hover {
  background: var(--c-surface-2);
}

.list-item:active {
  transform: scale(0.995);
}

.list-item.active {
  background: linear-gradient(90deg, rgba(7, 193, 96, 0.12) 0%, rgba(7, 193, 96, 0.03) 100%);
}

.list-item.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #3ce38d, #07c160);
  box-shadow: 0 0 10px rgba(7, 193, 96, 0.6);
}

.list-item .avatar {
  flex: none;
  border-radius: 13px;
}

.li-main {
  flex: 1;
  min-width: 0;
}

.li-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.li-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.li-time {
  font-size: 11.5px;
  color: var(--c-text-3);
  flex: none;
  font-variant-numeric: tabular-nums;
}

.li-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.li-sub {
  flex: 1;
  font-size: 12.5px;
  color: var(--c-text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.li-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(160deg, #ff7a7a, #e5484d);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 4px 10px -6px rgba(229, 72, 77, 0.9);
}

.li-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f04438;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.14);
}

.li-flag {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--c-surface-3);
  color: var(--c-text-3);
}

.list-section-title {
  padding: 14px 22px 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--c-text-3);
  text-transform: uppercase;
}

.list-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--c-text-3);
  font-size: 13px;
}

/* ---------------- 头像 ---------------- */

.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: visible;
  background: var(--c-surface-3);
  color: #fff;
  font-weight: 650;
  flex: none;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.05);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  color: #fff;
  text-shadow: 0 1px 2px rgba(16, 24, 40, 0.22);
  letter-spacing: -0.02em;
}

.avatar.av-c0 { background: linear-gradient(145deg, #6ea8fe, #3b82f6); }
.avatar.av-c1 { background: linear-gradient(145deg, #5ee0a8, #10b981); }
.avatar.av-c2 { background: linear-gradient(145deg, #f7b267, #f59e0b); }
.avatar.av-c3 { background: linear-gradient(145deg, #f38ba8, #e11d48); }
.avatar.av-c4 { background: linear-gradient(145deg, #a78bfa, #7c3aed); }
.avatar.av-c5 { background: linear-gradient(145deg, #67e8f9, #0891b2); }
.avatar.av-c6 { background: linear-gradient(145deg, #fda4af, #db2777); }
.avatar.av-c7 { background: linear-gradient(145deg, #94a3b8, #475569); }

.avatar-group {
  background: linear-gradient(145deg, #38bdf8, #2563eb) !important;
  color: #fff;
}

.avatar-online {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2.5px #fff;
}

/* ---------------- 聊天区 ---------------- */

.view {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 600px at 100% 0%, rgba(56, 129, 255, 0.05), transparent 60%),
    radial-gradient(900px 520px at 0% 100%, rgba(7, 193, 96, 0.05), transparent 60%),
    var(--c-bg);
}

.chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.chat-head {
  height: 66px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgba(16, 24, 40, 0.06);
  position: relative;
  z-index: 2;
}

.chat-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-title {
  min-width: 0;
}

.chat-name {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-status {
  font-size: 11.5px;
  color: var(--c-text-3);
  margin-top: 1px;
}

.chat-status.online {
  color: var(--green);
  font-weight: 600;
}

.chat-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 0;
  background: transparent;
  color: var(--c-text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), transform 0.16s var(--ease);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.icon-btn:hover {
  background: var(--c-surface-3);
  color: var(--c-text);
}

.icon-btn:active {
  transform: scale(0.93);
}

.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 0 10px;
  scroll-behavior: smooth;
}

.msg-list {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-more {
  align-self: center;
  margin: 4px 0 12px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--c-line);
  color: var(--c-text-2);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.16s var(--ease);
}

.msg-more:hover {
  background: #fff;
}

.divider,
.sys-msg {
  align-self: center;
  margin: 14px auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.05);
  color: var(--c-text-3);
  font-size: 11.5px;
  max-width: 70%;
  text-align: center;
}

.msg-row {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  align-items: flex-start;
}

.msg-row.self {
  flex-direction: row-reverse;
}

.msg-avatar .avatar {
  border-radius: 13px;
}

.msg-main {
  max-width: min(62%, 620px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.msg-row.self .msg-main {
  align-items: flex-end;
}

.msg-name {
  font-size: 11.5px;
  color: var(--c-text-3);
  padding: 0 4px;
}

.msg-bubble {
  position: relative;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.56;
  word-break: break-word;
  box-shadow: var(--sh-xs), 0 10px 24px -18px rgba(16, 24, 40, 0.4);
  animation: msgIn 0.18s var(--ease);
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(3px) scale(0.995); }
  to { opacity: 1; transform: none; }
}

.msg-bubble::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 14px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 2px;
}

.msg-row.self .msg-bubble {
  background: linear-gradient(145deg, #a4f177 0%, #8ce35c 100%);
  color: #0d2a12;
  box-shadow: 0 1px 2px rgba(80, 160, 60, 0.18), 0 10px 24px -18px rgba(60, 140, 40, 0.55);
}

.msg-row.self .msg-bubble::before {
  left: auto;
  right: -5px;
  background: #8ce35c;
}

.msg-row.sending .msg-bubble {
  opacity: 0.62;
}

.msg-row.flash .msg-bubble {
  animation: msgFlash 1.1s var(--ease);
}

@keyframes msgFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(7, 193, 96, 0); }
  30% { box-shadow: 0 0 0 4px rgba(7, 193, 96, 0.26); }
}

.bubble-text {
  white-space: pre-wrap;
}

.msg-quote {
  border-left: 2px solid rgba(16, 24, 40, 0.18);
  background: rgba(16, 24, 40, 0.045);
  border-radius: 6px;
  padding: 6px 9px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--c-text-2);
}

.msg-row.self .msg-quote {
  border-left-color: rgba(13, 42, 18, 0.28);
  background: rgba(255, 255, 255, 0.4);
  color: #29501f;
}

.mq-name {
  font-weight: 650;
  margin-bottom: 2px;
}

.mq-text {
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.msg-read {
  font-size: 11px;
  color: var(--c-text-3);
  padding: 0 4px;
}

.msg-edited {
  font-size: 11px;
  color: var(--c-text-3);
  margin-left: 4px;
}

.bubble-image,
.msg-bubble.bubble-image {
  padding: 0;
  background: transparent !important;
  box-shadow: none;
}

.msg-bubble.bubble-image::before {
  display: none;
}

.bubble-image img {
  max-width: 280px;
  max-height: 320px;
  border-radius: 12px;
  display: block;
  box-shadow: var(--sh-sm);
  cursor: zoom-in;
}

.bubble-voice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 92px;
  cursor: pointer;
  color: inherit;
}

.vb-icon svg {
  width: 17px;
  height: 17px;
}

.vb-wave {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 16px;
}

.vb-wave i {
  width: 2.5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
  height: 8px;
}

.vb-wave i:nth-child(2) { height: 12px; }
.vb-wave i:nth-child(3) { height: 16px; }
.vb-wave i:nth-child(4) { height: 10px; }
.vb-wave i:nth-child(5) { height: 14px; }

.bubble-voice.playing .vb-wave i {
  animation: wave 0.9s ease-in-out infinite;
  opacity: 0.95;
}

.bubble-voice.playing .vb-wave i:nth-child(2) { animation-delay: 0.1s; }
.bubble-voice.playing .vb-wave i:nth-child(3) { animation-delay: 0.2s; }
.bubble-voice.playing .vb-wave i:nth-child(4) { animation-delay: 0.3s; }
.bubble-voice.playing .vb-wave i:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.45); }
}

.vb-len {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.bubble-file {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  padding: 2px 0;
}

.bf-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(150deg, #eef4ff, #dbe7ff);
  color: #3b6fe0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.bf-icon svg {
  width: 20px;
  height: 20px;
}

.bf-name {
  font-size: 13.5px;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bf-size {
  font-size: 11.5px;
  color: var(--c-text-3);
  margin-top: 2px;
}

.bubble-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  min-width: 230px;
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-xs);
}

.bc-name {
  font-weight: 650;
  font-size: 14px;
}

.bc-tip {
  font-size: 11.5px;
  color: var(--c-text-3);
  margin-top: 2px;
}

.bubble-loc {
  min-width: 230px;
}

.bl-poi {
  font-weight: 650;
  font-size: 13.5px;
}

.bl-addr {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 2px;
}

.bl-map {
  margin-top: 8px;
  height: 96px;
  border-radius: 10px;
  background:
    linear-gradient(120deg, rgba(7, 193, 96, 0.12), rgba(56, 129, 255, 0.14)),
    repeating-linear-gradient(0deg, transparent 0 11px, rgba(255, 255, 255, 0.6) 11px 12px),
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(255, 255, 255, 0.6) 11px 12px);
}

.bubble-link {
  min-width: 230px;
}

.blink-title {
  font-weight: 650;
  font-size: 13.5px;
}

.blink-desc {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 4px;
}

.blink-url {
  font-size: 11.5px;
  color: var(--green);
  margin-top: 6px;
  word-break: break-all;
}

.bubble-rp,
.msg-bubble.bubble-redpacket {
  min-width: 236px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(150deg, #f97066 0%, #e5484d 100%) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px -16px rgba(229, 72, 77, 0.85);
}

.msg-bubble.bubble-redpacket::before {
  background: #ef5f5c;
}

.rp-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-greet {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 8px;
}

.rp-tip {
  font-size: 11.5px;
  opacity: 0.85;
  margin-top: 4px;
}

/* 输入区 */

.chat-foot {
  padding: 10px 20px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(16, 24, 40, 0.06);
}

.composer-reply {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: var(--r-sm);
  background: var(--c-surface-3);
  border-left: 3px solid var(--green);
  font-size: 12.5px;
  color: var(--c-text-2);
}

.composer {
  max-width: 1080px;
  margin: 0 auto;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
}

.composer-tools .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #4a4f57;
}

.composer-tools .icon-btn svg {
  width: 23px;
  height: 23px;
}

.composer-tools .icon-btn:hover {
  background: #eceef2;
  color: #1a1d21;
}

.composer-tools .icon-btn {
  width: 34px;
  height: 34px;
  color: var(--c-text-2);
  border-radius: 9px;
}

.composer-tools .icon-btn:hover {
  background: var(--c-surface-3);
  color: var(--c-text);
}

.composer-tools .mic-btn.recording {
  color: #fff;
  background: linear-gradient(150deg, #ff7a7a, #e5484d);
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.16);
}

.composer-input {
  width: 100%;
  min-height: 44px;
  max-height: 160px;
  resize: none;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--c-surface-3);
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.composer-input:focus {
  background: #fff;
  border-color: var(--green-line);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.composer-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.composer-hint {
  font-size: 11.5px;
  color: var(--c-text-3);
}

.send-btn {
  margin-left: auto;
  height: 38px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-sm);
  background: linear-gradient(150deg, #13cf74, #05a850);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: 0 10px 24px -14px rgba(7, 193, 96, 0.9);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), filter 0.16s var(--ease);
}

.send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -16px rgba(7, 193, 96, 0.95);
  filter: saturate(1.05);
}

.send-btn:active {
  transform: translateY(0) scale(0.98);
}

.rec-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: rgba(240, 68, 56, 0.06);
  border: 1px solid rgba(240, 68, 56, 0.18);
  color: #b42318;
  font-size: 13px;
}

.rb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f04438;
  animation: recPulse 1s infinite;
}

@keyframes recPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

/* ---------------- 空状态 ---------------- */

.empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--c-text-3);
  padding: 40px;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: linear-gradient(150deg, #ffffff, #eef3fa);
  box-shadow: var(--sh-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  color: #b6c2d2;
  margin-bottom: 10px;
}

.empty-icon svg {
  width: 40px;
  height: 40px;
}

.empty-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text-2);
}

.empty-sub {
  font-size: 12.5px;
  color: var(--c-text-3);
}

/* ---------------- 通用控件 ---------------- */

.btn {
  height: 38px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line-strong);
  background: #fff;
  color: var(--c-text);
  font-size: 13.5px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease),
    transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.btn:hover {
  background: var(--c-surface-2);
  border-color: #cfd8e3;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(150deg, #13cf74, #05a850);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 24px -14px rgba(7, 193, 96, 0.85);
}

.btn-primary:hover {
  background: linear-gradient(150deg, #17d87c, #06b256);
  box-shadow: 0 16px 30px -16px rgba(7, 193, 96, 0.95);
}

.btn-danger {
  border-color: transparent;
  background: linear-gradient(150deg, #fb7185, #e11d48);
  color: #fff;
}

.btn-danger:hover {
  background: linear-gradient(150deg, #fb7f91, #d81a42);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: var(--r-xs);
}

.input {
  height: 42px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line-strong);
  background: #fff;
  outline: none;
  font-size: 14px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
}

.input:hover {
  border-color: #c9d4e1;
}

.input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.textarea {
  min-height: 96px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line-strong);
  background: #fff;
  outline: none;
  resize: vertical;
  font-size: 14px;
  line-height: 1.6;
}

.textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-2);
}

.hint {
  font-size: 11.5px;
  color: var(--c-text-3);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--c-surface-3);
  color: var(--c-text-2);
  font-size: 11px;
  font-weight: 600;
}

.tag-ok {
  background: rgba(7, 193, 96, 0.12);
  color: #05803e;
}

.tag-bad {
  background: rgba(240, 68, 56, 0.12);
  color: #b42318;
}

.vip-tag,
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fde68a, #f5c04a);
  color: #7a4d00;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------------- 弹层 ---------------- */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 60;
  animation: fadeIn 0.16s var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 460px;
  max-width: 100%;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  animation: modalIn 0.2s var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal-sm { width: 380px; }
.modal-lg { width: 640px; }

.modal-head {
  padding: 18px 22px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--c-text-3);
}

.modal-close:hover {
  background: var(--c-surface-3);
  color: var(--c-text);
}

.modal-body {
  padding: 4px 22px 8px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--c-text-2);
}

.modal-text {
  margin: 0 0 6px;
}

.modal-foot {
  padding: 14px 22px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-form .field {
  margin-bottom: 14px;
}

.ctx-menu {
  position: fixed;
  min-width: 168px;
  padding: 6px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-md);
  z-index: 80;
  animation: fadeIn 0.12s var(--ease);
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-xs);
  font-size: 13px;
  color: var(--c-text);
  cursor: pointer;
}

.ctx-item:hover {
  background: var(--c-surface-3);
}

.ctx-item.danger {
  color: var(--c-danger);
}

.ctx-item.danger:hover {
  background: rgba(240, 68, 56, 0.08);
}

.ctx-sep {
  height: 1px;
  margin: 5px 8px;
  background: var(--c-line);
}

.toast-root {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  animation: toastIn 0.2s var(--ease);
}

.toast-error {
  background: linear-gradient(150deg, #f97066, #e5484d);
}

.toast-success {
  background: linear-gradient(150deg, #20c97a, #059c4e);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.img-mask {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 32px;
}

.img-full {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: var(--r-md);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
}

.img-cap {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  text-align: center;
  margin-top: 12px;
}

/* ---------------- 登录页 ---------------- */

.auth {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(900px 620px at 12% 14%, rgba(7, 193, 96, 0.16), transparent 62%),
    radial-gradient(820px 560px at 88% 86%, rgba(56, 129, 255, 0.16), transparent 62%),
    radial-gradient(600px 400px at 60% 10%, rgba(168, 85, 247, 0.08), transparent 60%),
    #f5f8fc;
  position: relative;
  overflow: auto;
}

.auth::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 24, 40, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(720px 520px at 50% 45%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(720px 520px at 50% 45%, #000 30%, transparent 78%);
  pointer-events: none;
}

.auth-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 920px;
  max-width: 100%;
  min-height: 560px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 50px 120px -50px rgba(16, 24, 40, 0.5);
  overflow: hidden;
}

.auth-panel {
  width: 46%;
  padding: 48px 42px;
  display: flex;
  flex-direction: column;
  color: #0b2b1a;
  background:
    radial-gradient(520px 380px at 20% 0%, rgba(255, 255, 255, 0.55), transparent 65%),
    linear-gradient(155deg, #d9fbe7 0%, #b6f2ce 42%, #d8f0ff 100%);
  position: relative;
  overflow: hidden;
}

.auth-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(7, 193, 96, 0.32), transparent 65%);
  filter: blur(6px);
}

.auth-logo {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #17d67a, #04a24c);
  color: #fff;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
  box-shadow: 0 18px 36px -16px rgba(7, 193, 96, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.auth-panel h1,
.auth-name {
  margin: 26px 0 6px;
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #0a2a19;
}

.auth-sub {
  font-size: 13.5px;
  color: #35624a;
  margin: 0;
  line-height: 1.6;
}

.auth-features {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 34px;
}

.auth-feature {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.auth-feature .af-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.75);
  color: #067a3d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 4px 12px -8px rgba(6, 122, 61, 0.6);
}

.auth-feature .af-ico svg {
  width: 15px;
  height: 15px;
}

.af-title {
  font-size: 13px;
  font-weight: 650;
  color: #0b3a23;
}

.af-sub {
  font-size: 11.5px;
  color: #4b7a61;
  margin-top: 1px;
}

.auth-card {
  flex: 1;
  padding: 46px 46px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.auth-card .auth-brand {
  display: none;
}

.auth-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--c-surface-3);
  margin-bottom: 26px;
  align-self: flex-start;
  gap: 2px;
}

.tab {
  height: 34px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--c-text-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.tab.active {
  background: #fff;
  color: var(--c-text);
  box-shadow: var(--sh-xs), 0 4px 12px -8px rgba(16, 24, 40, 0.4);
}

.auth-form .field {
  margin-bottom: 16px;
}

.auth-form .input {
  height: 46px;
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  border-color: transparent;
}

.auth-form .input:focus {
  background: #fff;
  border-color: var(--green);
}

.auth-form .btn-block {
  height: 46px;
  border-radius: var(--r-md);
  font-size: 14.5px;
  margin-top: 6px;
}

.auth-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-text-3);
  text-align: center;
}

.auth-foot {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--c-line);
  font-size: 11.5px;
  color: var(--c-text-3);
  text-align: center;
}

/* ---------------- 通讯录 / 资料 ---------------- */

.pane {
  height: 100%;
  overflow-y: auto;
  padding: 26px 30px 40px;
}

.pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pane-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pane-sub {
  font-size: 12.5px;
  color: var(--c-text-3);
  margin-top: 4px;
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.search-grow {
  flex: 1;
}

.results,
.req-group {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}

.user-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-line);
  transition: background 0.16s var(--ease);
}

.user-result:last-child {
  border-bottom: 0;
}

.user-result:hover {
  background: var(--c-surface-2);
}

.ur-name {
  font-size: 14px;
  font-weight: 600;
}

.ur-sub {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 2px;
}

.req-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-line);
}

.req-row:last-child {
  border-bottom: 0;
}

.req-acts {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.profile {
  background: #fff;
  border-radius: var(--r-xl);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}

.profile-banner {
  min-height: 128px;
  height: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 26px;
  background:
    radial-gradient(460px 240px at 15% 0%, rgba(255, 255, 255, 0.22), transparent 62%),
    linear-gradient(135deg, #0f766e 0%, #0d9488 44%, #2563eb 100%);
  position: relative;
  color: #fff;
}

.profile-banner > .avatar {
  flex: none;
  border-radius: 20px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6), 0 12px 26px -14px rgba(0, 0, 0, 0.5);
}

.profile-meta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.profile-banner .profile-name {
  color: #fff;
  font-size: 20px;
  text-shadow: 0 1px 12px rgba(4, 16, 28, 0.4);
}

.profile-banner .profile-line {
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 10px rgba(4, 16, 28, 0.35);
}

.profile-sign {
  padding: 10px 0 0;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
}

.profile-acts {
  display: flex;
  gap: 10px;
  padding: 18px 26px 24px;
}

.profile-meta .avatar {
  box-shadow: 0 0 0 4px #fff, var(--sh-sm);
  border-radius: 20px;
}

.profile-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile-line {
  font-size: 12.5px;
  color: var(--c-text-3);
  margin-top: 3px;
}

.profile-banner .profile-name { font-size: 20px; }
.profile-banner .profile-line { color: rgba(255, 255, 255, 0.94); margin-top: 0; }

.profile-sign {
  padding: 14px 26px 18px;
  font-size: 13px;
  color: var(--c-text-2);
  border-top: 1px solid var(--c-line);
}

.profile-acts {
  display: flex;
  gap: 10px;
  padding: 0 26px 24px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--c-line);
  background: #fff;
}

.info-row:last-child {
  border-bottom: 0;
}

.info-label {
  width: 88px;
  font-size: 12.5px;
  color: var(--c-text-3);
  flex: none;
}

.info-value {
  font-size: 13.5px;
  color: var(--c-text);
  word-break: break-all;
}

.members-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--c-text-2);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.member-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 8px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--c-line);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.member-cell:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}

.member-name {
  font-size: 12px;
  color: var(--c-text-2);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- 我 / 资料 ---------------- */

.me-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-sm);
  margin-bottom: 18px;
}

.me-avatar {
  position: relative;
}

.me-avatar .avatar {
  border-radius: 22px;
  box-shadow: var(--sh-sm);
}

.me-form {
  background: #fff;
  border-radius: var(--r-xl);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-xs);
  padding: 22px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.me-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.me-side-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 12px;
}

.msh-name {
  font-size: 15px;
  font-weight: 650;
}

.msh-sub {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 2px;
}

/* ---------------- 朋友圈 ---------------- */

.moments {
  height: 100%;
  overflow-y: auto;
}

.moment-cover {
  height: 268px;
  position: relative;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(255, 255, 255, 0.35), transparent 60%),
    linear-gradient(140deg, #0f766e 0%, #0891b2 45%, #2563eb 100%);
}

.cover-inner {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 16px;
  width: min(760px, 92%);
}

.cover-inner .avatar {
  border-radius: 20px;
  box-shadow: 0 0 0 4px #fff, var(--sh-md);
}

.cover-meta {
  padding-bottom: 44px;
}

.cover-name {
  color: #fff;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.cover-sign {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12.5px;
  margin-top: 4px;
}

.cover-inner .btn-primary {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.92);
  color: #0b3a23;
  border: 0;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.7);
}

.cover-inner .btn-primary:hover {
  background: #fff;
}

.moment-list {
  width: min(760px, 92%);
  margin: 62px auto 60px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.moment-card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-xs);
  padding: 18px 20px;
  transition: box-shadow 0.18s var(--ease);
}

.moment-card:hover {
  box-shadow: var(--sh-sm);
}

.moment-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.moment-name {
  font-size: 13.5px;
  font-weight: 650;
  color: #2f6fd0;
}

.moment-text {
  font-size: 14px;
  line-height: 1.62;
  color: var(--c-text);
  margin-top: 4px;
  white-space: pre-wrap;
}

.moment-imgs {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  grid-template-columns: repeat(3, 104px);
}

.moment-img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--c-surface-3);
  cursor: zoom-in;
  transition: transform 0.18s var(--ease);
}

.moment-img:hover {
  transform: scale(1.02);
}

.moment-imgs.n1 {
  grid-template-columns: minmax(0, 300px);
}

.moment-imgs.n1 .moment-img {
  width: 300px;
  height: auto;
  max-height: 380px;
}

.moment-imgs.n2 {
  grid-template-columns: repeat(2, 150px);
}

.moment-imgs.n2 .moment-img {
  width: 150px;
  height: 150px;
}

.moment-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--c-line);
}

.moment-time {
  font-size: 11.5px;
  color: var(--c-text-3);
  font-variant-numeric: tabular-nums;
}

.moment-acts {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--c-text-2);
  font-size: 12.5px;
  padding: 5px 9px;
  border-radius: 8px;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.link-btn:hover {
  background: var(--c-surface-3);
  color: var(--c-text);
}

.link-btn.liked {
  color: var(--c-danger);
  font-weight: 600;
}

.link-btn.danger {
  color: var(--c-danger);
}

.moment-likes {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--c-surface-2);
  font-size: 12.5px;
  color: #2f6fd0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.moment-cmts {
  margin-top: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--c-surface-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.moment-cmt {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--c-text-2);
}

.mc-name {
  color: #2f6fd0;
  font-weight: 600;
  margin-right: 4px;
}

.moment-input {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.moment-input .input {
  flex: 1;
}

.publish-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.thumb {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: var(--c-surface-3);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: rgba(16, 24, 40, 0.6);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.thumb-add {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  border: 1.5px dashed var(--c-line-strong);
  background: var(--c-surface-2);
  color: var(--c-text-3);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.thumb-add:hover {
  border-color: var(--green);
  color: var(--green);
}

/* ---------------- 公告 / 通话记录 ---------------- */

.ann-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ann-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px 17px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
}

.ann-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.ann-text {
  font-size: 13.5px;
  line-height: 1.6;
}

.ann-time {
  font-size: 11.5px;
  color: var(--c-text-3);
  margin-top: 4px;
}

.call-history {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}

.call-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-line);
}

.call-row:last-child {
  border-bottom: 0;
}

/* ---------------- 钱包 ---------------- */

.wallet {
  height: 100%;
  overflow-y: auto;
  padding: 26px 30px 40px;
}

.wallet-body {
  max-width: 880px;
  margin: 0 auto;
}

.balance-card {
  position: relative;
  border-radius: var(--r-xl);
  padding: 26px 28px;
  color: #fff;
  background:
    radial-gradient(520px 260px at 88% 0%, rgba(255, 255, 255, 0.28), transparent 60%),
    linear-gradient(135deg, #0f9f5b 0%, #07c160 48%, #059669 100%);
  box-shadow: 0 28px 60px -28px rgba(7, 193, 96, 0.75);
  overflow: hidden;
}

.balance-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 26px solid rgba(255, 255, 255, 0.12);
}

.balance-label {
  font-size: 12.5px;
  opacity: 0.86;
  letter-spacing: 0.04em;
}

.balance-num {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 10px;
}

.bn-unit {
  font-size: 17px;
  font-weight: 600;
  opacity: 0.9;
}

.bn-value {
  font-size: 38px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.bc-vip {
  position: absolute;
  right: 24px;
  top: 24px;
  text-align: right;
}

.vip-exp,
.vip-none {
  font-size: 11.5px;
  opacity: 0.85;
}

.wallet-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0 22px;
}

.wa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-xs);
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}

.wa:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
  border-color: #dfe7f1;
}

.wa-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-icon svg {
  width: 21px;
  height: 21px;
}

.wa-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-2);
}

.wallet-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 6px;
}

.wallet-tab {
  border: 0;
  background: transparent;
  padding: 0 2px 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-text-3);
  position: relative;
}

.wallet-tab.active {
  color: var(--c-text);
}

.wallet-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #07c160, #34d399);
}

.wallet-list {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}

.bill-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-line);
}

.bill-row:last-child {
  border-bottom: 0;
}

.bill-title {
  font-size: 13.5px;
  font-weight: 600;
}

.bill-sub {
  font-size: 11.5px;
  color: var(--c-text-3);
  margin-top: 2px;
}

.bill-amt {
  margin-left: auto;
  font-size: 14.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bill-amt.in {
  color: #059669;
}

.bill-amt.out {
  color: var(--c-text);
}

.quick-amounts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.packet {
  max-width: 420px;
  margin: 0 auto;
  border-radius: 22px;
  padding: 30px 26px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(400px 240px at 50% -10%, rgba(255, 255, 255, 0.3), transparent 60%),
    linear-gradient(150deg, #fb7185 0%, #e11d48 100%);
  box-shadow: 0 30px 60px -28px rgba(225, 29, 72, 0.7);
}

.packet-head {
  font-size: 15px;
  font-weight: 650;
  opacity: 0.95;
}

.packet-amount .pa-num {
  font-size: 44px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.pa-tip {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}

.packet-open {
  margin-top: 18px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(150deg, #fde68a, #f5c04a);
  color: #7a4d00;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 18px 36px -16px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.18s var(--ease);
}

.packet-open:hover {
  transform: scale(1.05);
}

.packet-open:disabled {
  opacity: 0.6;
  transform: none;
}

.packet-greet,
.packet-meta,
.packet-from {
  font-size: 12.5px;
  opacity: 0.9;
}

.packet-list {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.packet-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}

.vip-levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.vip-level {
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 16px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}

.vip-level:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}

.vip-level.active {
  border-color: #f0c04a;
  box-shadow: 0 0 0 4px rgba(240, 192, 74, 0.16);
}

.vl-name {
  font-size: 13.5px;
  font-weight: 700;
}

.vl-price {
  font-size: 12.5px;
  color: var(--c-text-3);
  margin-top: 6px;
}

/* ---------------- 通话界面 ---------------- */

.call-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 16, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}

.call-layer.show {
  opacity: 1;
  pointer-events: auto;
}

.call-box {
  width: min(900px, 92vw);
  height: min(620px, 86vh);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(170deg, #1b2330 0%, #0d1219 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  color: #e9eef5;
  position: relative;
}

.call-info {
  padding: 22px 24px 6px;
  text-align: center;
}

.call-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.call-tip {
  font-size: 12.5px;
  color: rgba(233, 238, 245, 0.6);
  margin-top: 4px;
}

.call-timer {
  font-size: 12.5px;
  color: rgba(233, 238, 245, 0.7);
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}

.call-videos {
  flex: 1;
  min-height: 0;
  padding: 10px 16px;
  display: grid;
  gap: 10px;
}

.call-videos.video-mode {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.call-tile {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #06090e;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.call-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.call-tile-name {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 11.5px;
  backdrop-filter: blur(6px);
}

.call-videos.audio-mode {
  display: flex;
  align-items: center;
  justify-content: center;
}

.call-audio-avatar .avatar {
  border-radius: 32px;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.06), 0 30px 60px -24px rgba(0, 0, 0, 0.9);
}

.call-local {
  position: absolute;
  right: 22px;
  bottom: 96px;
  width: 178px;
  height: 118px;
  border-radius: 14px;
  overflow: hidden;
  background: #06090e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.9);
  cursor: grab;
}

.call-local-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.call-local-video.off {
  opacity: 0.25;
}

.call-local-tip {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.75);
}

.call-ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 24px 24px;
}

.call-ctrl .icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.16s var(--ease), transform 0.16s var(--ease);
}

.call-ctrl .icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.call-ctrl .icon-btn.danger,
.call-ctrl .icon-btn.hangup {
  background: linear-gradient(150deg, #fb7185, #e11d48);
  border-color: transparent;
  box-shadow: 0 14px 30px -14px rgba(225, 29, 72, 0.9);
}

.incoming {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0 4px;
}

.incoming-name {
  font-size: 17px;
  font-weight: 700;
}

.incoming-tip {
  font-size: 12.5px;
  color: var(--c-text-3);
}

.incoming-kind {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  animation: ringPulse 1.4s var(--ease) infinite;
}

@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(7, 193, 96, 0.35); }
  70% { box-shadow: 0 0 0 16px rgba(7, 193, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(7, 193, 96, 0); }
}

/* ---------------- 管理后台 ---------------- */

.admin-body {
  padding: 26px 30px 40px;
  height: 100%;
  overflow-y: auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--sh-xs);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}

.stat-num {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--c-text);
}

.stat-label {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 4px;
}

.stat-version {
  font-size: 11px;
  color: var(--c-text-3);
}

.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--c-surface-3);
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 16px;
}

.admin-tab {
  border: 0;
  background: transparent;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  transition: background 0.16s var(--ease), color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.admin-tab.active {
  background: #fff;
  color: var(--c-text);
  box-shadow: var(--sh-xs);
}

.admin-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.admin-list {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--c-line);
  transition: background 0.14s var(--ease);
}

.admin-row:last-child {
  border-bottom: 0;
}

.admin-row:hover {
  background: var(--c-surface-2);
}

.ar-info {
  min-width: 0;
}

.ar-name {
  font-size: 13.5px;
  font-weight: 650;
}

.ar-sub {
  font-size: 11.5px;
  color: var(--c-text-3);
  margin-top: 2px;
}

.admin-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  color: var(--c-text-3);
  font-size: 12px;
}

.admin-form {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-xs);
}

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

@media (max-width: 1100px) {
  .list { width: 288px; }
  .msg-main { max-width: 72%; }
}

@media (max-width: 900px) {
  .rail { width: 58px; padding: 10px 0; }
  .rail-btn { width: 42px; height: 42px; }
  .list { width: 100%; border-right: 0; }
  .main.mobile-detail .list { display: none; }
  .main:not(.mobile-detail) .view { display: none; }
  .chat-head { height: 60px; padding: 0 12px; }
  .msg-list { padding: 12px 14px 20px; }
  .msg-main { max-width: 78%; }
  .chat-foot { padding: 8px 12px 12px; }
  .auth-wrap { flex-direction: column; width: 440px; min-height: 0; }
  .auth-panel { width: 100%; padding: 28px 26px; }
  .auth-panel h1, .auth-name { font-size: 22px; margin-top: 16px; }
  .auth-features { flex-direction: row; flex-wrap: wrap; padding-top: 18px; gap: 10px; }
  .auth-card { padding: 26px; }
  .wallet, .admin-body, .pane { padding: 18px 16px 30px; }
  .wallet-actions { grid-template-columns: repeat(2, 1fr); }
  .moment-list { width: 100%; margin: 52px auto 40px; }
  .cover-inner { width: 92%; }
}

/* 图片消息：永远与头像保持安全距离，且不撑破气泡 */

.msg-row {
  gap: 14px;
}

.msg-row.self .msg-avatar,
.msg-row.other .msg-avatar {
  flex: 0 0 auto;
}

.msg-main {
  min-width: 0;
}

.msg-bubble-wrap {
  min-width: 0;
  max-width: 100%;
}

.msg-bubble {
  max-width: 100%;
}

.msg-bubble.bubble-image {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
  border-radius: 12px;
  line-height: 0;
}

.msg-bubble.bubble-image::before {
  display: none !important;
}

.msg-bubble.bubble-image img,
img.bubble-image {
  display: block;
  max-width: 260px !important;
  max-height: 300px !important;
  border-radius: 12px;
  object-fit: cover;
}

@media (max-width: 900px) {
  .msg-bubble.bubble-image img,
  img.bubble-image {
    max-width: 210px !important;
    max-height: 240px !important;
  }
}

/* ---------------- 细节打磨 ---------------- */

.empty-acts {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.empty-acts .btn {
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-sm);
}

.empty-acts .btn svg {
  width: 16px;
  height: 16px;
}

.li-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: none;
  background: linear-gradient(145deg, #94a3b8, #64748b);
}

.li-ico svg {
  width: 20px;
  height: 20px;
}

.chat-body {
  background-color: #eef1f6;
  background-image:
    radial-gradient(760px 420px at 88% 6%, rgba(7, 193, 96, 0.06), transparent 62%),
    radial-gradient(680px 380px at 6% 98%, rgba(56, 129, 255, 0.06), transparent 62%),
    radial-gradient(rgba(16, 24, 40, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
}

.list {
  width: 330px;
}

.admin-row .btn-danger,
.admin-row .btn-danger:hover {
  border: 1px solid rgba(240, 68, 56, 0.2);
  background: rgba(240, 68, 56, 0.07);
  color: #b42318;
  box-shadow: none;
}

.admin-row .btn-danger:hover {
  background: rgba(240, 68, 56, 0.13);
}

.admin-row .btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 9px;
}

.wallet {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wallet > * {
  width: 100%;
  max-width: 1000px;
}

.wallet-body {
  max-width: 1000px;
}

.balance-card {
  padding: 28px 30px;
  border-radius: 22px;
}

.balance-num .bn-value {
  font-size: 42px;
}

.wallet-actions .wa {
  padding: 18px 10px;
}

.stat-num {
  font-size: 28px;
}

.stat-card {
  padding: 18px 20px;
  border-radius: 18px;
}

.pane-title {
  font-size: 21px;
}

.list-title {
  font-size: 21px;
}

.msg-list {
  gap: 2px;
}

.msg-row {
  padding: 8px 0;
}

.msg-bubble {
  padding: 11px 15px;
  border-radius: 15px;
  font-size: 14.2px;
}

.msg-row.self .msg-bubble {
  background: linear-gradient(145deg, #a8f47c 0%, #8ce35c 100%);
}

.chat-head {
  height: 68px;
}

.composer-input {
  min-height: 46px;
  padding: 12px 15px;
  border-radius: 13px;
}

/* 侧栏「我」的二级菜单卡片化 */

.list .list-body .list-item {
  border-radius: 12px;
}

/* 个人资料 / 修改密码卡片布局 */

.me-card {
  align-items: flex-start;
  gap: 30px;
  padding: 28px;
}

.me-avatar {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.me-form {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.me-form .field {
  max-width: 460px;
}

.me-form .input,
.me-form .textarea,
.me-form select {
  width: 100%;
}

.me-form .btn {
  margin-top: 6px;
}

.results:empty,
.req-group:empty,
.moment-list:empty {
  display: none;
}

.btn {
  white-space: nowrap;
  flex: none;
}

.admin-bar .btn,
.search-bar .btn {
  min-width: 76px;
}

/* 通讯录搜索区更紧凑 */

.search-bar .input {
  height: 42px;
}

/* 选中态描边，避免纯色块显脏 */

.list-item.active {
  box-shadow: inset 0 0 0 1px rgba(7, 193, 96, 0.16);
}

/* 管理后台统计卡片的强调色 */

.stat-card:nth-child(1) .stat-num { color: #0f172a; }
.stat-card:nth-child(3) .stat-num { color: #0b7a43; }

/* 滚动条在浅色面板上更淡 */

.chat-body::-webkit-scrollbar-thumb,
.list-body::-webkit-scrollbar-thumb {
  background: rgba(16, 24, 40, 0.12);
  background-clip: content-box;
}

/* 顶部标题区的说明文字更轻 */

.pane-sub,
.chat-status {
  letter-spacing: 0.01em;
}

/* 头像上的在线点立体一点 */

.avatar-online {
  box-shadow: 0 0 0 2.5px #fff, 0 0 8px rgba(34, 197, 94, 0.6);
}

/* 群公告条 */

.chat-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: linear-gradient(90deg, rgba(7, 193, 96, 0.10), rgba(7, 193, 96, 0.03));
  border-bottom: 1px solid rgba(7, 193, 96, 0.16);
  color: #0b5b33;
  font-size: 12.5px;
}

.chat-notice svg {
  color: var(--green-dark);
  flex: none;
}

.cn-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cn-close {
  border: 0;
  background: transparent;
  color: #5b7a68;
  font-size: 17px;
  line-height: 1;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
}

.cn-close:hover {
  background: rgba(7, 193, 96, 0.12);
}

/* @ 提醒 */

.mention {
  color: #0b7a43;
  font-weight: 650;
}

.msg-row.self .mention {
  color: #0a5527;
}

.mention-pick {
  position: fixed;
  z-index: 95;
  min-width: 190px;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  box-shadow: var(--sh-md);
}

.mp-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.mp-row:hover {
  background: var(--c-surface-3);
}

.mp-name {
  font-size: 13px;
}

/* 会话列表草稿 */

.li-draft {
  display: flex;
  align-items: center;
  gap: 6px;
}

.draft-tag {
  color: #e5484d;
  font-weight: 650;
  font-size: 12px;
}

/* 会话内搜索 */

.chat-search {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-results {
  max-height: 46vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.search-row {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
}

.search-row:hover {
  background: var(--c-surface-2);
}

.search-empty {
  padding: 24px;
  text-align: center;
  color: var(--c-text-3);
  font-size: 13px;
}

.sr-info {
  min-width: 0;
  flex: 1;
}

.sr-name {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--c-text-2);
}

.sr-text {
  font-size: 13px;
  color: var(--c-text);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sr-time {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 4px;
}

/* 二维码 */

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 6px 0 4px;
}

.qr-box {
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--sh-sm), inset 0 0 0 1px var(--c-line);
}

.qr-box svg {
  display: block;
  border-radius: 8px;
}

.qr-name {
  font-size: 16px;
  font-weight: 700;
}

.qr-tip {
  font-size: 12px;
  color: var(--c-text-3);
  text-align: center;
  max-width: 290px;
  line-height: 1.6;
}

.qr-link {
  font-size: 10.5px;
  color: var(--c-text-3);
  word-break: break-all;
  text-align: center;
  max-width: 290px;
  opacity: 0.75;
}

.qr-error {
  padding: 40px 20px;
  color: var(--c-danger);
  font-size: 13px;
}

.me-card.qr-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin-top: 14px;
}

.qr-entry-main {
  flex: 1;
  min-width: 0;
}

.qr-entry-title {
  font-size: 14px;
  font-weight: 650;
}

.qr-entry-sub {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 2px;
}

.info-row .btn {
  margin-left: auto;
}

/* 扫码落地页 */

.main.join-mode .list {
  display: none;
}

.main.join-mode .view {
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(7, 193, 96, 0.08), transparent 62%),
    radial-gradient(760px 460px at 90% 100%, rgba(56, 129, 255, 0.08), transparent 62%),
    var(--c-bg);
}

.join-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.join-card {
  width: 348px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 22px;
  box-shadow: var(--sh-md);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.join-name {
  font-size: 19px;
  font-weight: 700;
  margin-top: 6px;
}

.join-sub {
  font-size: 12.5px;
  color: var(--c-text-3);
}

.join-notice {
  margin-top: 6px;
  padding: 10px 12px;
  width: 100%;
  border-radius: 10px;
  background: var(--c-surface-2);
  font-size: 12.5px;
  color: var(--c-text-2);
  line-height: 1.6;
}

.join-members {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 6px 0 4px;
}

.join-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--c-text-2);
  width: 52px;
}

.join-member span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.join-card .btn-block {
  margin-top: 12px;
  height: 44px;
}

.join-foot {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 6px;
}

.join-loading {
  padding: 30px 0;
  color: var(--c-text-3);
  font-size: 13px;
}

.join-error {
  padding: 20px 0;
  color: var(--c-danger);
  font-size: 13px;
  text-align: center;
}

/* 群禁言提示条 */

.chat-mute-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(247, 144, 9, 0.10);
  border-bottom: 1px solid rgba(247, 144, 9, 0.22);
  color: #8a5a00;
  font-size: 12.5px;
}

.chat-mute-bar svg {
  color: #b06f00;
  flex: none;
}

/* 朋友圈可见范围标签 */

.moment-vis {
  font-size: 11px;
  color: var(--c-text-3);
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--c-surface-3);
  margin-left: 6px;
}

/* 朋友圈可见好友选择 */

.vis-picker {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 12px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: var(--c-surface-2);
}

.vis-picker .pick-row {
  padding: 8px 10px;
}

/* ---------------- 多选 & 收藏 ---------------- */

.msg-row.selecting {
  cursor: pointer;
  border-radius: 12px;
}

.msg-row.selecting:hover {
  background: rgba(7, 193, 96, 0.06);
}

.msg-row.selecting .msg-bubble {
  pointer-events: none;
}

.msg-row.selected {
  background: rgba(7, 193, 96, 0.10);
}

.msg-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--c-line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  align-self: center;
  color: #fff;
  background: transparent;
}

.msg-row.selected .msg-check {
  background: var(--green);
  border-color: var(--green);
}

.select-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  max-width: 1080px;
  margin: 0 auto;
}

.sb-count {
  font-size: 13px;
  color: var(--c-text-2);
  margin-right: auto;
}

.fav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  cursor: pointer;
  transition: box-shadow 0.16s var(--ease);
}

.fav-row:hover {
  box-shadow: var(--sh-sm);
}

.fav-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.fav-info {
  min-width: 0;
  flex: 1;
}

.fav-title {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text);
}

.fav-sub {
  font-size: 11.5px;
  color: var(--c-text-3);
  margin-top: 3px;
}

/* ---------------- 深色模式 ---------------- */

html[data-theme="dark"] {
  color-scheme: dark;
  --c-bg: #0e1116;
  --c-surface: #161a21;
  --c-surface-2: #1b2029;
  --c-surface-3: #232935;
  --c-line: #272e3a;
  --c-line-strong: #364050;
  --c-text: #e7edf6;
  --c-text-2: #a6b2c2;
  --c-text-3: #7a8798;
  --green-soft: rgba(7, 193, 96, 0.16);
  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 10px 24px -14px rgba(0, 0, 0, 0.8);
  --sh-md: 0 2px 8px rgba(0, 0, 0, 0.55), 0 20px 44px -22px rgba(0, 0, 0, 0.85);
  --sh-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}

html[data-theme="dark"] body {
  background: var(--c-bg);
  color: var(--c-text);
}

html[data-theme="dark"] .main,
html[data-theme="dark"] .view {
  background: var(--c-bg);
}

html[data-theme="dark"] .list {
  background: var(--c-surface);
  border-right-color: var(--c-line);
}

html[data-theme="dark"] .search-box {
  background: var(--c-surface-3);
}

html[data-theme="dark"] .search-box:focus-within {
  background: #0f131a;
}

html[data-theme="dark"] .list-item:hover {
  background: var(--c-surface-2);
}

html[data-theme="dark"] .list-item.active {
  background: linear-gradient(90deg, rgba(7, 193, 96, 0.20) 0%, rgba(7, 193, 96, 0.05) 100%);
}

html[data-theme="dark"] .chat-head {
  background: rgba(22, 26, 33, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .chat-body {
  background-color: #0f1319;
  background-image:
    radial-gradient(760px 420px at 88% 6%, rgba(7, 193, 96, 0.07), transparent 62%),
    radial-gradient(680px 380px at 6% 98%, rgba(56, 129, 255, 0.07), transparent 62%),
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
}

html[data-theme="dark"] .msg-bubble {
  background: #1f242d;
  color: var(--c-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 24px -18px rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .msg-bubble::before {
  background: #1f242d;
}

html[data-theme="dark"] .msg-row.self .msg-bubble {
  background: linear-gradient(145deg, #2e8b52 0%, #256e41 100%);
  color: #eaf6ee;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 24px -18px rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .msg-row.self .msg-bubble::before {
  background: #256e41;
}

html[data-theme="dark"] .msg-quote {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: rgba(255, 255, 255, 0.25);
  color: var(--c-text-2);
}

html[data-theme="dark"] .msg-row.self .msg-quote {
  background: rgba(0, 0, 0, 0.18);
  border-left-color: rgba(0, 0, 0, 0.3);
  color: #dff2e4;
}

html[data-theme="dark"] .divider,
html[data-theme="dark"] .sys-msg {
  background: rgba(255, 255, 255, 0.06);
  color: var(--c-text-3);
}

html[data-theme="dark"] .chat-foot {
  background: rgba(22, 26, 33, 0.92);
  border-top-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .composer-input {
  background: var(--c-surface-3);
  color: var(--c-text);
}

html[data-theme="dark"] .composer-input:focus {
  background: #0f131a;
}

html[data-theme="dark"] .composer-input::placeholder {
  color: var(--c-text-3);
}

html[data-theme="dark"] .chat-notice {
  background: linear-gradient(90deg, rgba(7, 193, 96, 0.18), rgba(7, 193, 96, 0.05));
  border-bottom-color: rgba(7, 193, 96, 0.25);
  color: #8fe8b3;
}

html[data-theme="dark"] .chat-mute-bar {
  background: rgba(247, 144, 9, 0.14);
  border-bottom-color: rgba(247, 144, 9, 0.25);
  color: #f5c26b;
}

html[data-theme="dark"] .modal {
  background: var(--c-surface);
  color: var(--c-text);
}

html[data-theme="dark"] .modal-mask {
  background: rgba(4, 7, 12, 0.72);
}

html[data-theme="dark"] .modal-title {
  color: var(--c-text);
}

html[data-theme="dark"] .modal-body {
  color: var(--c-text-2);
}

html[data-theme="dark"] .input,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] select.input {
  background: #10141a;
  border-color: var(--c-line-strong);
  color: var(--c-text);
}

html[data-theme="dark"] .input:focus,
html[data-theme="dark"] .textarea:focus {
  background: #0c1016;
}

html[data-theme="dark"] .btn {
  background: var(--c-surface-2);
  border-color: var(--c-line-strong);
  color: var(--c-text);
}

html[data-theme="dark"] .btn:hover {
  background: var(--c-surface-3);
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-primary:hover {
  border-color: transparent;
  background: linear-gradient(150deg, #13cf74, #05a850);
  color: #fff;
}

html[data-theme="dark"] .btn-primary:hover {
  background: linear-gradient(150deg, #17d87c, #06b256);
}

html[data-theme="dark"] .btn-danger {
  border-color: transparent;
  background: linear-gradient(150deg, #fb7185, #e11d48);
  color: #fff;
}

html[data-theme="dark"] .send-btn {
  background: linear-gradient(150deg, #13cf74, #05a850);
  color: #fff;
}

html[data-theme="dark"] .pick-row:hover,
html[data-theme="dark"] .search-row:hover {
  background: var(--c-surface-2);
}

html[data-theme="dark"] .ctx-menu {
  background: var(--c-surface);
  border-color: var(--c-line);
}

html[data-theme="dark"] .ctx-item:hover {
  background: var(--c-surface-3);
}

html[data-theme="dark"] .toast {
  background: rgba(45, 52, 64, 0.96);
}

html[data-theme="dark"] .auth {
  background:
    radial-gradient(900px 620px at 12% 14%, rgba(7, 193, 96, 0.16), transparent 62%),
    radial-gradient(820px 560px at 88% 86%, rgba(56, 129, 255, 0.16), transparent 62%),
    #0b0e13;
}

html[data-theme="dark"] .auth-wrap {
  background: rgba(22, 26, 33, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .auth-card {
  background: var(--c-surface);
}

html[data-theme="dark"] .auth-panel {
  background:
    radial-gradient(520px 380px at 20% 0%, rgba(255, 255, 255, 0.10), transparent 65%),
    linear-gradient(155deg, #0f3b2a 0%, #0d3a46 45%, #10243f 100%);
}

html[data-theme="dark"] .auth-panel h1,
html[data-theme="dark"] .auth-name {
  color: #eafff3;
}

html[data-theme="dark"] .auth-sub {
  color: rgba(214, 245, 228, 0.78);
}

html[data-theme="dark"] .af-title {
  color: #d9f7e6;
}

html[data-theme="dark"] .af-sub {
  color: rgba(200, 235, 218, 0.7);
}

html[data-theme="dark"] .auth-feature .af-ico {
  background: rgba(255, 255, 255, 0.10);
  color: #9ef0c2;
}

html[data-theme="dark"] .auth-tabs {
  background: var(--c-surface-3);
}

html[data-theme="dark"] .tab.active {
  background: var(--c-surface-2);
  color: var(--c-text);
}

html[data-theme="dark"] .auth-form .input {
  background: #10141a;
}

html[data-theme="dark"] .auth-form .input:focus {
  background: #0c1016;
}

html[data-theme="dark"] .auth-foot {
  border-top-color: var(--c-line);
}

html[data-theme="dark"] .pane,
html[data-theme="dark"] .wallet,
html[data-theme="dark"] .admin-body,
html[data-theme="dark"] .moments {
  background: var(--c-bg);
}

html[data-theme="dark"] .results,
html[data-theme="dark"] .req-group,
html[data-theme="dark"] .profile,
html[data-theme="dark"] .me-card,
html[data-theme="dark"] .member-cell,
html[data-theme="dark"] .ann-row,
html[data-theme="dark"] .call-history,
html[data-theme="dark"] .moment-card,
html[data-theme="dark"] .wallet-list,
html[data-theme="dark"] .wa,
html[data-theme="dark"] .vip-level,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .admin-list,
html[data-theme="dark"] .admin-form,
html[data-theme="dark"] .join-card,
html[data-theme="dark"] .fav-row {
  background: var(--c-surface);
  border-color: var(--c-line);
  color: var(--c-text);
}

html[data-theme="dark"] .me-card {
  background: linear-gradient(135deg, #171c24 0%, #121821 100%);
}

html[data-theme="dark"] .user-result,
html[data-theme="dark"] .req-row,
html[data-theme="dark"] .info-row,
html[data-theme="dark"] .bill-row,
html[data-theme="dark"] .admin-row,
html[data-theme="dark"] .call-row {
  border-bottom-color: var(--c-line);
  background: transparent;
}

html[data-theme="dark"] .admin-row:hover,
html[data-theme="dark"] .user-result:hover {
  background: var(--c-surface-2);
}

html[data-theme="dark"] .info-label,
html[data-theme="dark"] .bill-sub,
html[data-theme="dark"] .ur-sub,
html[data-theme="dark"] .ar-sub,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .moment-time,
html[data-theme="dark"] .moment-vis {
  color: var(--c-text-3);
}

html[data-theme="dark"] .moment-likes,
html[data-theme="dark"] .moment-cmts {
  background: var(--c-surface-2);
  color: var(--c-text-2);
}

html[data-theme="dark"] .moment-imgs .moment-img {
  background: var(--c-surface-3);
}

html[data-theme="dark"] .admin-tabs,
html[data-theme="dark"] .wallet-tabs {
  background: transparent;
}

html[data-theme="dark"] .admin-tabs {
  background: var(--c-surface-3);
}

html[data-theme="dark"] .admin-tab.active {
  background: var(--c-surface-2);
  color: var(--c-text);
}

html[data-theme="dark"] .wallet-tabs {
  border-bottom-color: var(--c-line);
}

html[data-theme="dark"] .pending-amount,
html[data-theme="dark"] .quick-amounts .btn {
  color: var(--c-text);
}

html[data-theme="dark"] .qr-entry-sub,
html[data-theme="dark"] .qr-link,
html[data-theme="dark"] .qr-tip {
  color: var(--c-text-3);
}

html[data-theme="dark"] .qr-box {
  background: #fff;
}

html[data-theme="dark"] .empty-icon {
  background: linear-gradient(150deg, #1b212b, #141922);
  box-shadow: none;
  color: #4d5a6b;
}

html[data-theme="dark"] .profile-banner {
  filter: brightness(0.92);
}

html[data-theme="dark"] .join-page {
  background: var(--c-bg);
}

html[data-theme="dark"] .join-notice {
  background: var(--c-surface-2);
  color: var(--c-text-2);
}

html[data-theme="dark"] .toast-success {
  background: linear-gradient(150deg, #1f9d63, #0a7a46);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

