/* ====== 天浩-交流 样式 ====== */
:root {
  --bg: #0e0f13;
  --bg-2: #15171d;
  --surface: #181b22;
  --surface-2: #1f232c;
  --border: #2a2e38;
  --border-soft: #23262f;
  --text: #e7e9ee;
  --text-2: #9aa0ad;
  --text-3: #6b707c;
  --accent: #5b8def;
  --accent-2: #4a7ce0;
  --accent-soft: rgba(91, 141, 239, 0.12);
  --green: #3ecf8e;
  --red: #f0616d;
  --orange: #e0a458;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  --mono: 'SF Mono', 'Cascadia Code', Consolas, 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景：细网格 + 极淡中心光，避免花哨渐变 */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 38px 38px;
  background-position: center;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(900px 600px at 50% -10%, rgba(91,141,239,0.08), transparent 70%);
}

.view { display: none; position: relative; z-index: 1; height: 100vh; width: 100vw; }
.view.active { display: flex; }

/* ====== 认证页 ====== */
.auth-view {
  align-items: center; justify-content: center;
}
.auth-container { z-index: 1; width: 100%; padding: 20px; display: flex; justify-content: center; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px 40px;
  width: 400px; max-width: 100%;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.auth-logo { text-align: center; margin-bottom: 32px; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin-bottom: 14px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 18px;
  border-radius: 12px; letter-spacing: -1px;
}
.auth-logo h1 { font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.auth-logo p { color: var(--text-3); margin-top: 6px; font-size: 13px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.input-group {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-label { font-size: 12px; color: var(--text-3); white-space: nowrap; min-width: 34px; }
.input-group input {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 14px; padding: 13px 0; outline: none; font-family: inherit;
}
.input-group input::placeholder { color: var(--text-3); }
.captcha-img { border-radius: 5px; cursor: pointer; border: 1px solid var(--border); }

.error-msg { color: var(--red); font-size: 12px; min-height: 16px; text-align: center; display: none; }
.error-msg.show { display: block; }

.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-2); }

/* ====== 按钮 ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-lg { padding: 13px 24px; font-size: 15px; width: 100%; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-outline { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #d8505b; }
.btn-icon {
  height: 32px; padding: 0 10px; background: none; border: none; color: var(--text-2);
  font-size: 13px; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.btn-danger-icon:hover { color: var(--red); background: rgba(240,97,109,0.1); }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ====== 聊天布局 ====== */
.chat-layout { display: flex; height: 100vh; width: 100vw; }
.sidebar {
  width: 280px; min-width: 280px; background: var(--bg-2);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; transition: all 0.25s;
}
.sidebar.collapsed { width: 0; min-width: 0; overflow: hidden; border: none; }
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  width: 30px; height: 24px; border-radius: 6px;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 1px; }

.sidebar-section { padding: 12px; flex: 1; overflow-y: auto; border-bottom: 1px solid var(--border-soft); }
.section-title {
  font-size: 11px; font-weight: 700; color: var(--text-3); letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.badge {
  background: var(--accent-soft); color: var(--accent); font-size: 11px;
  padding: 1px 7px; border-radius: 10px; font-weight: 700;
}

/* 好友 */
.add-friend-btn {
  width: 100%; padding: 9px; margin-bottom: 10px;
  background: var(--surface); border: 1px dashed var(--border); color: var(--text-2);
  border-radius: var(--radius-sm); font-size: 13px; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.add-friend-btn:hover { border-color: var(--accent); color: var(--accent); }
.add-friend-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px; margin-bottom: 10px;
}
.add-friend-box input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; padding: 8px 10px; color: var(--text); font-size: 13px; outline: none; font-family: inherit;
}
.add-friend-box input:focus { border-color: var(--accent); }
.friend-search-result { margin-top: 8px; font-size: 13px; }
.friend-search-result .sr-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px; border-radius: 5px; background: var(--bg); margin-bottom: 4px;
}
.friend-search-result button {
  background: var(--accent); color: #fff; border: none; padding: 4px 10px;
  border-radius: 5px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.friend-search-result button:disabled { background: var(--border); color: var(--text-3); cursor: default; }

.friend-list { display: flex; flex-direction: column; gap: 2px; }
.friend-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: var(--radius-sm); cursor: pointer; transition: background 0.2s;
}
.friend-item:hover { background: var(--surface); }
.friend-item.active { background: var(--accent-soft); }
.fi-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex-shrink: 0;
}
.fi-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.fi-num { font-family: var(--mono); font-size: 11px; color: var(--text-3); min-width: 26px; }
.fi-name { font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-del { color: var(--text-3); font-size: 14px; opacity: 0; transition: opacity 0.2s; cursor: pointer; }
.friend-item:hover .fi-del { opacity: 1; }
.fi-del:hover { color: var(--red); }

.user-item { display: flex; align-items: center; gap: 8px; padding: 5px 10px; font-size: 13px; color: var(--text-2); }
.user-item .ui-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.sidebar-footer {
  padding: 10px 14px; border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.current-user { display: flex; align-items: center; gap: 8px; }
.cu-name { font-size: 13px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-num { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.footer-actions { display: flex; gap: 2px; }

/* 主聊天区 */
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft); background: var(--bg-2);
}
.chat-room-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.room-icon {
  width: 30px; height: 30px; border-radius: 7px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 12px; font-weight: 700;
}
.chat-room-info h2 { font-size: 16px; font-weight: 700; }
.room-desc { font-size: 12px; color: var(--text-3); }
.chat-header-actions { display: flex; gap: 2px; }
.sidebar-toggle-mobile { display: flex; }

.search-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 20px;
  background: var(--surface); border-bottom: 1px solid var(--border-soft);
}
.search-bar input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 5px;
  padding: 8px 12px; color: var(--text); font-size: 13px; outline: none; font-family: inherit;
}
.search-bar input:focus { border-color: var(--accent); }
.search-results { font-size: 12px; color: var(--text-3); white-space: nowrap; }

.messages-container { flex: 1; overflow-y: auto; padding: 18px 20px; position: relative; scroll-behavior: smooth; }
.messages-container::-webkit-scrollbar { width: 8px; }
.messages-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.messages-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; color: var(--text-3); }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.messages-list { display: flex; flex-direction: column; gap: 2px; min-height: 100%; }

.message { display: flex; flex-direction: column; gap: 4px; padding: 5px 0; animation: msgIn 0.25s ease; max-width: 86%; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.message.self { align-items: flex-end; align-self: flex-end; }
.message.system { align-self: center; max-width: 100%; justify-content: center; }
.msg-meta { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.message.self .msg-meta { text-align: right; }
.msg-time { color: var(--text-3); font-size: 11px; margin-left: 6px; }
.msg-bubble {
  padding: 9px 13px; border-radius: 12px; font-size: 14px; line-height: 1.55;
  word-break: break-word; border: 1px solid var(--border-soft);
}
.message.other .msg-bubble { background: var(--surface); border-top-left-radius: 3px; }
.message.self .msg-bubble { background: var(--accent); color: #fff; border: none; border-top-right-radius: 3px; }
.message.system .msg-bubble { background: rgba(224,164,88,0.12); border-color: rgba(224,164,88,0.3); color: var(--orange); font-size: 12px; padding: 5px 14px; border-radius: 16px; }
.message.deleted .msg-bubble { opacity: 0.5; font-style: italic; }
.msg-content a { color: #bcd4ff; text-decoration: underline; }

.date-separator { text-align: center; margin: 16px 0; }
.date-separator span { background: var(--surface); color: var(--text-3); font-size: 11px; padding: 4px 14px; border-radius: 14px; border: 1px solid var(--border-soft); }

.scroll-bottom-btn {
  position: sticky; bottom: 6px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 7px 16px; border-radius: 18px;
  font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); z-index: 5; display: none; width: fit-content;
}
.scroll-bottom-btn.show { display: block; }

.chat-input-area { padding: 12px 20px 16px; border-top: 1px solid var(--border-soft); background: var(--bg-2); }
.typing-indicator { font-size: 12px; color: var(--text-3); padding: 2px 0 8px 4px; font-style: italic; }
.input-row { display: flex; align-items: flex-end; gap: 10px; }
.message-input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; color: var(--text); font-size: 14px; font-family: inherit; resize: none;
  outline: none; max-height: 120px; line-height: 1.5; transition: border-color 0.2s;
}
.message-input:focus { border-color: var(--accent); }
.message-input::placeholder { color: var(--text-3); }
.btn-send { padding: 11px 22px; }

/* ====== 弹窗 ====== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 100;
  display: flex; align-items: center; justify-content: center; animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: 400px; max-width: 92vw; box-shadow: var(--shadow); animation: rise 0.3s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); }
.modal-header h2 { font-size: 17px; }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-input, .form-select {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; color: var(--text); font-size: 14px; outline: none; font-family: inherit;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); }
.form-static { font-family: var(--mono); font-size: 15px; color: var(--accent); padding: 4px 0; }
.modal-hint { font-size: 12px; color: var(--text-3); line-height: 1.6; }

/* ====== Toast ====== */
.toast-container { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; color: #fff; box-shadow: var(--shadow); animation: slideIn 0.3s ease; max-width: 340px; }
.toast.success { background: #1f8a5b; }
.toast.error { background: #b83b46; }
.toast.info { background: var(--accent-2); }
@keyframes slideIn { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }

/* ====== 响应式 ====== */
@media (max-width: 768px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; box-shadow: var(--shadow); }
  .sidebar.collapsed { width: 0; min-width: 0; }
  .sidebar-toggle-mobile { display: flex; }
  .sidebar-toggle { display: none; }
  .auth-card { padding: 32px 22px; }
  .message { max-width: 92%; }
}
@media (max-width: 480px) {
  .message { max-width: 95%; }
  .chat-header { padding: 10px 14px; }
  .messages-container { padding: 14px; }
}

/* ====== 后台管理 ====== */
.admin-layout { width: 100%; min-height: 100vh; padding: 26px 40px; flex-direction: column; box-sizing: border-box; }
.admin-user { font-size: 13px; color: var(--text-2); }
.title-admin-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.tool-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.broadcast-box { margin-top: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.broadcast-box h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.broadcast-box .form-input { width: 100%; margin-bottom: 10px; resize: vertical; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.admin-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.admin-header-actions { display: flex; gap: 8px; }
.admin-tabs {
  display: flex; gap: 4px; margin-bottom: 24px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; width: fit-content;
}
.admin-tab {
  padding: 9px 20px; border: none; background: none; color: var(--text-2);
  font-size: 14px; font-weight: 500; cursor: pointer; border-radius: var(--radius-sm);
  transition: all 0.2s; font-family: inherit;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { background: var(--accent); color: #fff; }
.admin-content { animation: fade 0.25s ease; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 6px;
}
.stat-num { font-size: 32px; font-weight: 700; color: var(--accent); font-family: var(--mono); }
.stat-label { font-size: 13px; color: var(--text-3); }
.admin-note {
  background: var(--surface); border: 1px solid var(--border-soft); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; color: var(--text-2); line-height: 1.6;
}
.table-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.table-header h3 { font-size: 17px; font-weight: 600; }
.search-input {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 12px; color: var(--text); font-size: 13px; outline: none; font-family: inherit; min-width: 200px;
}
.search-input:focus { border-color: var(--accent); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  padding: 11px 14px; text-align: left; font-weight: 600; color: var(--text-3);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); background: var(--bg-2);
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-2); }
.role-badge { padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.role-badge.admin { background: var(--accent-soft); color: var(--accent); }
.role-badge.user { background: rgba(62,207,142,0.12); color: var(--green); }

@media (max-width: 640px) {
  .admin-layout { padding: 18px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-title { font-size: 17px; }
}

/* ====== 等级 / 头衔 ====== */
.cu-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 14px;
}
.cu-avatar.lg { width: 52px; height: 52px; border-radius: 12px; font-size: 20px; }
.cu-meta { font-size: 11px; color: var(--text-3); font-family: var(--mono); }

.lv-badge {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9px;
  background: rgba(91,141,239,0.14); color: var(--accent);
  font-size: 11px; font-weight: 700; font-family: var(--mono); margin-left: 6px;
}
.title-chip {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 9px;
  font-size: 11px; font-weight: 600; margin-left: 6px;
  border: 1px solid currentColor; opacity: 0.95;
}
.msg-author { font-weight: 600; color: var(--text); }

/* 群聊项 */
.group-list { display: flex; flex-direction: column; gap: 2px; }
.group-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: var(--radius-sm); cursor: pointer; transition: background 0.2s;
}
.group-item:hover { background: var(--surface); }
.group-item.active { background: var(--accent-soft); }
.gi-icon {
  width: 28px; height: 28px; border-radius: 7px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.gi-name { font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gi-count { font-size: 11px; color: var(--text-3); font-family: var(--mono); }

.mini-link {
  margin-left: auto; background: none; border: none; color: var(--accent);
  font-size: 11px; cursor: pointer; font-family: inherit; padding: 2px 6px; border-radius: 5px;
}
.mini-link:hover { background: var(--accent-soft); }

.public-item .fi-num { color: var(--accent); font-weight: 700; }

/* ====== 个人设置弹窗 ====== */
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-name { font-size: 17px; font-weight: 700; }
.profile-num { font-size: 12px; color: var(--text-3); font-family: var(--mono); margin-top: 2px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ps-item { background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.ps-num { font-size: 22px; font-weight: 700; color: var(--accent); font-family: var(--mono); }
.ps-label { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.level-bar { height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; border: 1px solid var(--border-soft); }
.level-bar-fill { height: 100%; background: var(--accent); border-radius: 6px; transition: width 0.4s ease; }
.level-hint { font-size: 12px; color: var(--text-3); margin: 8px 0 16px; text-align: center; }
.profile-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); }
.profile-title-label { font-size: 13px; color: var(--text-2); }

/* ====== 好友面板 / 群成员 ====== */
.panel-friend-list { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.panel-friend-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--bg); border-radius: var(--radius-sm);
}
.pf-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pf-name { font-size: 14px; }
.pf-sub { font-size: 11px; color: var(--text-3); font-family: var(--mono); }
.pf-del { color: var(--text-3); cursor: pointer; font-size: 13px; padding: 4px 8px; border-radius: 5px; }
.pf-del:hover { color: var(--red); background: rgba(240,97,109,0.1); }

.member-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 32px; align-items: center; }
.member-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: var(--accent-soft); color: var(--accent); border-radius: 14px; font-size: 12px;
}
.member-chip button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; padding: 0; }
.member-search-result { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; }
.member-search-result .sr-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  background: var(--bg); border-radius: var(--radius-sm); font-size: 13px;
}
.sr-check { width: 16px; height: 16px; accent-color: var(--accent); }
.sr-spacer { flex: 1; }
.sr-add { background: var(--accent); color: #fff; border: none; padding: 4px 10px; border-radius: 5px; font-size: 12px; cursor: pointer; font-family: inherit; }
.sr-add:disabled { background: var(--border); color: var(--text-3); cursor: default; }
.member-friend-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.member-friend-list .sr-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  background: var(--bg); border-radius: var(--radius-sm); font-size: 13px;
}
.member-pick { margin-top: 8px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 10px; max-height: 220px; overflow-y: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 8px; }
.pick-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; font-size: 13px; cursor: pointer; border-radius: 6px; }
.pick-item:hover { background: var(--surface); }
.pick-item .sr-check { width: 15px; height: 15px; accent-color: var(--accent); }
