/* ===== 我的日记 · 管理后台（深色玻璃 · 高级桌面版） ===== */
:root {
  --bg: #0C0C10; --panel: rgba(24,24,30,.66); --panel-solid: #16161C;
  --line: rgba(255,255,255,.08); --line-soft: rgba(255,255,255,.06);
  --ink: #F2F2F5; --ink-soft: #9A9AA2;
  --accent: #FF6B6B; --accent-press: #FF9A6B;
  --ok: #5BC8A8; --warn: #F5A623; --danger: #E5484D;
  --radius: 16px;
  --glass-blur: blur(26px) saturate(1.6);
  font-size: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; }

/* ---------- 布局 ---------- */
.layout { display: flex; height: 100vh; }
.sidebar {
  width: 248px; flex: none; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #121218, #0E0E13);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--panel); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 6px 18px rgba(255,107,107,.14);
}
.brand-txt b { display: block; font-size: 15px; letter-spacing: .5px; }
.brand-txt span { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 2px; letter-spacing: 2px; }
.nav { flex: 1; padding: 6px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 12px;
  color: var(--ink-soft); font-size: 13.5px; font-weight: 600; letter-spacing: .02em;
  transition: background .15s ease, color .15s ease; position: relative;
}
.nav-item .ni { font-size: 16px; line-height: 1; }
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.nav-item.on { color: var(--ink); background: rgba(255,107,107,.12); }
.nav-item.on::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 2px; background: var(--accent);
}
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: var(--danger); color: #FFF; font-size: 11px; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}
.nav-badge.show { display: flex; }
.side-foot { padding: 16px 20px; border-top: 1px solid var(--line-soft); }
.conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.conn.ok i { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.side-ver { font-size: 10.5px; color: var(--ink-soft); opacity: .6; margin-top: 8px; letter-spacing: 1px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02); backdrop-filter: var(--glass-blur);
}
.tb-title { font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.tb-right { display: flex; align-items: center; gap: 14px; }
.admin-chip {
  display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; background: rgba(255,107,107,.1); color: var(--accent);
}
.admin-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.tb-time { font-size: 12px; color: var(--ink-soft); letter-spacing: .5px; }

.content { flex: 1; overflow-y: auto; padding: 26px 28px 60px; }

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--panel); border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line), 0 12px 34px rgba(0,0,0,.3);
  backdrop-filter: var(--glass-blur);
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  padding: 18px 18px 16px; border-radius: var(--radius);
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line), 0 12px 34px rgba(0,0,0,.3);
  position: relative; overflow: hidden;
}
.stat b { font-size: 28px; font-weight: 800; display: block; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--ink-soft); display: block; margin-top: 5px; }
.stat.hot b { color: var(--accent); }
.stat::after {
  content: ''; position: absolute; right: -22px; top: -22px; width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,107,.14), transparent 70%);
}
.section-title { font-size: 15px; font-weight: 800; margin: 22px 0 12px; letter-spacing: .02em; }
.section-title small { font-size: 11.5px; color: var(--ink-soft); font-weight: 400; margin-left: 8px; }

/* ---------- 概览 ---------- */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.activity { padding: 18px; }
.activity-item { display: flex; gap: 12px; padding: 10px 2px; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.activity-item:last-child { border-bottom: none; }
.activity-item .ai-t { color: var(--ink-soft); font-size: 11.5px; margin-left: auto; flex: none; }
.activity-item em { font-style: normal; color: var(--accent); font-weight: 700; }
.quick { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.q-btn {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 12px;
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  transition: transform .15s ease, background .15s ease;
}
.q-btn:hover { background: rgba(255,255,255,.07); }
.q-btn:active { transform: scale(.98); }
.q-btn .cnt { margin-left: auto; color: var(--accent); font-weight: 800; }
.q-btn .cnt.zero { color: var(--ink-soft); font-weight: 400; }

/* ---------- 审核列表 ---------- */
.review-card { padding: 16px 18px; margin-bottom: 12px; display: flex; gap: 14px; align-items: flex-start; }
.review-ava { flex: none; }
.review-ava img, .review-ava .ph {
  width: 56px; height: 56px; border-radius: 13px; object-fit: cover;
  background: #222228; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--ink-soft);
}
.avatar-review .ph { box-shadow: inset 0 0 0 1px var(--line); }
.review-body { flex: 1; min-width: 0; }
.review-head { display: flex; align-items: baseline; gap: 10px; }
.review-nick { font-size: 13.5px; font-weight: 700; }
.review-time { font-size: 11.5px; color: var(--ink-soft); }
.review-text { font-size: 13.5px; line-height: 1.7; color: var(--ink); margin-top: 7px; white-space: pre-wrap; word-break: break-word; }
.review-images { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.review-images img { width: 92px; height: 92px; object-fit: cover; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line); }
.review-meta { font-size: 11.5px; color: var(--ink-soft); margin-top: 8px; }
.blocked-tag { display: inline-block; font-size: 11px; color: var(--danger); background: rgba(229,72,77,.12); padding: 2px 9px; border-radius: 999px; margin-left: 8px; }
.review-acts { display: flex; gap: 9px; margin-top: 12px; justify-content: flex-end; }
.btn-approve {
  padding: 8px 22px; border-radius: 999px; font-weight: 700; font-size: 13px; color: #FFF;
  background: linear-gradient(135deg, var(--accent), var(--accent-press));
  box-shadow: 0 6px 18px rgba(255,107,107,.28);
}
.btn-reject { padding: 8px 22px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--danger); background: rgba(229,72,77,.1); }
.btn-approve:active, .btn-reject:active { filter: brightness(.94); }
.btn-approve:disabled, .btn-reject:disabled { opacity: .45; cursor: not-allowed; }
.empty-state {
  text-align: center; padding: 64px 20px; color: var(--ink-soft);
  border-radius: var(--radius); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line);
}
.empty-state .e-ico { font-size: 42px; }
.empty-state b { display: block; font-size: 14.5px; color: var(--ink); margin: 12px 0 4px; }
.empty-state span { font-size: 12px; }

/* ---------- 用户表 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; color: var(--ink-soft); font-weight: 600; padding: 14px 16px; border-bottom: 1px solid var(--line); letter-spacing: .5px; }
td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }
.u-cell { display: flex; align-items: center; gap: 11px; }
.u-av { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #FF9A6B); color: #FFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.u-av img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.u-nick { font-weight: 700; }
.u-uid { font-size: 11px; color: var(--ink-soft); }
.pill { display: inline-flex; align-items: center; font-size: 11px; padding: 3px 10px; border-radius: 999px; }
.pill.ok { background: rgba(91,200,168,.12); color: var(--ok); }
.pill.ban { background: rgba(229,72,77,.12); color: var(--danger); }
.ban-btn { font-size: 12.5px; font-weight: 700; padding: 6px 16px; border-radius: 999px; }
.ban-btn.ban { color: #FFF; background: rgba(229,72,77,.85); }
.ban-btn.un { color: var(--ok); background: rgba(91,200,168,.12); }

/* ---------- 违禁词 ---------- */
.word-add { display: flex; gap: 10px; margin-bottom: 16px; }
.word-add input {
  flex: 1; max-width: 420px; padding: 12px 16px; border-radius: 12px; outline: none;
  background: rgba(255,255,255,.05); border: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
}
.word-add input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.word-add button {
  padding: 0 26px; border-radius: 12px; font-weight: 700; color: #FFF;
  background: linear-gradient(135deg, var(--accent), var(--accent-press)); box-shadow: 0 6px 18px rgba(255,107,107,.28);
}
.word-note { font-size: 12px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 16px; }
.word-note em { font-style: normal; color: var(--accent); font-weight: 700; }
.word-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.word-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(229,72,77,.09); box-shadow: inset 0 0 0 1px rgba(229,72,77,.35);
}
.word-tag button { color: var(--danger); font-size: 16px; line-height: 1; }
.word-tag button:hover { transform: scale(1.15); }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; top: 26px; transform: translateX(-50%);
  padding: 10px 22px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(20,20,26,.92); color: #FFF; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 12px 34px rgba(0,0,0,.5);
  backdrop-filter: var(--glass-blur);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  z-index: 99;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(4px); }

@media (max-width: 900px) {
  .sidebar { width: 200px; }
  .dash-grid { grid-template-columns: 1fr; }
}

/* SVG 图标统一 */
.ni svg, .qi svg { width: 17px; height: 17px; display: block; color: currentColor; }
.q-btn .qi { flex: none; display: flex; margin-right: 1px; }
