/* ============================================
   玖梦聊天室 - 高级样式
   ============================================ */

:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #5849c2;
  --secondary: #fd79a8;
  --accent: #00cec9;
  --bg-dark: #0f0a1a;
  --bg-card: #1a1230;
  --bg-card-hover: #221840;
  --bg-sidebar: #120c24;
  --bg-input: #1e1538;
  --bg-message-self: linear-gradient(135deg, #6c5ce7, #a29bfe);
  --bg-message-other: #1e1538;
  --text-primary: #e8e0f0;
  --text-secondary: #9b8cb8;
  --text-muted: #6b5b8a;
  --border-color: #2a1f45;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Noto Sans SC', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow: hidden;
  position: relative;
}

#app {
  height: 100%;
}

/* ---- Background Particles ---- */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---- Glass Container ---- */
.glass {
  background: rgba(26, 18, 48, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(108, 92, 231, 0.15);
  box-shadow: var(--shadow);
}

/* ============ AUTH PAGE ============ */
#auth-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.auth-container {
  width: 420px;
  max-width: 90vw;
  padding: 40px 36px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(108,92,231,0.08), transparent, rgba(253,121,168,0.08), transparent);
  animation: rotateGradient 8s linear infinite;
  z-index: -1;
}

@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-icon {
  font-size: 48px;
  margin-bottom: 8px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.auth-logo h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.auth-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}

.auth-form {
  display: none;
  animation: slideUp 0.4s ease;
}

.auth-form.active {
  display: block;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,92,231,0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto;
}

.btn.loading .spinner {
  display: block;
}

.btn.loading .btn-text {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-error {
  background: rgba(253, 121, 168, 0.1);
  border: 1px solid rgba(253, 121, 168, 0.3);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  color: var(--secondary);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ============ MAIN APP ============ */
#app {
  display: none;
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ============ SIDEBAR ============ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 5;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header h2 {
  font-size: 18px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s;
}

.user-profile:hover {
  background: var(--bg-card-hover);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

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

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

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

.user-info .status {
  font-size: 12px;
  color: var(--accent);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 12px 8px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(108,92,231,0.15);
  color: var(--primary-light);
}

.nav-item .nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.nav-item .nav-icon.public {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

.nav-item .nav-icon.private {
  background: linear-gradient(135deg, #fd79a8, #e84393);
}

.nav-item .nav-icon.online {
  background: linear-gradient(135deg, #00cec9, #81ecec);
}

.nav-item .nav-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.nav-item .nav-badge {
  background: var(--secondary);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* ============ MAIN CONTENT ============ */
.main-content {
  margin-left: 280px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 10, 26, 0.8);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.chat-header .chat-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header .chat-title .online-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

/* ---- Message Bubbles ---- */
.message {
  display: flex;
  gap: 10px;
  max-width: 75%;
  animation: messageSlide 0.3s ease;
  position: relative;
}

@keyframes messageSlide {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.message.self {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.other {
  align-self: flex-start;
}

.message .msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  font-weight: 600;
}

.message .msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message .msg-content {
  padding: 10px 16px;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message.self .msg-content {
  background: var(--bg-message-self);
  border-bottom-right-radius: 4px;
  color: #fff;
}

.message.other .msg-content {
  background: var(--bg-message-other);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

.message .msg-text {
  font-size: 14px;
  line-height: 1.5;
}

.message .msg-sender {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 4px;
  display: block;
}

.message .msg-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.message.self .msg-time {
  color: rgba(255,255,255,0.6);
}

.message .msg-image {
  max-width: 300px;
  max-height: 300px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s;
  display: block;
}

.message .msg-image:hover {
  transform: scale(1.02);
}

.message .msg-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.message .msg-file:hover {
  background: var(--bg-card-hover);
}

.message .msg-file .file-icon {
  font-size: 24px;
}

.message .msg-file .file-info {
  flex: 1;
  min-width: 0;
}

.message .msg-file .file-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message .msg-file .file-size {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---- Date Separator ---- */
.date-separator {
  text-align: center;
  padding: 16px 0;
  position: relative;
}

.date-separator::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border-color);
}

.date-separator span {
  background: var(--bg-dark);
  padding: 4px 16px;
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  border-radius: 10px;
}

/* ---- Typing Indicator ---- */
.typing-indicator {
  display: none;
  padding: 8px 24px;
  font-size: 13px;
  color: var(--text-muted);
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.typing-indicator.show {
  display: flex;
}

.typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  margin: 0 2px;
  animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* ---- Chat Input ---- */
.chat-input-area {
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border-color);
  background: rgba(15, 10, 26, 0.8);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border-radius: 16px;
  border: 2px solid var(--border-color);
  padding: 4px;
  transition: border-color 0.3s;
}

.chat-input-wrapper:focus-within {
  border-color: var(--primary);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  padding: 8px 12px;
  resize: none;
  max-height: 100px;
  min-height: 24px;
  line-height: 1.4;
  font-family: inherit;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 4px;
}

.input-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.input-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.send-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}

.send-btn:active {
  transform: scale(0.95);
}

/* ---- Image Preview ---- */
.image-preview {
  display: none;
  padding: 8px 24px 0;
  flex-shrink: 0;
}

.image-preview.show {
  display: block;
}

.image-preview .preview-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 12px;
  position: relative;
}

.image-preview .preview-box img {
  max-height: 80px;
  border-radius: 6px;
}

.image-preview .preview-box .remove-preview {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--secondary);
  border: 2px solid var(--bg-dark);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ FRIENDS LIST MODAL ============ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
  display: flex;
}

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

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-input);
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.friend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.friend-item:hover {
  background: var(--bg-card-hover);
}

.friend-item .friend-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.friend-item .friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-item .friend-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.friend-item .friend-status {
  font-size: 12px;
}

/* ============ FILE UPLOAD POPUP ============ */
.file-upload-popup {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  z-index: 50;
  width: 300px;
  box-shadow: var(--shadow);
  animation: popupSlide 0.3s ease;
}

.file-upload-popup.show {
  display: block;
}

@keyframes popupSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.file-upload-popup h4 {
  font-size: 14px;
  margin-bottom: 12px;
}

.file-drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-muted);
}

.file-drop-zone:hover {
  border-color: var(--primary);
  background: rgba(108,92,231,0.05);
  color: var(--primary-light);
}

.file-drop-zone .upload-icon {
  font-size: 36px;
  margin-bottom: 8px;
  display: block;
}

/* ============ RESPONSIVE ============ */
.sidebar-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-input);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .message {
    max-width: 90%;
  }
  .message .msg-image {
    max-width: 200px;
    max-height: 200px;
  }
}

/* ---- Scrollbar for sidebar ---- */
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

/* ---- User search ---- */
.search-box {
  padding: 8px 12px;
}

.search-box input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-results {
  max-height: 200px;
  overflow-y: auto;
}

/* ---- Notification toast ---- */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  z-index: 200;
  display: none;
  animation: toastSlide 0.3s ease;
  min-width: 250px;
}

.toast.show {
  display: block;
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left: 3px solid var(--accent); }
.toast.error { border-left: 3px solid var(--secondary); }
.toast.info { border-left: 3px solid var(--primary-light); }

/* ---- Dashboard ---- */
.dash-card {
  background: var(--bg-input);
  border-radius: 10px;
  padding: 12px 16px;
}
.dash-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-btn {
  padding: 6px 12px;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}
.dash-btn:hover {
  background: var(--primary-dark);
}
.stat-item {
  background: var(--bg-input);
  border-radius: 8px;
  padding: 10px 14px;
}
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.stat-val {
  font-size: 16px;
  font-weight: 600;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}
.stat-row:last-child { border-bottom: none; }
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-input);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
/* ---- Empty state ---- */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
}

.empty-state .empty-icon {
  font-size: 64px;
  opacity: 0.5;
}

.empty-state .empty-text {
  font-size: 16px;
}

.empty-state .empty-hint {
  font-size: 13px;
}

/* ---- File message attachment styles ---- */
.msg-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-input);
  border-radius: 10px;
  margin-top: 6px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
}

.msg-attachment:hover {
  background: var(--bg-card-hover);
}

.system-message {
  text-align: center;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 12px;
}
