/* ============================================================
   LiteCMS 后台样式 v1.0.0
   ============================================================ */

:root {
  --bg: #f4f6f8;
  --surface: #fff;
  --ink: #14171c;
  --ink-2: #4b535d;
  --ink-3: #8b939e;
  --line: #e4e8ed;
  --brand: #2f5bea;
  --brand-soft: #eef2ff;
  --ok: #0f9d58;
  --ok-soft: #e7f6ee;
  --warn: #b26a00;
  --warn-soft: #fff6e5;
  --danger: #d93025;
  --danger-soft: #fdecea;
  --radius: 12px;
  --mono: "SFMono-Regular", Consolas, Menlo, monospace;
  --side-w: 216px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
code { font-family: var(--mono); font-size: .9em; background: #f1f3f6; padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.text-danger { color: var(--danger); }

/* ---------------------------------------------------------- 侧边栏 */
.admin-body { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--side-w);
  flex-shrink: 0;
  background: #10131a;
  color: #c8ced8;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 14px;
}
.side-brand .brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(140deg, #4d7cff, #2f5bea);
  color: #fff; font-weight: 800; font-size: 17px;
}
.side-brand strong { display: block; color: #fff; font-size: 14px; line-height: 1.3; }
.side-brand small { color: #6f7885; font-size: 11px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.side-nav a {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #aab2be;
  transition: background .15s, color .15s;
}
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.on { background: rgba(77, 124, 255, .18); color: #9db6ff; font-weight: 600; }

.side-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}
.side-foot a { color: #8b939e; padding: 5px 8px; border-radius: 6px; }
.side-foot a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-foot a.danger:hover { color: #ff8b82; }

/* ---------------------------------------------------------- 主区域 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 62px;
  flex-shrink: 0;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-2);
}
.user-chip .avatar {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}
.user-chip em {
  font-style: normal;
  font-size: 11px;
  background: #f1f3f6;
  color: var(--ink-3);
  border-radius: 999px;
  padding: 0 7px;
}

.content { padding: 24px 26px 60px; width: 100%; }

/* ---------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.btn:hover { border-color: #c7d2fe; color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #2549c9; border-color: #2549c9; color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }

.link {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--brand);
  cursor: pointer;
}
.link:hover { text-decoration: underline; }
.link.danger { color: var(--danger); }
/* 1.0.67 投稿待审：行内「通过并发布」按钮 + 投稿者标识 */
.link.ok { color: #0b6b3d; font-weight: 600; }
.sub-cell.contrib-from { color: #456f92; display: flex; align-items: center; gap: 5px; }
.contrib-dot {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  border-radius: 3px; background: #eaf1fb; color: #2f5bd7; font-size: 10px; line-height: 1;
}

/* ---------------------------------------------------------- 提示条 */
.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-success { background: var(--ok-soft); border-color: #bfe5cf; color: #0b6b3d; }
.alert-error { background: var(--danger-soft); border-color: #f6c7c3; color: #a3201a; }
.alert-close {
  background: none; border: 0; font-size: 18px; line-height: 1;
  color: inherit; opacity: .5; cursor: pointer;
}
.alert-close:hover { opacity: 1; }

/* ---------------------------------------------------------- 统计卡 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-label { font-size: 12.5px; color: var(--ink-3); }
.stat strong { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.stat-sub { font-size: 12px; color: var(--ink-3); }
.stat-sub a { color: var(--brand); }

/* ---------------------------------------------------------- 面板 */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h3 { margin: 0; font-size: 14px; }

.panel-empty { padding: 30px 18px; text-align: center; color: var(--ink-3); font-size: 13px; }
.panel-empty a { color: var(--brand); }

.pad { padding: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-cols-7-3 { grid-template-columns: 7fr 3fr; }
.grid-cols-6-4 { grid-template-columns: 6fr 4fr; }

/* ---------------------------------------------------------- 列表（仪表盘） */
.simple-list { list-style: none; margin: 0; padding: 0; }

.simple-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #f0f2f5;
}
.simple-list li:last-child { border-bottom: 0; }
.sl-main { min-width: 0; }
.sl-main > a { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 2px; flex-wrap: wrap; }
.link-edit { font-size: 12.5px; color: var(--brand); flex-shrink: 0; }

/* ---------------------------------------------------------- 状态标签 */
.pill {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  line-height: 1.7;
  white-space: nowrap;
}
.pill-ok { background: var(--ok-soft); color: #0b6b3d; }
.pill-draft { background: #f1f3f6; color: var(--ink-3); }
.pill-danger { background: var(--danger-soft); color: #a3201a; }
.pill-star { background: var(--warn-soft); color: var(--warn); }
/* 精选失效：超出精选上限、首页不再展示 */
.pill-alert { background: #f1f2f5; color: #6b7280; text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: #b9bec7; }
.stale-hint { color: #9aa0aa; }

/* 文章列表顶部的精选状态提示 */
.feature-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #eadfc2;
  border-radius: 8px;
  background: #fffbf1;
  color: #7a5a1c;
  font-size: 12.5px;
  line-height: 1.7;
}
.feature-note b { color: #a35a00; }
.feature-note-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #e0a34a; flex-shrink: 0;
}

/* ---------------------------------------------------------- 工具栏 / 标签页 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tabs { display: flex; gap: 4px; background: #eaedf1; padding: 3px; border-radius: 9px; }
.tabs .tab {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabs .tab em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.tabs .tab:hover { color: var(--ink); }
.tabs .tab.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08); }

.filter-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-form select, .filter-form input {
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.filter-form input { width: 170px; }
.filter-form select:focus, .filter-form input:focus { border-color: #a5b8f5; box-shadow: 0 0 0 3px rgba(47,91,234,.1); }

/* ---------------------------------------------------------- 批量操作 */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 13px;
}
.bulk-bar select {
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 8px;
  font-size: 12.5px;
  font-family: inherit;
  background: #fff;
  outline: none;
}
.check-all { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); cursor: pointer; }

/* ---------------------------------------------------------- 数据表格 */
.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}
.panel .table-wrap { border: 0; border-radius: 0; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }

.data-table thead th {
  text-align: left;
  padding: 10px 14px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f2f4f7;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafbfd; }
.data-table tr.row-active { background: var(--brand-soft); }

.col-check { width: 38px; }
.col-num { width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.col-status { width: 84px; }
.col-time { width: 96px; white-space: nowrap; }
.col-act { width: 168px; }
.col-cat { width: 96px; }
.col-tags { width: 150px; }

.title-cell { display: flex; align-items: center; gap: 7px; }
.title-cell a { font-weight: 500; }
.sub-cell { font-size: 11.5px; margin-top: 1px; font-family: var(--mono); opacity: .75; }
.desc-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag-mini {
  display: inline-block;
  font-size: 11px;
  background: #f1f3f6;
  color: var(--ink-2);
  border-radius: 5px;
  padding: 0 6px;
  margin-right: 4px;
}

.act-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-form { display: inline; }

.table-empty { text-align: center; padding: 40px 16px !important; color: var(--ink-3); }
.table-empty a { color: var(--brand); }

.table-plain { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-plain th, .table-plain td { padding: 10px 18px; text-align: left; border-bottom: 1px solid #f2f4f7; }
.table-plain th { width: 150px; font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
.table-plain tr:last-child th, .table-plain tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------- 表单 */
.field { display: block; margin-bottom: 16px; }
.field > .label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.req { color: var(--danger); font-style: normal; }

.field input[type=text],
.field input[type=password],
.field input[type=number],
.field input[type=datetime-local],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  line-height: 1.6;
}
.field textarea { resize: vertical; }

/* 提示条预览（设置页） */
.tips-preview { margin: 12px 0 6px; padding: 0; }
.tips-preview > div { padding: 8px 12px; border: 1px solid transparent; border-radius: 4px; font-size: 12.5px; line-height: 1.7; }
.tips-preview > div.info { border-color: #bce8f1; background: #d9edf7; color: #31708f; }
.tips-preview > div.warning { border-color: #faebcc; background: #fcf8e3; color: #8a6d3b; }
.tips-preview > div.danger { border-color: #ebccd1; background: #f2dede; color: #a94442; }

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #a5b8f5;
  box-shadow: 0 0 0 3px rgba(47, 91, 234, .1);
}
.field .has-error { border-color: #f0a9a4; background: #fffafa; }
.err-msg { display: block; color: var(--danger); font-size: 12px; margin-top: 4px; font-style: normal; }

.radio-row { display: flex; gap: 16px; font-size: 13px; }
.radio-row label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; flex: 0 0 auto; white-space: nowrap; }
.radio-row .hint { flex: 0 1 auto; white-space: normal; }

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 16px;
  cursor: pointer;
}

/* ---------------------------------------------------------- 编辑器 */
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.card-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card-block:last-child { margin-bottom: 0; }

.side-title {
  font-size: 13px;
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.side-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.side-meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f2f4f7; font-size: 11.5px; line-height: 1.9; }

.toolbar-editor {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}

.tb {
  border: 0;
  background: transparent;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s;
}
.tb:hover { background: #e9edf3; color: var(--ink); }
.tb-info { margin-left: auto; font-size: 11.5px; padding-right: 4px; }
.tb-media { border-left: 1px solid var(--line); margin-left: 2px; padding-left: 10px; color: var(--brand); font-weight: 600; }
.tb-media:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------------------------------------------------------------- 媒体库弹窗 */
.media-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; }
.media-modal[hidden] { display: none; }
.media-mask { position: absolute; inset: 0; background: rgba(20, 26, 34, .46); }
.media-dialog {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 880px;
  max-height: 84vh; background: #fff; border-radius: var(--radius); box-shadow: 0 18px 46px rgba(15, 23, 42, .22);
  overflow: hidden;
}
.media-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.media-head h3 { margin: 0; font-size: 14px; }
.media-x { border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 0 4px; }
.media-x:hover { color: var(--ink); }
.media-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.media-upload { position: relative; overflow: hidden; display: inline-block; }
.media-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.media-upload span {
  display: inline-block; padding: 7px 13px; font-size: 12.5px; color: #fff; background: var(--brand);
  border-radius: 7px; font-weight: 600;
}
.media-upload:hover span { background: #2549c9; }
.media-search {
  flex: 1 1 180px; min-width: 140px; padding: 7px 10px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px; outline: none; background: #fff;
}
.media-search:focus { border-color: var(--brand); }
.media-opt { font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.media-status { font-size: 12px; margin-left: auto; }
.media-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 18px; min-height: 180px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.media-card {
  position: relative; display: flex; flex-direction: column; gap: 0; padding: 0; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; text-align: left;
  font-family: inherit; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.media-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(37, 73, 201, .13); transform: translateY(-1px); }
.media-thumb { display: flex; align-items: center; justify-content: center; height: 92px; background: #f4f6f8; overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-ext { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.media-meta { display: block; padding: 7px 9px 8px; }
.media-meta b { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta em { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.media-badge {
  position: absolute; top: 6px; right: 6px; font-size: 10px; color: #fff; background: rgba(37, 73, 201, .86);
  padding: 1px 6px; border-radius: 20px; opacity: 0; transition: opacity .15s;
}
.media-card:hover .media-badge { opacity: 1; }
.media-empty { grid-column: 1 / -1; padding: 48px 12px; text-align: center; color: var(--ink-3); font-size: 13px; }
.media-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: #fafbfc; }
.media-insert-row { display: flex; align-items: center; gap: 8px; }
.media-insert-row input { width: 220px; padding: 6px 9px; font-size: 12px; font-family: var(--mono); border: 1px solid var(--line); border-radius: 7px; }

/* ---------------------------------------------------------------- 友情链接拖拽排序 */
.drag-handle { display: inline-block; padding: 2px 7px; cursor: grab; color: var(--ink-3); font-size: 13px; user-select: none; touch-action: none; }
.drag-handle:hover { color: var(--brand); background: var(--brand-soft); border-radius: 5px; }
.drag-handle:active { cursor: grabbing; }
/* 拖拽排序：被拖行 + 插入位置提示 + 拖动中禁止选中 */
tfoot tr, tr.dragging {
  box-shadow: 0 10px 26px rgba(18, 40, 63, .18);
  background: #fff !important;
  position: relative;
  z-index: 5;
}
tr.dragging { opacity: .96; }
.drag-handle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-radius: 5px; }
table.data-table.sorting { cursor: grabbing; }
table.data-table.sorting .drag-handle { cursor: grabbing; }
tr.drop-above > td { box-shadow: inset 0 2px 0 var(--brand); }
tr.drop-above:first-child > td { box-shadow: inset 0 2px 0 var(--brand); }
body.row-sorting { user-select: none; -webkit-user-select: none; cursor: grabbing; }

.content-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0 0 9px 9px !important;
  padding: 14px !important;
  font-family: var(--mono) !important;
  font-size: 13px !important;
  line-height: 1.8 !important;
  resize: vertical;
  min-height: 380px;
}
.content-input:focus { border-color: #a5b8f5; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag-pick {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
}
.tag-pick:hover { border-color: #c7d2fe; color: var(--brand); }
.tag-pick.on { background: var(--brand-soft); border-color: #c7d2fe; color: var(--brand); font-weight: 600; }

/* ---------------------------------------------------------- 标签管理 */
.tag-manage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  padding: 18px;
}
.tag-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fcfcfd;
}
.tag-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tag-card-head strong { font-size: 13.5px; }
.tag-card-slug { font-size: 11.5px; margin: 3px 0 10px; }
.tag-rename { display: flex; gap: 6px; margin-bottom: 8px; }
.tag-rename input {
  flex: 1;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
}
.tag-rename input:focus { border-color: #a5b8f5; }
.tag-del { font-size: 12px; }

/* ---------------------------------------------------------- 设置页 */
.settings-wrap { margin-bottom: 4px; }
.settings-actions { display: flex; gap: 10px; margin-bottom: 18px; }

/* ---------------------------------------------------------- 分页（复用前台结构） */
.pager { display: flex; align-items: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 33px; height: 33px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-2);
}
.pager a:hover { border-color: #c7d2fe; color: var(--brand); }
.pager .current { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pager .disabled { color: #c3c9d1; background: #fafbfc; }
.pager .total { border: 0; background: transparent; color: var(--ink-3); margin-left: 4px; }

/* ---------------------------------------------------------- 登录页 */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #0e1117;
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.auth-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 22% 28%, rgba(77, 124, 255, .32), transparent 42%),
    radial-gradient(circle at 78% 68%, rgba(167, 139, 250, .26), transparent 44%),
    radial-gradient(circle at 50% 95%, rgba(245, 158, 11, .14), transparent 46%);
  filter: blur(8px);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

.auth-wrap { position: relative; width: 100%; max-width: 380px; }

.login-card {
  background: rgba(255, 255, 255, .98);
  border-radius: 18px;
  padding: 34px 30px 26px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
}

.login-head { text-align: center; margin-bottom: 22px; }
.login-head .brand-mark.big {
  width: 46px; height: 46px;
  display: inline-grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(140deg, #4d7cff, #2f5bea 60%, #1e3fbe);
  color: #fff; font-weight: 800; font-size: 23px;
  box-shadow: 0 8px 20px -6px rgba(47, 91, 234, .8);
  margin-bottom: 12px;
}
.login-head h1 { font-size: 18px; margin: 0 0 4px; letter-spacing: -.01em; }
.login-head p { margin: 0; font-size: 12.5px; }

.login-form .field { margin-bottom: 14px; }
.login-form .btn-block { margin-top: 6px; padding: 11px; font-size: 14px; }

.login-tip {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.75;
  text-align: center;
}

.auth-foot { text-align: center; color: #6b7482; font-size: 11.5px; margin-top: 18px; }

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
  .editor-grid { grid-template-columns: 1fr; }
  .grid-cols-7-3, .grid-cols-6-4 { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .admin-body { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    overflow-x: auto;
  }
  .side-brand { border: 0; padding: 0; margin: 0; }
  .side-brand small { display: none; }
  .side-nav { flex-direction: row; gap: 2px; }
  .side-nav a { padding: 7px 10px; white-space: nowrap; font-size: 13px; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; border: 0; padding: 0; }
  .topbar { padding: 0 16px; height: 56px; }
  .user-chip { display: none; }
  .content { padding: 16px 14px 50px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat strong { font-size: 22px; }
  .tabs { overflow-x: auto; max-width: 100%; }
}

/* ============================================================
   评论管理 v1.1.0
   ============================================================ */

.pill-warn { background: #fff6e5; color: #8a5300; }

.nav-badge {
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  background: #d93025;
  color: #fff;
  border-radius: 999px;
  padding: 0 6px;
  line-height: 1.7;
  min-width: 17px;
  text-align: center;
}

.cm-user { display: flex; align-items: center; gap: 8px; }
.cm-dot {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.cm-text {
  font-size: 13px;
  line-height: 1.6;
  color: #2c323a;
  word-break: break-word;
  max-width: 420px;
}

.reply-to {
  font-size: 11.5px;
  color: var(--brand);
  margin-bottom: 2px;
}

.small-link { font-size: 12.5px; color: var(--ink-2); }
.small-link:hover { color: var(--brand); }

/* 状态徽标 */
.badge-ok {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11.5px; font-weight: 600; color: #1a7f4b; background: #e6f6ec;
}
.badge-draft {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11.5px; font-weight: 600; color: #8a6d3b; background: #fdf6e3;
}

/* ============================================================
   广告设置页（侧边栏「广告」独立菜单）
   ============================================================ */
.ad-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 0 16px; padding: 16px 18px;
  background: linear-gradient(135deg, #f7f9ff, #eef3ff);
  border: 1px solid #e2e9f8; border-radius: 12px;
}
.ad-hero h3 { margin: 0 0 4px; font-size: 15px; color: var(--ink); }
.ad-hero p { margin: 0; font-size: 12.5px; line-height: 1.7; }
.ad-hero strong { color: var(--brand); font-weight: 600; }

.ad-badge {
  display: inline-block; flex: 0 0 auto;
  padding: 2px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.ad-badge.on { color: #1a7f4b; background: #e6f6ec; }
.ad-badge.off { color: #6b7480; background: #eef1f5; }
.panel-head .ad-badge { margin-left: 8px; }

#adPanel .panel-head { flex-wrap: wrap; gap: 6px; }
.check-line.check-lg { font-size: 14px; font-weight: 600; }

#adPanel textarea,
.settings-wrap textarea[name^="ad_"] {
  line-height: 1.65; background: #fbfcfd; tab-size: 2;
}
#adPanel textarea:focus,
.settings-wrap textarea[name^="ad_"]:focus { background: #fff; }

/* 填写说明折叠块 */
.ad-tip { margin: -2px 0 4px; border: 1px dashed var(--line); border-radius: 9px; background: #fbfcfe; }
.ad-tip > summary {
  cursor: pointer; padding: 9px 13px;
  font-size: 12.5px; color: var(--ink-2); font-weight: 600;
  list-style: none; user-select: none;
}
.ad-tip > summary::-webkit-details-marker { display: none; }
.ad-tip > summary::before { content: "\25B8"; display: inline-block; margin-right: 6px; color: var(--brand); transition: transform .15s; }
.ad-tip[open] > summary::before { transform: rotate(90deg); }
.ad-tip-list { margin: 0; padding: 0 16px 12px 30px; }
.ad-tip-list li { font-size: 12px; color: var(--ink-3); line-height: 1.9; list-style: disc; }
.ad-tip-list code { background: #eef1f5; border-radius: 4px; padding: 0 4px; font-size: 11.5px; }

/* ============================================================
   导入（WordPress WXR）v1.0.51
   ============================================================ */

.import-form { padding: 18px 16px; }
.import-file {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: #fafbfd;
}
.import-file input[type="file"] { font-size: 13px; }
.import-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.import-note { padding: 0 16px 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }
.import-note b { display: block; margin: 10px 0 4px; color: var(--ink); }
.import-note ul { margin: 0; padding-left: 18px; }
.import-note code { background: #f1f3f6; border-radius: 4px; padding: 0 5px; font-size: 12px; }
.kv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv-table th, .kv-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.kv-table th { color: var(--ink-3); font-weight: 500; width: 45%; }
.kv-table tr:last-child th, .kv-table tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------- 标签折叠（文章表单） */
.tag-picker-more { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.tag-toggle {
  margin-top: 8px;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.tag-toggle:hover { text-decoration: underline; }

/* 1.0.67 编辑页的投稿者信息条 */
.contrib-owner {
  display: flex; align-items: center; gap: 10px; background: #f2f6fd; border: 1px solid #dbe6f8;
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
}
.contrib-owner img, .contrib-owner .owner-initial {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; display: block;
  object-fit: cover; background: #e3ecfb; color: #2f5bd7;
  text-align: center; line-height: 38px; font-weight: 700;
}
.contrib-owner .owner-text { flex: 1; min-width: 0; }
.contrib-owner .owner-text b { display: block; font-size: 13.5px; color: var(--ink); }
.contrib-owner .owner-text small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; word-break: break-all; }
