/* =========================================================
   展信包装 · 网站管理后台
   品牌：展信红 #BD112B / 炭黑 #23272B / 浅灰 #F5F6F7
   零外部依赖：系统字体 + 原生 CSS
   ========================================================= */

/* ---------- 1. 设计变量 ---------- */
:root {
  --brand: #BD112B;
  --brand-dark: #9C0D23;
  --brand-darker: #7E0A1C;
  --brand-soft: #FCEBEE;
  --brand-soft-2: #F8DDE2;
  --ink: #23272B;
  --ink-2: #363D43;
  --ink-3: #4B535A;
  --text: #252A2F;
  --muted: #6B7278;
  --muted-2: #8B9299;
  --bg: #F5F6F7;
  --surface: #FFFFFF;
  --line: #E8EAEC;
  --line-strong: #D8DCE0;
  --ok: #1E8E5A;
  --ok-soft: #E9F7EF;
  --warn: #B7791F;
  --warn-soft: #FCF4E4;
  --info: #2563EB;
  --info-soft: #EDF3FF;
  --purple: #6D4AC8;
  --purple-soft: #F1EDFC;
  --danger-line: #F1C6CE;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(23, 28, 33, .04);
  --shadow-md: 0 2px 6px rgba(23, 28, 33, .06), 0 12px 28px -20px rgba(23, 28, 33, .28);
  --shadow-lg: 0 18px 48px -12px rgba(15, 20, 25, .28), 0 4px 12px -4px rgba(15, 20, 25, .12);
  --sidebar-w: 236px;
  --topbar-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { vertical-align: middle; }
[hidden] { display: none !important; }
::selection { background: rgba(189, 17, 43, .18); }
:focus-visible { outline: 2px solid rgba(189, 17, 43, .55); outline-offset: 2px; }
.icon { display: inline-block; flex: none; vertical-align: middle; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spacer { flex: 1 1 auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- 3. 启动屏 ---------- */
.boot-splash {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--bg);
}
.boot-mark {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--brand); color: #fff;
  font-size: 26px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 18px 36px -18px rgba(189, 17, 43, .75);
}
.boot-title { font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.boot-bar { width: 168px; height: 3px; border-radius: 3px; background: #E4E7E9; overflow: hidden; }
.boot-bar span {
  display: block; width: 40%; height: 100%; border-radius: 3px; background: var(--brand);
  animation: boot-slide 1.1s ease-in-out infinite;
}
@keyframes boot-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }
.noscript { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- 4. 布局骨架 ---------- */
.layout { display: flex; min-height: 100vh; background: var(--bg); }
.main {
  flex: 1 1 auto; min-width: 0; min-height: 100vh;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
}
.content { flex: 1 1 auto; width: 100%; max-width: 1320px; margin: 0 auto; padding: 24px 28px 48px; }

/* ---------- 5. 侧边栏 ---------- */
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: radial-gradient(900px 420px at 0% 0%, #2E3338 0%, #23272B 52%, #1E2225 100%);
  color: #fff;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 17px 18px 15px;
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.sidebar-brand:hover { color: #fff; }
.brand-mark {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 700;
  box-shadow: 0 10px 22px -10px rgba(189, 17, 43, .9);
}
.brand-mark-lg { width: 46px; height: 46px; border-radius: 13px; font-size: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.brand-sub { font-size: 10px; letter-spacing: .16em; color: rgba(255, 255, 255, .42); margin-top: 2px; }
.sidebar-nav { flex: 1 1 auto; overflow-y: auto; padding: 12px; }
.nav-group-title {
  padding: 14px 10px 6px; font-size: 10.5px; letter-spacing: .1em;
  color: rgba(255, 255, 255, .32); text-transform: uppercase;
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 2px; padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .70);
  font-size: 13.5px; font-weight: 450;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav-item .icon { color: rgba(255, 255, 255, .5); transition: color .15s ease; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item:hover .icon { color: rgba(255, 255, 255, .82); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(189, 17, 43, .30), rgba(189, 17, 43, .10));
  color: #fff;
  box-shadow: inset 3px 0 0 0 var(--brand);
}
.nav-item.active .icon { color: #F5A9B5; }
.nav-badge {
  margin-left: auto; display: none; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 1;
}
.nav-badge.show { display: inline-flex; }
.sidebar-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 11px; color: rgba(255, 255, 255, .35);
}
.sidebar-foot span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-mask { display: none; }

/* ---------- 6. 顶部栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  height: var(--topbar-h); padding: 0 28px;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.btn.menu-btn { display: none; }
.site-picker { display: flex; align-items: center; gap: 9px; min-width: 0; }
.site-picker-label { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.site-select {
  max-width: 280px; height: 34px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7278' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  appearance: none; -webkit-appearance: none;
  font-size: 13px; font-weight: 500; color: var(--ink);
  text-overflow: ellipsis; cursor: pointer;
}
.site-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(189, 17, 43, .12); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-wrap { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 9px 5px 6px;
  border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--ink-2);
  transition: background .15s ease;
}
.user-btn:hover { background: #F2F3F5; }
.avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, #C4142F, #8E0D20);
  color: #fff; font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
}
.user-name { font-size: 13px; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn .icon { color: var(--muted-2); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  min-width: 208px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow-lg);
  display: none;
}
.user-menu.open { display: block; animation: pop-in .14s ease-out; }
.user-menu-head { padding: 8px 10px 9px; }
.user-menu-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.user-menu-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 7px;
  background: none; color: var(--ink-2);
  font-size: 13px; text-align: left; text-decoration: none;
}
.menu-item .icon { color: var(--muted); }
.menu-item:hover { background: #F5F6F7; color: var(--ink); }
.menu-item.danger { color: var(--brand); }
.menu-item.danger .icon { color: var(--brand); }
.menu-item.danger:hover { background: var(--brand-soft); }

/* ---------- 7. 通用页面结构 ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.page-desc { margin-top: 5px; font-size: 13px; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.page-actions .btn { text-decoration: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.card-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }
.card-body.no-pad { padding: 0; }
.card + .card { margin-top: 16px; }

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; line-height: 1; white-space: nowrap;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 1px 2px rgba(189, 17, 43, .22);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-primary:active:not(:disabled) { background: var(--brand-darker); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: #FAFBFC; border-color: #C6CBD0; color: var(--ink); }
.btn-danger { background: #fff; border-color: var(--danger-line); color: var(--brand); }
.btn-danger:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand-dark); }
.btn-danger-solid { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-danger-solid:hover:not(:disabled) { background: var(--brand-dark); color: #fff; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet:hover:not(:disabled) { background: #F1F2F4; color: var(--ink); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
.link { color: var(--brand); font-size: 12.5px; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ---------- 9. 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field > label .req { color: var(--brand); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text);
  font-size: 13.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7278' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.65; }
.textarea.code { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; background: #FAFBFC; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(189, 17, 43, .12);
}
.input::placeholder, .textarea::placeholder { color: #AEB5BB; }
.input:disabled, .select:disabled, .textarea:disabled { background: #F6F7F8; color: var(--muted); cursor: not-allowed; }
.hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.6; }
.hint.warn { color: var(--warn); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span-2, .span-2 { grid-column: 1 / -1; }
.input-group { display: flex; gap: 8px; align-items: center; }
.input-group .input { flex: 1 1 auto; }
.input-icon-wrap { position: relative; }
.input-icon-wrap > .icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); pointer-events: none;
}
.input-icon-wrap .input { height: 42px; padding-left: 37px; }
.form-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line);
}
.form-footer .footer-left { margin-right: auto; }
.color-input-row { display: flex; gap: 8px; align-items: center; }
.color-input-row input[type="color"] {
  width: 42px; height: 38px; padding: 3px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer;
}
.color-input-row .input { flex: 1 1 auto; }

/* ---------- 10. 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 0 0 var(--radius) var(--radius); }
.table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 13px; }
.table th {
  padding: 10px 14px; text-align: left;
  background: #FAFBFC; border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); white-space: nowrap;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid #F0F2F3;
  color: var(--ink-2); vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFC; }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-clickable:hover { background: #FBF7F7; }
.table .cell-title { font-weight: 600; color: var(--ink); }
.table .cell-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.table .cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table .col-actions { text-align: right; }
.table .cell-detail { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.table-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.table-toolbar .spacer { flex: 1 1 auto; }
.toolbar-count { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.search-box { position: relative; flex: 1 1 220px; max-width: 320px; min-width: 180px; }
.search-box > .icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); pointer-events: none;
}
.search-box .input { height: 34px; padding-left: 33px; font-size: 13px; }
.search-box .search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted-2);
}
.search-box .search-clear:hover { background: #EEF0F2; color: var(--ink); }
.thumb-sm {
  width: 38px; height: 38px; display: block;
  border-radius: 7px; background: #F2F3F5; object-fit: cover;
}
.thumb-sm.placeholder { display: grid; place-items: center; color: #A6ADB3; }
.table .cell-title-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.table .cell-title-cell .title-text { min-width: 0; }

/* ---------- 11. 徽标 / 状态 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 500;
  white-space: nowrap; line-height: 1;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--ok-soft); color: var(--ok); }
.badge-grey { background: #F1F2F4; color: #6B7280; }
.badge-red { background: var(--brand-soft); color: var(--brand); }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-blue { background: var(--info-soft); color: var(--info); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }

/* ---------- 12. 分页 ---------- */
.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.pagination-info { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager button {
  min-width: 30px; height: 30px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: 7px;
  background: #fff; color: var(--ink-2);
  font-size: 12.5px; font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; justify-content: center;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager-ellipsis { width: 22px; text-align: center; color: var(--muted-2); font-size: 12.5px; }

/* ---------- 13. 类型 Tabs / 分段控件 ---------- */
.type-tabs {
  display: inline-flex; gap: 3px; max-width: 100%; overflow-x: auto;
  padding: 4px; margin-bottom: 16px;
  background: #EDEFF1; border-radius: 10px;
}
.type-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: 7px;
  color: #5A6167; font-size: 13px; font-weight: 500; white-space: nowrap;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.type-tab:hover { color: var(--ink); }
.type-tab.active { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); font-weight: 600; }
.type-tab .count { font-size: 11px; color: var(--muted-2); font-weight: 500; }
.seg-tabs {
  display: inline-flex; gap: 2px; padding: 3px;
  background: #F0F2F3; border-radius: 9px;
}
.seg-tab {
  padding: 6px 13px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 500;
}
.seg-tab:hover:not(:disabled) { color: var(--ink); }
.seg-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.seg-tab:disabled { opacity: .5; cursor: not-allowed; }
.modal-tabs { margin-bottom: 18px; }

/* ---------- 14. 仪表盘 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  display: flex; align-items: center; gap: 13px;
  padding: 16px 17px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); color: inherit; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #DFE2E5; color: inherit; }
.kpi-icon {
  width: 42px; height: 42px; flex: none; border-radius: 11px;
  display: grid; place-items: center;
}
.kpi-icon.small { width: 36px; height: 36px; border-radius: 9px; }
.tone-red { background: var(--brand-soft); color: var(--brand); }
.tone-blue { background: var(--info-soft); color: var(--info); }
.tone-amber { background: var(--warn-soft); color: var(--warn); }
.tone-green { background: var(--ok-soft); color: var(--ok); }
.tone-purple { background: var(--purple-soft); color: var(--purple); }
.kpi > span:last-child { display: block; min-width: 0; }
.kpi-num { display: block; font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-label { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.mini-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-bottom: 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.mini-stat {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; color: inherit; text-decoration: none;
  border-left: 1px solid var(--line);
}
.mini-stat:first-child { border-left: 0; }
.mini-stat:hover { background: #FBFBFC; color: inherit; }
.mini-stat .kpi-num { font-size: 20px; }
.mini-stat .kpi-label { margin-top: 1px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.dash-grid .card { min-width: 0; }
.recent-contents { display: flex; flex-direction: column; }
.content-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 18px; border-top: 1px solid #F0F2F3;
  color: inherit; text-decoration: none;
}
.content-item:first-child { border-top: 0; }
.content-item:hover { background: #FAFBFC; color: inherit; }
.content-item-thumb {
  width: 38px; height: 38px; flex: none; border-radius: 8px; overflow: hidden;
  background: #F2F3F5; display: grid; place-items: center; color: #A6ADB3;
}
.content-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.content-item-main { min-width: 0; flex: 1 1 auto; }
.content-item-title { font-size: 13px; font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-item-meta { margin-top: 3px; font-size: 11.5px; color: var(--muted-2); display: flex; align-items: center; gap: 7px; }

/* ---------- 15. 站点管理 ---------- */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.site-card {
  display: flex; flex-direction: column;
  padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.site-card-head { display: flex; align-items: flex-start; gap: 12px; }
.site-logo {
  width: 44px; height: 44px; flex: none; border-radius: 11px;
  display: grid; place-items: center;
  color: #fff; font-size: 18px; font-weight: 700;
}
.site-card-title { min-width: 0; flex: 1 1 auto; }
.site-card-title h3 { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-domain { margin-top: 3px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-counts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 15px 0 13px; padding: 11px 8px;
  background: #FAFBFC; border: 1px solid var(--line); border-radius: 9px; text-align: center;
}
.site-counts strong { display: block; font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.site-counts span { font-size: 11.5px; color: var(--muted-2); }
.site-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; font-size: 12px; color: var(--muted); }
.site-meta .mono { font-size: 11.5px; }
.site-card-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.kv-row { display: grid; grid-template-columns: minmax(130px, .9fr) minmax(0, 1.6fr) 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.kv-row .input { height: 34px; font-size: 13px; }
.kv-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 9px;
  border: 1px solid var(--line-strong); border-radius: 7px;
  background: #fff; color: var(--ink-2); font-size: 12px;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.kv-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- 16. 内容编辑器 ---------- */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 16px; align-items: start; }
.editor-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.editor-main .card + .card { margin-top: 0; }
.editor-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.editor-aside .card + .card { margin-top: 0; }
.cover-preview {
  width: 100%; aspect-ratio: 16 / 9; margin-bottom: 8px;
  border: 1px dashed var(--line-strong); border-radius: 9px;
  background: #FAFBFC; overflow: hidden;
  display: grid; place-items: center; color: var(--muted-2); font-size: 12px;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-actions { display: flex; gap: 7px; }
.extra-status { margin-top: 6px; font-size: 11.5px; color: var(--muted-2); }
.extra-status.ok { color: var(--ok); }
.extra-status.err { color: var(--brand); }
.form-section-note { font-size: 11.5px; color: var(--muted-2); font-weight: 400; }

/* ---------- 17. 媒体库 ---------- */
.upload-zone {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 26px 18px;
  border: 1.5px dashed #D5D9DE; border-radius: var(--radius);
  background: #FBFBFC; color: var(--muted);
  text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--brand); background: #FDF4F5; }
.upload-zone .upload-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
}
.upload-zone-title { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.upload-zone-hint { font-size: 11.5px; color: var(--muted-2); }
.upload-progress { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 14px; padding: 16px; }
.media-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.media-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #F2F3F5; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.media-card:hover .media-thumb img { transform: scale(1.03); }
.media-thumb .media-ext {
  position: absolute; right: 6px; bottom: 6px;
  padding: 1px 6px; border-radius: 5px;
  background: rgba(23, 28, 33, .62); color: #fff; font-size: 10px; letter-spacing: .04em;
}
.media-meta { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 0; font-size: 11.5px; color: var(--muted); }
.media-name { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-actions { display: flex; gap: 6px; padding: 8px 10px 10px; }
.media-actions .btn { flex: 1 1 0; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
.picker-item {
  display: block; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.picker-item:hover { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(189, 17, 43, .1); }
.picker-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #F2F3F5; }
.picker-item span { display: block; padding: 6px 8px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 18. 线索 / 详情 ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin-bottom: 18px; }
.detail-item.mini { min-width: 0; }
.detail-label { font-size: 11.5px; color: var(--muted-2); margin-bottom: 3px; }
.detail-value { font-size: 13.5px; color: var(--ink-2); word-break: break-word; line-height: 1.6; }
.lead-message {
  margin-bottom: 18px; padding: 12px 14px;
  background: #FAFBFC; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; line-height: 1.8; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.modal-section-title {
  margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; gap: 6px;
}
.confirm-text { margin: 0; font-size: 14px; line-height: 1.8; color: var(--ink-2); }

/* ---------- 19. SEO / 预览 ---------- */
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.preview-panel {
  margin: 0; padding: 15px 16px;
  max-height: 340px; min-height: 180px; overflow: auto;
  background: #23272B; color: #DCE2E7; border-radius: 10px;
  font-family: var(--mono); font-size: 12px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-all;
}
.preview-panel::-webkit-scrollbar { width: 8px; height: 8px; }
.preview-panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 4px; }
.preview-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.publish-list { display: flex; flex-direction: column; }
.publish-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px; border-top: 1px solid #F0F2F3;
}
.publish-item:first-child { border-top: 0; }
.publish-icon {
  width: 32px; height: 32px; flex: none; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
}
.publish-main { min-width: 0; flex: 1 1 auto; }
.publish-title { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.publish-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

/* ---------- 20. 设置 ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.settings-grid .span-2 { grid-column: 1 / -1; }
.settings-grid .card + .card { margin-top: 0; }
.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.info-row:last-child { border-bottom: 0; }
.info-row > span:first-child { color: var(--muted); }
.info-row > span:last-child { color: var(--ink-2); font-weight: 500; text-align: right; word-break: break-word; }

/* ---------- 21. 空状态 / 加载 / 错误 ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44px 20px; text-align: center;
}
.empty-icon {
  width: 56px; height: 56px; margin-bottom: 14px; border-radius: 16px;
  background: #F2F3F5; color: #9AA1A8;
  display: grid; place-items: center;
}
.empty-title { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.empty-desc { margin-top: 5px; max-width: 380px; font-size: 12.5px; line-height: 1.7; color: var(--muted-2); }
.empty .btn { margin-top: 16px; }
.loading-block { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 46px 20px; font-size: 13px; color: var(--muted); }
.spinner {
  width: 16px; height: 16px; flex: none; display: inline-block;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, #EFF1F3 25%, #F7F8F9 37%, #EFF1F3 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
html.is-busy { cursor: progress; }

/* ---------- 22. Toast ---------- */
.toast-root {
  position: fixed; top: 16px; right: 16px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
  width: max-content; max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  min-width: 240px; max-width: 400px;
  padding: 11px 14px;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--muted);
  border-radius: 9px; box-shadow: var(--shadow-lg);
  font-size: 13px; color: var(--ink-2); line-height: 1.55;
  pointer-events: auto;
  animation: toast-in .22s cubic-bezier(.2, .8, .3, 1);
}
.toast.leaving { animation: toast-out .2s ease forwards; }
.toast-icon { display: inline-flex; margin-top: 1px; }
.toast.success { border-left-color: var(--ok); }
.toast.success .toast-icon { color: var(--ok); }
.toast.error { border-left-color: var(--brand); }
.toast.error .toast-icon { color: var(--brand); }
.toast.warning { border-left-color: var(--warn); }
.toast.warning .toast-icon { color: var(--warn); }
.toast.info { border-left-color: var(--info); }
.toast.info .toast-icon { color: var(--info); }
.toast-msg { min-width: 0; word-break: break-word; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

/* ---------- 23. Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(20, 24, 28, .46);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fade-in .15s ease;
}
.modal {
  display: flex; flex-direction: column;
  width: 100%; max-width: 560px; max-height: calc(100vh - 40px);
  background: #fff; border-radius: 14px;
  box-shadow: 0 24px 64px -12px rgba(15, 20, 25, .42);
  animation: modal-in .2s cubic-bezier(.2, .8, .3, 1);
}
.modal.modal-lg { max-width: 780px; }
.modal.modal-xl { max-width: 980px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 13px 20px; border-top: 1px solid var(--line);
  background: #FCFCFD; border-radius: 0 0 14px 14px;
}
.modal-foot .footer-left { margin-right: auto; display: flex; gap: 8px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- 24. 登录页 ---------- */
.login-page { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100vh; background: #fff; }
.login-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 40px;
  padding: 40px 48px;
  background: radial-gradient(1100px 620px at 100% 0%, #343A3F 0%, #23272B 55%, #1C1F22 100%);
  color: #fff;
}
.login-brand::before {
  content: ""; position: absolute; right: -170px; top: -170px;
  width: 540px; height: 540px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(189, 17, 43, .55), rgba(189, 17, 43, 0) 62%);
}
.login-brand::after {
  content: ""; position: absolute; left: -150px; bottom: -220px;
  width: 480px; height: 480px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 0 0 64px rgba(255, 255, 255, .028), 0 0 0 148px rgba(255, 255, 255, .018);
}
.login-brand > * { position: relative; z-index: 1; }
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.login-brand .brand-name { font-size: 17px; }
.login-brand .brand-sub { color: rgba(255, 255, 255, .46); }
.brand-hero { margin: auto 0; max-width: 460px; display: flex; flex-direction: column; gap: 18px; }
.brand-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: #F0AEBA;
}
.brand-eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--brand); }
.brand-hero h1 { font-size: clamp(30px, 3.1vw, 42px); line-height: 1.28; letter-spacing: -.015em; font-weight: 700; }
.brand-hero p { font-size: 14px; line-height: 1.85; color: rgba(255, 255, 255, .62); }
.brand-points { display: flex; flex-direction: column; gap: 11px; margin-top: 6px; list-style: none; }
.brand-points li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255, 255, 255, .76); }
.brand-points .icon { color: #F0AEBA; }
.brand-foot { font-size: 11.5px; color: rgba(255, 255, 255, .32); }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 48px 26px; background: #fff; }
.login-card { width: 100%; max-width: 396px; }
.login-card-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.login-card-head p { margin: 6px 0 22px; font-size: 13.5px; color: var(--muted); }
.login-hint {
  display: flex; align-items: flex-start; gap: 9px;
  margin-bottom: 22px; padding: 11px 13px;
  background: #FDF4F5; border: 1px solid #F5D6DB; border-radius: 10px;
  font-size: 12.5px; line-height: 1.7; color: #7C2836;
}
.login-hint .icon { flex: none; margin-top: 2px; color: var(--brand); }
.login-hint code {
  padding: 1px 5px; border-radius: 4px;
  background: #fff; border: 1px solid #F0C9D0;
  font-family: var(--mono); font-size: 11.5px; color: var(--brand);
}
.login-card .field { margin-bottom: 15px; }
.login-error {
  margin: -2px 0 14px; padding: 9px 12px;
  background: var(--brand-soft); border: 1px solid #F3C6CE; border-radius: 8px;
  font-size: 12.5px; color: #A11227;
}
.login-foot { margin-top: 26px; text-align: center; font-size: 11.5px; color: var(--muted-2); }

/* ---------- 25. 响应式 ---------- */
@media (max-width: 1240px) {
  .editor-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .editor-aside .card + .card { margin-top: 0; }
  .dash-grid { grid-template-columns: 1fr; }
  .seo-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .span-2 { grid-column: auto; }
}
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-stats { grid-template-columns: 1fr; }
  .mini-stat { border-left: 0; border-top: 1px solid var(--line); }
  .mini-stat:first-child { border-top: 0; }
}
@media (max-width: 768px) {
  :root { --topbar-h: 56px; }
  .sidebar {
    width: 268px;
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.2, .8, .3, 1);
    box-shadow: none;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .content { padding: 16px 14px 40px; }
  .topbar { padding: 0 14px; gap: 8px; }
  .btn.menu-btn { display: inline-flex; }
  .mobile-mask {
    display: none; position: fixed; inset: 0; z-index: 55;
    background: rgba(15, 20, 25, .45);
    animation: fade-in .2s ease;
  }
  body.menu-open .mobile-mask { display: block; }
  .site-picker-label { display: none; }
  .site-select { max-width: 168px; }
  .user-name { display: none; }
  .page-title { font-size: 19px; }
  .page-head { margin-bottom: 16px; }
  .kpi { padding: 14px; gap: 11px; }
  .kpi-icon { width: 38px; height: 38px; }
  .kpi-num { font-size: 22px; }
  .editor-aside { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 20px); }
  .toast-root { top: 10px; right: 10px; left: 10px; max-width: none; width: auto; }
  .toast { min-width: 0; max-width: none; width: 100%; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-wrap { min-height: 100vh; padding: 32px 20px; }
  .table-toolbar { padding: 12px 14px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 12px; }
  .site-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .search-box { max-width: none; flex-basis: 100%; }
  .table-toolbar .toolbar-count { margin-left: auto; }
  .kpi-label { font-size: 12px; }
  .pagination { justify-content: center; }
  .pagination-info { width: 100%; text-align: center; }
  .modal-foot { justify-content: stretch; }
  .modal-foot .btn { flex: 1 1 auto; }
  .modal-foot .footer-left { margin-right: 0; }
  .kv-row { grid-template-columns: 1fr 32px; }
  .kv-row .input:first-child { grid-column: 1; }
  .kv-row .input:nth-child(2) { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ---------- 26. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* v1.19 侧边栏「显示高级工具」切换按钮 */
.nav-more {
  width: calc(100% - 24px);
  margin: 8px 12px 4px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px dashed rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-more:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.nav-more .icon { color: rgba(255, 255, 255, .5); }

/* v2.0 仪表盘「访客来源」卡片 */
.dash-traffic-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dash-traffic-stat { background: #FCF9F9; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.dash-traffic-stat strong { font-size: 20px; line-height: 1.2; color: var(--ink); font-weight: 700; }
.dash-traffic-stat span { font-size: 12px; color: var(--muted); }
.dash-traffic-row { display: flex; align-items: center; gap: 10px; margin: 9px 0; font-size: 12.5px; }
.dash-traffic-label { width: 88px; flex: 0 0 88px; color: var(--ink-2); }
.dash-traffic-bar { flex: 1; height: 8px; border-radius: 6px; background: #F4E8EA; overflow: hidden; }
.dash-traffic-bar > i { display: block; height: 100%; border-radius: 6px; background: var(--brand); }
.dash-traffic-num { width: 88px; flex: 0 0 88px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .dash-traffic-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* v2.5 顶栏：预览网站 / 发布 */
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-right: 6px; }
.topbar-actions .btn { white-space: nowrap; }
@media (max-width: 760px) { .topbar-actions { display: none; } }

/* v2.7 内容编辑器简洁模式：高级字段/卡片默认收起 */
.ed-adv-field { display: none; }
.editor-advanced .ed-adv-field { display: block; }
.ed-adv { display: none; }
.editor-advanced .ed-adv { display: block; }
#fBody { min-height: 460px; }
@media (max-width: 1100px) { #fBody { min-height: 360px; } }

/* v2.8 易优风格发布页 */
.ed-form { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ed-tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 6; }
.ed-tab { appearance: none; border: 0; background: none; padding: 13px 18px 11px; font-size: 14px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; }
.ed-tab:hover { color: var(--brand); }
.ed-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.ed-pane { padding: 6px 0 4px; }
.ed-row { display: flex; gap: 16px; padding: 12px 22px; border-bottom: 1px dashed #f0e8e9; align-items: flex-start; }
.ed-row:last-child { border-bottom: 0; }
.ed-label { flex: 0 0 120px; text-align: right; padding-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.ed-label .req { color: var(--brand); margin-right: 3px; }
.ed-control { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ed-control > .input, .ed-control > .select, .ed-control > .textarea { max-width: 760px; }
.ed-control-title { max-width: 980px; }
.ed-control-title > .input { max-width: 430px; }
.ed-subfield { display: flex; align-items: center; gap: 10px; max-width: 760px; }
.ed-subfield .ed-sublabel { flex: 0 0 auto; font-size: 13px; color: var(--muted); }
.ed-subfield .input { flex: 1; }
.ed-checks { display: flex; flex-wrap: wrap; gap: 14px 20px; padding-top: 7px; }
.ed-checks .check-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; }
.ed-cover { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ed-cover .cover-preview { width: 120px; height: 90px; flex: 0 0 120px; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fcf9f9; color: var(--muted); font-size: 12px; }
.ed-cover .cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.ed-cover-actions { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 8px; }
.ed-cover-actions .input { max-width: 520px; }
.ed-cover-actions .btn { align-self: flex-start; }
.ed-row-detail { border-bottom: 0; }
.ed-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.ed-detail-tab { font-size: 13px; padding: 5px 12px; border-radius: 6px; color: var(--muted); background: #f7f2f3; }
.ed-detail-tab.active { background: var(--brand); color: #fff; font-weight: 600; }
.ed-detail-hint { font-size: 12px; color: var(--muted); }
.ed-rich-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #fafafa; }
.ed-rt-btn { appearance: none; border: 0; background: none; min-width: 30px; height: 28px; padding: 0 7px; border-radius: 4px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.ed-rt-btn:hover { background: #f0e6e8; color: var(--brand); }
.ed-rt-btn.active { background: #f6e3e6; color: var(--brand); }
.ed-rt-sep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; }
.ed-rich-editor { min-height: 430px; max-width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 0 0 8px 8px; outline: none; font-size: 14px; line-height: 1.8; background: #fff; }
.ed-rich-editor:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(189,17,43,.06); }
.ed-rich-editor img { max-width: 100%; height: auto; border-radius: 6px; }
.ed-rich-editor h2 { font-size: 20px; margin: 14px 0 8px; }
.ed-rich-editor h3 { font-size: 17px; margin: 12px 0 6px; }
.ed-rich-editor blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--brand); background: #fdf7f8; color: var(--ink-2); }
.ed-rich-editor ul, .ed-rich-editor ol { padding-left: 22px; }
.ed-inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-submit-bar { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fff; position: sticky; bottom: 0; }
.ed-submit-bar .btn { min-width: 108px; }
@media (max-width: 760px) {
  .ed-row { flex-direction: column; gap: 6px; padding: 10px 14px; }
  .ed-label { text-align: left; padding-top: 0; flex: none; }
  .ed-rich-editor { min-height: 300px; }
}

/* v2.9 UEditor 容器（与易优同款编辑器） */
.ed-ueditor-wrap { max-width: 100%; }
.ed-ueditor { width: 100%; min-height: 430px; }
.ed-ueditor .edui-editor { border-radius: 8px; }
.ed-ueditor .edui-editor-toolbarbox { border-radius: 8px 8px 0 0; }
.ed-ueditor .edui-editor-iframeholder { border-radius: 0 0 8px 8px; }

/* v2.9c 导航树：左侧图标点击隐藏/展示 */
.tree-node-toggle { border: 0; background: none; padding: 2px 3px; margin-right: 2px; border-radius: 4px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; }
.tree-node-toggle:hover { color: var(--brand); background: #f7edef; }
.nav-row.is-hidden .tree-title { color: var(--muted); }
.nav-row.is-hidden .tree-node-toggle { color: #b9a4a7; }

/* v2.9d 一级菜单：左侧按钮收起/展开子菜单 */
.tree-collapse-btn { border: 0; background: none; padding: 2px 4px; margin-right: 2px; border-radius: 4px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; }
.tree-collapse-btn:hover { color: var(--brand); background: #f7edef; }
.tree-collapsed-note { margin-left: 8px; font-size: 11.5px; color: var(--muted); background: #f6f1f2; border-radius: 4px; padding: 1px 6px; }

/* v2.9e 图集卡片：显示开关（与产品栏目一致） */
.ext5-card-meta .ext5-switch { margin-right: 6px; }
.ext5-meta-status { font-size: 12px; color: var(--muted); margin-right: 4px; }
.ext5-card.is-off .ext5-meta-status { color: #b58900; }

/* v2.9f 内容列表：易优风格紧凑表格 */
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.v15-list-table { table-layout: fixed; }
.v15-list-table th, .v15-list-table td { padding: 7px 8px; font-size: 12.5px; }
.v15-list-table .cell-title-cell { min-width: 0; gap: 8px; }
.v15-list-table .cell-title-cell .title-text { min-width: 0; }
.v15-list-table .cell-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v15-list-table .cell-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.v15-list-table .content-thumb, .v15-list-table .cell-thumb { width: 34px; height: 34px; }
.v15-list-table .v15-sort { width: 48px; height: 26px; font-size: 12px; }
.v15-list-table .cell-actions .btn { height: 26px; padding: 0 7px; font-size: 12px; }

/* v2.9g 内容列表：宽屏列全展示，小屏列宽自适应 */
.v15-list-table { table-layout: fixed; width: 100%; }
.v15-list-table .cell-actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: nowrap; }
.v15-list-table .cell-actions .btn { height: 25px; padding: 0 6px; font-size: 12px; }

/* v2.9h 内容列表细节：日期/排序/操作列不挤压 */
.v15-list-table td.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.v15-list-table .v15-sort { width: 100%; max-width: 44px; height: 24px; padding: 1px 2px; font-size: 11.5px; }
.v15-list-table .cell-actions { gap: 2px; }
.v15-list-table .cell-actions .btn { height: 24px; padding: 0 4px; font-size: 11.5px; }

/* v2.9i 内容列表：取消操作列吸顶（避免与时间/排序列重叠） */
.v15-list-table .col-actions { position: static !important; box-shadow: none !important; background: transparent !important; }
.v15-list-table thead th.col-actions, .v15-list-table tbody td.col-actions { background: transparent !important; }
.v15-list-table .cell-actions { display: flex; justify-content: flex-end; gap: 2px; flex-wrap: nowrap; }
.v15-list-table .cell-actions .btn { white-space: nowrap; }
.v15-list-table td, .v15-list-table th { overflow: hidden; }

/* v2.9j 内容列表：发布时间完整显示 */
.v15-list-table td.nowrap { overflow: visible; white-space: nowrap; font-size: 11.5px; }

/* v2.9k 内容列表：排序框完整显示 */
.v15-list-table .v15-sort { max-width: 50px; }

/* v2.10b 导航展开状态图标用品牌红色 */
.tree-node-icon.is-expanded-icon { color: var(--brand); }
.tree-node-icon.is-expanded-icon.tree-collapse-btn:hover { color: var(--brand); background: #f7edef; }

/* v2.10d 仪表盘：近期线索/最近更新 两卡强制等高对齐 */
.dash-grid { align-items: stretch !important; }
.dash-grid > .card { height: 100%; display: flex; flex-direction: column; }
.dash-grid > .card > .table-wrap,
.dash-grid > .card > .list,
.dash-grid > .card > .card-body { flex: 1 1 auto; }

/* v2.10e 仪表盘：去掉网格内相邻卡片的 .card + .card 上边距，保证顶部对齐 */
.dash-grid > .card,
.v15-dash-3 > .card,
.dash-grid > .card + .card,
.v15-dash-3 > .card + .card { margin-top: 0 !important; }

/* v2.10f 仪表盘卡片顶部对齐加固 */
.dash-grid, .v15-dash-3 { align-items: stretch !important; }
.dash-grid > .card, .v15-dash-3 > .card { margin-top: 0 !important; margin-bottom: 0 !important; align-self: stretch !important; }

/* 图集列表（表格版） */
.v15-list-table tr.is-off td { opacity: .62; }
.ext5-sort-cell { display: flex; gap: 4px; align-items: center; }
.ext5-sort-cell .v15-sort { width: 44px; }
.ext5-list-loading { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.v15-list-table .cell-thumb { border-radius: 4px; object-fit: cover; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.v15-list-table .cell-thumb-empty { color: var(--muted); }
