/* ==========================================================================
   HowGo UI · LaswI 冰蓝玻璃拟物主题（基于 laswi.com.cn 视觉语言重做）
   说明：仅重写 public/css/style.css；DOM id/class 与 JS 依赖全部对齐保留。
   视觉 Token 移植自 laswi.com.cn 实测（#07398f→#9be8ff 蓝阶 / 玻璃卡片 / 999px 胶囊）
   ========================================================================== */

:root {
  /* laswi 蓝阶主色 */
  --aqua-ink: #07398f;
  --aqua-ink-deep: #03285f;
  --aqua-deep: #0a4bb0;
  --aqua-mid: #1683e8;
  --aqua-bright: #3fb6ff;
  --aqua-cyan: #9be8ff;

  /* 玻璃白 / 文字 */
  --glass-high: rgba(255, 255, 255, 0.92);
  --glass-mid: rgba(255, 255, 255, 0.55);
  --glass-low: rgba(255, 255, 255, 0.28);
  --card-stroke: rgba(8, 58, 165, 0.42);
  --card-stroke-soft: rgba(8, 58, 165, 0.18);
  --text: #07398f;
  --text-2: #5b77a8;
  --text-3: #8ba3c9;

  /* 语义色 */
  --danger: #ff5d5d;
  --green: #0fb268;          /* 兼容遗留 JS 内联绿色引用 */
  --green-dark: #0a9557;
  --green-deep: #077a49;

  /* 布局 */
  --rail-w: 76px;
  --side-w: 300px;
  --head-h: 58px;

  /* laswi 糖果渐变 / 标题渐变 */
  --candy: linear-gradient(180deg, #5ec6ff 0%, #1f90f2 52%, #0b62d8 100%);
  --candy-soft: linear-gradient(180deg, #eaf6ff 0%, #cfeaff 100%);
  --title-grad: linear-gradient(100deg, #062f8c 0%, #1474e8 55%, #0694e0 100%);
  --rail-grad: linear-gradient(180deg, #0f4b9e 0%, #0a3a7f 55%, #062b60 100%);
  --sh-1: 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.55), inset 0 10px 18px -12px rgba(255, 255, 255, 0.9), inset 0 -8px 16px -10px rgba(10, 75, 176, 0.22), 0 20px 34px -22px rgba(4, 45, 150, 0.75);
  --sh-card: 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 12px 18px -14px rgba(255, 255, 255, 0.95), inset 0 -10px 18px -12px rgba(10, 75, 176, 0.2), 0 22px 36px -24px rgba(4, 45, 150, 0.7);
  --shadow-blue: 0 12px 24px -14px rgba(4, 45, 150, 0.5);
  --radius-card: 22px;
  --radius-pill: 999px;
  --font: -apple-system, system-ui, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.01em;
  overflow: hidden;
  /* 浅冰蓝渐变底 + 竖纹 + 环境光 */
  background:
    radial-gradient(1100px 520px at 82% -12%, rgba(155, 232, 255, 0.55) 0%, transparent 60%),
    radial-gradient(900px 620px at -8% 108%, rgba(63, 182, 255, 0.35) 0%, transparent 55%),
    radial-gradient(700px 420px at 108% 82%, rgba(255, 255, 255, 0.85) 0%, transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0, rgba(255, 255, 255, 0.28) 1px, transparent 1px, transparent 96px),
    repeating-linear-gradient(0deg, rgba(91, 138, 197, 0.10) 0, rgba(91, 138, 197, 0.10) 1px, transparent 1px, transparent 84px),
    linear-gradient(180deg, #cdeaff 0%, #d9f1fd 24%, #c2e2f7 62%, #a9ccea 100%);
  background-attachment: fixed;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; outline: none; }
img { -webkit-user-drag: none; }
a { color: var(--aqua-mid); }
::selection { background: rgba(63, 182, 255, 0.35); }

/* 细玻璃滚动条 */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: rgba(10, 75, 176, 0.28); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(10, 75, 176, 0.45); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 品牌徽标（糖果蓝渐变方块） */
.howgo {
  background: linear-gradient(135deg, #2fa8ff 0%, #0b62d8 60%, #0a4bb0 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border-radius: 14px;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 10px 14px -10px rgba(255, 255, 255, 0.9), 0 8px 16px -8px rgba(4, 45, 150, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   登录页
   ========================================================================== */
.login-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1000px 620px at 16% -6%, rgba(155, 232, 255, 0.6) 0%, transparent 55%),
    radial-gradient(820px 560px at 104% 88%, rgba(63, 182, 255, 0.4) 0%, transparent 58%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0, rgba(255, 255, 255, 0.3) 1px, transparent 1px, transparent 92px),
    linear-gradient(180deg, #cdeaff 0%, #d9f1fd 26%, #c0e0f6 60%, #a7c8e9 100%);
}
.login-body::before,
.login-body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  pointer-events: none;
}
.login-body::before {
  width: 340px; height: 340px; left: -120px; bottom: -100px;
  background: radial-gradient(circle at 35% 35%, rgba(155, 232, 255, 0.9), rgba(63, 182, 255, 0.25) 60%, transparent 72%);
}
.login-body::after {
  width: 300px; height: 300px; right: -110px; top: -90px;
  background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.95), rgba(155, 232, 255, 0.4) 58%, transparent 72%);
}
.login-card {
  position: relative;
  width: 420px;
  background:
    radial-gradient(240px 150px at 88% -4%, rgba(255, 255, 255, 0.95) 0%, transparent 60%),
    radial-gradient(300px 220px at -6% 112%, rgba(155, 232, 255, 0.4) 0%, transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
  border-radius: var(--radius-card);
  border: 1px solid var(--card-stroke);
  padding: 52px 42px 30px;
  box-shadow: var(--sh-card);
  text-align: center;
  overflow: hidden;
}
/* 顶部弧光 */
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 7%; right: 7%; height: 14px;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.28) 65%, transparent);
  filter: blur(1px);
  pointer-events: none;
}
.login-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--aqua-mid);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.login-logo { margin-bottom: 6px; }
.login-logo .logo-badge {
  width: 84px; height: 84px; font-size: 46px;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), inset 0 12px 16px -10px rgba(255, 255, 255, 0.85), 0 14px 26px -12px rgba(6, 47, 140, 0.65);
}
.login-logo h1 {
  margin: 20px 0 4px;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: var(--title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.login-slogan { color: var(--text-2); margin-bottom: 30px; font-size: 13px; letter-spacing: 0.02em; }
.login-error {
  background: linear-gradient(180deg, rgba(255, 235, 235, 0.95), rgba(255, 224, 224, 0.9));
  color: #c22f45;
  border: 1px solid rgba(255, 93, 93, 0.4);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.login-tip { color: var(--text-3); font-size: 12px; margin: 14px 4px 6px; line-height: 1.6; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--card-stroke-soft), transparent); }
.login-foot { color: var(--text-3); font-size: 12px; margin-top: 28px; letter-spacing: 0.04em; }

/* ==========================================================================
   按钮体系
   ========================================================================== */
.btn-primary {
  background: var(--candy);
  color: #fff;
  border: none;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), inset 0 8px 12px -8px rgba(255, 255, 255, 0.75), 0 12px 20px -12px rgba(4, 45, 150, 0.8);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.2), box-shadow .18s, filter .18s;
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), inset 0 8px 12px -8px rgba(255, 255, 255, 0.8), 0 16px 26px -14px rgba(4, 45, 150, 0.9); }
.btn-primary:active { transform: translateY(0); filter: brightness(0.98); }
.btn-primary:disabled { opacity: .55; cursor: default; transform: none; }

.btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(230, 243, 255, 0.85));
  color: var(--aqua-deep);
  border: 1px solid var(--card-stroke-soft);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 8px 16px -12px rgba(4, 45, 150, 0.5);
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.2), box-shadow .18s, background .18s;
}
.btn-ghost:hover { background: linear-gradient(180deg, #fff, rgba(214, 240, 255, 0.95)); transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 12px 20px -12px rgba(4, 45, 150, 0.6); }
.btn-block { width: 100%; display: block; }
.btn-plain { border: none; background: none; color: var(--aqua-mid); padding: 4px 6px; font-weight: 600; }
.btn-plain.danger { color: var(--danger); }
.btn-plain:hover { opacity: .8; }

.btn-action {
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform .16s cubic-bezier(.2, .9, .3, 1.2), box-shadow .16s, filter .16s;
}
.btn-action:hover { transform: translateY(-1px); }
.btn-action.green { background: var(--candy); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 10px 18px -12px rgba(4, 45, 150, 0.8); }
.btn-action.gray { background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(226, 238, 252, .9)); color: #45618c; box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 8px 14px -10px rgba(4,45,150,.45); }
.btn-action.danger { background: linear-gradient(180deg, rgba(255, 236, 236, 0.96), rgba(255, 216, 216, 0.92)); color: #e5484d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8); }
.btn-action.orange { background: linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(255, 236, 202, 0.92)); color: #c47b1d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8); }

/* ==========================================================================
   主框架
   ========================================================================== */
.app {
  display: flex;
  align-items: stretch;
  width: 100vw;
  height: 100vh;
  padding: 16px 18px 18px;
  gap: 14px;
}

/* ---- 左导航（深蓝玻璃） ---- */
.rail {
  width: var(--rail-w);
  background:
    radial-gradient(200px 120px at 50% -4%, rgba(155, 232, 255, 0.35) 0%, transparent 60%),
    radial-gradient(240px 200px at 50% 112%, rgba(22, 131, 232, 0.3) 0%, transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 34px),
    var(--rail-grad);
  flex-shrink: 0;
  border-radius: var(--radius-card);
  border: 1px solid rgba(8, 58, 165, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), inset 0 14px 20px -16px rgba(155, 232, 255, 0.55), 0 22px 36px -24px rgba(3, 40, 95, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 14px;
  position: relative;
  z-index: 30;
}
.rail-logo {
  width: 44px; height: 44px;
  font-size: 24px;
  border-radius: 15px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #59c7ff 0%, #1f90f2 45%, #0b62d8 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), inset 0 10px 12px -8px rgba(255, 255, 255, 0.9), 0 10px 18px -8px rgba(1, 20, 55, 0.6);
}
.rail-brand {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(224, 244, 255, 0.75);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.rail-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding-top: 6px;
}
.rail-btn {
  position: relative;
  width: 46px; height: 46px;
  border: none;
  border-radius: 15px;
  background: transparent;
  color: rgba(226, 244, 255, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .16s, color .16s, box-shadow .16s, transform .16s;
}
.rail-btn svg { width: 24px; height: 24px; }
.rail-btn img, .rail-btn .avatar-mini { width: 36px; height: 36px; border-radius: 12px; }
.rail-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); transform: translateY(-1px); }
.rail-btn.active {
  background: var(--candy);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), inset 0 10px 14px -10px rgba(255, 255, 255, 0.85), 0 12px 20px -10px rgba(1, 20, 55, 0.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}
.rail-badge {
  position: absolute;
  top: 3px; right: 2px;
  min-width: 17px; height: 17px;
  padding: 0 5px;
  background: linear-gradient(180deg, #ff8a8a, #ff4d4d);
  color: #fff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 4px 8px -4px rgba(160, 20, 20, 0.7);
}
.rail-bottom { display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---- 侧栏（白色玻璃卡） ---- */
.side {
  width: var(--side-w);
  background:
    radial-gradient(260px 130px at 96% -6%, rgba(255, 255, 255, 0.95) 0%, transparent 55%),
    radial-gradient(320px 220px at -10% 112%, rgba(155, 232, 255, 0.35) 0%, transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 253, 255, 0.88));
  flex-shrink: 0;
  border-radius: var(--radius-card);
  border: 1px solid var(--card-stroke);
  box-shadow: var(--sh-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 20;
}
.side::before {
  content: "";
  position: absolute;
  top: 0; left: 6%; right: 6%; height: 12px;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), transparent);
  pointer-events: none;
}
.side-head {
  height: var(--head-h);
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.side-head h2 {
  font-size: 18px;
  font-weight: 900;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.02em;
  background: var(--title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.side-search { display: flex; padding: 6px 14px 8px; }
.side-search input {
  flex: 1;
  height: 32px;
  border: 1px solid var(--card-stroke-soft);
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(232, 244, 255, 0.7), rgba(248, 252, 255, 0.8));
  box-shadow: inset 0 1px 3px rgba(10, 75, 176, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  padding: 0 14px;
  font-size: 13px;
  color: var(--text);
}
.side-search input::placeholder { color: var(--text-3); }
.side-list { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }

/* 列表项：白色玻璃胶囊 */
.item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  cursor: pointer;
  border-radius: 15px;
  margin-bottom: 2px;
  border: 1px solid transparent;
  transition: background .15s, box-shadow .15s, transform .15s;
}
.item:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(230, 243, 255, 0.75));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 8px 14px -12px rgba(4, 45, 150, 0.45);
}
.item.active {
  background: var(--candy);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), inset 0 10px 14px -10px rgba(255, 255, 255, 0.7), 0 10px 18px -12px rgba(4, 45, 150, 0.7);
}
.item.active .item-name,
.item.active .item-time,
.item.active .item-preview { color: #fff; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.16); }
.item.active .item-count { background: rgba(255, 255, 255, 0.92); color: #0a4bb0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9); }
.item .ava { flex-shrink: 0; }
.item-main { flex: 1; min-width: 0; }
.item-title { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.item-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-time { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.item-sub { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; gap: 6px; }
.item-preview { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-count {
  background: linear-gradient(180deg, #ff8a8a, #ff4d4d);
  color: #fff;
  border-radius: 9px;
  min-width: 17px; height: 17px;
  line-height: 17px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* 头像（白描边玻璃圆角方块） */
.avatar-mini {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), inset 0 8px 10px -8px rgba(255, 255, 255, 0.9), 0 6px 10px -6px rgba(4, 45, 150, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.avatar-mini img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; font-size: 14px; border-radius: 10px; }
.avatar-lg {
  width: 68px; height: 68px;
  font-size: 28px;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), inset 0 12px 14px -10px rgba(255, 255, 255, 0.9), 0 14px 22px -12px rgba(4, 45, 150, 0.6);
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }

/* ---- 主内容区（大玻璃卡） ---- */
.main {
  flex: 1;
  min-width: 0;
  background:
    radial-gradient(520px 300px at 100% -8%, rgba(255, 255, 255, 0.9) 0%, transparent 55%),
    radial-gradient(600px 380px at -8% 112%, rgba(155, 232, 255, 0.32) 0%, transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(242, 251, 255, 0.66));
  border-radius: var(--radius-card);
  border: 1px solid var(--card-stroke);
  box-shadow: var(--sh-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.main-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}
.main-empty .big { font-size: 52px; opacity: .75; filter: drop-shadow(0 10px 12px rgba(4, 45, 150, 0.25)); }

/* 顶部 */
.topbar {
  height: var(--head-h);
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  border-bottom: 1px solid rgba(8, 58, 165, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.topbar h3 {
  font-size: 17px;
  font-weight: 800;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--aqua-ink);
}
.topbar .sub { font-size: 12px; color: var(--text-2); font-weight: 500; }
.topbar-actions { display: flex; gap: 8px; }

/* ==========================================================================
   聊天区（玻璃圆润气泡）
   ========================================================================== */
.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px;
  background:
    radial-gradient(500px 240px at 96% -6%, rgba(255, 255, 255, 0.5) 0%, transparent 60%),
    radial-gradient(420px 260px at 0% 112%, rgba(155, 232, 255, 0.22) 0%, transparent 55%);
}
.chat-date {
  text-align: center;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  margin: 16px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(235, 246, 255, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 12px -10px rgba(4, 45, 150, 0.5);
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.msg-row { display: flex; gap: 10px; margin: 14px 0; align-items: flex-start; }
.msg-row.me { flex-direction: row-reverse; }
.msg-body { max-width: 58%; min-width: 0; display: flex; flex-direction: column; }
.msg-row.me .msg-body { align-items: flex-end; }
.msg-name { font-size: 11.5px; color: var(--text-3); margin: 0 4px 4px; font-weight: 500; }
.msg-row.me .msg-name { text-align: right; }

.bubble {
  position: relative;
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  word-break: break-word;
  background:
    radial-gradient(200px 100px at 90% -10%, rgba(255, 255, 255, 0.95) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 251, 255, 0.9));
  border: 1px solid rgba(8, 58, 165, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 10px 14px -12px rgba(255, 255, 255, 0.95), 0 12px 20px -14px rgba(4, 45, 150, 0.55);
  color: #0b3c7d;
}
.msg-row.me .bubble {
  background: var(--candy);
  color: #fff;
  border: 1px solid rgba(8, 58, 165, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), inset 0 10px 14px -12px rgba(255, 255, 255, 0.8), 0 14px 22px -14px rgba(4, 45, 150, 0.85);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.14);
}
.bubble img.msg-img {
  max-width: 220px;
  max-height: 280px;
  border-radius: 12px;
  display: block;
  cursor: zoom-in;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 18px -12px rgba(4, 45, 150, 0.5);
}
.bubble.system {
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  text-align: center;
  padding: 2px 10px;
  border: none;
  box-shadow: none;
  margin: 2px auto;
  max-width: 78%;
}

/* 输入区 */
.chat-input {
  flex: none;
  border-top: 1px solid rgba(8, 58, 165, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(226, 243, 255, 0.4));
  padding: 10px 16px 14px;
  position: relative;
}
.chat-toolbar { display: flex; align-items: center; gap: 6px; padding: 0 6px 8px; }
.chat-toolbar button {
  width: 32px; height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--aqua-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.chat-toolbar button:hover { background: rgba(255, 255, 255, 0.8); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9); }
.chat-toolbar button svg { width: 24px; height: 24px; }
.chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-row textarea {
  flex: 1;
  height: 78px;
  min-height: 52px;
  resize: none;
  border: 1px solid rgba(8, 58, 165, 0.16);
  border-radius: 16px;
  padding: 11px 15px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #0b3c7d;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 255, 0.92));
  box-shadow: inset 0 2px 5px rgba(10, 75, 176, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}
.chat-input-row textarea::placeholder { color: var(--text-3); }
.chat-send {
  height: 44px;
  padding: 0 26px;
  background: var(--candy);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), inset 0 8px 12px -8px rgba(255, 255, 255, 0.75), 0 12px 18px -12px rgba(4, 45, 150, 0.8);
  transition: transform .16s cubic-bezier(.2, .9, .3, 1.2), filter .16s;
}
.chat-send:hover { filter: brightness(1.06); transform: translateY(-1px); }
.chat-send:disabled { opacity: .5; cursor: default; transform: none; }

/* emoji 面板 */
.emoji-panel {
  position: absolute;
  bottom: 148px;
  left: 86px;
  width: 340px;
  max-height: 230px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 249, 255, 0.96));
  border: 1px solid var(--card-stroke-soft);
  border-radius: 18px;
  box-shadow: var(--sh-card);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  z-index: 60;
}
.emoji-panel span { font-size: 21px; text-align: center; padding: 4px 0; border-radius: 8px; cursor: pointer; }
.emoji-panel span:hover { background: linear-gradient(180deg, #e7f6ff, #d4ecff); transform: scale(1.15); }

/* ==========================================================================
   资料卡 / 详情
   ========================================================================== */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px 40px;
  gap: 10px;
  overflow-y: auto;
}
.profile-card .name { font-size: 21px; font-weight: 900; color: var(--aqua-ink); }
.profile-card .bio { color: var(--text-2); max-width: 340px; text-align: center; line-height: 1.7; }
.profile-card .meta { font-size: 12.5px; color: var(--text-3); }
.profile-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }

/* ==========================================================================
   朋友圈
   ========================================================================== */
.mom-head { text-align: center; padding: 26px 16px 12px; flex: none; }
.mom-head .who { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 6px; }
.mom-feeds {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 20px 24px;
  background:
    radial-gradient(420px 220px at 100% -4%, rgba(255, 255, 255, 0.45) 0%, transparent 60%),
    radial-gradient(360px 220px at -4% 108%, rgba(155, 232, 255, 0.2) 0%, transparent 55%);
}
.feed {
  position: relative;
  background:
    radial-gradient(260px 120px at 92% -8%, rgba(255, 255, 255, 0.95) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 253, 255, 0.9));
  border: 1px solid var(--card-stroke-soft);
  border-radius: 18px;
  padding: 15px 17px;
  margin-bottom: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 10px 14px -12px rgba(255, 255, 255, 0.95), 0 10px 18px -16px rgba(4, 45, 150, 0.5);
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.2), box-shadow .2s;
}
.feed:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), inset 0 10px 14px -12px rgba(255, 255, 255, 1), 0 18px 26px -18px rgba(4, 45, 150, 0.6); }
.feed-head { display: flex; gap: 11px; align-items: center; }
.feed-name { font-weight: 800; color: var(--aqua-ink); font-size: 14.5px; }
.feed-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.feed-content { margin: 10px 0 6px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: #0b3c7d; }
.feed-imgs { display: grid; gap: 7px; margin: 8px 0 4px; }
.feed-imgs.s1 { grid-template-columns: 220px; }
.feed-imgs.s2, .feed-imgs.s4 { grid-template-columns: repeat(2, 1fr); }
.feed-imgs.s3, .feed-imgs.s6, .feed-imgs.s9 { grid-template-columns: repeat(3, 1fr); }
.feed-imgs.s5, .feed-imgs.s7, .feed-imgs.s8 { grid-template-columns: repeat(3, 1fr); }
.feed-imgs img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  cursor: zoom-in;
  background: linear-gradient(180deg, #dbeefc, #c7e2f5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.feed-foot {
  border-top: 1px solid rgba(8, 58, 165, 0.1);
  margin-top: 10px;
  padding-top: 9px;
  display: flex;
  gap: 18px;
  color: var(--text-2);
  font-size: 13px;
}
.feed-foot span { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.feed-likes {
  background: linear-gradient(180deg, rgba(232, 246, 255, 0.8), rgba(218, 240, 255, 0.75));
  border-radius: 12px;
  padding: 6px 11px;
  margin-top: 8px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.feed-likes .lk { color: var(--aqua-mid); font-weight: 600; }
.feed-comments {
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(232, 246, 255, 0.8), rgba(218, 240, 255, 0.75));
  border-radius: 12px;
  padding: 7px 11px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.feed-comments .cm { margin: 5px 0; line-height: 1.55; }
.feed-comments .cm-name { color: var(--aqua-deep); font-weight: 700; }
.feed-input { display: flex; gap: 8px; margin-top: 9px; }
.feed-input input {
  flex: 1;
  height: 32px;
  border: 1px solid rgba(8, 58, 165, 0.15);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.92);
  color: #0b3c7d;
}
.feed-input button {
  border: none;
  background: var(--candy);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0 16px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   管理后台
   ========================================================================== */
.admin-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 20px 6px;
  flex: none;
}
.stat-card {
  position: relative;
  flex: 1;
  min-width: 160px;
  background:
    radial-gradient(200px 90px at 92% -10%, rgba(255, 255, 255, 0.95) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(243, 250, 255, 0.9));
  border: 1px solid var(--card-stroke-soft);
  border-radius: 18px;
  padding: 16px 18px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 10px 14px -12px rgba(255, 255, 255, 0.95), 0 10px 16px -14px rgba(4, 45, 150, 0.5);
}
.stat-card .num {
  font-size: 30px;
  font-weight: 900;
  margin-top: 6px;
  background: var(--title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .lbl { color: var(--text-2); font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; }
.table-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 20px 22px; }
.hg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 253, 255, 0.85));
  border: 1px solid var(--card-stroke-soft);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 10px 18px -16px rgba(4, 45, 150, 0.5);
}
.hg-table th {
  text-align: left;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(224, 242, 255, 0.9), rgba(208, 234, 252, 0.85));
  font-size: 12.5px;
  font-weight: 700;
  color: #35649e;
  border-bottom: 1px solid rgba(8, 58, 165, 0.12);
  white-space: nowrap;
}
.hg-table td {
  padding: 11px 14px;
  border-top: 1px solid rgba(8, 58, 165, 0.07);
  font-size: 13px;
  vertical-align: middle;
  color: #27497f;
}
.hg-table tbody tr:hover td { background: rgba(231, 245, 255, 0.5); }
.hg-table .cell-user { display: flex; align-items: center; gap: 9px; }

/* 标签 */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.tag.admin { background: linear-gradient(180deg, #fff2db, #ffe3b8); color: #a4650c; }
.tag.user { background: linear-gradient(180deg, #e2f6ff, #c8eaff); color: #0a5f9e; }
.tag.banned { background: linear-gradient(180deg, #ffe9e9, #ffd5d5); color: #d43a3a; }
.tag.online { background: linear-gradient(180deg, #e4fbf0, #c8f3df); color: #0b8a57; }

/* ==========================================================================
   通用弹层
   ========================================================================== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(6, 42, 97, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .18s;
}
.modal-card {
  position: relative;
  background:
    radial-gradient(300px 160px at 92% -6%, rgba(255, 255, 255, 0.98) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 255, 0.96));
  border: 1px solid var(--card-stroke);
  border-radius: 22px;
  width: 440px;
  max-width: 92vw;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 14px 18px -14px rgba(255, 255, 255, 1), 0 30px 60px -30px rgba(3, 40, 95, 0.85);
}
.modal-card::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%; height: 10px;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), transparent);
  pointer-events: none;
}
.modal-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(8, 58, 165, 0.1);
}
.modal-head h4 { flex: 1; font-size: 16px; font-weight: 800; color: var(--aqua-ink); }
.modal-close {
  border: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(230, 243, 255, 0.7));
  font-size: 18px;
  color: var(--text-2);
  width: 30px; height: 30px;
  border-radius: var(--radius-pill);
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.modal-close:hover { background: #fff; color: var(--danger); }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; color: #27497f; }
.modal-foot {
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid rgba(8, 58, 165, 0.08);
}

/* 表单 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.form-row input, .form-row textarea {
  width: 100%;
  border: 1px solid rgba(8, 58, 165, 0.16);
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 14px;
  color: #0b3c7d;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 3px rgba(10, 75, 176, 0.08);
}
.form-row input:focus, .form-row textarea:focus { border-color: rgba(22, 131, 232, 0.6); box-shadow: inset 0 1px 3px rgba(10, 75, 176, 0.08), 0 0 0 3px rgba(63, 182, 255, 0.18); }
.form-row textarea { resize: vertical; min-height: 72px; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 13px;
  border: 1px solid transparent;
}
.search-result-item:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(231, 245, 255, 0.7)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9); }
.search-result-item .info { flex: 1; min-width: 0; }
.search-result-item .info .n { font-weight: 700; color: #0b3c7d; }
.search-result-item .info .s { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.file-input-hidden { display: none; }

/* 图片预览 */
.img-preview-modal .modal-body { max-width: 88vw; display: flex; align-items: center; justify-content: center; }
.img-preview-modal img {
  max-width: 86vw;
  max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px -20px rgba(3, 40, 95, 0.8);
}

/* ==========================================================================
   Toast / Loading
   ========================================================================== */
#toastRoot {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast-item {
  background: linear-gradient(180deg, rgba(10, 48, 105, 0.92), rgba(6, 34, 78, 0.94));
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 14px 24px -14px rgba(1, 20, 55, 0.9);
  animation: fadeUp .22s;
  max-width: 70vw;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(205, 234, 255, 0.3);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.loading-spin {
  width: 44px; height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-top-color: var(--aqua-mid);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  box-shadow: 0 10px 20px -10px rgba(4, 45, 150, 0.5);
}

/* ==========================================================================
   动画 / 响应式
   ========================================================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .app { gap: 10px; padding: 12px; }
  .side { width: 268px; }
  .msg-body { max-width: 68%; }
}
@media (max-width: 860px) {
  .app { position: relative; }
  .side {
    position: absolute;
    left: var(--rail-w);
    top: 12px;
    bottom: 12px;
    z-index: 25;
    box-shadow: var(--sh-card);
  }
  .main { position: static; }
}
@media (max-width: 620px) {
  .app { padding: 8px; gap: 8px; }
  .rail { width: 64px; }
  .side { left: 64px; }
}
