/* IMCHAT 前端样式 —— 微信桌面版三栏布局，无任何外部资源 */

/* ---------------- 基础 ---------------- */

:root {
  --green: #07c160;
  --green-dark: #06ad56;
  --bubble-self: #95ec69;
  --bg-chat: #ededed;
  --bg-list: #f7f7f7;
  --rail: #2e2e2e;
  --rail-hover: #3a3a3a;
  --line: #e4e4e4;
  --text: #191919;
  --text-2: #666;
  --text-3: #999;
  --danger: #e64340;
  --vip: #d4a017;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #f2f2f2;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--green);
  text-decoration: none;
}

.hide {
  display: none !important;
}

.hidden-input {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------------- 应用骨架 ---------------- */

.app {
  height: 100%;
  width: 100%;
}

.boot {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #fff;
}

.boot-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--green);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
}

.boot-text {
  color: var(--text-3);
  font-size: 13px;
}

.noscript {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--text-2);
  z-index: 9999;
}

.main {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.rail {
  width: 64px;
  flex: 0 0 64px;
  background: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0 12px;
  gap: 14px;
  user-select: none;
}

.list {
  width: 300px;
  flex: 0 0 300px;
  background: var(--bg-list);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.view {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: var(--bg-chat);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------------- 左侧导航 ---------------- */

.rail-top {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.rail-avatar {
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
}

.rail-avatar img {
  border-radius: 50%;
}

.rail-vip {
  position: absolute;
  right: 6px;
  bottom: -2px;
  background: var(--vip);
  color: #fff;
  font-size: 9px;
  padding: 0 3px;
  border-radius: 6px;
  line-height: 13px;
}

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

.rail-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9a9a9a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.rail-btn:hover {
  background: var(--rail-hover);
  color: #cfcfcf;
}

.rail-btn.active {
  color: var(--green);
}

.rail-btn.small {
  width: 38px;
  height: 38px;
  color: #8a8a8a;
}

.rail-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #fa5151;
  color: #fff;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
  font-weight: 500;
}

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

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7a7a7a;
  transition: background 0.2s;
}

.conn-dot.on {
  background: var(--green);
}

/* ---------------- 列表通用 ---------------- */

.list-head {
  padding: 14px 12px 8px;
  flex: 0 0 auto;
}

.list-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.list-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.list-actions {
  display: flex;
  gap: 4px;
}

.search-box {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ededed;
  border-radius: 15px;
  padding: 5px 10px;
  color: var(--text-3);
}

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

.search-input::-webkit-search-cancel-button {
  display: none;
}

.list-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 8px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.list-item:hover {
  background: #eaeaea;
}

.list-item.active {
  background: #dedede;
}

.list-item.danger .li-name {
  color: var(--danger);
}

.list-item .avatar {
  flex: 0 0 auto;
}

.li-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

.li-name {
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.li-time {
  font-size: 11px;
  color: var(--text-3);
  flex: 0 0 auto;
}

.li-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}

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

.li-badge {
  flex: 0 0 auto;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #fa5151;
  color: #fff;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
}

.li-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fa5151;
}

.li-flag {
  color: var(--text-3);
  display: flex;
  align-items: center;
}

.li-ico {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.li-ico-new {
  background: #fa9d3b;
}

.li-star {
  color: var(--vip);
  display: inline-flex;
}

.li-arrow {
  color: #bbb;
  display: flex;
  align-items: center;
}

.list-section-title {
  padding: 12px 12px 4px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.5px;
}

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

/* 虚拟滚动容器 */

.vlist {
  position: relative;
  overflow-y: auto;
  min-height: 0;
}

.vlist-inner {
  position: relative;
  width: 100%;
}

.vlist-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  will-change: transform;
}

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

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  background: #d5d5d5;
  color: #fff;
  position: relative;
  flex: 0 0 auto;
  user-select: none;
}

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

.avatar-fallback {
  background: #8a9aa8;
  font-weight: 500;
}

.avatar-group {
  background: linear-gradient(140deg, #6c7a89, #47525e);
  color: #fff;
}

.avatar-online {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  border: 1px solid #fff;
}

/* ---------------- 聊天面板 ---------------- */

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

.chat-head {
  flex: 0 0 auto;
  height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f5f5;
  border-bottom: 1px solid var(--line);
}

.chat-head .chat-back {
  display: none;
}

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

.chat-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-name {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-status {
  font-size: 11px;
  color: var(--text-3);
}

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

.chat-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #222;
}

.chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 24px 14px;
  background: var(--bg-chat);
}

.msg-list {
  max-width: 980px;
  margin: 0 auto;
  padding-bottom: 8px;
}

.msg-more {
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  padding: 10px 0;
}

.divider {
  text-align: center;
  font-size: 11px;
  color: #9c9c9c;
  margin: 14px 0 10px;
}

.sys-msg {
  text-align: center;
  font-size: 12px;
  color: #9c9c9c;
  margin: 8px auto;
  max-width: 80%;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  padding: 3px 10px;
  display: table;
}

.msg-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  position: relative;
}

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

.msg-row.flash .msg-bubble {
  animation: flash 1.4s ease;
}

@keyframes flash {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(7, 193, 96, 0);
  }
  20%,
  60% {
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.45);
  }
}

.msg-avatar {
  cursor: pointer;
}

.msg-main {
  display: flex;
  flex-direction: column;
  max-width: min(72%, 720px);
  min-width: 0;
}

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

.msg-name {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 4px;
  padding-left: 2px;
}

.msg-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
}

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

.msg-bubble {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.msg-row.self .msg-bubble {
  background: var(--bubble-self);
  color: #111;
}

.msg-bubble::before {
  content: "";
  position: absolute;
  top: 12px;
  left: -5px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 6px solid #fff;
}

.msg-row.self .msg-bubble::before {
  left: auto;
  right: -5px;
  border-right: 0;
  border-left: 6px solid var(--bubble-self);
}

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

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

.bubble-tip {
  color: var(--text-3);
}

.msg-edited {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 3px;
  padding: 0 2px;
}

.msg-read {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 3px;
  padding: 0 2px;
  text-align: right;
}

.msg-quote {
  background: rgba(0, 0, 0, 0.05);
  border-left: 2px solid #b9b9b9;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-2);
  max-width: 100%;
  cursor: pointer;
}

.msg-row.self .msg-quote {
  background: rgba(0, 0, 0, 0.06);
}

.mq-name {
  color: var(--text-2);
  font-size: 11px;
  margin-bottom: 1px;
}

.mq-text {
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 图片 */

.bubble-image {
  display: block;
  max-width: 260px;
  max-height: 280px;
  border-radius: 4px;
  cursor: zoom-in;
  object-fit: cover;
}

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

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

/* 语音 */

.bubble-voice {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  min-height: 24px;
}

.vb-icon {
  display: flex;
  color: #333;
}

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

.vb-wave i {
  width: 2px;
  height: 5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 1px;
}

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

.bubble-voice.playing .vb-wave i:nth-child(1) {
  height: 8px;
  animation-delay: 0s;
}

.bubble-voice.playing .vb-wave i:nth-child(2) {
  height: 14px;
  animation-delay: 0.12s;
}

.bubble-voice.playing .vb-wave i:nth-child(3) {
  height: 10px;
  animation-delay: 0.24s;
}

.bubble-voice.playing .vb-wave i:nth-child(4) {
  height: 15px;
  animation-delay: 0.36s;
}

.bubble-voice.playing .vb-wave i:nth-child(5) {
  height: 7px;
  animation-delay: 0.48s;
}

@keyframes wave {
  from {
    transform: scaleY(0.5);
    opacity: 0.5;
  }
  to {
    transform: scaleY(1.15);
    opacity: 1;
  }
}

.vb-len {
  font-size: 12px;
  color: #555;
  flex: 0 0 auto;
}

/* 视频 */

.bubble-video {
  display: block;
  max-width: 320px;
  max-height: 240px;
  border-radius: 4px;
  background: #000;
}

/* 文件 */

.bubble-file {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 190px;
}

.bf-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #eef4ff;
  color: #4a80d0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.bf-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

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

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

/* 位置 */

.bubble-loc {
  width: 240px;
  cursor: pointer;
}

.bl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 13px;
  color: #333;
}

.bl-poi {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bl-addr {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bl-map {
  margin-top: 6px;
  height: 74px;
  border-radius: 4px;
  background: linear-gradient(135deg, #dfe9dd, #c8d8c2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6e8a68;
}

/* 名片 */

.bubble-card {
  width: 210px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  padding-bottom: 10px;
}

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

.bc-name {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.bc-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

/* 链接 */

.bubble-link {
  width: 250px;
  cursor: pointer;
}

.blink-title {
  font-size: 14px;
  font-weight: 500;
}

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

.blink-url {
  font-size: 11px;
  color: #576b95;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 红包 */

.bubble-rp {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 200px;
  color: #fff;
}

.msg-bubble.redpacket-hint {
  background: #fa9d3b;
}

.rp-icon {
  color: #f4c07a;
  display: flex;
}

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

.rp-greet {
  font-size: 13px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-tip {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 3px;
}

.msg-bubble.bubble-redpacket,
.msg-bubble.bubble-redpacket.mine {
  background: #fa9d3b;
}

.msg-bubble.bubble-redpacket::before,
.msg-bubble.bubble-redpacket.mine::before {
  border-right-color: #fa9d3b;
  border-left-color: #fa9d3b;
}

/* 结构型气泡的内边距微调 */

.msg-bubble.bubble-video {
  padding: 4px;
  background: #000;
}

.msg-bubble.bubble-video::before {
  border-right-color: #000;
}

.msg-row.self .msg-bubble.bubble-video::before {
  border-left-color: #000;
}

.msg-bubble.bubble-voice,
.msg-bubble.bubble-file,
.msg-bubble.bubble-loc,
.msg-bubble.bubble-card,
.msg-bubble.bubble-link {
  padding: 10px 12px;
}

/* ---------------- 输入区 ---------------- */

.chat-foot {
  flex: 0 0 auto;
  background: #f5f5f5;
  border-top: 1px solid var(--line);
  position: relative;
}

.composer-reply {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 16px;
  background: #f0f0f0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.cr-name {
  color: var(--green);
  font-size: 11px;
}

.cr-body {
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70vw;
}

.composer {
  padding: 8px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #555;
}

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

.mic-btn {
  color: #555;
}

.composer-input {
  width: 100%;
  min-height: 42px;
  max-height: 120px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.55;
  padding: 4px 2px;
  color: var(--text);
}

.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.composer-hint {
  font-size: 11px;
  color: #b0b0b0;
}

.send-btn {
  min-width: 78px;
}

/* 录音条 */

.rec-bar {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -8px);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  border-radius: 18px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  z-index: 8;
  white-space: nowrap;
}

.rb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

.rb-time {
  color: #ffd666;
}

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

.empty {
  margin: auto;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  text-align: center;
}

.empty-icon {
  color: #cfcfcf;
  display: flex;
}

.empty-text {
  font-size: 14px;
  color: #8a8a8a;
}

.empty-sub {
  font-size: 12px;
  color: #b0b0b0;
}

/* ---------------- 按钮 / 表单 ---------------- */

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 5px;
  padding: 7px 16px;
  font-size: 13px;
  line-height: 1.4;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:hover {
  background: #f4f4f4;
}

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

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

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-danger {
  background: #fff;
  border-color: #f0c3c1;
  color: var(--danger);
}

.btn-danger:hover {
  background: #fdf3f3;
}

.btn-block {
  width: 100%;
  display: block;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
}

.input {
  width: 100%;
  border: 1px solid #dcdcdc;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s;
}

.input:focus {
  border-color: var(--green);
}

.textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}

select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.field-label {
  font-size: 12px;
  color: var(--text-2);
}

.hint {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
}

.static-value {
  font-size: 13px;
  color: var(--text-2);
  padding: 8px 0;
}

.tag {
  display: inline-block;
  font-size: 10px;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 8px;
  background: #ebeef5;
  color: #7d8794;
  white-space: nowrap;
}

.tag-ok {
  background: #e7f8ee;
  color: #0e9d55;
}

.tag-bad {
  background: #fdecec;
  color: #d93026;
}

.vip-tag {
  font-size: 10px;
  line-height: 15px;
  padding: 0 5px;
  border-radius: 7px;
  background: linear-gradient(90deg, #f6d365, #e2b13c);
  color: #6b4a00;
  font-weight: 600;
}

/* ---------------- Toast ---------------- */

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

.toast {
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 520px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  animation: toast-in 0.18s ease-out;
  word-break: break-word;
}

.toast-success {
  background: rgba(7, 140, 76, 0.94);
}

.toast-error {
  background: rgba(196, 48, 43, 0.94);
}

.toast-out {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s, transform 0.35s;
}

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

/* ---------------- 弹窗 ---------------- */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.14s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: #fff;
  border-radius: 8px;
  width: 460px;
  max-width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  animation: modal-in 0.16s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-sm {
  width: 360px;
}

.modal-lg {
  width: 620px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  flex: 0 0 auto;
}

.modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.modal-close {
  color: #999;
}

.modal-body {
  padding: 4px 16px 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-text {
  margin: 6px 0 10px;
  color: var(--text-2);
  line-height: 1.6;
  font-size: 13px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px 16px;
  flex: 0 0 auto;
}

.modal-form {
  display: flex;
  flex-direction: column;
}

body.modal-open {
  overflow: hidden;
}

/* 选择列表 */

.pick-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pick-scroll {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
}

.pick-row:hover {
  background: #f5f5f5;
}

.pick-row.active {
  background: #e8f7ef;
}

.pick-row input[type="checkbox"] {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
}

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

.pick-sub {
  font-size: 11px;
  color: var(--text-3);
}

/* 右键菜单 */

.ctx-menu {
  position: fixed;
  z-index: 3500;
  min-width: 148px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
  padding: 4px;
  display: flex;
  flex-direction: column;
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 13px;
  text-align: left;
  color: var(--text);
  white-space: nowrap;
}

.ctx-item:hover {
  background: #f2f2f2;
}

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

.ctx-item.danger:hover {
  background: #fdf0f0;
}

.ctx-item[disabled] {
  opacity: 0.45;
  cursor: default;
}

.ctx-item svg {
  color: #888;
  flex: 0 0 auto;
}

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

.ctx-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 6px;
}

/* 表情面板 */

.emoji-panel {
  position: fixed;
  z-index: 3400;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  padding: 8px;
  width: 292px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
}

.emoji-item {
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  padding: 5px 0;
  border-radius: 4px;
}

.emoji-item:hover {
  background: #f0f0f0;
}

/* 图片预览 */

.img-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  z-index: 3600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 30px;
}

.img-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.img-full {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
}

.img-cap {
  color: #ccc;
  font-size: 12px;
}

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

.auth {
  min-height: 100vh;
  background: linear-gradient(160deg, #f4f7f5 0%, #e8f0eb 55%, #dfe9e3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.auth-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 380px;
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 30px 30px 22px;
  box-shadow: 0 12px 40px rgba(20, 50, 35, 0.12);
}

.auth-brand {
  text-align: center;
  margin-bottom: 18px;
}

.auth-logo {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: var(--green);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  letter-spacing: 1px;
}

.auth-name {
  font-size: 18px;
  font-weight: 600;
}

.auth-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: #f2f4f3;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 18px;
}

.tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 7px 0;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.tab.active {
  background: #fff;
  color: var(--green);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

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

.auth-form .input {
  padding: 10px 12px;
}

.auth-form .btn-block {
  margin-top: 8px;
  padding: 10px 0;
  font-size: 14px;
}

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

.auth-foot {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 11px;
  color: #b6b6b6;
  text-align: center;
}

/* ---------------- 通讯录内容区 ---------------- */

.pane {
  padding: 22px 26px 40px;
  overflow-y: auto;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.pane-head {
  margin-bottom: 16px;
  flex: 0 0 auto;
}

.pane-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.pane-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}

.search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  max-width: 520px;
}

.search-grow {
  flex: 1;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 620px;
}

.user-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.user-result:hover {
  background: #f7f7f7;
}

.ur-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ur-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ur-sub {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ur-time {
  font-size: 11px;
  color: #bbb;
}

.req-group {
  margin-bottom: 18px;
  max-width: 640px;
}

.req-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 8px;
  border-bottom: 1px solid #f3f3f3;
}

.req-acts {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

/* 资料页 */

.profile {
  max-width: 680px;
  width: 100%;
}

.profile-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 4px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.profile-name {
  font-size: 19px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-line {
  font-size: 12px;
  color: var(--text-3);
}

.profile-sign {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}

.profile-acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 4px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid #f3f3f3;
}

.info-label {
  font-size: 13px;
  color: var(--text-3);
  flex: 0 0 70px;
}

.info-value {
  flex: 1 1 auto;
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

.members {
  padding-top: 14px;
}

.members-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

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

.member-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 2px;
  border-radius: 6px;
}

.member-cell:hover {
  background: #f7f7f7;
}

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

.group-panel {
  padding: 4px 0;
}

/* 资料卡弹窗 */

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 12px;
}

.pc-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pc-name {
  font-size: 17px;
  font-weight: 600;
}

.pc-line {
  font-size: 12px;
  color: var(--text-3);
}

.pc-sign {
  font-size: 12px;
  color: var(--text-2);
}

/* “我”页 */

.me-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
  max-width: 620px;
}

.me-avatar {
  position: relative;
  width: 84px;
  height: 84px;
  cursor: pointer;
  margin-bottom: 16px;
}

.me-avatar-mask {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.me-avatar:hover .me-avatar-mask {
  opacity: 1;
}

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

.me-actions {
  margin-top: 6px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.me-side-head {
  padding: 18px 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.msh-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msh-name {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msh-sub {
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.moment-cover {
  height: 190px;
  background: linear-gradient(150deg, #3f5c4a, #6b8f74 45%, #a8c0ac);
  display: flex;
  align-items: flex-end;
  padding: 0 32px 18px;
  position: relative;
}

.cover-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  color: #fff;
}

.cover-inner .avatar {
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

.cover-meta {
  flex: 1 1 auto;
  min-width: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.cover-name {
  font-size: 18px;
  font-weight: 600;
}

.cover-sign {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 3px;
}

.cover-inner .btn-primary {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
}

.cover-inner .btn-primary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.moment-list {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 20px 60px;
}

.moment-card {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #f3f3f3;
}

.moment-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.moment-name {
  font-size: 14px;
  font-weight: 600;
  color: #576b95;
}

.moment-text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.moment-imgs {
  display: grid;
  gap: 4px;
  max-width: 360px;
}

.moment-imgs.n1 {
  grid-template-columns: 1fr;
  max-width: 220px;
}

.moment-imgs.n1 .moment-img {
  aspect-ratio: auto;
  max-height: 280px;
}

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

.moment-imgs.n3,
.moment-imgs.n4,
.moment-imgs.n5,
.moment-imgs.n6,
.moment-imgs.n7,
.moment-imgs.n8,
.moment-imgs.n9 {
  grid-template-columns: repeat(3, 1fr);
}

.moment-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 3px;
  cursor: zoom-in;
  background: #f0f0f0;
  display: block;
}

.moment-imgs.n2 .moment-img,
.moment-imgs.n4 .moment-img {
  aspect-ratio: 1 / 1;
}

.moment-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.moment-time {
  font-size: 11px;
  color: #b2b2b2;
}

.moment-acts {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-btn {
  border: 0;
  background: transparent;
  color: #576b95;
  font-size: 12px;
  padding: 2px 0;
}

.link-btn:hover {
  text-decoration: underline;
}

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

.link-btn.danger {
  color: #b26a6a;
}

.moment-likes {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f7f7f7;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
  color: #576b95;
}

.moment-likes svg {
  color: var(--danger);
  flex: 0 0 auto;
}

.moment-cmts {
  background: #f7f7f7;
  border-radius: 4px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.moment-cmt {
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.mc-name {
  color: #576b95;
}

.mc-text {
  color: var(--text);
}

.moment-input {
  display: flex;
  gap: 6px;
  align-items: center;
}

.moment-input .input {
  padding: 5px 8px;
  font-size: 12px;
}

/* 发布 */

.publish-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  background: #f4f4f4;
}

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

.thumb img.broken {
  opacity: 0.2;
}

.thumb-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 16px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-add {
  border: 1px dashed #ccc;
  background: #fafafa;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* 公告 */

.ann-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 680px;
}

.ann-row {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fafcfb;
}

.ann-icon {
  color: var(--green);
  display: flex;
  flex: 0 0 auto;
  padding-top: 2px;
}

.ann-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ann-text {
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.ann-time {
  font-size: 11px;
  color: var(--text-3);
}

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

.wallet {
  display: flex;
  flex-direction: column;
}

.wallet-body {
  max-width: 760px;
  width: 100%;
}

.balance-card {
  background: linear-gradient(135deg, #07c160, #0aa356);
  border-radius: 12px;
  padding: 22px 24px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 22px rgba(7, 193, 96, 0.25);
}

.balance-label {
  font-size: 12px;
  opacity: 0.9;
}

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

.bn-unit {
  font-size: 16px;
}

.bn-value {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.bc-vip {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.vip-badge {
  background: linear-gradient(90deg, #f7e0a3, #e2b13c);
  color: #6b4a00;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
  padding: 3px 10px;
}

.vip-exp {
  font-size: 11px;
  opacity: 0.9;
}

.vip-none {
  font-size: 12px;
  opacity: 0.9;
}

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

.wa {
  border: 1px solid #f0f0f0;
  background: #fbfbfb;
  border-radius: 10px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #444;
  transition: background 0.15s, transform 0.15s;
}

.wa:hover {
  background: #f2f8f4;
  transform: translateY(-1px);
}

.wa-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9f7ef;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-text {
  font-size: 12px;
}

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

.wallet-tab {
  border: 0;
  background: transparent;
  padding: 8px 2px 10px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.wallet-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 500;
}

.wallet-list {
  display: flex;
  flex-direction: column;
}

.bill-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid #f4f4f4;
}

.bill-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bill-title {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-sub {
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-amt {
  font-size: 15px;
  font-weight: 600;
  flex: 0 0 auto;
}

.bill-amt.in {
  color: var(--green);
}

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

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

.transfer-list {
  max-height: 220px;
}

/* 红包 */

.packet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px 0 10px;
}

.packet-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.packet-meta {
  min-width: 0;
}

.packet-from {
  font-size: 14px;
  font-weight: 500;
}

.packet-greet {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

.packet-amount {
  background: linear-gradient(135deg, #fff5e6, #ffe9cc);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pa-num {
  font-size: 30px;
  font-weight: 600;
  color: #d4700e;
}

.pa-tip {
  font-size: 12px;
  color: #b07c3e;
}

.packet-open {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 40% 35%, #ffcf6b, #e8a13a);
  color: #7a4400;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(212, 112, 14, 0.35);
  transition: transform 0.15s;
}

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

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

.packet-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
}

.packet-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px solid #f6f6f6;
  font-size: 12px;
}

.pr-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pr-amt {
  color: #d4700e;
  flex: 0 0 auto;
}

/* VIP */

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

.vip-level {
  border: 1px solid #eee;
  background: #fcfcfc;
  border-radius: 8px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.vip-level.active {
  border-color: #e2b13c;
  background: #fffbf0;
  box-shadow: 0 0 0 1px #e2b13c inset;
}

.vl-name {
  font-size: 13px;
  font-weight: 500;
}

.vl-price {
  font-size: 11px;
  color: #b8860b;
}

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

.admin-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: #f8fbf9;
  border: 1px solid #edf3ef;
  border-radius: 9px;
  padding: 12px 14px;
}

.stat-num {
  font-size: 21px;
  font-weight: 600;
  color: #0e7a44;
}

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

.stat-version {
  align-self: center;
  font-size: 11px;
  color: #bbb;
}

.admin-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  border: 0;
  background: transparent;
  padding: 8px 2px 10px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.admin-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 500;
}

.admin-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 560px;
  margin: 4px 0 6px;
}

.admin-list {
  display: flex;
  flex-direction: column;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid #f4f4f4;
}

.ar-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ar-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  flex-wrap: wrap;
}

.ar-sub {
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ar-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  word-break: break-word;
}

.ar-acts {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

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

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
  margin: 6px 0 10px;
}

/* ---------------- 通话 ---------------- */

.call-layer {
  position: fixed;
  inset: 0;
  z-index: 3800;
  background: rgba(12, 16, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.call-layer.show {
  opacity: 1;
}

.call-box {
  width: min(920px, 94vw);
  height: min(660px, 88vh);
  border-radius: 14px;
  background: #1d2420;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 18px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.call-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  flex: 0 0 auto;
  z-index: 2;
}

.call-kind-icon {
  color: #8ce0b4;
  display: flex;
  margin-bottom: 2px;
}

.call-name {
  font-size: 17px;
  font-weight: 600;
}

.call-tip {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.call-timer {
  font-size: 13px;
  color: #8ce0b4;
  font-variant-numeric: tabular-nums;
}

.call-videos {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  margin: 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  overflow: hidden;
}

.call-videos.audio-mode {
  flex-direction: column;
}

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

.call-audio-avatar .avatar {
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06);
}

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

.call-tile {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #0e1310;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.call-tile-name {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 1px 6px;
}

.call-local {
  position: absolute;
  right: 22px;
  bottom: 96px;
  width: 168px;
  height: 118px;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0f0d;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  z-index: 3;
  cursor: grab;
  touch-action: none;
}

.call-local-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(-1);
}

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

.call-local-tip {
  position: absolute;
  left: 6px;
  bottom: 4px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  padding: 0 5px;
}

.call-ctrl {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
  z-index: 2;
}

.ctrl-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.ctrl-btn.off {
  background: rgba(255, 255, 255, 0.85);
  color: #222;
}

.ctrl-btn.danger {
  background: #e64340;
}

.ctrl-btn.danger:hover {
  background: #f25652;
}

/* 来电 */

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

.incoming-name {
  font-size: 16px;
  font-weight: 600;
}

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

.incoming-kind {
  color: var(--green);
}

/* 通话记录 */

.call-history {
  display: flex;
  flex-direction: column;
  max-width: 720px;
}

.call-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid #f4f4f4;
}

.cr-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cr-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-name {
  font-size: 14px;
}

.cr-dir {
  font-size: 10px;
  color: var(--text-3);
  border: 1px solid #e6e6e6;
  border-radius: 3px;
  padding: 0 3px;
}

.cr-sub {
  font-size: 11px;
  color: var(--text-3);
}

.cr-time {
  font-size: 11px;
  color: #b5b5b5;
  flex: 0 0 auto;
}

/* 位置详情 */

.loc-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0;
}

.loc-poi {
  font-size: 15px;
  font-weight: 600;
}

.loc-addr {
  font-size: 12px;
  color: var(--text-3);
}

.loc-geo {
  font-size: 11px;
  color: #bbb;
  font-variant-numeric: tabular-nums;
}

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

@media (max-width: 1100px) {
  .list {
    width: 268px;
    flex-basis: 268px;
  }
}

@media (max-width: 900px) {
  .main {
    position: relative;
  }

  .rail {
    width: 54px;
    flex-basis: 54px;
    padding: 12px 0 8px;
    gap: 10px;
  }

  .rail-btn {
    width: 42px;
    height: 42px;
  }

  .list {
    width: 100%;
    flex: 1 1 auto;
    border-right: 0;
  }

  .view {
    display: none;
  }

  .main.mobile-detail .list {
    display: none;
  }

  .main.mobile-detail .view {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
  }

  .chat-back {
    display: inline-flex;
  }

  .chat-head .chat-back {
    display: inline-flex;
  }

  .chat-head {
    padding: 0 10px;
    height: 52px;
  }

  .chat-body {
    padding: 6px 10px 12px;
  }

  .msg-main {
    max-width: 78%;
  }

  .composer {
    padding: 6px 10px 8px;
  }

  .composer-hint {
    display: none;
  }

  .send-btn {
    min-width: 64px;
    padding: 7px 14px;
  }

  .pane {
    padding: 16px 14px 30px;
  }

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

  .balance-card {
    padding: 16px;
  }

  .bn-value {
    font-size: 26px;
  }

  .moment-cover {
    height: 150px;
    padding: 0 16px 14px;
  }

  .moment-list {
    padding: 12px 14px 50px;
  }

  .wallet-actions {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .wa {
    padding: 10px 2px;
  }

  .wa-icon {
    width: 34px;
    height: 34px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal {
    width: 100%;
    max-height: 88vh;
  }

  .modal-lg,
  .modal-sm {
    width: 100%;
  }

  .call-box {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .call-local {
    width: 108px;
    height: 78px;
    right: 14px;
    bottom: 88px;
  }

  .call-ctrl {
    gap: 16px;
  }

  .ctrl-btn {
    width: 46px;
    height: 46px;
  }

  .call-videos.video-mode {
    grid-template-columns: 1fr;
  }

  .profile-banner {
    gap: 12px;
  }

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

  .admin-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .publish-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }

  .wallet-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .moment-imgs {
    max-width: 100%;
  }
}
