:root {
  --bg: #eef4ff;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --text: #172033;
  --muted: #69758a;
  --primary: #1668ff;
  --primary-dark: #0f4ed2;
  --line: #dce6f5;
  --bubble: #eef4ff;
  --mine: #1668ff;
  --danger: #df3f40;
  --shadow: 0 20px 60px rgba(61, 87, 125, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  font-size: 14px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(22, 104, 255, 0.24), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(95, 196, 255, 0.24), transparent 30%),
    linear-gradient(135deg, #f7fbff 0%, var(--bg) 100%);
}

/* 全局紧凑模式：字体、按钮、卡片和间距整体缩小一点 */
.app-shell {
  font-size: 0.94em;
}

.auth-card,
.sidebar,
.dialog-card {
  padding: 16px;
}

.brand-card {
  padding: 48px;
}

input,
textarea,
select {
  padding: 11px 13px;
  border-radius: 14px;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.quick-actions button,
.tool-btn {
  padding: 10px 14px;
  border-radius: 14px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.auth-panel {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: center;
  max-width: 1120px;
  min-height: calc(100vh - 56px);
  margin: 0 auto;
}

.brand-card,
.auth-card,
.sidebar,
.chat-panel,
.dialog-card {
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.brand-card {
  min-height: 520px;
  padding: 56px;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
}

.brand-card::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1668ff, #78d3ff);
  opacity: 0.24;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  background: linear-gradient(135deg, #1668ff, #5fc4ff);
}

.eyebrow {
  margin: 42px 0 10px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-card h1 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.06;
}

.brand-desc {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.auth-card {
  padding: 28px;
  border-radius: 28px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  margin-bottom: 24px;
  border-radius: 18px;
  background: #eef4ff;
}

.tab {
  border: 0;
  border-radius: 14px;
  padding: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.tab.active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 104, 255, 0.12);
}

.auth-form,
.dialog-card {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: #33435b;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 15px;
  outline: none;
  color: var(--text);
  background: #fff;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(22, 104, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(22, 104, 255, 0.12);
}

.code-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.quick-actions button,
.tool-btn {
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 800;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #5fc4ff);
  box-shadow: 0 14px 30px rgba(22, 104, 255, 0.24);
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), #38b6ff);
}

.ghost-btn,
.icon-btn,
.quick-actions button,
.tool-btn {
  color: #34506f;
  background: #edf4ff;
}

.form-tip {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.chat-layout {
  max-width: 1360px;
  height: calc(100vh - 56px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.logged-in .chat-layout {
  max-width: 100%;
}

.top-nav {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.page-container {
  flex: 1;
  min-height: 0;
  position: relative;
}

.page-view {
  height: 100%;
  min-height: 0;
}

.page-view.hidden {
  display: none;
}

.contacts-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.chat-panel {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.74);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.profile-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #1668ff, #78d3ff);
}

.profile-card h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.profile-card p,
.chat-header p,
.conversation-meta,
.message-time {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.search-box {
  margin: 18px 0 12px;
}

.sidebar-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: #eef4ff;
}

.nav-tab {
  border: 0;
  border-radius: 11px;
  padding: 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-tab.active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 6px 16px rgba(22, 104, 255, 0.12);
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 4px 10px;
  color: #33435b;
  font-weight: 900;
}

.conversation-list {
  display: grid;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.conversation-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
  max-width: 100%;
  overflow: hidden;
}

.conversation-item.active {
  border-color: rgba(22, 104, 255, 0.35);
  background: #fff;
}

.conversation-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  min-width: 0;
}

.conversation-title span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-preview {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.74);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.chat-header h2 {
  margin: 0 0 6px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.message-area {
  overflow: auto;
  padding: 24px;
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  height: 100%;
  color: var(--muted);
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 10px;
  color: var(--text);
}

.message {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  scroll-margin-bottom: 18px;
}

.message.mine {
  flex-direction: row-reverse;
}

.message.new-message-highlight .bubble {
  animation: newMessageGlow 1.2s ease;
}

@keyframes newMessageGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 104, 255, 0.36);
    transform: translateY(4px);
  }
  45% {
    box-shadow: 0 0 0 8px rgba(22, 104, 255, 0.12);
    transform: translateY(0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 104, 255, 0);
  }
}

.message-body {
  max-width: min(560px, 76%);
}

.message-name {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.message.mine .message-name {
  text-align: right;
}

.bubble {
  padding: 12px 14px;
  border-radius: 18px 18px 18px 4px;
  background: var(--bubble);
  line-height: 1.7;
  white-space: pre-wrap;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.message.mine .bubble {
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  background: var(--mine);
}

.bubble img {
  display: block;
  max-width: 280px;
  border-radius: 14px;
}

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

.message.mine.image-message .bubble {
  background: transparent;
}

.image-bubble {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.image-bubble img {
  display: block;
  width: auto;
  max-width: min(180px, 52vw);
  max-height: 180px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(23, 32, 51, 0.14);
}

/* ===== 文件消息 ===== */
.file-message .bubble {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  white-space: normal !important;
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  -ms-user-select: auto !important;
  user-select: auto !important;
  -webkit-touch-callout: default !important;
}

.message.mine.file-message .bubble {
  background: transparent !important;
}

.file-bubble {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  min-width: 0;
  max-width: 200px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: #f3f6fb;
  border: 1px solid rgba(22, 104, 255, 0.06);
  -webkit-transition: background 0.2s, border-color 0.2s;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.message.mine .file-bubble {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.file-bubble:active {
  background: rgba(22, 104, 255, 0.08);
  border-color: rgba(22, 104, 255, 0.16);
}

.file-icon {
  font-size: 20px;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex-shrink: 0;
  line-height: 1;
  margin-right: 8px;
}

.file-info {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  min-width: 0;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1;
  margin-bottom: 1px;
}

.file-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.file-meta {
  font-size: 10px;
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.file-download {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex-shrink: 0;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(22, 104, 255, 0.1);
  color: var(--primary);
  line-height: 1;
  margin-left: 6px;
}

.message.mine .file-download {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.image-preview-dialog {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.82);
}

.image-preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: none;
}

.image-preview-dialog[open] {
  display: grid;
  place-items: center;
  padding: 18px;
}

.image-preview-dialog img {
  max-width: 96vw;
  max-height: 92dvh;
  border-radius: 12px;
  object-fit: contain;
}

.typing-row {
  display: none;
  padding: 0 24px 10px;
  color: var(--muted);
  font-size: 13px;
}

.typing-row.show {
  display: block;
}

.typing-row.ai-replying::after {
  content: "";
  display: inline-block;
  width: 1.5em;
  animation: aiReplyDots 1.2s steps(4, end) infinite;
}

@keyframes aiReplyDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

.composer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.file-tool {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.file-tool input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 12px;
  align-items: end;
}

textarea {
  min-height: 54px;
  max-height: 160px;
  resize: vertical;
}

.send-btn {
  height: 54px;
}

dialog {
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(19, 31, 51, 0.42);
  backdrop-filter: blur(6px);
}

.dialog-card {
  width: min(420px, 92vw);
  padding: 24px;
  background: #fff;
}

.dialog-card h3 {
  margin: 0;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  z-index: 10;
  max-width: 90vw;
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  background: rgba(23, 32, 51, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .app-shell {
    padding: 14px;
  }

  .auth-panel,
  .chat-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 28px);
  }

  .brand-card {
    min-height: auto;
    padding: 36px;
  }

  .chat-layout {
    gap: 10px;
  }

  .chat-panel {
    min-height: 400px;
  }

  /* === 登录后固定布局：上下左右白色边框 === */
  body.logged-in {
    background: #ffffff;
  }

  body.logged-in .app-shell {
    position: relative;
    padding: 0;
    background: #ffffff;
    overflow: visible;
    width: 100%;
    max-width: 100%;
  }

  body.logged-in .chat-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    overflow: hidden;
  }

  body.logged-in .page-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  body.logged-in .page-view {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.logged-in .contacts-panel,
  body.logged-in .chat-panel {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
  }

  body.logged-in .contacts-panel {
    padding: 14px;
    overflow: hidden;
  }

  body.logged-in .conversation-list {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.logged-in .search-box {
    margin: 12px 0 10px;
  }

  body.logged-in .section-title {
    margin: 12px 4px 8px;
  }

  body.logged-in .conversation-item {
    grid-template-columns: 44px 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
  }

  body.logged-in .chat-header {
    padding: 16px 18px;
  }

  body.logged-in .message-area {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.logged-in .composer {
    padding: 12px;
  }
}

@media (hover: none) and (pointer: coarse) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  body:not(.logged-in) {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell {
    width: 100%;
    max-width: 100vw;
  }

  body:not(.logged-in) .app-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  html.logged-in,
  body.logged-in {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body.logged-in .app-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }
}

/* 最终覆盖：全局整体缩小一点 */
.app-shell {
  font-size: 0.92em;
}

.auth-panel {
  gap: 22px;
}

.brand-card {
  padding: 46px;
  border-radius: 30px;
}

.auth-card,
.sidebar,
.dialog-card {
  padding: 16px;
}

.chat-layout {
  gap: 16px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.profile-card {
  grid-template-columns: 46px 1fr auto;
}

input,
textarea,
select {
  padding: 10px 12px;
  border-radius: 14px;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.quick-actions button,
.tool-btn {
  padding: 10px 13px;
  border-radius: 14px;
}

.conversation-item {
  grid-template-columns: 44px 1fr;
  padding: 10px;
  border-radius: 18px;
}

.message-area {
  padding: 18px;
}

.composer {
  padding: 12px 16px 16px;
}

.send-btn {
  height: 48px;
}

textarea {
  min-height: 48px;
}

/* 再次缩小：整体更紧凑，会话列表缩小更多 */
.app-shell {
  font-size: 0.88em;
}

.app-shell {
  padding: 22px;
}

.auth-card,
.sidebar,
.dialog-card {
  padding: 14px;
}

.chat-layout {
  gap: 12px;
}

.profile-card {
  grid-template-columns: 40px 1fr auto;
  gap: 9px;
  padding-bottom: 10px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-size: 0.9em;
}

.profile-card h2 {
  font-size: 15px;
}

.search-box {
  margin: 12px 0 8px;
}

.quick-actions {
  gap: 8px;
}

.section-title {
  margin: 14px 4px 8px;
}

.conversation-list {
  gap: 7px;
}

.conversation-item {
  grid-template-columns: 38px 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 15px;
}

.conversation-item .avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 0.86em;
}

.conversation-title {
  gap: 6px;
  font-size: 0.9em;
}

.conversation-preview {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
}

body.logged-in .contacts-panel {
  padding: 12px;
}

body.logged-in .profile-card {
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  padding-bottom: 10px;
}

body.logged-in .avatar {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

body.logged-in .conversation-item {
  grid-template-columns: 38px 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 15px;
}

body.logged-in .conversation-list {
  gap: 7px;
  max-height: none !important;
}

body.logged-in .chat-header {
  padding: 13px 15px;
}

.chat-header h2 {
  font-size: 1.15em;
}

.message-area {
  padding: 14px;
}

.composer {
  padding: 10px 12px 12px;
}

input,
textarea,
select {
  padding: 9px 11px;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.quick-actions button,
.tool-btn {
  padding: 8px 11px;
}

/* 第三轮缩小：整体更小，会话列表重点缩小 */
.app-shell {
  font-size: 0.82em;
  padding: 18px;
}

.auth-card,
.sidebar,
.dialog-card {
  padding: 12px;
}

.chat-layout {
  gap: 10px;
}

/* 会话列表重点缩小 */
.profile-card {
  grid-template-columns: 34px 1fr auto;
  gap: 7px;
  padding-bottom: 8px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 0.82em;
}

.profile-card h2 {
  font-size: 13px;
}

.profile-card p {
  font-size: 11px;
}

.search-box {
  margin: 10px 0 6px;
}

.search-box input {
  padding: 7px 10px;
  font-size: 12px;
}

.quick-actions {
  gap: 6px;
}

.quick-actions button {
  padding: 7px 9px;
  font-size: 12px;
}

.section-title {
  margin: 10px 4px 6px;
  font-size: 13px;
}

.section-title small {
  font-size: 11px;
}

.conversation-list {
  gap: 5px;
}

.conversation-item {
  grid-template-columns: 32px 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
}

.conversation-item .avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 0.78em;
}

.conversation-title {
  gap: 4px;
  font-size: 0.82em;
}

.conversation-title span:last-child {
  font-size: 10px;
}

.conversation-preview {
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.3;
}

/* 登录后通讯录缩小 */
body.logged-in .contacts-panel {
  padding: 10px;
}

body.logged-in .profile-card {
  grid-template-columns: 34px 1fr auto;
  gap: 7px;
  padding-bottom: 8px;
}

body.logged-in .avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

body.logged-in .conversation-item {
  grid-template-columns: 32px 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
}

body.logged-in .conversation-list {
  gap: 5px;
  max-height: none !important;
}

body.logged-in .chat-header {
  padding: 10px 12px;
}

.chat-header h2 {
  font-size: 1.05em;
}

.chat-header p {
  font-size: 11px;
}

.message-area {
  padding: 12px;
}

.message {
  margin-bottom: 12px;
}

.message-body {
  max-width: 80%;
}

.message-name {
  margin-bottom: 4px;
  font-size: 11px;
}

.bubble {
  padding: 9px 11px;
  border-radius: 14px 14px 14px 4px;
  font-size: 13px;
  line-height: 1.55;
}

.message.mine .bubble {
  border-radius: 14px 14px 4px 14px;
}

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

.tool-row {
  gap: 6px;
  margin-bottom: 7px;
}

.tool-btn {
  padding: 6px 9px;
  font-size: 12px;
}

.input-row {
  gap: 8px;
}

textarea {
  min-height: 40px;
  max-height: 120px;
  padding: 8px 10px;
  font-size: 13px;
}

.send-btn {
  height: 40px;
  font-size: 13px;
}

input,
textarea,
select {
  padding: 7px 10px;
}

.primary-btn,
.ghost-btn,
.icon-btn {
  padding: 7px 10px;
  font-size: 12px;
}

.auth-form {
  gap: 12px;
}

label {
  gap: 5px;
  font-size: 12px;
}

.brand-card {
  padding: 36px;
}

.brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  font-size: 28px;
}

.brand-card h1 {
  font-size: clamp(28px, 5vw, 52px);
}

.brand-desc {
  font-size: 14px;
  line-height: 1.6;
}

.eyebrow {
  margin: 30px 0 8px;
  font-size: 12px;
}

.auth-tabs {
  padding: 5px;
  margin-bottom: 16px;
}

.tab {
  padding: 9px;
  font-size: 13px;
}

/* 表情栏：表情多时横向滑动，不挤压输入框 */
.tool-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.emoji-btn {
  flex: 0 0 auto;
  min-width: 30px;
  padding: 6px 8px;
  font-size: 16px;
  line-height: 1;
}

.file-tool {
  flex: 0 0 auto;
  white-space: nowrap;
}

.voice-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.voice-btn.recording {
  color: #fff;
  background: #ff3b30;
  animation: voicePulse 1s infinite;
}

@keyframes voicePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 防止表情过多导致页面撑开 */
.composer {
  min-width: 0;
  overflow: hidden;
}

.tool-row {
  width: 100%;
  max-width: 100%;
  max-height: 34px;
}

.tool-row::-webkit-scrollbar {
  display: none;
}

.emoji-btn {
  width: 30px;
  height: 28px;
  min-width: 30px;
}

.input-row {
  min-width: 0;
}

.message-input,
#messageInput {
  min-width: 0;
}

/* 最终覆盖：图片消息不用文字气泡背景，避免出现蓝色边框 */
.image-message .bubble,
.message.mine.image-message .bubble {
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.image-message .image-bubble img {
  max-width: min(180px, 52vw);
  max-height: 180px;
}

/* 语音消息 */
.audio-message .bubble {
  padding: 0;
  min-width: 0;
  background: transparent;
  box-shadow: none;
}

.voice-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px 7px 9px;
  min-width: 72px;
  max-width: 128px;
  color: #28506f;
  background: linear-gradient(135deg, #f8fbff 0%, #e7f0ff 100%);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 5px 14px rgba(22, 104, 255, 0.10),
    inset 0 0 0 1px rgba(22, 104, 255, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.voice-bubble span {
  flex: 0 0 auto;
  color: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.voice-play-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  background: linear-gradient(135deg, #1668ff, #5fc4ff);
  box-shadow: 0 3px 8px rgba(22, 104, 255, 0.28);
}

.voice-duration {
  opacity: 0.82;
  font-size: 11px;
}

.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.voice-wave i {
  display: block;
  width: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.62;
}

.voice-wave i:nth-child(1) {
  height: 6px;
}

.voice-wave i:nth-child(2) {
  height: 10px;
}

.voice-wave i:nth-child(3) {
  height: 7px;
}

.voice-bubble.playing {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #eef6ff 0%, #dceaff 100%);
  box-shadow:
    0 7px 18px rgba(22, 104, 255, 0.16),
    0 0 0 3px rgba(22, 104, 255, 0.10);
}

.voice-bubble.playing .voice-play-icon {
  animation: voiceMiniPulse 0.9s infinite;
}

.voice-bubble.playing .voice-wave i {
  animation: voiceWave 0.75s infinite ease-in-out;
}

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

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

.voice-bubble.loading {
  opacity: 0.78;
}

.voice-bubble.loading .voice-play-icon {
  animation: voiceLoading 0.8s infinite linear;
}

.message.mine .voice-bubble {
  color: #24486a;
  background: linear-gradient(135deg, #eaf3ff 0%, #dbeaff 100%);
}

.voice-bubble:active {
  transform: scale(0.96);
}

@keyframes voiceMiniPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

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

@keyframes voiceWave {
  0%, 100% {
    transform: scaleY(0.72);
    opacity: 0.42;
  }
  50% {
    transform: scaleY(1.18);
    opacity: 0.9;
  }
}

/* 语音消息最终覆盖：去掉发送方蓝底，只保留独立小气泡 */
.message.audio-message .bubble,
.message.mine.audio-message .bubble {
  padding: 0 !important;
  min-width: 0 !important;
  color: inherit !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.message.audio-message .voice-bubble,
.message.mine.audio-message .voice-bubble {
  width: auto;
  min-width: 72px;
  max-width: 128px;
  padding: 7px 11px 7px 9px;
  border-radius: 999px;
}

.message.mine.audio-message .voice-bubble {
  background: linear-gradient(135deg, #eaf3ff 0%, #dbeaff 100%);
}

.message.audio-message .voice-label {
  display: none;
}

/* 头像图片和未读红点 */
.avatar {
  position: relative;
  overflow: visible;
}

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

.avatar-with-dot {
  position: relative;
}

.unread-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ff2d55;
  box-shadow: 0 2px 6px rgba(255, 45, 85, 0.4);
}

.profile-actions {
  display: grid;
  gap: 5px;
}

.profile-actions .ghost-btn {
  padding: 6px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.profile-edit-card {
  width: min(420px, 92vw);
  max-height: 88dvh;
  overflow-y: auto;
}

.profile-edit-card input[type="file"] {
  padding: 8px;
  font-size: 12px;
}

/* 好友/会话多时防重叠：列表内部滚动，条目固定结构 */
.contacts-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conversation-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.conversation-item {
  flex: 0 0 auto;
  width: 100%;
  min-height: 46px;
  align-items: center;
}

.conversation-item > div:last-child {
  min-width: 0;
  overflow: hidden;
}

.conversation-title {
  min-width: 0;
  overflow: hidden;
}

.conversation-name-line {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.conversation-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-status {
  flex: 0 0 auto;
  padding: 1px 4px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1.25;
  white-space: nowrap;
}

.conversation-status.online {
  color: #168f3e;
  background: rgba(52, 199, 89, 0.16);
}

.conversation-status.offline {
  color: var(--muted);
  background: rgba(105, 117, 138, 0.12);
}

.conversation-tag {
  flex: 0 0 auto;
  white-space: nowrap;
}

.conversation-tag.assistant-tag {
  padding: 1px 6px;
  border-radius: 999px;
  color: #6a3df4;
  background: rgba(106, 61, 244, 0.1);
  font-weight: 800;
}

.conversation-title span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.conversation-title span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.logged-in .contacts-panel {
  overflow: hidden;
}

body.logged-in .conversation-list {
  flex: 1 1 auto;
  min-height: 90px;
  overflow-y: auto;
  overflow-x: hidden;
}

body.logged-in .conversation-item {
  flex: 0 0 auto;
  min-height: 40px;
}

@media (max-width: 900px) {
  body.logged-in .chat-layout {
    align-items: stretch;
  }

  body.logged-in .contacts-panel {
    max-height: none;
  }

  body.logged-in .conversation-list {
    max-height: none;
  }

  body.logged-in .chat-panel {
    min-height: 0;
    height: 100%;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  body.logged-in .top-nav {
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
}

/* === 在线状态绿点 === */
.online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #34c759;
  box-shadow: 0 1px 4px rgba(52, 199, 89, 0.5);
  z-index: 2;
}

/* 会话列表中的在线绿点 */
.conversation-item .avatar-with-online {
  position: relative;
}

/* 聊天头部在线状态 */
.chat-header-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #34c759;
  font-size: 11px;
  font-weight: 700;
}

.chat-header-online::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #34c759;
  box-shadow: 0 0 4px rgba(52, 199, 89, 0.6);
}

.chat-header-offline {
  color: var(--muted);
  font-size: 11px;
}

/* === 已读/未读状态 === */
.message-read-status {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1;
}

.message.mine .message-read-status {
  text-align: right;
}

.read-status-read {
  color: var(--muted);
}

.read-status-unread {
  color: #1668ff;
  font-weight: 600;
}

/* === 消息头像可点击 === */
.message .avatar {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.message .avatar:hover {
  transform: scale(1.08);
}

.message .avatar:active {
  transform: scale(0.95);
}

/* === 对方信息弹窗 === */
.sender-info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 28px 24px;
}

.sender-info-avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 32px;
  background: linear-gradient(135deg, #1668ff, #78d3ff);
  position: relative;
  margin-bottom: 4px;
}

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

.sender-info-card h3 {
  margin: 0;
  font-size: 18px;
}

.sender-info-email {
  margin: 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}

.sender-info-status {
  margin: 0;
  font-size: 12px;
}

.sender-info-status.online {
  color: #34c759;
  font-weight: 700;
}

.sender-info-status.offline {
  color: var(--muted);
}

.sender-info-card .dialog-actions {
  width: 100%;
  margin-top: 8px;
}

.sender-info-card .dialog-actions button {
  flex: 1;
}

/* === 自动回复开关 === */
.auto-reply-section {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f0f5ff;
}

.auto-reply-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #33435b;
  cursor: pointer;
}

.auto-reply-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #ccd6e6;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.auto-reply-toggle input:checked + .toggle-switch {
  background: #34c759;
}

.auto-reply-toggle input:checked + .toggle-switch::after {
  transform: translateX(18px);
}

.auto-reply-section input[type="text"] {
  width: auto;
  min-width: 4.5em;
  max-width: 100%;
  justify-self: start;
  padding: 8px 10px;
  font-size: 12px;
  field-sizing: content;
}

.auto-reply-section .form-tip {
  font-size: 11px;
  margin: 0;
}

/* 自动回复消息标签 */
.auto-reply-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
  color: #8a7400;
  background: #fff3cd;
  vertical-align: middle;
}

/* 创建群聊：好友勾选列表 */
.friend-check-list,
.group-manage-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbff;
}

.friend-check-item {
  display: grid;
  grid-template-columns: auto 34px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
}

.friend-check-item input {
  width: auto;
}

.friend-check-item .avatar,
.group-member-row .avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.friend-check-item small,
.group-member-info small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

/* 群管理 */
.group-manage-card {
  width: min(520px, 94vw);
  max-height: 88dvh;
  overflow-y: auto;
}

.group-manage-card h4 {
  margin: 8px 0 6px;
  font-size: 13px;
  color: #33435b;
}

.group-manage-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbff;
}

.group-manage-section input[type="file"] {
  padding: 8px;
  font-size: 12px;
}

.compact-btn {
  padding: 8px 10px;
  font-size: 12px;
}

.group-member-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
}

.group-member-info {
  min-width: 0;
}

.group-member-info strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-member-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.group-member-actions button,
.danger-btn {
  border: 0;
  border-radius: 10px;
  padding: 6px 8px;
  color: #34506f;
  background: #edf4ff;
  font-size: 11px;
  font-weight: 800;
}

.danger-btn {
  color: #fff;
  background: #df3f40;
}

/* 个人信息页面 - 旧样式已移除，使用新的 .profile-page 全屏列表样式 */

/* === 通讯录和"我的"页面：拉长至全屏 === */
body.logged-in #contactsView,
body.logged-in #profileView {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.logged-in .contacts-panel {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  background: var(--bg);
}

body.logged-in .contacts-panel .conversation-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: none;
}

/* "我的"页面：全屏功能列表 */
body.logged-in #profileView {
  padding: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.profile-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.profile-page-header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-size: 1.1em;
  font-weight: 800;
}

.profile-page-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.profile-page-user .profile-page-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 24px;
  flex-shrink: 0;
}

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

.profile-page-user-info h3 {
  margin: 0 0 4px;
  font-size: 1.1em;
}

.profile-page-user-info .profile-page-email {
  font-size: 0.85em;
}

.profile-page-section {
  margin-top: 10px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-page-section-title {
  padding: 10px 16px 4px;
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 700;
}

.profile-page-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.profile-page-item:last-child {
  border-bottom: 0;
}

.profile-page-item:active {
  background: rgba(22, 104, 255, 0.06);
}

.profile-page-item-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 16px;
  background: #eef4ff;
  flex-shrink: 0;
}

.profile-page-item-label {
  flex: 1;
}

.profile-page-item-arrow {
  color: var(--muted);
  font-size: 0.8em;
}

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

.profile-page-item.danger .profile-page-item-icon {
  background: rgba(223, 63, 64, 0.12);
}

.profile-page-spacer {
  flex: 1;
}

.profile-page-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #1668ff, #78d3ff);
  overflow: hidden;
  position: relative;
}

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

.profile-page-email {
  margin: 0;
  color: var(--primary);
  font-weight: 600;
  word-break: break-all;
}

/* === 强制全屏：覆盖所有冲突规则 === */
body.logged-in {
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
}

body.logged-in .app-shell {
  height: 100dvh !important;
  min-height: 100dvh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.logged-in .chat-layout {
  width: 100% !important;
  max-width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.logged-in .top-nav {
  flex-shrink: 0;
  border-radius: 0 !important;
  border: 0 !important;
}

body.logged-in .page-container {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

body.logged-in .page-view {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.logged-in .chat-panel {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.logged-in .contacts-panel {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.logged-in .profile-page {
  min-height: 100% !important;
  height: 100% !important;
}

body.logged-in .contacts-panel .conversation-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
}

body.logged-in .contacts-panel {
  display: flex !important;
  flex-direction: column !important;
}

/* === 关于弹窗 === */
.about-card {
  width: min(420px, 92vw);
  max-height: 88dvh;
  overflow-y: auto;
}

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

.about-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, #1668ff, #78d3ff);
  margin-bottom: 4px;
}

.about-content h4 {
  margin: 0;
  font-size: 18px;
}

.about-version {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.about-desc {
  margin: 6px 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin: 8px 0;
}

.about-feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f0f5ff;
  font-size: 12px;
  font-weight: 600;
}

.about-feature-icon {
  font-size: 16px;
}

.about-copyright {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

/* === 消息长按操作弹窗 === */
.message-action-card {
  width: min(360px, 92vw);
  padding: 0;
  overflow: hidden;
}

.message-action-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  max-height: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.message-action-btn:active {
  background: rgba(22, 104, 255, 0.06);
}

.message-action-btn:last-child {
  border-bottom: 0;
}

.message-action-btn.cancel {
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
}

.message-action-btn.danger-action {
  color: var(--danger);
}

.message-action-icon {
  font-size: 18px;
}

/* === 联系人管理弹窗 === */
.contact-manage-card {
  width: min(440px, 94vw);
  max-height: 88dvh;
  overflow-y: auto;
}

.contact-manage-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.contact-manage-user .avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 1em;
}

.contact-manage-info {
  min-width: 0;
}

.contact-manage-info strong {
  display: block;
  font-size: 15px;
}

.contact-manage-info small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.contact-manage-section {
  display: grid;
  gap: 6px;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbff;
}

.contact-setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 600;
  color: #33435b;
  cursor: pointer;
}

.contact-setting-icon {
  font-size: 18px;
}

.contact-setting-label {
  flex: 1;
}

.contact-setting-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.contact-setting-row input[type="checkbox"]:checked + .toggle-switch {
  background: #34c759;
}

.contact-setting-row input[type="checkbox"]:checked + .toggle-switch::after {
  transform: translateX(18px);
}

.contact-remark-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #33435b;
}

.contact-remark-label input {
  padding: 10px 12px;
  font-size: 14px;
}

.contact-manage-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.contact-manage-actions button {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 11px;
  font-size: 13px;
}

/* 通讯录标题右侧 */
.section-title-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-edit-btn {
  padding: 4px 10px !important;
  font-size: 11px !important;
  border-radius: 10px !important;
}

.section-edit-btn.active {
  color: #fff !important;
  background: var(--primary) !important;
}

/* 编辑模式下联系人列表 */
.conversation-item.edit-mode {
  cursor: pointer;
}

.conv-edit-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--primary);
  background: #eef4ff;
  flex-shrink: 0;
  margin-left: 4px;
}

/* 消息数量角标 */
.conv-msg-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: var(--primary);
  white-space: nowrap;
}

/* === 撤回消息样式 === */
.message.recalled .bubble {
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
  background: transparent !important;
  box-shadow: none !important;
}

.message.recalled.mine .bubble {
  color: var(--muted);
  background: transparent !important;
}

/* ======================== 管理员后台 ======================== */

/* 管理员入口项高亮 */
.profile-page-item.admin-item {
  background: linear-gradient(135deg, #eef4ff, #ddeaff);
}

.profile-page-item.admin-item .profile-page-item-icon {
  color: var(--primary);
}

/* 管理员弹窗 */
.admin-card {
  width: min(480px, 94vw);
  max-height: 88dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.admin-card h3 {
  margin: 0 0 8px;
}

/* 统计栏 */
.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4f8ff;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.admin-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-stat-item b {
  color: var(--text);
  font-size: 14px;
}

.admin-stat-item.danger b {
  color: var(--danger);
}

.admin-stat-item.warn b {
  color: #d98c00;
}

/* 搜索框 */
.admin-search-box {
  margin-bottom: 10px;
}

.admin-search-box input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}

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

/* 用户列表 */
.admin-user-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 60dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 4px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #f7faff;
  border: 1px solid var(--line);
}

.admin-user-row.is-banned {
  background: #fff0f0;
  border-color: #ffd6d6;
}

.admin-user-row.is-muted {
  background: #fff8ec;
  border-color: #ffe6b3;
}

.admin-user-row .avatar {
  flex-shrink: 0;
}

.admin-user-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.admin-user-email {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.admin-user-status {
  display: inline-block;
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.admin-user-status.ok {
  color: #1a9e6b;
  background: #e6f9f0;
}

.admin-user-status.danger {
  color: var(--danger);
  background: #ffe3e3;
}

.admin-user-status.warn {
  color: #b97400;
  background: #fff3d6;
}

.admin-user-status.admin {
  color: var(--primary);
  background: #e3eeff;
}

/* 标签 */
.admin-user-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.admin-user-tag.guest {
  color: var(--muted);
  background: #eef1f6;
}

.admin-user-tag.admin {
  color: #fff;
  background: var(--primary);
}

.admin-user-tag.me {
  color: #fff;
  background: #1a9e6b;
}

/* 操作按钮 */
.admin-user-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.admin-action-btn {
  border: 0;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}

.admin-action-btn.danger {
  background: var(--danger);
}

.admin-action-btn.active {
  background: #1a9e6b;
}

.admin-action-btn.warn {
  background: #e8a300;
}

.admin-action-btn:hover {
  filter: brightness(1.05);
}

.admin-action-btn:active {
  transform: scale(0.96);
}

@media (max-width: 360px) {
  .admin-action-btn {
    padding: 6px 8px;
    font-size: 11px;
  }
}

/* ===== 管理员操作对话框 ===== */
.admin-action-card {
  width: min(440px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
}

.admin-action-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.admin-action-user-info {
  padding: 10px 14px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: #eef4ff;
  color: var(--primary);
  font-weight: 800;
  font-size: 15px;
}

.admin-action-card select {
  appearance: auto;
  -webkit-appearance: auto;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.admin-action-card textarea {
  resize: vertical;
  min-height: 60px;
  font-size: 14px;
  line-height: 1.5;
}

.admin-action-card .dialog-actions button {
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
}

/* 封禁/禁言原因展示行 */
.admin-reason-line {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.admin-reason-line.danger {
  color: var(--danger);
}

.admin-reason-line.warn {
  color: #c88200;
}

/* 禁言横幅 */
.mute-banner {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #fff3cd, #ffe8a1);
  color: #856404;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #f5d785;
  line-height: 1.5;
}

.mute-banner.show {
  display: flex;
}

.mute-banner::before {
  content: "\1F507";
  font-size: 16px;
  flex-shrink: 0;
}

/* ===== 拉黑提示 ===== */
.block-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fde8e8, #ffd0d0);
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  border-radius: 14px;
  border: 1px solid rgba(223, 63, 64, 0.2);
  line-height: 1.5;
}

.block-notice .link-btn {
  background: none;
  border: 0;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 13px;
  text-decoration: underline;
}

/* ===== 分享名片 ===== */
.share-card-card {
  max-width: 380px;
}

.share-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.share-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 22px;
  flex-shrink: 0;
}

.share-card-detail h4 {
  margin: 0 0 4px;
  font-size: 17px;
}

.share-card-fields {
  display: grid;
  gap: 14px;
}

.copy-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.copy-field input {
  padding: 10px 13px;
}

.copy-btn {
  padding: 10px 16px;
  white-space: nowrap;
}

/* ===== 找回密码 ===== */
.auth-form-link {
  display: flex;
  justify-content: center;
  margin-top: -4px;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: none;
}

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

.forgot-password-card {
  width: min(440px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
}

.forgot-password-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.forgot-password-card .form-tip {
  margin: 0 0 8px;
}

.forgot-password-card .dialog-actions button {
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
}

/* ===== 朋友圈 ===== */
.moments-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

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

.moments-header h2 {
  margin: 0;
  font-size: 18px;
}

.moments-post-btn {
  font-size: 13px;
  padding: 8px 14px;
}

.moments-feed {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.moments-feed .empty-state {
  padding: 60px 20px;
}

.moment-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(61, 87, 125, 0.06);
}

.moment-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.moment-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  background: linear-gradient(135deg, #1668ff, #78d3ff);
  overflow: hidden;
  flex-shrink: 0;
}

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

.moment-card-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
}

.moment-card-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

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

.moment-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.moment-images.one {
  grid-template-columns: 1fr;
  max-width: 200px;
}

.moment-images.two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 240px;
}

.moment-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  background: #eef4ff;
}

.moment-images.one .moment-img {
  aspect-ratio: auto;
  max-height: 200px;
  border-radius: 14px;
}

.moment-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(220, 230, 245, 0.5);
}

.moment-action-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.moment-action-btn:active {
  background: rgba(22, 104, 255, 0.06);
}

.moment-action-btn.liked {
  color: var(--primary);
}

.moment-action-btn.delete {
  margin-left: auto;
  color: var(--danger);
}

.moment-like-count {
  font-size: 12px;
  color: var(--muted);
}

.moment-comments {
  margin-top: 8px;
  background: rgba(238, 244, 255, 0.5);
  border-radius: 12px;
  padding: 8px 12px;
}

.moment-comment {
  font-size: 13px;
  line-height: 1.6;
  padding: 3px 0;
  color: var(--text);
  word-break: break-word;
}

.moment-comment-name {
  font-weight: 800;
  color: var(--primary);
  margin-right: 6px;
}

.moment-comment-time {
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
}

/* 朋友圈发布弹窗 */
.moments-post-card {
  width: min(440px, 92vw);
}

.moments-post-card textarea {
  resize: vertical;
  min-height: 80px;
  font-size: 14px;
  line-height: 1.6;
}

.moments-image-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.moments-img-btn {
  display: inline-block;
  width: fit-content;
  font-size: 13px;
  padding: 8px 14px;
}

.moments-image-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.moments-image-preview:empty {
  display: none;
}

.moments-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
}

.moments-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moments-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.moments-comment-card {
  width: min(400px, 92vw);
}

.moments-comment-card textarea {
  resize: vertical;
  min-height: 60px;
  font-size: 14px;
  line-height: 1.6;
}

/* 朋友圈图片大图预览 */
.moments-img-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.moments-img-preview-overlay img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 8px;
}

/* 朋友圈可见范围 */
.moments-visibility-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.moments-visibility-label {
  font-size: 14px;
  font-weight: 700;
  color: #33435b;
  white-space: nowrap;
}

.moments-visibility-row select {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
}

.moments-visible-to-box {
  margin-top: 4px;
}

.moments-visible-to-box.hidden {
  display: none;
}

.moments-visible-to-box .friend-check-list {
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
}

.moments-visibility-card {
  width: min(440px, 92vw);
}

.moment-visibility-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
  background: rgba(238, 244, 255, 0.6);
  padding: 1px 8px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== 自定义ID ===== */
.profile-page-customid {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.add-friend-card {
  width: min(440px, 92vw);
}

.add-friend-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 14px;
  background: #eef4ff;
}

.add-friend-tab {
  flex: 1;
  border: 0;
  border-radius: 11px;
  padding: 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.add-friend-tab.active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 6px 16px rgba(22, 104, 255, 0.12);
}

.add-friend-panel.hidden {
  display: none;
}

.search-user-result {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #f7faff;
}

.search-user-result.hidden {
  display: none;
}

.search-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.search-user-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  background: linear-gradient(135deg, #1668ff, #78d3ff);
  flex-shrink: 0;
}

.search-user-name {
  font-weight: 800;
  font-size: 15px;
}

.search-user-id {
  font-size: 12px;
  color: var(--muted);
}

/* ===== 自定义ID编辑弹窗 ===== */
.custom-id-card {
  width: min(440px, 92vw);
}

/* ===== 二维码弹窗 ===== */
.qrcode-card {
  width: min(360px, 92vw);
  text-align: center;
}

.qrcode-display {
  display: grid;
  place-items: center;
  padding: 20px 0;
}

.qrcode-display canvas,
.qrcode-display img {
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 12px;
  background: #fff;
}

.qrcode-display #qrcodeImg {
  width: 220px;
  height: 220px;
}

/* ===== 扫一扫弹窗 ===== */
.scan-qrcode-card {
  width: min(400px, 92vw);
}

.scan-area {
  position: relative;
  width: 100%;
  min-height: 240px;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a2e;
  display: grid;
  place-items: center;
}

.scan-video {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.scan-video.hidden {
  display: none;
}

.scan-canvas {
  display: none;
}

.scan-tip {
  color: rgba(255, 255, 255, 0.7) !important;
  text-align: center;
  padding: 20px;
}

.scan-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: space-between;
}

.scan-actions .ghost-btn {
  flex: 1;
  text-align: center;
}

/* ===== 扫描结果弹窗 ===== */
.scan-result-card {
  width: min(400px, 92vw);
}

.scan-result-content {
  text-align: center;
  padding: 16px 0;
}

.scan-result-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, #1668ff, #78d3ff);
  margin: 0 auto 12px;
}

.scan-result-name {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.scan-result-id {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
