/* ============ Liquid Glass 风格 · 三主题 · 统一圆角 ============ */
:root {
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .08);
  --shadow-lift: 0 14px 34px rgba(0, 0, 0, .14);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --accent: #e8842e;
  --accent-soft: rgba(232, 132, 46, .14);
  --danger: #d64545;
  --ok: #22a06b;
}
html[data-theme="light"] {
  --bg1: #eef1f5; --bg2: #dfe6ee;
  --card: rgba(255, 255, 255, .58);
  --card-solid: #ffffff;
  --text: #1f2329; --muted: #667085;
  --border: rgba(255, 255, 255, .65);
  --glass: rgba(255, 255, 255, .5);
  --input-bg: rgba(255, 255, 255, .75);
}
html[data-theme="dark"] {
  --bg1: #14171c; --bg2: #1d222b;
  --card: rgba(40, 46, 58, .55);
  --card-solid: #262c38;
  --text: #e7eaf0; --muted: #9aa4b2;
  --border: rgba(255, 255, 255, .08);
  --glass: rgba(40, 46, 58, .5);
  --input-bg: rgba(52, 60, 74, .7);
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --shadow-lift: 0 14px 34px rgba(0, 0, 0, .45);
}
html[data-theme="auto"] { /* 跟随系统：覆盖为 light/dark 变量的媒体查询 */
}
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] { --bg1:#eef1f5; --bg2:#dfe6ee; --card:rgba(255,255,255,.58); --card-solid:#fff;
    --text:#1f2329; --muted:#667085; --border:rgba(255,255,255,.65); --glass:rgba(255,255,255,.5); --input-bg:rgba(255,255,255,.75);
    --shadow:0 8px 30px rgba(0,0,0,.08); --shadow-lift:0 14px 34px rgba(0,0,0,.14); }
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] { --bg1:#14171c; --bg2:#1d222b; --card:rgba(40,46,58,.55); --card-solid:#262c38;
    --text:#e7eaf0; --muted:#9aa4b2; --border:rgba(255,255,255,.08); --glass:rgba(40,46,58,.5); --input-bg:rgba(52,60,74,.7);
    --shadow:0 8px 30px rgba(0,0,0,.35); --shadow-lift:0 14px 34px rgba(0,0,0,.45); }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--text); line-height: 1.6;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  padding: 0 0 60px;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { line-height: 1.35; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: var(--glass);
  border-bottom: 1px solid var(--border);
}
.nav-inner { max-width: 960px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 6px; height: 58px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.brand { font-weight: 800; font-size: 16px; color: var(--text); display: flex; align-items: center; gap: 8px; flex: none; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.nav-links { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav-links a {
  color: var(--muted); padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 14px; white-space: nowrap; transition: all .2s;
}
.nav-links a:hover { color: var(--text); background: var(--accent-soft); }
.nav-links a.active { color: var(--accent); font-weight: 700; background: var(--accent-soft); }
.nav-right { display: flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; }
.nav-right .btn, .nav-right a, .nav-right .badge { white-space: nowrap; }

/* ---------- 卡片 / 玻璃 ---------- */
.card {
  background: var(--card);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.solid { background: var(--card-solid); }

/* ---------- 按钮 / 输入 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--radius-sm); color: #fff;
  background: linear-gradient(135deg, #ef8b33, #d96f1c);
  box-shadow: 0 4px 14px rgba(217, 111, 28, .35);
  transition: all .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(217, 111, 28, .45); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: linear-gradient(135deg, #d64545, #b53232); box-shadow: 0 4px 14px rgba(214, 69, 69, .3); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: 14px; color: var(--text);
  background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; outline: none; transition: border .2s, box-shadow .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted); }
label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 0; }

/* ---------- 自定义下拉（.cs） ---------- */
.cs { position: relative; }
.cs .cs-box {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; cursor: pointer; font-size: 14px; user-select: none;
}
.cs .cs-box::after { content: "▾"; color: var(--muted); font-size: 12px; }
.cs.open .cs-box::after { transform: rotate(180deg); }
.cs .cs-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--card-solid); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift); max-height: 220px; overflow-y: auto; display: none;
}
.cs.open .cs-list { display: block; }
.cs .cs-item { padding: 9px 14px; font-size: 14px; cursor: pointer; border-radius: 6px; margin: 2px 4px; }
.cs .cs-item:hover { background: var(--accent-soft); color: var(--accent); }
.cs .cs-item.sel { color: var(--accent); font-weight: 700; }

/* ---------- 表格 ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }

/* ---------- 徽章 / 标签 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.ok { background: rgba(34, 160, 107, .15); color: var(--ok); }
.badge.warn { background: rgba(232, 132, 46, .15); color: var(--accent); }
.badge.danger { background: rgba(214, 69, 69, .15); color: var(--danger); }
.badge.muted { background: var(--accent-soft); color: var(--muted); }

/* ---------- 弹窗 / Toast ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 16px;
}
.modal-mask.open { display: flex; animation: fadeIn .2s ease; }
.modal {
  width: 100%; max-width: 420px; background: var(--card-solid);
  border-radius: var(--radius); box-shadow: var(--shadow-lift); padding: 24px;
  animation: popIn .22s ease;
}
.modal h3 { margin-bottom: 6px; }
.modal .close-x { float: right; cursor: pointer; color: var(--muted); font-size: 20px; background: none; border: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--card-solid); border-left: 4px solid var(--ok); color: var(--text);
  padding: 10px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lift);
  font-size: 14px; animation: popIn .2s ease;
}
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--accent); }

/* ---------- 回到顶部 ---------- */
#toTop {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: none;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--card-solid); color: var(--text); font-size: 18px;
  box-shadow: var(--shadow-lift); transition: all .2s;
}
#toTop.show { display: block; }

/* ---------- 工具类 ---------- */
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flex .grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.text-center { text-align: center; }
.small { font-size: 13px; }
.pill-num { font-size: 30px; font-weight: 800; }
.tag { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 8px; font-size: 12px; margin: 0 4px 4px 0; }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
textarea.input { min-height: 90px; resize: vertical; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.pager button { padding: 6px 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 14px; }
.file-input { font-size: 13px; color: var(--muted); }
/* 页面过渡 */
.page-anim { animation: pageIn .25s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 新增：邮箱前缀+固定后缀组合 / 站内信角标 / 消息列表 / 功能介绍 ---------- */
.email-wrap { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.email-wrap .input { border: none; outline: none; box-shadow: none; border-radius: 0; }
.email-suffix { display: inline-flex; align-items: center; padding: 0 12px; background: var(--accent-soft); color: var(--accent); font-size: 13px; white-space: nowrap; user-select: none; }
.msg-badge { display: inline-block; margin-left: 4px; font-size: 11px; padding: 0 5px; border-radius: 8px; }
.msg-item { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 8px; cursor: pointer; background: var(--card); transition: background .15s; }
.msg-item.intro { border-color: var(--accent); }
.msg-item:hover { background: var(--card-solid); }
.intro-body { white-space: normal; }
