/* ==========================================================================
   微信网页版 · 全站样式
   视觉基准：微信绿 #07C160 / 深色侧栏 #2E2E2E / 聊天绿 #95EC69
   ========================================================================== */

:root {
  --green: #07C160;
  --green-dark: #06AD56;
  --green-deep: #05964A;
  --green-soft: #E8F8EF;
  --bubble: #95EC69;
  --rail: #2B2B2B;
  --ink: #101915;
  --text: #1F2522;
  --muted: #7C8781;
  --muted-2: #9AA49E;
  --line: #E7EAE8;
  --line-soft: #F0F2F1;
  --bg: #F4F7F5;
  --card: #FFFFFF;
  --danger: #FA5151;
  --blue: #576B95;
  --shadow-sm: 0 1px 3px rgba(16, 40, 28, .05);
  --shadow-md: 0 12px 32px -12px rgba(16, 40, 28, .18);
  --shadow-lg: 0 32px 80px -32px rgba(12, 50, 32, .30);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
code { font-family: var(--mono); }
[hidden] { display: none !important; }
::selection { background: rgba(7, 193, 96, .22); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(30, 45, 37, .16); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(30, 45, 37, .26); }

:focus-visible { outline: 2px solid rgba(7, 193, 96, .55); outline-offset: 2px; }

.icon { display: block; flex: none; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.wechat-logo, .wechat-mark { display: block; }
.mono { font-family: var(--mono); }
.text-muted { color: var(--muted); }
.text-green { color: var(--green); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .62; cursor: not-allowed; transform: none !important; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #0AC96A 0%, var(--green) 55%, var(--green-dark) 100%);
  box-shadow: 0 8px 20px -8px rgba(7, 193, 96, .65);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(7, 193, 96, .7);
}
.btn-outline {
  background: #fff;
  color: #2C3A33;
  border: 1px solid #DDE4E0;
  box-shadow: 0 1px 2px rgba(16, 40, 28, .03);
}
.btn-outline:hover:not(:disabled) { border-color: #BFE9D1; color: var(--green-dark); background: #FBFFFC; }
.btn-ghost {
  background: #F3F6F4;
  color: #3A4841;
  border: 1px solid transparent;
}
.btn-ghost:hover:not(:disabled) { background: #EAF1ED; color: #17231D; }
.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #FF6B6B, #F03E3E);
  box-shadow: 0 8px 20px -10px rgba(250, 81, 81, .7);
}
.btn-danger:hover:not(:disabled) { transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-lg { height: 52px; border-radius: 12px; font-size: 15px; letter-spacing: 2px; }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 8px; font-size: 12.5px; gap: 6px; }
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex: none;
}
.btn-ghost .btn-spinner, .btn-outline .btn-spinner {
  border-color: rgba(7, 193, 96, .2);
  border-top-color: var(--green);
}

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #5E6A64;
  transition: background .15s ease, color .15s ease;
  flex: none;
}
.icon-btn:hover { background: rgba(0, 0, 0, .055); color: #1E2A23; }

.link-btn {
  color: var(--green-dark);
  font-size: 12.5px;
  font-weight: 500;
  padding: 2px 0;
}
.link-btn:hover { color: var(--green); text-decoration: underline; }

/* --------------------------------------------------------------------------
   表单
   -------------------------------------------------------------------------- */

.field { display: block; margin-bottom: 18px; }
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #3D4A43;
}
.field-label em {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-2);
}
.field-label em.optional {
  background: #EFF3F0;
  border-radius: 4px;
  padding: 2px 6px;
}
.field-label em.required { color: var(--green-dark); }
.field-hint {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #8B958F;
}
.field-hint.ok { color: var(--green-dark); }
.field-hint.bad { color: var(--danger); }
.suggestion-label { margin-left: 5px; color: #9AA49E; }
.suggestion-chip {
  display: inline-flex;
  align-items: center;
  margin: 4px 4px 0 0;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #D6F0E1;
  background: #EDF9F2;
  color: var(--green-dark);
  font-size: 10.5px;
  font-family: var(--mono);
  transition: background .13s ease, border-color .13s ease;
}
.suggestion-chip:hover { background: #DFF5E8; border-color: #B9E8CE; }
.spin { animation: spin 1s linear infinite; }

.input-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 14px;
  background: #F5F8F6;
  border: 1.5px solid #E3E9E5;
  border-radius: 12px;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.input-shell:focus-within {
  background: #fff;
  border-color: rgba(7, 193, 96, .7);
  box-shadow: 0 0 0 4px rgba(7, 193, 96, .10);
}
.input-shell.is-invalid { border-color: rgba(250, 81, 81, .6); background: #FFF8F8; }
.input-shell.is-valid { border-color: rgba(7, 193, 96, .55); }
.input-shell input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #17231D;
}
.input-shell input::placeholder { color: #A4ADA8; font-size: 13.5px; }
.input-prefix {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  transform: translateY(-.5px);
}
.input-icon { color: #8B958F; }
.input-action {
  width: 32px; height: 32px;
  margin-right: -6px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #8B958F;
  flex: none;
  transition: background .15s ease, color .15s ease;
}
.input-action:hover { background: #E8EFEA; color: var(--green-dark); }
.input-status {
  width: 20px; height: 20px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 14px;
}
.input-status.ok { color: var(--green); }
.input-status.bad { color: var(--danger); }
.input-status .icon { width: 18px; height: 18px; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #66736B;
  cursor: pointer;
  user-select: none;
}
.check input { width: 15px; height: 15px; accent-color: var(--green); cursor: pointer; }

.notice-box {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  margin: 4px 0 20px;
  background: #F1FAF5;
  border: 1px solid #DCF3E6;
  border-radius: 10px;
  color: #4D6B5B;
  font-size: 11.5px;
  line-height: 1.65;
}
.notice-box .notice-icon { color: var(--green-dark); margin-top: 1px; }
.notice-box p { margin: 0; }

/* --------------------------------------------------------------------------
   登录 / 注册
   -------------------------------------------------------------------------- */

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #F3F7F4;
  position: relative;
  overflow-x: hidden;
}
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.auth-orb { position: absolute; border-radius: 50%; }
.auth-orb-1 {
  width: 620px; height: 620px;
  top: -240px; right: -160px;
  background: radial-gradient(circle at 35% 35%, rgba(7, 193, 96, .24), rgba(7, 193, 96, 0) 68%);
}
.auth-orb-2 {
  width: 560px; height: 560px;
  bottom: -240px; left: -200px;
  background: radial-gradient(circle at 60% 40%, rgba(16, 174, 255, .15), rgba(16, 174, 255, 0) 70%);
}
.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 40, 28, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 40, 28, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
}

.auth-topbar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  box-shadow: 0 6px 16px -6px rgba(7, 193, 96, .55);
}
.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #12251A;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.brand-text small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.2px;
  color: #8A958F;
  text-transform: uppercase;
}
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-note { font-size: 12.5px; color: #7C8781; }

.auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 18px 48px 54px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}
.auth-hero { max-width: 570px; animation: fadeUp .55s ease both; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(7, 193, 96, .18);
  box-shadow: 0 4px 14px -8px rgba(7, 193, 96, .4);
  font-size: 12px;
  font-weight: 500;
  color: #267A4B;
  letter-spacing: .4px;
  backdrop-filter: blur(8px);
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(7, 193, 96, .45);
  animation: pulse 2s infinite;
}
.auth-hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: -2.5px;
  font-weight: 800;
  color: #10241A;
}
.auth-hero h1 em {
  font-style: normal;
  color: var(--green);
  position: relative;
  white-space: nowrap;
}
.auth-hero h1 em::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 2px;
  height: 10px;
  background: linear-gradient(90deg, rgba(7, 193, 96, .18), rgba(7, 193, 96, .04));
  border-radius: 6px;
  z-index: -1;
}
.hero-lead {
  max-width: 445px;
  font-size: 15.5px;
  line-height: 1.8;
  color: #5D6B63;
}

.hero-preview {
  width: 365px;
  margin-top: 32px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 26px 60px -32px rgba(10, 60, 35, .42), 0 2px 8px rgba(10, 60, 35, .04);
  backdrop-filter: blur(16px);
  transform: rotate(-1.1deg);
  transition: transform .3s ease;
}
.hero-preview:hover { transform: rotate(0deg) translateY(-2px); }
.preview-top { display: flex; align-items: center; gap: 10px; padding: 2px 2px 12px; }
.preview-avatar {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0AC96A, #05964A);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.preview-name { flex: 1; min-width: 0; }
.preview-name strong { display: block; font-size: 13px; font-weight: 600; color: #1B2A22; }
.preview-name small { display: block; margin-top: 2px; font-size: 10.5px; color: #9AA49E; }
.preview-dots { color: #A8B1AC; letter-spacing: 1px; font-size: 12px; }
.preview-body {
  background: #F0F3F1;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
  justify-content: center;
}
.preview-bubble {
  align-self: flex-start;
  max-width: 82%;
  padding: 8px 11px;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  line-height: 1.55;
  color: #2A352F;
  box-shadow: 0 1px 2px rgba(16, 40, 28, .05);
  position: relative;
}
.preview-bubble::before {
  content: "";
  position: absolute;
  left: -4px; top: 10px;
  border: 4px solid transparent;
  border-right-color: #fff;
  border-left: 0;
}
.preview-bubble-me {
  align-self: flex-end;
  background: var(--bubble);
  color: #17231D;
}
.preview-bubble-me::before {
  left: auto; right: -4px;
  border-right: 0;
  border-left: 4px solid var(--bubble);
}
.preview-input {
  margin-top: 10px;
  height: 34px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #E8EDE9;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11.5px;
  color: #A4ADA8;
}
.preview-input i {
  margin-left: auto;
  font-style: normal;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 11px;
}
.preview-profile { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.preview-chip {
  font-size: 10.5px;
  color: #3E7C5A;
  background: #EDF9F2;
  border: 1px solid #D8F1E2;
  padding: 4px 8px;
  border-radius: 999px;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
}
.hero-features li { display: flex; align-items: center; gap: 9px; }
.feature-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(7, 193, 96, .14);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px -8px rgba(7, 193, 96, .5);
  flex: none;
}
.feature-copy strong { display: block; font-size: 13px; font-weight: 600; color: #26342C; }
.feature-copy small { display: block; margin-top: 2px; font-size: 10.5px; color: #8B958F; }

.auth-card {
  width: 100%;
  max-width: 430px;
  justify-self: end;
  padding: 38px 36px 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  position: relative;
  animation: fadeUp .55s .08s ease both;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 36px; right: 36px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, rgba(7, 193, 96, .7), transparent);
}
.auth-card-wide { max-width: 470px; }
.auth-card-head { text-align: center; }
.auth-card-logo {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  box-shadow: 0 10px 24px -10px rgba(7, 193, 96, .65);
}
.auth-card-head h2 {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -.6px;
  color: #12251A;
}
.auth-card-head p { margin-top: 7px; font-size: 13px; color: #8B958F; }
.auth-form { margin-top: 26px; }
.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 22px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  font-size: 11.5px;
  color: #A0AAA4;
  white-space: nowrap;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #EDF0EE;
}
.auth-card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px dashed #E7ECE8;
  font-size: 10.5px;
  color: #8B958F;
  flex-wrap: wrap;
}
.auth-card-foot code {
  font-size: 10px;
  color: #4D5C53;
  background: #F2F6F3;
  padding: 3px 7px;
  border-radius: 5px;
  word-break: break-all;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(7, 193, 96, .5);
  animation: pulse 2.2s infinite;
  flex: none;
}
.auth-footer {
  position: relative;
  z-index: 1;
  padding: 16px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: #8B958F;
}
.auth-footer a { color: var(--green-dark); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.footer-dot { color: #C4CCC7; }

/* --------------------------------------------------------------------------
   主应用框架
   -------------------------------------------------------------------------- */

.app-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E7ECE9;
  position: relative;
}
.app-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(7, 193, 96, .10), transparent 38%),
    radial-gradient(circle at 88% 86%, rgba(16, 174, 255, .08), transparent 42%),
    linear-gradient(135deg, #EDF2EF 0%, #E4EAE7 55%, #E9EFEB 100%);
}
.app-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(23, 60, 40, .10) .7px, transparent .7px);
  background-size: 18px 18px;
  opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 78%);
}
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1240px, 96vw);
  height: min(840px, 94vh);
  height: min(840px, 94dvh);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 40px 100px -30px rgba(20, 40, 30, .42),
    0 0 0 1px rgba(0, 0, 0, .04);
  animation: shellIn .45s ease both;
}

/* 左侧深色导航 */
.rail {
  width: 68px;
  flex: none;
  background: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 0 16px;
  gap: 6px;
}
.rail-avatar {
  width: 42px; height: 42px;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  margin-bottom: 18px;
  border: 2px solid rgba(255, 255, 255, .14);
  background: #3A3A3A;
  flex: none;
  transition: border-color .15s ease, transform .15s ease;
}
.rail-avatar:hover { border-color: rgba(7, 193, 96, .75); transform: translateY(-1px); }
.rail-avatar .avatar { width: 100%; height: 100%; border-radius: 8px; font-size: 16px; }
.rail-nav, .rail-bottom { display: flex; flex-direction: column; gap: 5px; width: 100%; align-items: center; }
.rail-bottom { margin-top: auto; }
.rail-btn {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #9B9B9B;
  transition: background .15s ease, color .15s ease;
}
.rail-btn:hover { background: rgba(255, 255, 255, .08); color: #F2F2F2; }
.rail-btn.active { color: var(--green); background: rgba(7, 193, 96, .13); }
.rail-btn.active::before {
  content: "";
  position: absolute;
  left: -12px; top: 11px;
  width: 3px; height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--green);
}
.rail-logout:hover { color: #FF7B7B; background: rgba(250, 81, 81, .12); }
.rail-badge {
  position: absolute;
  top: 5px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger);
  border: 2px solid var(--rail);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 12px;
  text-align: center;
}

/* 会话列表栏 */
.sidebar {
  width: 312px;
  flex: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #F7F7F7;
  border-right: 1px solid #E7E7E7;
}
.sidebar-head {
  flex: none;
  min-height: 64px;
  padding: 14px 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-title-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sidebar-title-row h2 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.sidebar-title-row .head-count { font-size: 11.5px; color: #9AA49E; }
.head-actions { display: flex; align-items: center; gap: 3px; }
.search-box {
  flex: 1;
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  background: #E9E9E9;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #8E8E8E;
  transition: background .15s ease, border-color .15s ease;
}
.search-box:focus-within { background: #fff; border-color: rgba(7, 193, 96, .45); }
.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: #222;
}
.search-box input::placeholder { color: #9E9E9E; }
.sidebar-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 8px 14px;
}

.chat-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .13s ease;
  user-select: none;
}
.chat-item:hover { background: #EDEDED; }
.chat-item.active { background: #E4E4E4; }
.chat-item-main { flex: 1; min-width: 0; }
.chat-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #1B1B1B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item-time { font-size: 10.5px; color: #A6A6A6; flex: none; }
.chat-item-bottom { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.chat-item-preview {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #9A9A9A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item-preview .draft { color: #B0B0B0; }
.unread-badge {
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex: none;
  line-height: 1;
}
.chat-item-muted .unread-badge { background: #B9C2BD; }
.chat-item-pin {
  font-size: 9px;
  color: #8A958F;
  background: #E9EEEA;
  border-radius: 4px;
  padding: 2px 5px;
  flex: none;
}

.contact-section-title {
  padding: 14px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  color: #9AA49E;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .13s ease;
}
.contact-item:hover { background: #EDEDED; }
.contact-item-main { flex: 1; min-width: 0; }
.contact-name { font-size: 14px; font-weight: 500; color: #1B1B1B; display: flex; align-items: center; gap: 6px; }
.contact-handle { margin-top: 3px; font-size: 11px; color: #9AA49E; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-tag {
  font-size: 9px;
  font-weight: 600;
  color: var(--green-dark);
  background: #E4F7EC;
  border: 1px solid #CFF0DD;
  padding: 1px 5px;
  border-radius: 4px;
  flex: none;
}
.contact-arrow { color: #C0C7C3; flex: none; }

.side-menu { padding: 8px 2px; }
.side-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 11px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .13s ease;
}
.side-menu-item:hover { background: #EDEDED; }
.side-menu-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #E8F7EE;
  color: var(--green-dark);
  flex: none;
}
.side-menu-item.dim .side-menu-icon { background: #EEF0EF; color: #9AA49E; }
.side-menu-copy { flex: 1; min-width: 0; }
.side-menu-copy strong { display: block; font-size: 14px; font-weight: 500; color: #1B1B1B; }
.side-menu-copy small { display: block; margin-top: 2px; font-size: 10.5px; color: #A0AAA4; }
.side-menu-item .chevron { color: #C4CBC7; }
.side-profile {
  margin: 10px 2px 4px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  border: 1px solid #ECEFED;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 40, 28, .03);
  transition: border-color .15s ease, transform .15s ease;
}
.side-profile:hover { border-color: #D6EEE0; transform: translateY(-1px); }
.side-profile-main { flex: 1; min-width: 0; }
.side-profile-main strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-profile-main small { display: block; margin-top: 3px; font-size: 11px; color: #9AA49E; }
.side-menu-divider { height: 1px; background: #ECEFED; margin: 8px 12px; }

/* 主面板 */
.main-panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #F5F5F5;
  position: relative;
}

/* --------------------------------------------------------------------------
   聊天
   -------------------------------------------------------------------------- */

.chat-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-header {
  flex: none;
  height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F5F5F5;
  border-bottom: 1px solid #E7E7E7;
  position: relative;
  z-index: 4;
}
.back-btn { display: none; }
.chat-title { min-width: 0; flex: 1; }
.chat-title h3 {
  font-size: 16px;
  font-weight: 600;
  color: #171717;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-title .chat-sub {
  margin-top: 2px;
  font-size: 10.5px;
  color: #9AA49E;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-actions { display: flex; align-items: center; gap: 3px; margin-left: auto; }

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 28px 26px;
  background: #F5F5F5;
}
.time-divider {
  display: flex;
  justify-content: center;
  margin: 18px 0 22px;
}
.time-divider span {
  font-size: 10.5px;
  color: #A6A6A6;
  background: rgba(255, 255, 255, .7);
  border-radius: 4px;
  padding: 3px 8px;
}
.message-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
}
.message-row.mine { flex-direction: row-reverse; }
.message-row .avatar {
  width: 36px; height: 36px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 1px;
}
.message-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(64%, 560px);
  min-width: 0;
}
.message-row.mine .message-content { align-items: flex-end; }
.message-sender {
  margin: 0 2px 4px;
  font-size: 10.5px;
  color: #9AA49E;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bubble {
  position: relative;
  padding: 9px 13px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .025);
  color: #1E1E1E;
}
.message-row:not(.mine) .bubble { background: #fff; }
.message-row:not(.mine) .bubble::before {
  content: "";
  position: absolute;
  left: -5px; top: 11px;
  border: 5px solid transparent;
  border-right-color: #fff;
  border-left: 0;
}
.message-row.mine .bubble { background: var(--bubble); }
.message-row.mine .bubble::after {
  content: "";
  position: absolute;
  right: -5px; top: 11px;
  border: 5px solid transparent;
  border-left-color: var(--bubble);
  border-right: 0;
}
.message-time {
  margin: 3px 3px 0;
  font-size: 9.5px;
  color: #B3BAB6;
  opacity: 0;
  transition: opacity .15s ease;
}
.message-row:hover .message-time { opacity: 1; }
.message-row.mine .message-time { text-align: right; }
.message-row.system-tip {
  justify-content: center;
  margin: 14px 0;
}
.message-row.system-tip .bubble {
  background: rgba(0, 0, 0, .045);
  color: #8A958F;
  font-size: 10.5px;
  box-shadow: none;
  border-radius: 4px;
  padding: 4px 9px;
}
.message-row.system-tip .bubble::before, .message-row.system-tip .bubble::after { display: none; }

.composer {
  flex: none;
  padding: 9px 18px 15px;
  background: #F5F5F5;
  border-top: 1px solid #E7E7E7;
  position: relative;
  z-index: 5;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-bottom: 5px;
  color: #5F6A64;
}
.composer-tools button {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #5F6A64;
  transition: background .13s ease, color .13s ease;
}
.composer-tools button:hover { background: #E8E8E8; color: #1E1E1E; }
.composer-hint { margin-left: auto; font-size: 10px; color: #AEB5B1; }
.composer-row { display: flex; align-items: flex-end; gap: 10px; }
.composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border: none;
  outline: none;
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #1E1E1E;
  box-shadow: inset 0 0 0 1px #E7E7E7;
  transition: box-shadow .15s ease;
}
.composer textarea:focus { box-shadow: inset 0 0 0 1px rgba(7, 193, 96, .6), 0 0 0 3px rgba(7, 193, 96, .07); }
.composer textarea::placeholder { color: #A9B1AD; }
.send-btn {
  flex: none;
  height: 38px;
  padding: 0 20px;
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: background .15s ease, opacity .15s ease;
}
.send-btn:hover:not(:disabled) { background: var(--green-dark); }
.send-btn:disabled { opacity: .55; cursor: not-allowed; }
.emoji-panel {
  position: absolute;
  left: 18px;
  bottom: calc(100% - 4px);
  width: 304px;
  max-width: calc(100vw - 32px);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .18);
  border: 1px solid #EEF1EF;
  z-index: 20;
}
.emoji-panel button {
  height: 33px;
  border-radius: 6px;
  font-size: 19px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.emoji-panel button:hover { background: #F1F5F2; }

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background:
    radial-gradient(circle at 50% 42%, rgba(7, 193, 96, .055), transparent 45%),
    #F5F5F5;
}
.chat-empty .empty-logo { width: 76px; height: 76px; border-radius: 20px; opacity: .95; box-shadow: 0 18px 40px -18px rgba(7, 193, 96, .55); }
.chat-empty h2 { margin-top: 20px; font-size: 21px; font-weight: 700; letter-spacing: -.4px; }
.chat-empty p { margin-top: 8px; font-size: 12.5px; color: #8B958F; line-height: 1.7; max-width: 320px; }
.chat-empty .btn { margin-top: 20px; }
.welcome-stats {
  display: flex;
  gap: 28px;
  margin-top: 26px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid #ECEFED;
  border-radius: 12px;
}
.welcome-stat { text-align: center; }
.welcome-stat strong { display: block; font-size: 19px; font-weight: 700; color: var(--green-dark); }
.welcome-stat small { display: block; margin-top: 2px; font-size: 10.5px; color: #9AA49E; }

/* 联系人资料 */
.profile-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 36px 40px;
  background: #F5F5F5;
}
.panel-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin-bottom: 18px;
}
.panel-topbar h2 { font-size: 15px; font-weight: 600; }
.panel-topbar .icon-btn { display: none; }
.profile-card {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #EFF2F0;
}
.profile-card-main { flex: 1; min-width: 0; }
.profile-card-main h2 { font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.profile-handle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--green-dark);
  background: #EAF8F0;
  border-radius: 6px;
  padding: 3px 8px;
}
.profile-bio { margin-top: 12px; font-size: 13px; line-height: 1.7; color: #6B7770; }
.profile-actions { display: flex; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.profile-info-card {
  margin-top: 16px;
  padding: 6px 22px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #EFF2F0;
  box-shadow: var(--shadow-sm);
}
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #F2F4F3;
  font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: #8B958F; flex: none; }
.info-row .info-value { color: #27332C; text-align: right; word-break: break-all; }
.info-row code { font-size: 12px; color: #4D5C53; }

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

.moments-panel { flex: 1; min-height: 0; overflow-y: auto; background: #F5F5F5; }
.moments-hero {
  position: relative;
  height: 218px;
  padding: 0 34px 30px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, .22), transparent 32%),
    linear-gradient(120deg, #0A3D26 0%, #076B3C 46%, #0AB765 100%);
}
.moments-hero::before {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  right: -60px; top: -90px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
}
.moments-hero::after {
  content: "";
  position: absolute;
  width: 380px; height: 380px;
  right: -120px; top: -150px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .10);
}
.moments-hero-inner { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; width: 100%; gap: 20px; }
.moments-hero h2 { font-size: 27px; font-weight: 750; letter-spacing: -.8px; }
.moments-hero p { margin-top: 7px; font-size: 12px; color: rgba(255, 255, 255, .72); letter-spacing: .3px; }
.moments-hero .hero-avatar {
  width: 58px; height: 58px;
  border-radius: 13px;
  border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
  flex: none;
}
.moments-body {
  position: relative;
  max-width: 680px;
  margin: -28px auto 0;
  padding: 0 22px 44px;
}
.moments-compose {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #EFF2F0;
  box-shadow: 0 8px 24px -16px rgba(16, 40, 28, .25);
  margin-bottom: 16px;
}
.compose-fake {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  background: #F4F6F5;
  border-radius: 7px;
  color: #9AA49E;
  font-size: 12.5px;
  text-align: left;
  transition: background .15s ease;
}
.compose-fake:hover { background: #EDF2EF; }
.compose-camera { color: #5F6A64; }
.moment-card {
  padding: 18px;
  margin-bottom: 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #EFF2F0;
  box-shadow: var(--shadow-sm);
}
.moment-head { display: flex; align-items: center; gap: 11px; }
.moment-head .avatar { width: 42px; height: 42px; border-radius: 8px; font-size: 16px; }
.moment-head-main { flex: 1; min-width: 0; }
.moment-author { font-size: 14px; font-weight: 600; color: #1D2A22; }
.moment-time { margin-top: 3px; font-size: 10.5px; color: #9AA49E; }
.moment-more { color: #A6AEA9; }
.moment-text {
  margin: 12px 0 4px 53px;
  font-size: 14px;
  line-height: 1.72;
  color: #27332C;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.moment-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 10px 0 0 53px;
  padding-top: 9px;
  border-top: 1px solid #F2F4F3;
}
.moment-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  color: #66736B;
  font-size: 11.5px;
  transition: background .13s ease, color .13s ease;
}
.moment-action:hover { background: #F2F5F3; color: var(--green-dark); }
.moment-action.liked { color: #E5484D; }
.moment-action.liked .icon { fill: currentColor; }
.moment-action.danger:hover { color: var(--danger); background: #FFF1F1; }
.moment-social {
  margin: 8px 0 0 53px;
  background: #F6F8F7;
  border-radius: 7px;
  overflow: hidden;
}
.moment-likes {
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--blue);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
}
.moment-likes .like-icon { color: var(--blue); margin-right: 3px; }
.moment-like-name { color: var(--blue); }
.moment-comments { padding: 2px 11px 8px; }
.moment-comment {
  padding: 5px 0;
  font-size: 12px;
  line-height: 1.65;
  color: #35423B;
  word-break: break-word;
}
.moment-comment-name { color: var(--blue); font-weight: 500; }
.moment-comment-name::after { content: "："; color: #6B7770; }
.moment-comment-time { margin-left: 5px; font-size: 9.5px; color: #A6AEA9; }
.moment-comment-form {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid #ECEFED;
  background: #fff;
}
.moment-comment-form input {
  flex: 1;
  min-width: 0;
  height: 30px;
  border: 1px solid #E4E9E6;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 12px;
  outline: none;
}
.moment-comment-form input:focus { border-color: rgba(7, 193, 96, .55); }
.moment-comment-form button {
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   我
   -------------------------------------------------------------------------- */

.me-panel { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 36px 44px; background: #F5F5F5; }
.me-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 14%, rgba(255, 255, 255, .2), transparent 34%),
    linear-gradient(120deg, #0A3D26 0%, #087344 52%, #0AB765 100%);
  box-shadow: 0 18px 38px -22px rgba(7, 100, 55, .55);
}
.me-hero::after {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  right: -100px; top: -130px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
}
.me-hero .avatar {
  width: 82px; height: 82px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
  font-size: 30px;
  flex: none;
}
.me-hero-main { position: relative; z-index: 1; flex: 1; min-width: 0; }
.me-hero-main h2 { font-size: 24px; font-weight: 750; letter-spacing: -.5px; }
.me-handle { margin-top: 5px; font-size: 12px; color: rgba(255, 255, 255, .78); }
.me-bio { margin-top: 9px; font-size: 12.5px; line-height: 1.65; color: rgba(255, 255, 255, .8); }
.me-edit-btn {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 11.5px;
  backdrop-filter: blur(6px);
}
.me-edit-btn:hover { background: rgba(255, 255, 255, .25); }
.me-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.info-card {
  background: #fff;
  border: 1px solid #EFF2F0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.info-card-label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #8B958F; }
.info-card-value { margin-top: 7px; font-size: 14px; font-weight: 600; color: #1D2A22; word-break: break-all; }
.info-card-value.code { font-family: var(--mono); font-size: 12.5px; }
.info-card-note { margin-top: 4px; font-size: 10.5px; color: #9AA49E; }
.me-actions { margin-top: 16px; background: #fff; border: 1px solid #EFF2F0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.action-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #F2F4F3;
  text-align: left;
  transition: background .13s ease;
}
.action-row:last-child { border-bottom: none; }
.action-row:hover { background: #F9FBFA; }
.action-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #EAF8F0;
  color: var(--green-dark);
  flex: none;
}
.action-row.danger .action-icon { background: #FFF0F0; color: var(--danger); }
.action-copy { flex: 1; min-width: 0; }
.action-copy strong { display: block; font-size: 13.5px; font-weight: 500; color: #1D2A22; }
.action-copy small { display: block; margin-top: 2px; font-size: 10.5px; color: #9AA49E; }
.action-row .chevron { color: #C4CBC7; }
.api-card {
  margin-top: 16px;
  padding: 16px 18px;
  background: #0F2319;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  position: relative;
}
.api-card::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(7, 193, 96, .16);
  filter: blur(4px);
}
.api-card-main { position: relative; z-index: 1; flex: 1; min-width: 0; }
.api-card-label { font-size: 10px; letter-spacing: 1.4px; color: rgba(255, 255, 255, .5); text-transform: uppercase; }
.api-card-value { margin-top: 5px; font-family: var(--mono); font-size: 12px; color: #7DF0AD; word-break: break-all; }
.api-copy {
  position: relative;
  z-index: 1;
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  flex: none;
}
.api-copy:hover { background: rgba(255, 255, 255, .18); }

/* --------------------------------------------------------------------------
   底部移动端导航
   -------------------------------------------------------------------------- */

.mobile-tabs { display: none; }

/* --------------------------------------------------------------------------
   弹窗 / Toast / 空状态
   -------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 26, 20, .48);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .18s ease;
}
.modal-overlay.show { opacity: 1; }
.modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
  transform: translateY(10px) scale(.985);
  transition: transform .18s ease;
  overflow: hidden;
}
.modal-overlay.show .modal-card { transform: none; }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
  flex: none;
}
.modal-title-wrap h3 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.modal-title-wrap p { margin-top: 5px; font-size: 12px; line-height: 1.6; color: #8B958F; }
.modal-close { margin: -4px -6px 0 0; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { flex: none; display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; }
.modal-body .field:last-child { margin-bottom: 0; }
.modal-body .input-shell { height: 46px; }
.modal-body textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1.5px solid #E3E9E5;
  background: #F5F8F6;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.65;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.modal-body textarea:focus {
  background: #fff;
  border-color: rgba(7, 193, 96, .7);
  box-shadow: 0 0 0 4px rgba(7, 193, 96, .10);
}
.confirm-text { font-size: 13.5px; line-height: 1.8; color: #4D5C53; }
.modal-profile { display: flex; align-items: center; gap: 14px; padding: 4px 0 16px; }
.modal-profile h4 { font-size: 17px; font-weight: 700; }
.modal-profile p { margin-top: 4px; font-size: 11.5px; color: #8B958F; }
.modal-list { border-top: 1px solid #F0F2F1; }
.modal-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid #F3F5F4;
  font-size: 12.5px;
}
.modal-list-row:last-child { border-bottom: none; }
.modal-list-row span { color: #8B958F; }
.modal-list-row strong { font-weight: 500; color: #27332C; text-align: right; word-break: break-all; }
.modal-actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.modal-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 8px;
  border: 1px solid #E9EDEA;
  border-radius: 10px;
  font-size: 11.5px;
  color: #4D5C53;
  background: #FBFCFB;
}
.modal-action-card:hover { border-color: #CBEBD9; background: #F4FCF7; color: var(--green-dark); }
.modal-action-card .icon { color: var(--green-dark); }

.avatar-picker { display: flex; gap: 9px; flex-wrap: wrap; }
.avatar-swatch {
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 2px solid transparent;
  padding: 0;
  position: relative;
  transition: transform .15s ease, border-color .15s ease;
}
.avatar-swatch:hover { transform: translateY(-2px); }
.avatar-swatch.active { border-color: #17231D; box-shadow: 0 0 0 2px #fff inset; }
.avatar-swatch span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 500px);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 15px;
  border-radius: 9px;
  background: rgba(28, 36, 31, .95);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast-icon { display: flex; color: #9ADDB8; flex: none; }
.toast-success .toast-icon { color: #62E8A2; }
.toast-error .toast-icon { color: #FF9B9B; }
.toast-text { min-width: 0; word-break: break-word; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 46px 20px;
  color: #8B958F;
}
.empty-icon {
  width: 62px; height: 62px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #EFF6F2;
  color: #7FB79A;
  margin-bottom: 14px;
}
.empty-state h4 { font-size: 14px; font-weight: 600; color: #4D5C53; }
.empty-state p { margin-top: 6px; font-size: 11.5px; line-height: 1.7; max-width: 260px; }
.empty-state .btn { margin-top: 16px; }
.list-empty { padding: 40px 16px; text-align: center; font-size: 12px; color: #9AA49E; line-height: 1.7; }

/* 启动遮罩 */
.app-boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #F4F7F5;
  transition: opacity .3s ease, visibility .3s ease;
}
.app-boot img { width: 58px; height: 58px; border-radius: 15px; box-shadow: 0 16px 34px -16px rgba(7, 193, 96, .6); }
.app-boot span { font-size: 12px; color: #8B958F; letter-spacing: .5px; }
.app-boot.hide { opacity: 0; visibility: hidden; }

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

.admin-page { min-height: 100vh; background: #EEF2EF; color: #17231D; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
  width: 248px;
  flex: none;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  background: #12231B;
  color: #fff;
  overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.admin-brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 8px 18px -8px rgba(7, 193, 96, .65); }
.admin-brand span { display: flex; flex-direction: column; }
.admin-brand strong { font-size: 14.5px; font-weight: 650; letter-spacing: .2px; }
.admin-brand small { margin-top: 2px; font-size: 9px; letter-spacing: 1.8px; color: rgba(255, 255, 255, .42); text-transform: uppercase; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 30px; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .66);
  font-size: 13px;
  transition: background .15s ease, color .15s ease;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-nav a.active { background: var(--green); color: #fff; box-shadow: 0 8px 18px -10px rgba(7, 193, 96, .8); }
.admin-side-foot { margin-top: auto; padding-top: 18px; }
.admin-me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.admin-me .avatar { width: 36px; height: 36px; border-radius: 8px; font-size: 14px; }
.admin-me-main { min-width: 0; }
.admin-me-main strong { display: block; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-me-main small { display: block; margin-top: 2px; font-size: 10px; color: rgba(255, 255, 255, .42); }
.admin-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  transition: background .15s ease, color .15s ease;
}
.admin-logout:hover { background: rgba(250, 81, 81, .12); color: #FF9B9B; }
.admin-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 36px 40px;
}
.admin-topbar { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.admin-menu-btn { display: none; }
.admin-heading { flex: 1; min-width: 0; }
.admin-eyebrow { font-size: 9.5px; font-weight: 700; letter-spacing: 2.2px; color: var(--green-dark); }
.admin-heading h1 { margin-top: 5px; font-size: 27px; font-weight: 750; letter-spacing: -.7px; }
.admin-heading p { margin-top: 5px; font-size: 12.5px; color: #6B7A72; }
.admin-top-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.api-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #E1E7E3;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #4D5C53;
  box-shadow: 0 1px 2px rgba(16, 40, 28, .03);
}
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card {
  padding: 17px 18px;
  background: #fff;
  border: 1px solid rgba(16, 40, 28, .05);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 11.5px; color: #6B7A72; }
.stat-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #EAF8F0;
  color: var(--green-dark);
}
.stat-card:nth-child(2) .stat-icon { background: #EAF3FF; color: #3B82F6; }
.stat-card:nth-child(3) .stat-icon { background: #FFF4E6; color: #E08A00; }
.stat-card:nth-child(4) .stat-icon { background: #F3EDFF; color: #8B5CF6; }
.stat-value { margin-top: 10px; font-size: 30px; font-weight: 750; letter-spacing: -1px; line-height: 1.1; }
.stat-note { margin-top: 4px; font-size: 10.5px; color: #9AA49E; }
.stat-note.green { color: var(--green-dark); }
.admin-card {
  margin-top: 20px;
  background: #fff;
  border: 1px solid rgba(16, 40, 28, .05);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}
.admin-card-head h2 { font-size: 16.5px; font-weight: 700; letter-spacing: -.3px; }
.admin-card-head p { margin-top: 4px; font-size: 11.5px; color: #8B958F; }
.admin-tools { display: flex; align-items: center; gap: 9px; flex: none; }
.admin-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 224px;
  height: 36px;
  padding: 0 10px;
  background: #F5F7F6;
  border: 1px solid #E8EDEA;
  border-radius: 8px;
  color: #8B958F;
}
.admin-search:focus-within { background: #fff; border-color: rgba(7, 193, 96, .5); }
.admin-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 12px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-table th {
  padding: 10px 18px;
  text-align: left;
  background: #F7F9F8;
  border-top: 1px solid #EFF2F0;
  border-bottom: 1px solid #EFF2F0;
  color: #6B7A72;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3px;
  white-space: nowrap;
}
.admin-table td { padding: 12px 18px; border-bottom: 1px solid #F1F4F2; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #FBFCFB; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.user-cell .avatar { width: 34px; height: 34px; border-radius: 8px; font-size: 13px; }
.user-cell-main { min-width: 0; }
.user-cell-name { font-size: 12.5px; font-weight: 600; color: #1D2A22; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.user-cell-sub { margin-top: 2px; font-size: 10px; color: #9AA49E; }
.handle-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green-dark);
  background: #EBF9F1;
  border: 1px solid #D8F1E2;
  border-radius: 5px;
  padding: 3px 6px;
  white-space: nowrap;
}
.pwd-cell { display: flex; align-items: center; gap: 5px; }
.pwd-value {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.2px;
  color: #27332C;
  min-width: 54px;
}
.pwd-value.masked { letter-spacing: 2px; color: #9AA49E; }
.pwd-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #8B958F;
}
.pwd-btn:hover { background: #EEF3F0; color: var(--green-dark); }
.time-cell { color: #5D6B63; font-size: 11.5px; white-space: nowrap; }
.time-cell small { display: block; margin-top: 2px; color: #A0AAA4; font-size: 10px; }
.data-cell { display: flex; gap: 8px; flex-wrap: wrap; }
.data-chip { font-size: 9.5px; color: #6B7A72; background: #F3F6F4; border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 3px; }
.row-action {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #8B958F;
}
.row-action:hover { background: #EEF3F0; color: var(--green-dark); }
.row-action.danger:hover { background: #FFF0F0; color: var(--danger); }
.row-action:disabled { opacity: .35; cursor: not-allowed; }
.table-loading { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 42px; color: #8B958F; font-size: 12px; }
.table-loading .btn-spinner { border-color: rgba(7, 193, 96, .18); border-top-color: var(--green); }
.admin-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  background: #FFFAED;
  border: 1px solid #F4E5B9;
  border-radius: 12px;
  color: #7A5B12;
  font-size: 11.5px;
  line-height: 1.7;
}
.admin-note-icon { color: #D99B00; margin-top: 1px; flex: none; }
.admin-note strong { display: block; font-size: 12px; margin-bottom: 2px; }
.admin-note p { margin: 0; }
.admin-note code { font-size: 10.5px; background: rgba(122, 91, 18, .08); padding: 1px 4px; border-radius: 3px; }
.admin-footer { margin-top: 26px; text-align: center; font-size: 10.5px; color: #8B958F; }
.admin-footer code { color: #5D6B63; }
.skeleton { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #EEF2EF 25%, #F7F9F8 37%, #EEF2EF 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skeleton-line { width: 70%; margin-top: 12px; }
.skeleton-line.short { width: 38%; margin-top: 0; }
.skeleton-line.tiny { width: 52%; height: 8px; }
.skeleton-card { min-height: 112px; }

/* --------------------------------------------------------------------------
   响应式：登录 / 注册
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .auth-main { gap: 44px; padding-left: 40px; padding-right: 40px; }
  .auth-hero h1 { font-size: clamp(38px, 5vw, 52px); }
  .hero-preview { width: 330px; }
  .hero-features { gap: 16px; }
}

@media (max-width: 940px) {
  .auth-main {
    grid-template-columns: 1fr;
    max-width: 560px;
    gap: 26px;
    padding-top: 0;
  }
  .auth-hero { max-width: none; text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-preview { display: none; }
  .hero-features { justify-content: center; }
  .auth-card, .auth-card-wide { justify-self: center; max-width: 500px; }
  .auth-topbar { padding: 20px 28px; }
  .auth-footer { padding-bottom: 20px; }
}

@media (max-width: 600px) {
  .auth-topbar { padding: 16px 18px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text { font-size: 18px; }
  .brand-text small { display: none; }
  .topbar-note { display: none; }
  .auth-main { padding: 4px 14px 34px; gap: 20px; }
  .auth-hero h1 { margin: 16px 0 12px; font-size: clamp(30px, 9vw, 38px); letter-spacing: -1.4px; }
  .auth-hero h1 em::after { height: 7px; }
  .hero-lead { font-size: 13.5px; line-height: 1.7; }
  .hero-badge { font-size: 11px; padding: 6px 11px; }
  .hero-features { display: none; }
  .auth-card, .auth-card-wide { padding: 28px 20px 22px; border-radius: 22px; }
  .auth-card::before { left: 24px; right: 24px; }
  .auth-card-logo { width: 48px; height: 48px; border-radius: 12px; margin-bottom: 13px; }
  .auth-card-head h2 { font-size: 22px; }
  .auth-form { margin-top: 22px; }
  .field { margin-bottom: 15px; }
  .input-shell { height: 49px; }
  .btn-lg { height: 49px; }
  .auth-divider { margin: 18px 0 14px; }
  .auth-footer { font-size: 10.5px; gap: 7px; padding: 12px 14px 18px; }
  .auth-page-register .auth-hero h1 { font-size: clamp(27px, 8vw, 34px); }
  .auth-page-register .hero-lead { display: none; }
  .auth-page-register .auth-main { gap: 14px; }
}

/* --------------------------------------------------------------------------
   响应式：主应用
   -------------------------------------------------------------------------- */

@media (max-width: 1060px) {
  .sidebar { width: 286px; }
  .app-shell { width: 98vw; }
  .messages { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 760px) {
  .app-page { display: block; background: #F5F5F5; }
  .app-bg { display: none; }
  .app-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    animation: none;
    display: block;
  }
  .rail { display: none; }
  .sidebar {
    width: 100%;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    border-right: none;
    padding-bottom: 4px;
  }
  .sidebar-head { padding: 12px 14px 8px; min-height: 56px; }
  .sidebar-title-row h2 { font-size: 18px; }
  .sidebar-body { padding-bottom: 16px; }
  .main-panel {
    position: absolute;
    inset: 0 0 56px 0;
    z-index: 8;
    transform: translateX(100%);
    transition: transform .24s cubic-bezier(.22, .61, .36, 1);
    background: #F5F5F5;
  }
  .app-shell.detail-open .main-panel { transform: translateX(0); }
  .app-shell.view-discover .sidebar,
  .app-shell.view-me .sidebar { display: none; }
  .app-shell.view-discover .main-panel,
  .app-shell.view-me .main-panel {
    position: relative;
    inset: auto;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    transform: none;
    z-index: 1;
  }
  .chat-header { height: 56px; padding: 0 10px; gap: 6px; }
  .back-btn { display: grid; }
  .chat-title h3 { font-size: 15px; }
  .chat-title .chat-sub { font-size: 9.5px; }
  .messages { padding: 14px 12px 18px; }
  .message-row { gap: 7px; margin-bottom: 14px; }
  .message-row .avatar { width: 33px; height: 33px; font-size: 12px; border-radius: 6px; }
  .message-content { max-width: 78%; }
  .bubble { font-size: 14px; padding: 9px 12px; }
  .message-time { opacity: .8; }
  .composer { padding: 8px 10px 10px; }
  .composer-hint { display: none; }
  .composer-tools button { width: 30px; height: 30px; }
  .send-btn { height: 38px; padding: 0 16px; }
  .emoji-panel { left: 10px; width: 288px; }
  .mobile-tabs {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    height: 56px;
    display: flex;
    align-items: stretch;
    background: #F7F7F7;
    border-top: 1px solid #E5E5E5;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #666;
    font-size: 9.5px;
    transition: color .15s ease;
  }
  .mobile-tab .tab-icon-wrap { position: relative; display: flex; }
  .mobile-tab.active { color: var(--green); }
  .tab-badge {
    position: absolute;
    top: -5px; right: -10px;
    min-width: 15px; height: 15px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--danger);
    border: 1.5px solid #F7F7F7;
    color: #fff;
    font-size: 9px;
    font-style: normal;
    line-height: 12px;
    text-align: center;
  }
  .chat-empty { padding: 30px 24px; }
  .chat-empty .empty-logo { width: 66px; height: 66px; border-radius: 17px; }
  .chat-empty h2 { font-size: 19px; }
  .welcome-stats { gap: 18px; padding: 12px 18px; }
  .profile-panel, .me-panel { padding: 14px 12px 30px; }
  .panel-topbar { margin-bottom: 12px; }
  .panel-topbar .icon-btn { display: grid; }
  .profile-card { flex-direction: column; text-align: center; padding: 24px 18px; gap: 14px; }
  .profile-card-main h2 { font-size: 21px; }
  .profile-handle { margin-left: auto; margin-right: auto; }
  .profile-actions { justify-content: center; }
  .profile-info-card { padding: 4px 16px; }
  .info-row { font-size: 12.5px; }
  .moments-hero { height: 172px; padding: 0 20px 24px; }
  .moments-hero h2 { font-size: 23px; }
  .moments-hero .hero-avatar { width: 48px; height: 48px; border-radius: 11px; }
  .moments-body { padding: 0 10px 34px; margin-top: -22px; }
  .moments-compose { padding: 10px 12px; }
  .moment-card { padding: 15px; }
  .moment-text, .moment-actions, .moment-social { margin-left: 0; }
  .moment-text { margin-top: 11px; }
  .moment-actions { padding-top: 8px; }
  .moment-social { margin-top: 8px; }
  .me-hero { flex-direction: column; text-align: center; padding: 24px 18px; gap: 13px; }
  .me-hero .avatar { width: 74px; height: 74px; border-radius: 17px; }
  .me-hero-main h2 { font-size: 22px; }
  .me-edit-btn { align-self: center; }
  .me-grid { grid-template-columns: 1fr; gap: 10px; }
  .action-row { padding: 13px 15px; }
  .api-card { padding: 14px 15px; }
  .toast-root { bottom: 72px; }
  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal-card { max-height: 90vh; border-radius: 16px 16px 12px 12px; }
  .modal-head { padding: 18px 18px 0; }
  .modal-body { padding: 16px 18px; }
  .modal-foot { padding: 0 18px 18px; }
  .modal-foot .btn { flex: 1; }
  .modal-actions-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 380px) {
  .message-content { max-width: 82%; }
  .sidebar { height: calc(100vh - 52px); height: calc(100dvh - 52px); }
  .mobile-tabs { height: 52px; }
  .main-panel { inset: 0 0 52px 0; }
  .app-shell.view-discover .main-panel, .app-shell.view-me .main-panel { height: calc(100vh - 52px); height: calc(100dvh - 52px); }
}

/* --------------------------------------------------------------------------
   响应式：管理后台
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-main { padding: 24px 24px 34px; }
  .admin-card-head { flex-wrap: wrap; }
  .admin-tools { width: 100%; }
  .admin-search { flex: 1; width: auto; }
}

@media (max-width: 820px) {
  .admin-side {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 24px 0 60px rgba(0, 0, 0, .28);
  }
  .admin-side.open { transform: translateX(0); }
  .admin-main { padding: 18px 16px 30px; }
  .admin-menu-btn {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #E1E7E3;
    color: #4D5C53;
    flex: none;
    margin-top: 2px;
  }
  .admin-topbar { flex-wrap: wrap; }
  .admin-heading h1 { font-size: 23px; }
  .admin-top-actions { margin-left: 52px; }
  .admin-card-head { padding: 16px; }
  .admin-table th, .admin-table td { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 620px) {
  .admin-top-actions .api-pill { display: none; }
  .admin-stats { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 25px; }
  .admin-card-head { gap: 10px; }
  .admin-tools { flex-wrap: wrap; }
  .admin-search { width: 100%; flex-basis: 100%; }
  .admin-table { min-width: 680px; }
  .admin-table th:nth-child(5), .admin-table td:nth-child(5) { display: none; }
  .admin-note { font-size: 11px; }
  .admin-footer { font-size: 9.5px; }
}

/* --------------------------------------------------------------------------
   动画
   -------------------------------------------------------------------------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(7, 193, 96, .45); }
  70% { box-shadow: 0 0 0 7px rgba(7, 193, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(7, 193, 96, 0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shellIn {
  from { opacity: 0; transform: translateY(10px) scale(.995); }
  to { opacity: 1; transform: none; }
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   补充组件
   -------------------------------------------------------------------------- */

.sidebar-search-wrap { padding: 0 2px 8px; }

.side-menu-item.danger .side-menu-icon { background: #FFF0F0; color: var(--danger); }
.side-menu-item.danger .side-menu-copy strong { color: var(--danger); }
.action-row.danger .action-copy strong { color: var(--danger); }

.boot-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 390px;
  padding: 24px;
  text-align: center;
}
.boot-error img {
  width: 58px; height: 58px;
  border-radius: 15px;
  box-shadow: 0 16px 34px -16px rgba(7, 193, 96, .6);
}
.boot-error h3 { font-size: 18px; font-weight: 700; }
.boot-error p { font-size: 12.5px; line-height: 1.7; color: #6B7770; }
.boot-error small { font-size: 10px; color: #9AA49E; word-break: break-all; }

.moments-hero-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; flex: none; }
.moments-refresh {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(6px);
  transition: background .15s ease, transform .2s ease;
}
.moments-refresh:hover { background: rgba(255, 255, 255, .24); transform: rotate(28deg); }

.compose-counter {
  margin-top: 7px;
  text-align: right;
  font-size: 10.5px;
  color: #9AA49E;
}

.moment-author {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: #1D2A22;
  text-align: left;
  line-height: 1.4;
}
button.moment-author:hover { color: var(--green-dark); text-decoration: underline; }

.me-hero .contact-tag {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
  vertical-align: middle;
}

.list-empty .link-btn { margin-top: 8px; }

@media (max-width: 760px) {
  .moments-hero-actions { gap: 8px; }
  .moments-refresh { width: 30px; height: 30px; }
  .compose-counter { font-size: 10px; }
}

