@charset "UTF-8";
/* ==========================================================================
   万信物流 · 运营后台样式表  admin/css/admin.css
   设计语言：延续前台的「印刷感」—— 直角 / 1px 细边框 / 大留白分区，
   不使用圆角卡片、不使用渐变与投影堆叠。
   配色：深墨绿侧栏 + 米白内容区 + 橙色强调 + 薄荷绿点缀。
   ========================================================================== */

/* ==========================================================================
   01. 变量与基础重置
   ========================================================================== */
:root {
  /* —— 品牌色 —— */
  --ink: #13252b;          /* 深墨绿：侧栏、标题 */
  --ink-soft: #294149;     /* 次级深色 */
  --ink-line: #24404a;     /* 深色区域内的分隔线 */
  --paper: #fbfaf6;        /* 米白：内容区底色 */
  --cream: #f4f1e8;        /* 稍暖的米色：表头 / 分组底 */
  --white: #fffefa;        /* 卡片白 */

  --orange: #ed6b3d;       /* 强调橙 */
  --orange-deep: #c9502b;  /* 深橙：hover / 文字 */
  --orange-soft: rgba(237, 107, 61, .14); /* 橙色浅底（focus 光晕） */

  --mint: #a6d7c8;         /* 薄荷绿：点缀 */
  --mint-deep: #287766;    /* 深薄荷：成功、在线 */
  --mint-soft: rgba(166, 215, 200, .28);

  --blue: #84a9b8;         /* 蓝灰：辅助信息 */
  --danger: #b83a2c;       /* 危险红 */
  --danger-deep: #9a2d21;
  --danger-soft: rgba(184, 58, 44, .1);

  /* —— 中性线 / 文字 —— */
  --line: #d7d9d1;         /* 主分隔线 */
  --line-soft: #e6e5dd;    /* 更轻的分隔线 */
  --line-strong: #c3c6bc;  /* 强调边框 */
  --text: #13252b;         /* 正文 */
  --text-soft: #5d6f72;    /* 次级文字 */
  --text-muted: #8b9694;   /* 弱化文字 */
  --field: #f8f8f4;        /* 输入框底色 */
  --field-line: #d5ded8;   /* 输入框边框 */

  /* —— 字体 —— */
  --display: "Noto Serif SC", Georgia, serif;
  --body: "Manrope", "Noto Sans SC", Arial, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  /* —— 尺寸 —— */
  --sidebar-w: 258px;
  --content-pad: 26px;
  --radius: 2px;           /* 全局只用 2px 直角 */
  --radius-pill: 999px;
  --shadow-pop: 0 10px 26px rgba(19, 37, 43, .14);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
svg { display: block; }

/* hidden 属性必须真正隐藏：JS 用 hidden 控制账户菜单、徽标、错误条 */
[hidden] { display: none !important; }

::selection { color: var(--white); background: var(--orange); }

/* 统一滚动条观感 */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #cfd2c9; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #b3b8ac; background-clip: content-box; }

/* ==========================================================================
   02. 整体框架：侧栏 + 主区域（grid 两栏）
   ========================================================================== */
.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--paper);
}

.main-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.content {
  flex: 1;
  min-width: 0;
  padding: var(--content-pad);
}

/* 页面切换时的内容淡入，避免生硬跳变 */
.content > * { animation: wx-fade .22s ease both; }
@keyframes wx-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   03. 品牌标识（侧栏与登录页共用）
   ========================================================================== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--orange);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: var(--radius);
}

.brand-copy { display: grid; gap: 3px; line-height: 1.15; min-width: 0; }
.brand-copy b {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .5px;
  white-space: nowrap;
}
.brand-copy small {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.9px;
  text-transform: uppercase;
}

/* 深色底上的品牌（登录页左侧） */
.brand.is-light { color: var(--white); }
.brand.is-light .brand-copy small { color: rgba(255, 254, 250, .58); }

/* ==========================================================================
   04. 侧栏：品牌 + 导航 + 底部状态
   ========================================================================== */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 22px 0 18px;
  overflow-y: auto;
  color: rgba(255, 254, 250, .82);
  background: var(--ink);
  border-right: 1px solid #0d1b20;
}

.sidebar .brand {
  margin: 0 20px 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink-line);
}

.side-nav {
  display: grid;
  gap: 2px;
  align-content: start;
  flex: 1;
  padding: 0 12px;
}

.nav-label {
  margin: 18px 0 6px;
  padding: 0 10px;
  color: rgba(166, 215, 200, .72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
}
.side-nav > .nav-label:first-child { margin-top: 4px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: rgba(255, 254, 250, .78);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.nav-item > i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--mint);
  opacity: .85;
}

.nav-item svg { width: 18px; height: 18px; }

.nav-item:hover {
  color: var(--white);
  background: rgba(255, 254, 250, .07);
}

.nav-item.is-active {
  color: var(--white);
  background: rgba(166, 215, 200, .1);
  border-color: rgba(166, 215, 200, .3);
}
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 3px;
  height: 22px;
  transform: translateY(-50%);
  background: var(--orange);
}
.nav-item.is-active > i { color: var(--orange); opacity: 1; }

.nav-item:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }

/* 侧栏未处理数量徽标 */
.badge {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--white);
  background: var(--orange);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.side-foot {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 20px 0;
  padding-top: 16px;
  border-top: 1px solid var(--ink-line);
  font-size: 11px;
  line-height: 1.5;
}
.side-foot b { display: block; color: var(--white); font-size: 12px; font-weight: 700; }
.side-foot a {
  color: var(--mint);
  font-size: 11px;
  border-bottom: 1px solid rgba(166, 215, 200, .35);
}
.side-foot a:hover { color: var(--orange); border-bottom-color: var(--orange); }

/* 运行状态小圆点：轻微呼吸 */
.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #4da98c;
  animation: wx-breathe 2.4s ease-in-out infinite;
}
@keyframes wx-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(77, 169, 140, .55); opacity: 1; }
  50% { box-shadow: 0 0 0 5px rgba(77, 169, 140, 0); opacity: .68; }
}

/* ==========================================================================
   05. 顶栏：面包屑 + 操作 + 账户菜单
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 0 var(--content-pad);
  background: rgba(251, 250, 246, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 12px;
}
.crumb span { color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.crumb b { color: var(--line-strong); font-weight: 400; }
.crumb strong {
  color: var(--ink);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--orange-deep); border-color: var(--orange); background: var(--paper); }
.icon-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }

/* 桌面端隐藏抽屉按钮，<1000px 显示 */
.menu-btn { display: none; }

.account { position: relative; }

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease;
}
.account-btn:hover { border-color: var(--line-strong); background: var(--paper); }
.account-btn > svg { width: 14px; height: 14px; color: var(--text-muted); }

.avatar {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--mint);
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
}

.account-name { max-width: 110px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 232px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}
/* JS 用 hidden 控制显隐，必须彻底隐藏 */
.account-menu[hidden] { display: none; }

.account-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--line-soft);
}
.account-head b { display: block; font-size: 12.5px; font-weight: 700; }
.account-head small { display: block; color: var(--text-muted); font-size: 10.5px; }

.account-action {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius);
  color: var(--text);
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}
.account-action:hover { background: var(--cream); color: var(--ink); }
.account-action.is-danger { color: var(--danger); }
.account-action.is-danger:hover { color: var(--white); background: var(--danger); }

/* ==========================================================================
   06. 页面头部：标题左 / 操作右
   ========================================================================== */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.page-kicker {
  margin-bottom: 7px;
  color: var(--orange-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.page-head h1 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: .3px;
}

.page-desc {
  max-width: 640px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12.5px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

/* ==========================================================================
   07. 卡片与统计
   ========================================================================== */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #fdfdf9;
}

.card-title {
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .2px;
}
.card-title small { margin-left: 8px; color: var(--text-muted); font-family: var(--body); font-size: 11px; font-weight: 500; }

.card-body { padding: 18px; }
.card-body > * + * { margin-top: 14px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  padding: 16px 18px 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 34px;
  height: 3px;
  background: var(--orange);
}
.stat-card:nth-child(4n + 2)::before { background: var(--mint-deep); }
.stat-card:nth-child(4n + 3)::before { background: var(--ink-soft); }
.stat-card:nth-child(4n + 4)::before { background: var(--blue); }

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.stat-value {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 31px;
  font-weight: 600;
  line-height: 1.12;
}
.stat-value small { margin-left: 5px; color: var(--text-muted); font-family: var(--body); font-size: 12px; font-weight: 600; }

.stat-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-soft);
  font-size: 11px;
}
.stat-foot b { color: var(--mint-deep); font-weight: 700; }
.stat-foot .status-dot { margin-top: 0; width: 6px; height: 6px; }

/* ==========================================================================
   08. 工具栏、搜索框与筛选
   ========================================================================== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* 放在卡片头部里的工具栏要占满整行。
   .card-head 是 flex 容器，不声明 flex-basis 的话工具栏会被压缩到内容宽度，
   内部的搜索框和下拉框就会各自换行堆成两行。 */
.card-head > .toolbar,
.card-body > .toolbar {
  flex: 1 1 100%;
  margin-bottom: 0;
}
/* 批量操作条同样要占满一行 */
.card-head > .batch-bar { flex: 1 1 100%; }

/* 工具栏里的下拉框/输入框不能沿用 width:100%（那是给表单网格用的），
   否则它会想独占一整行，把后面的控件挤到下一行去。 */
.toolbar-group > .select,
.toolbar-group > .input {
  width: auto;
  min-width: 132px;
  flex: 0 1 auto;
}
.search-box input { width: 100%; min-width: 0; }

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.toolbar-group:last-child { margin-left: auto; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
  flex: 1 1 220px;
  max-width: 340px;
}
.search-box svg {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-box input { padding-left: 33px; }

/* 通用输入控件 */
.input,
.select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--field);
  font-size: 13px;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input::placeholder, textarea::placeholder { color: #9ba5a4; }
.input:hover, .select:hover, textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, textarea:focus {
  border-color: var(--orange);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--orange-soft);
}
.input:disabled, .select:disabled, textarea:disabled {
  color: var(--text-muted);
  background: #f1f3f0;
  cursor: not-allowed;
}

.select {
  appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
                    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

textarea { min-height: 110px; line-height: 1.7; resize: vertical; }

/* 标签页 */
.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-bottom-color: transparent;
  color: var(--text-soft);
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.tab:hover { color: var(--ink); background: var(--cream); }
.tab.is-active {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
  border-bottom-color: var(--white);
}

.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  background: var(--cream);
  border: 1px solid var(--line-soft);
  font-size: 10.5px;
  font-weight: 800;
}
.tab.is-active .tab-count { color: var(--white); background: var(--mint-deep); border-color: var(--mint-deep); }

/* ==========================================================================
   09. 数据表格
   ========================================================================== */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}

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

table.data-table th {
  padding: 11px 14px;
  color: var(--text-soft);
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
}

table.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: middle;
}

table.data-table tbody tr:last-child td { border-bottom: 0; }
table.data-table tbody tr:hover { background: #f7f8f3; }
table.data-table tbody tr.is-selected { background: rgba(166, 215, 200, .16); }
table.data-table td small { color: var(--text-muted); }

.cell-strong { display: block; font-weight: 700; color: var(--ink); }
.cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.col-actions > * + * { margin-left: 6px; }

.row-check {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--mint-deep);
  cursor: pointer;
  vertical-align: middle;
}
th.row-check, td.row-check { text-align: center; padding-right: 4px; }

/* ==========================================================================
   10. 状态标签 chip
   ========================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-soft);
  background: var(--cream);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
  white-space: nowrap;
  vertical-align: middle;
}
.chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .85;
}

/* 「已发布」要一眼能认出来 —— 它是对外可见的唯一状态，值得比其它状态更重一点 */
.chip.is-live {
  color: var(--white);
  background: var(--mint-deep);
  border-color: var(--mint-deep);
  font-weight: 800;
  letter-spacing: .2px;
}
.chip.is-live::before {
  width: 6px;
  height: 6px;
  background: var(--mint);
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(166, 215, 200, .32);
}
.chip.is-draft    { color: #6d7876; background: #f2f2ec;                  border-color: var(--line); }
.chip.is-off      { color: var(--danger); background: var(--danger-soft); border-color: rgba(184, 58, 44, .32); }
.chip.is-pending  { color: var(--orange-deep); background: var(--orange-soft); border-color: rgba(237, 107, 61, .36); }
.chip.is-replied  { color: #1f6b57; background: rgba(166, 215, 200, .3);  border-color: rgba(40, 119, 102, .38); }
.chip.is-archived { color: #7a8482; background: #eceded;                  border-color: var(--line-strong); }

/* 已发布的整行左侧加一条绿边，扫一眼就能分出哪些是上线了的 */
tr.is-published > td:first-child { box-shadow: inset 3px 0 0 var(--mint-deep); }
tr.is-published .cell-strong { color: var(--ink); }

/* 表头里的排序说明 */
.th-note { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10px; font-weight: 600; letter-spacing: 0; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; }
.th-sort svg { width: 12px; height: 12px; color: var(--mint-deep); }

/* 文章列表：让一屏扫过去能分清主次 */
.col-index { width: 44px; text-align: center; color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.col-num { width: 62px; text-align: right; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.col-title { min-width: 260px; }

/* 标题行：正文标题比摘要明显大一档，缩略时也能一眼看到标题 */
.article-table .cell-strong {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.article-table .cell-sub {
  margin-top: 3px;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.7;
}
/* 行高放宽一点，不再挤在一起 */
.article-table tbody td { padding-top: 14px; padding-bottom: 14px; }

/* 栏目做成带色点的标签，比纯文字好认 */
.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.cat-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-deep);
  flex: 0 0 auto;
}

/* ==========================================================================
   11. 按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--cream);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .12s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }

.btn.primary {
  color: var(--white);
  background: var(--orange);
  border-color: var(--orange);
}
.btn.primary:hover { background: var(--orange-deep); border-color: var(--orange-deep); }

.btn.ghost {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line-strong);
}
.btn.ghost:hover { color: var(--orange-deep); border-color: var(--orange); background: var(--paper); }

.btn.is-small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11.5px;
  gap: 5px;
}
.btn.is-small svg { width: 13px; height: 13px; }

.btn.is-block { width: 100%; min-height: 44px; font-size: 13.5px; }

/* 危险按钮（含确认框里由 JS 切换的 .is-danger） */
.btn.danger,
.btn.is-danger {
  color: var(--white);
  background: var(--danger);
  border-color: var(--danger);
}
.btn.danger:hover,
.btn.is-danger:hover { background: var(--danger-deep); border-color: var(--danger-deep); }

/* 禁用态放在最后，保证覆盖所有变体 */
.btn:disabled,
.btn[disabled],
.btn.is-disabled {
  color: var(--text-muted) !important;
  background: #eeefe9 !important;
  border-color: var(--line) !important;
  transform: none;
  cursor: not-allowed;
  opacity: .85;
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

/* ==========================================================================
   12. 表单
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.form-grid.is-single { grid-template-columns: minmax(0, 1fr); }

.form-field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.form-field.is-wide { grid-column: 1 / -1; }

.form-label {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2px;
}

.req { color: var(--orange); font-style: normal; font-weight: 800; }

.form-hint {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.form-section {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}
.form-section::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--orange);
}
.form-section small { color: var(--text-muted); font-family: var(--body); font-size: 11px; font-weight: 500; }

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px calc(var(--content-pad) * -1) calc(var(--content-pad) * -1);
  padding: 14px var(--content-pad);
  background: rgba(251, 250, 246, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.form-actions .text-muted,
.form-actions > span { margin-right: auto; }

/* 编辑器：主编辑区 + 右侧栏 */
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.editor-main { min-width: 0; }
.editor-side {
  display: grid;
  gap: 16px;
  min-width: 0;
  position: sticky;
  top: 78px;
}
.editor-side .card { margin-bottom: 0; }
.editor-side .card-body { padding: 16px; }
.editor-side textarea { min-height: 84px; }
.editor-side .form-grid { grid-template-columns: minmax(0, 1fr); }

/* ==========================================================================
   13. Markdown 预览（后台文章预览 / 前台详情共用 .md-preview）
   ========================================================================== */
.md-preview {
  color: #2b3a3d;
  font-size: 13.5px;
  line-height: 1.85;
  counter-reset: md-section;
}
.md-preview > *:first-child { margin-top: 0; }
.md-preview > *:last-child { margin-bottom: 0; }

.md-preview h2,
.md-preview h3,
.md-preview h4 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .2px;
}

/* 与前台一致的分节头：橙色序号块 + 贯穿细线，让每个小节独立成块。
   后台预览是「所见即所得」，样式和前台差太多就失去意义了。

   层级注意：markdown.js 把 ## 渲染成 <h3>（# -> h2，文章标题占 h1），
   而后台提示词与 AI 生成内容用的都是 ##，所以小节实际是 <h3>。 */
.md-preview h3 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  counter-increment: md-section;
}
.md-preview h3::before {
  content: counter(md-section, cjk-ideographic);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
/* h2（正文里的 #）：更重的不编号标题 */
.md-preview h2 {
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font-size: 21px;
}
/* h4（正文里的 ###）：次级标题，左侧细线 */
.md-preview h4 {
  position: relative;
  margin: 22px 0 8px;
  padding-left: 11px;
  font-size: 16px;
}
.md-preview h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 3px;
  height: 14px;
  background: var(--mint-deep);
}

.md-preview p { margin: 0 0 14px; }

.md-preview ul,
.md-preview ol { margin: 0 0 14px; padding-left: 22px; }
.md-preview li { margin: 5px 0; }
.md-preview li::marker { color: var(--orange); font-weight: 700; }
.md-preview li > ul,
.md-preview li > ol { margin: 5px 0 3px; }

.md-preview blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--mint-deep);
  color: var(--ink-soft);
  background: #f4f7f3;
  font-size: 13px;
}
.md-preview blockquote p:last-child { margin-bottom: 0; }

.md-preview a {
  color: var(--orange-deep);
  border-bottom: 1px solid rgba(237, 107, 61, .4);
}
.md-preview a:hover { color: var(--orange); border-bottom-color: var(--orange); }

.md-preview strong { color: var(--ink); font-weight: 700; }
.md-preview em { color: var(--ink-soft); font-style: italic; }
.md-preview del { color: var(--text-muted); }

.md-preview code {
  padding: 2px 5px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: #a1401f;
  background: #f6f4ee;
  font-family: var(--mono);
  font-size: 12px;
}

.md-pre {
  margin: 16px 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--ink-line);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius);
  color: #e6ece9;
  background: #16292f;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}
.md-pre code {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}

.md-table-scroll {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.md-preview table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.md-preview table th {
  padding: 9px 12px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .6px;
  text-align: left;
  white-space: nowrap;
}
.md-preview table td {
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  vertical-align: top;
}
.md-preview table tbody tr:nth-child(even) { background: #faf9f4; }

/* 正文里的常见问题：渲染成问答卡片，和前台的观感保持一致
   （markdown.js 把连续的 Q/A 段落转成 <dl class="article-faq-list">） */
.md-preview .article-faq-list {
  display: grid;
  gap: 2px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: var(--line);
}
.md-preview .article-faq-item {
  padding: 14px 16px;
  border-left: 3px solid var(--mint);
  background: var(--paper);
}
.md-preview .article-faq-item dt {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.55;
}
.md-preview .article-faq-item dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.85;
}

.md-preview hr {
  height: 0;
  margin: 26px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.md-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ==========================================================================
   14. 留言卡片
   ========================================================================== */
.message-card {
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius);
}
.message-card.is-pending { border-left-color: var(--orange); }
.message-card.is-replied { border-left-color: var(--mint-deep); }
.message-card.is-archived { border-left-color: var(--line-strong); opacity: .88; }

.message-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 11px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.message-head b { font-family: var(--display); font-size: 15px; font-weight: 600; }

.message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 11px;
}
.message-meta span { display: inline-flex; align-items: center; gap: 4px; }
.message-meta svg { width: 12px; height: 12px; }
.message-meta a { color: var(--mint-deep); font-weight: 700; }

.message-route {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  margin-bottom: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: var(--cream);
  font-size: 11.5px;
  font-weight: 700;
}
.message-route svg { width: 13px; height: 13px; color: var(--orange); }
.message-route i { color: var(--orange); font-style: normal; }

.message-body {
  padding: 12px 14px;
  color: #33454a;
  background: #f9f9f5;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-reply {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--mint-deep);
  color: var(--ink-soft);
  background: rgba(166, 215, 200, .14);
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.75;
}
.message-reply b { display: block; margin-bottom: 4px; color: var(--mint-deep); font-size: 11px; letter-spacing: .6px; }

.message-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.message-actions .text-muted { margin-left: auto; }

/* ==========================================================================
   15. 反馈组件：toast + 确认框
   ========================================================================== */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(340px, calc(100vw - 40px));
  padding: 12px 16px;
  color: var(--white);
  background: var(--ink-soft);
  border: 1px solid rgba(255, 255, 255, .14);
  border-left: 3px solid var(--mint);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  /* 未弹出时不拦截鼠标，弹出后才可以点击 */
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.toast.is-open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.toast[data-kind="success"] { background: var(--mint-deep); border-left-color: var(--mint); }
.toast[data-kind="error"] { background: var(--danger); border-left-color: #f3b5a8; }
.toast[data-kind="info"] { background: var(--ink-soft); border-left-color: var(--orange); }

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(19, 37, 43, .56);
}
.dialog-backdrop.is-open { display: flex; }
.dialog-backdrop[hidden] { display: none; }

.dialog {
  width: min(430px, 100%);
  padding: 20px 22px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  animation: wx-dialog .18s ease both;
}
@keyframes wx-dialog {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
  to { opacity: 1; transform: none; }
}

.dialog-title { font-size: 18px; font-weight: 600; }

.dialog-message {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

/* ==========================================================================
   16. 空状态与加载
   ========================================================================== */
.empty-state {
  display: grid;
  place-items: center;
  gap: 9px;
  padding: 54px 22px;
  color: var(--text-muted);
  text-align: center;
}
.empty-state svg { width: 34px; height: 34px; color: var(--line-strong); }
.empty-state p { color: var(--text-soft); font-size: 13.5px; font-weight: 600; }
.empty-state small { color: var(--text-muted); font-size: 11.5px; }
.empty-state.is-loading { padding: 46px 22px; }
.empty-state.is-loading svg { display: none; }

.spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: wx-spin .7s linear infinite;
}
@keyframes wx-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   17. 分页
   ========================================================================== */
.pager {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pager-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.pager-btn:hover:not(:disabled) { color: var(--orange-deep); border-color: var(--orange); background: var(--paper); }
.pager-btn.is-current {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}
.pager-btn:disabled { color: #b9bfba; background: #f2f3ee; border-color: var(--line-soft); cursor: not-allowed; }

.pager-gap { padding: 0 3px; color: var(--text-muted); font-weight: 700; }

.pager-total {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 11.5px;
}

.pager.is-single {
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-muted);
  font-size: 11.5px;
}

/* ==========================================================================
   18. 登录页
   ========================================================================== */
body.login-page {
  background: var(--paper);
  min-height: 100vh;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  min-height: 100vh;
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 46px 54px;
  color: rgba(255, 254, 250, .86);
  background: var(--ink);
  overflow: hidden;
}
.login-intro::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(166, 215, 200, .18);
  transform: rotate(45deg);
  pointer-events: none;
}
.login-intro-copy { margin: auto 0; max-width: 520px; position: relative; z-index: 1; }
.login-intro h1 {
  margin: 14px 0 0;
  color: var(--white);
  font-size: 34px;
  line-height: 1.32;
}
.login-intro h1 em { color: var(--orange); font-style: normal; }

.login-kicker {
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.4px;
}
.login-kicker::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 10px;
  background: var(--orange);
}

.login-points {
  display: grid;
  gap: 16px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.login-points li {
  display: grid;
  gap: 4px;
  padding-left: 16px;
  border-left: 2px solid rgba(166, 215, 200, .35);
}
.login-points b { color: var(--white); font-size: 13.5px; font-weight: 700; }
.login-points span { color: rgba(255, 254, 250, .62); font-size: 12px; line-height: 1.7; }

.login-foot {
  position: relative;
  z-index: 1;
  color: rgba(255, 254, 250, .45);
  font-size: 11px;
  letter-spacing: .4px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 40px;
  background: var(--paper);
}

.login-form {
  display: grid;
  gap: 16px;
  width: min(400px, 100%);
}
.login-form h2 { font-size: 24px; font-weight: 600; }
.login-sub { margin-top: -6px; color: var(--text-muted); font-size: 12px; line-height: 1.7; }

.login-error {
  padding: 10px 13px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(184, 58, 44, .32);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
}
.login-error[hidden] { display: none; }

.login-back { margin-top: 2px; font-size: 12px; text-align: center; }
.login-back a {
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
}
.login-back a:hover { color: var(--orange-deep); border-bottom-color: var(--orange); }

/* 验证码：输入框 + 图片按钮并排 */
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  align-items: stretch;
}

.captcha-box {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: var(--white);
  font-size: 11.5px;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease;
}
.captcha-box:hover { border-color: var(--orange); background: var(--paper); }
.captcha-box svg { width: 100%; height: 100%; max-height: 40px; display: block; }
.captcha-box img { width: 100%; height: auto; display: block; }

/* ==========================================================================
   19. 工具类
   ========================================================================== */
.is-hidden { display: none !important; }
/* 只做颜色弱化，不改字号，避免与组件内的排版冲突 */
.text-muted { color: var(--text-muted); }
.text-muted b { color: var(--ink-soft); }

.stack { display: grid; gap: 16px; }
.stack > * { margin-bottom: 0; }
.stack.is-tight { gap: 9px; }

/* ==========================================================================
   19b. 模块级补充：批量操作条、复选框行、模板按钮、正文编辑器
   这些类由 admin-routes.js / admin-articles.js 渲染，补在通用规则之后
   ========================================================================== */

/* 批量操作条：勾选任意一行后出现 */
.batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid var(--mint-deep);
  border-left-width: 4px;
  background: rgba(166, 215, 200, .16);
}
.batch-bar[hidden] { display: none; }
.batch-bar b { color: var(--ink); font-size: 12px; font-weight: 800; }
.batch-bar b span { color: var(--orange-deep); }

/* 栏目控件：下拉选择 / 自定义输入 两种模式互斥显示 */
.category-control { display: grid; gap: 9px; }
.category-control input[hidden],
.category-control select[hidden] { display: none; }

.category-mode {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--white);
  width: fit-content;
}
.category-mode-btn {
  padding: 7px 14px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.category-mode-btn + .category-mode-btn { border-left: 1px solid var(--line); }
.category-mode-btn:hover { background: var(--cream); color: var(--ink); }
.category-mode-btn.is-active { background: var(--ink); color: var(--white); }

/* 复选框 + 说明文字同一行 */.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
  cursor: pointer;
}
.checkbox-line:hover { border-color: var(--ink-soft); }
.checkbox-line input[type="checkbox"] { margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--orange); }

/* 从 AI 导入的面板（线路 / 资讯两个编辑器共用） */
.import-text {
  min-height: 150px;
  font-size: 12.5px;
  line-height: 1.75;
}
.import-status {
  margin: 0;
  padding: 10px 13px;
  border-left: 3px solid var(--mint-deep);
  background: rgba(166, 215, 200, .18);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}
.import-status[data-kind="error"] {
  border-left-color: var(--orange-deep);
  background: rgba(237, 107, 61, .12);
  color: var(--orange-deep);
}
.import-status[data-kind="success"] {
  border-left-color: var(--mint-deep);
  color: var(--mint-deep);
}
.import-status[hidden] { display: none; }

/* 文章正文：等宽字体、行高放宽，方便核对 Markdown 语法 */
.article-body {
  min-height: 420px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Noto Sans SC", monospace;
  font-size: 13.5px;
  line-height: 1.85;
  tab-size: 2;
}

/* 分页的上一页/下一页按钮稍作区隔 */
.pager-prev, .pager-next { font-weight: 700; }
.pager-prev { margin-right: 4px; }
.pager-next { margin-left: 4px; }

/* ==========================================================================
   20. 响应式：<1000px 侧栏转抽屉，表格横向滚动，表单变单列
   ========================================================================== */
@media (max-width: 1240px) {
  .editor-layout { grid-template-columns: minmax(0, 1fr) 292px; }
}

@media (max-width: 1080px) {
  .editor-layout { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; }
}

@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(276px, 84vw);
    height: 100vh;
    transform: translateX(-102%);
    transition: transform .24s ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 18px 40px rgba(19, 37, 43, .34);
  }
  .sidebar.is-open { transform: none; }

  /* 抽屉打开时，主区域被遮罩盖住，点击可关闭 */
  .admin-shell::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(19, 37, 43, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s;
  }
  body:has(.sidebar.is-open) .admin-shell::after { opacity: 1; visibility: visible; }

  .menu-btn { display: grid; }

  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 26px; }

  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-actions {
    margin: 18px -16px -26px;
    padding: 12px 16px;
  }

  .login-shell { grid-template-columns: minmax(0, 1fr); }
  .login-intro { padding: 34px 26px; gap: 22px; }
  .login-intro h1 { font-size: 27px; }
  .login-intro-copy { margin: 0; }
  .login-panel { padding: 32px 22px 42px; }

  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

@media (max-width: 720px) {
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 23px; }
  .page-actions { width: 100%; }
  .topbar { min-height: 56px; gap: 10px; }
  .crumb span, .crumb b { display: none; }
  .account-name { display: none; }
  .toolbar { padding: 11px 12px; }
  .toolbar-group:last-child { margin-left: 0; width: 100%; }
  .search-box { max-width: none; flex-basis: 100%; }
  .card-body { padding: 15px; }
  .captcha-row { grid-template-columns: minmax(0, 1fr) 108px; }
  .toast { right: 12px; bottom: 12px; left: 12px; max-width: none; }
  .form-actions .btn { flex: 1 1 auto; }
}

/* 尊重系统的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
