/* 站内信 */
.msg-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.msg-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.msg-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.msg-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.msg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.msg-unread-hint {
  font-size: 0.85rem;
  color: var(--accent);
  margin-right: 0.25rem;
}

.msg-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.msg-list {
  list-style: none;
}

.msg-item {
  border-bottom: 1px solid var(--border);
}

.msg-item:last-child {
  border-bottom: none;
}

.msg-item-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  cursor: pointer;
}

.msg-item-link:hover {
  background: rgba(255, 255, 255, 0.03);
}

.msg-item.is-unread .msg-item-link {
  background: rgba(124, 108, 240, 0.06);
}

.msg-item.is-unread .msg-item-title {
  font-weight: 700;
}

.msg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
}

.msg-item.is-unread .msg-dot {
  background: var(--primary);
  box-shadow: 0 0 8px var(--glow);
}

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

.msg-item-title {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.msg-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.msg-item-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.msg-kind {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  margin-right: 0.35rem;
  background: rgba(124, 108, 240, 0.12);
  color: var(--primary);
}

.msg-detail {
  padding: 1.25rem 1.5rem;
}

.msg-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.msg-detail-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
}

.msg-detail-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.msg-detail-body {
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.msg-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.msg-forum-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.msg-mod-status {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
}
.msg-mod-status--approved {
  background: rgba(110, 231, 160, 0.1);
  border: 1px solid rgba(110, 231, 160, 0.35);
  color: #6ee7a0;
}
.msg-mod-status--rejected {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.msg-avatar-preview {
  margin-bottom: 1rem;
  text-align: center;
}

.msg-avatar-preview img {
  width: 6rem;
  height: 6rem;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.msg-avatar-preview p {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.msg-kind--review {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

.msg-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.msg-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.nav-msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--error);
  vertical-align: middle;
}

.btn-nav-msg {
  position: relative;
}

@media (max-width: 768px) {
  .msg-page {
    padding: 1rem 1rem 3rem;
  }
  .msg-item-link {
    grid-template-columns: auto 1fr;
  }
  .msg-item-time {
    grid-column: 2;
  }
}
