/* ===== 线保活动面板 · 全局样式 ===== */
:root {
  --accent: #2885FF;
  --accent-dark: #1a6fe0;
  --accent-soft: #eaf2ff;
  --ink: #111E2F;
  --ink-2: #43506b;
  --muted: #8b95a7;
  --bg: #f4f6fa;
  --card: #ffffff;
  --border: #e5eaf2;
  --vip: #c8912a;
  --vip-soft: #fdf4e3;
  --danger: #e5484d;
  --success: #16a34a;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(17, 30, 47, .07);
  --shadow-lg: 0 20px 60px rgba(17, 30, 47, .18);
  --topbar-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* SVG 图标统一描边风格 */
svg.icon { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.icon.accent { stroke: var(--accent); }
svg.icon.light { stroke: #fff; }
svg.icon.sm { width: 16px; height: 16px; }
svg.icon.lg { width: 28px; height: 28px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; line-height: 1.2; transition: .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(40,133,255,.28); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { display: inline-flex; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 0; background: transparent; border-radius: 9px; color: var(--ink);
  transition: .18s;
}
.icon-btn:hover { background: var(--accent-soft); }

/* ===== 品牌标识 ===== */
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, var(--accent), #5aa0ff);
  box-shadow: 0 6px 16px rgba(40,133,255,.3);
}
.brand-mark svg { stroke: #fff; }
.brand-mark-sm { width: 32px; height: 32px; border-radius: 9px; }

/* ===== 认证页 ===== */
.auth-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 12% 18%, #e7f0ff 0, transparent 42%),
              radial-gradient(circle at 88% 82%, #eef4ff 0, transparent 45%), var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border-radius: 20px;
  padding: 34px 32px 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.auth-brand h1 { font-size: 22px; margin: 0 0 2px; letter-spacing: .5px; }
.auth-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.auth-tabs { display: flex; gap: 6px; background: var(--bg); padding: 5px; border-radius: 11px; margin-bottom: 22px; }
.auth-tab { flex: 1; padding: 9px; border: 0; background: transparent; border-radius: 8px; font-weight: 600; color: var(--ink-2); }
.auth-tab.active { background: #fff; color: var(--accent); box-shadow: 0 2px 8px rgba(17,30,47,.08); }
.auth-form .btn { margin-top: 6px; }
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field-label em { color: var(--danger); font-style: normal; }
.field input, .field textarea, .field select, .inline-form input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: #fbfcfe; color: var(--ink); transition: .18s;
}
.field input:focus, .field textarea:focus, .field select:focus, .inline-form input:focus {
  border-color: var(--accent); background: #fff; outline: none; box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-hint { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.form-error { color: var(--danger); font-size: 13px; margin: 0 0 12px; }
.demo-accounts { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); }
.demo-title { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.demo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-chip { padding: 6px 12px; border: 1px solid var(--border); background: #fff; border-radius: 20px; font-size: 12px; color: var(--ink-2); }
.demo-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1400px; margin: 0 auto; height: 100%; padding: 0 22px;
  display: flex; align-items: center; gap: 14px;
}
.menu-btn { display: none; }
.topbar-brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand-name { font-weight: 700; font-size: 17px; white-space: nowrap; }
.search-wrap { position: relative; flex: 1; max-width: 480px; margin: 0 auto; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); display: flex; color: var(--muted); }
.search-icon svg { stroke: var(--muted); }
.search-input {
  width: 100%; height: 40px; padding: 0 38px 0 40px; border: 1px solid var(--border);
  border-radius: 20px; background: var(--bg); transition: .18s;
}
.search-input:focus { background: #fff; border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 50%; background: #dfe5ee; color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.admin-entry .btn-icon svg { width: 17px; height: 17px; }
.user-menu-wrap { position: relative; }
.user-chip { display: flex; align-items: center; gap: 8px; background: transparent; border: 0; padding: 4px 6px; border-radius: 10px; }
.user-chip:hover { background: var(--bg); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.user-name { font-size: 14px; font-weight: 600; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); width: 190px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; z-index: 50;
}
.dropdown-info { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; flex-direction: column; gap: 4px; }
.dropdown-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; background: transparent; border-radius: 8px; text-align: left; color: var(--ink-2); }
.dropdown-item:hover { background: var(--bg); color: var(--danger); }

/* ===== 分类栏 ===== */
.category-bar {
  position: sticky; top: var(--topbar-h); z-index: 30; background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  display: flex; gap: 8px; padding: 11px 22px; overflow-x: auto; scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }
.cat-pill {
  padding: 7px 16px; border: 1px solid transparent; background: var(--bg); color: var(--ink-2);
  border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: .18s;
}
.cat-pill:hover { color: var(--accent); }
.cat-pill.active { background: var(--accent); color: #fff; box-shadow: 0 4px 10px rgba(40,133,255,.25); }

/* ===== 内容区 ===== */
.content { max-width: 1400px; margin: 0 auto; padding: 26px 22px 60px; }
.content-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.content-head h2 { font-size: 20px; margin: 0; }
.result-count { color: var(--muted); font-size: 13px; }
.article-grid { display: flex; flex-direction: column; gap: 10px; }
/* 紧凑列表项：左图片 + 右（标题 / 发布时间 / 结束时间） */
.card.list-item {
  display: flex; flex-direction: row; align-items: center; gap: 13px;
  padding: 10px 12px; border-radius: 12px;
}
.card.list-item:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(17,30,47,.1); }
.list-thumb {
  width: 104px; height: 78px; flex: none; object-fit: cover;
  border-radius: 8px; background: var(--accent-soft); display: block;
}
.list-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.list-title-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.list-title {
  font-size: 15px; font-weight: 700; line-height: 1.35; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.list-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; font-size: 12px; color: var(--muted); }
.list-meta span { display: inline-flex; align-items: center; gap: 4px; }
.list-meta svg { width: 13px; height: 13px; stroke: var(--muted); }
.list-meta .ending-soon { color: var(--danger); }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; flex: none; }
.badge-cat { background: var(--accent-soft); color: var(--accent); }
.badge-vip { background: var(--vip-soft); color: var(--vip); font-size: 10px; padding: 1px 6px; }
.list-actions { flex: none; }
.list-actions .btn { padding: 8px 10px; font-size: 12.5px; }
.list-actions .btn svg { width: 15px; height: 15px; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-icon svg { width: 52px; height: 52px; stroke: #cbd3e0; }
.empty-state p { margin: 14px 0 18px; }

/* ===== 侧滑栏 ===== */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(17,30,47,.42); z-index: 60; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 290px; max-width: 84vw; z-index: 61;
  background: #fff; box-shadow: 8px 0 40px rgba(17,30,47,.16);
  display: flex; flex-direction: column; animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.sidebar-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; }
.sidebar-title svg { stroke: var(--accent); }
.sidebar-user { padding: 14px 20px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.sidebar-user strong { display: block; font-size: 14px; }
.sidebar-cats { flex: 1; overflow-y: auto; padding: 12px 12px; }
.sidebar-cat {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 11px 14px; border: 0; background: transparent; border-radius: 10px;
  color: var(--ink-2); font-weight: 600; text-align: left; margin-bottom: 3px;
}
.sidebar-cat:hover { background: var(--bg); }
.sidebar-cat.active { background: var(--accent-soft); color: var(--accent); }
.sidebar-cat .count { font-size: 12px; color: var(--muted); font-weight: 400; }
.sidebar-foot { padding: 14px 20px; border-top: 1px solid var(--border); }
.sidebar-admin { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--ink-2); font-weight: 600; }
.sidebar-admin:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 模态框 ===== */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,30,47,.5); backdrop-filter: blur(3px); }
.modal-panel { position: relative; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-height: 90vh; overflow-y: auto; animation: pop .2s ease; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255,255,255,.9); }
.detail-panel { max-width: 720px; }
.detail-cover { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.detail-body { padding: 26px 30px 30px; }
.detail-badges { display: flex; gap: 8px; margin-bottom: 12px; }
.detail-body h2 { font-size: 24px; line-height: 1.4; margin: 0 0 16px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; color: var(--muted); padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.detail-meta span { display: inline-flex; align-items: center; gap: 6px; }
.detail-meta svg { width: 15px; height: 15px; stroke: var(--muted); }
.detail-content { font-size: 15px; line-height: 1.9; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.detail-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.detail-actions .btn { flex: 1; min-width: 150px; }
.copy-tip { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; }

/* ===== 管理后台 ===== */
.admin-panel { max-width: 900px; }
.editor-panel { max-width: 640px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; border-bottom: 1px solid var(--border); }
.admin-head h2 { margin: 0; font-size: 19px; }
.admin-tabs { display: flex; gap: 4px; padding: 14px 26px 0; border-bottom: 1px solid var(--border); }
.admin-tab { padding: 9px 16px; border: 0; background: transparent; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-body { padding: 22px 26px 28px; }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-toolbar p { margin: 0; color: var(--ink-2); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
.admin-table td .title-cell { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; }
.row-actions button { border: 1px solid var(--border); background: #fff; border-radius: 7px; padding: 5px 9px; color: var(--ink-2); display: inline-flex; align-items: center; }
.row-actions button:hover { border-color: var(--accent); color: var(--accent); }
.row-actions button.danger:hover { border-color: var(--danger); color: var(--danger); }
.mini-vis { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.mini-vis.normal { background: var(--accent-soft); color: var(--accent); }
.mini-vis.vip { background: var(--vip-soft); color: var(--vip); }
.inline-form { display: flex; gap: 10px; margin-bottom: 18px; }
.inline-form input { flex: 1; }
.category-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 13px; }
.cat-tag button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--bg); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.cat-tag button:hover { background: #fde8e8; color: var(--danger); }
.settings-form { max-width: 620px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 22px; cursor: pointer; }
.switch-row strong { display: block; }
.switch-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.switch-input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch { width: 46px; height: 26px; border-radius: 20px; background: #cbd3e0; position: relative; flex: none; transition: .2s; }
.switch::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; left: 3px; top: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-input:checked + .switch { background: var(--accent); }
.switch-input:checked + .switch::after { transform: translateX(20px); }
.switch-input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.editor-form .field-row { display: flex; gap: 14px; }
.editor-form .field-row .field { flex: 1; min-width: 0; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ===== 提示 ===== */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 24px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
.copy-hint { position: fixed; left: 50%; top: 76px; transform: translateX(-50%); background: var(--success); color: #fff; padding: 8px 18px; border-radius: 20px; font-size: 13px; z-index: 100; box-shadow: var(--shadow); }

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .brand-name { display: none; }
  .search-wrap { max-width: none; }
  .admin-entry .btn-text { display: none; }
  .admin-entry { padding: 10px; }
  .user-name { display: none; }
  .content, .category-bar { padding-left: 14px; padding-right: 14px; }
  .topbar-inner { padding: 0 14px; gap: 8px; }
}
@media (max-width: 560px) {
  .list-thumb { width: 84px; height: 64px; }
  .card.list-item { gap: 10px; padding: 9px 10px; }
  .list-title { font-size: 14px; }
  .list-meta { font-size: 11px; gap: 3px 9px; }
  .list-meta .badge-cat { display: none; }
  .list-actions .btn { padding: 8px; }
  .act-label { display: none; }
  .detail-body { padding: 22px 18px; }
  .detail-body h2 { font-size: 20px; }
  .editor-form .field-row { flex-direction: column; gap: 0; }
  .admin-body { padding: 18px 16px; }
  .admin-head, .admin-tabs { padding-left: 16px; padding-right: 16px; }
  .detail-actions .btn { min-width: 100%; }
}

/* ============================================================
   二级页面架构（全屏页面，替代弹窗）
   ============================================================ */
.screen { min-height: 100vh; }
.sub-screen {
  position: fixed; inset: 0; z-index: 45; background: var(--bg);
  display: flex; flex-direction: column; overflow: hidden;
}
.sub-header {
  flex: none; height: 56px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 2;
}
.sub-header h1 { font-size: 17px; margin: 0; font-weight: 700; }
.back-btn { width: 40px; height: 40px; }
.sub-content { flex: 1; overflow-y: auto; padding: 20px 16px 60px; }

/* 顶栏：登录入口 / 用户入口 / 品牌按钮 */
.topbar-brand { background: transparent; border: 0; padding: 0; gap: 9px; }
.login-entry { padding: 8px 14px; font-size: 13px; }
.user-chip { border: 1px solid var(--border); background: #fff; padding: 4px 10px 4px 4px; border-radius: 20px; }
.user-chip:hover { border-color: var(--accent); }
.user-chip .avatar { width: 28px; height: 28px; }

/* 认证页（二级页面内） */
.auth-content { display: flex; justify-content: center; padding-top: 30px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border-radius: 18px;
  padding: 28px 26px 24px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.auth-card .auth-brand h2 { font-size: 21px; margin: 0 0 2px; }
.auth-card .auth-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.auth-notice {
  background: var(--accent-soft); color: var(--accent-dark); font-size: 13px;
  padding: 10px 13px; border-radius: 9px; margin: 0 0 18px; line-height: 1.5;
}
.auth-footnote { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 0; }

/* 详情二级页面 */
.detail-panel { max-width: 720px; margin: 0 auto; }

/* 管理后台二级页面 */
.admin-body { padding: 0 20px 50px; }
.admin-tabs { background: #fff; padding: 0 16px; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.admin-section { padding-top: 20px; }

/* VIP 卡密列表 */
.card-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.card-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px;
}
.card-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 14px; letter-spacing: .5px; }
.card-status { font-size: 12px; padding: 2px 9px; border-radius: 20px; font-weight: 600; margin-left: auto; }
.card-status.unused { background: #e7f7ee; color: var(--success); }
.card-status.used { background: var(--bg); color: var(--muted); }
.card-row .btn { padding: 6px 10px; font-size: 12px; }
.card-meta-small { font-size: 11px; color: var(--muted); }

/* 个人中心 */
.account-content { max-width: 560px; margin: 0 auto; }
.account-hero {
  background: linear-gradient(135deg, #1e63d8, #2885ff); color: #fff;
  border-radius: 16px; padding: 24px; margin-bottom: 18px;
}
.account-hero .avatar-lg {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin-bottom: 12px;
}
.account-hero h2 { margin: 0 0 4px; font-size: 20px; }
.account-hero .role-line { display: flex; align-items: center; gap: 10px; font-size: 13px; opacity: .92; }
.role-pill { background: rgba(255,255,255,.22); padding: 2px 12px; border-radius: 20px; font-weight: 600; }
.account-panel { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.account-panel h3 { margin: 0 0 6px; font-size: 16px; }
.account-panel p.desc { color: var(--ink-2); font-size: 13px; margin: 0 0 16px; }
.activate-form { display: flex; gap: 10px; }
.activate-form input { flex: 1; text-transform: uppercase; }
.vip-benefits { list-style: none; padding: 0; margin: 14px 0 0; }
.vip-benefits li { font-size: 13px; color: var(--ink-2); padding: 6px 0 6px 24px; position: relative; }
.vip-benefits li::before { content: ''; position: absolute; left: 2px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--vip); }
.logout-btn { width: 100%; color: var(--danger); }

@media (max-width: 860px) {
  .admin-body { padding: 0 12px 50px; }
}

/* 管理表格窄屏横向滚动，避免文字竖排 */
.admin-table { min-width: 560px; }
.admin-table th, .admin-table td { white-space: nowrap; }

/* ============================================================
   图片文件上传 / 正文插图 / 二次确认
   ============================================================ */
.field-label .inline-tool {
  float: right; padding: 2px 9px; font-size: 12px; line-height: 1.5;
  border-radius: 6px;
}
.field-label .inline-tool svg { width: 14px; height: 14px; vertical-align: -2px; }
.hidden-file { display: none !important; }
.upload-row { display: flex; align-items: center; gap: 12px; }
.file-input {
  flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2);
  border: 1px dashed var(--border); border-radius: 10px; padding: 9px 12px; background: #fff;
}
.file-input::file-selector-button {
  border: 0; background: var(--accent-soft); color: var(--accent);
  padding: 6px 12px; border-radius: 6px; font-weight: 600; cursor: pointer; margin-right: 10px;
}
.cover-preview {
  width: 88px; height: 56px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); flex: none;
}
.content-figure { margin: 14px 0; }
.content-img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
.confirm-danger, .confirm-danger svg {
  color: var(--danger) !important; stroke: var(--danger) !important;
  background: #fde8e8 !important;
}

/* 管理标签窄屏不换行 */
.admin-tab { white-space: nowrap; }

/* ============================================================
   升级 v3：轮播 / 视图切换 / 标签 / 互动 / 留言 / 用户管理
   ============================================================ */

/* ---------- 首页轮播 ---------- */
.carousel-wrap {
  position: relative; max-width: 1400px; margin: 18px auto 0; padding: 0 22px;
}
.carousel-track {
  position: relative; height: 260px; border-radius: 16px; overflow: hidden;
  background: var(--accent-soft); box-shadow: var(--shadow);
}
.carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  cursor: pointer;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(17,30,47,.55), transparent 48%);
}
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 22px 26px;
}
.carousel-title {
  display: inline-block; max-width: 80%; color: #fff; font-size: 20px;
  font-weight: 700; line-height: 1.4; text-shadow: 0 2px 8px rgba(0,0,0,.3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom;
}
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.82); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.carousel-arrow:hover { background: #fff; }
.carousel-prev { left: 32px; }
.carousel-next { right: 32px; }
.carousel-dots {
  position: absolute; bottom: 12px; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: center; gap: 7px;
}
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.5); padding: 0; transition: .2s;
}
.carousel-dot.active { width: 20px; border-radius: 5px; background: #fff; }

/* ---------- 标签筛选栏 ---------- */
.tag-bar {
  display: flex; gap: 7px; padding: 10px 22px; overflow-x: auto;
  scrollbar-width: none; background: var(--card); border-bottom: 1px solid var(--border);
}
.tag-bar::-webkit-scrollbar { display: none; }
.tag-pill {
  padding: 4px 12px; border: 1px solid var(--border); background: #fff;
  color: var(--ink-2); border-radius: 14px; font-size: 12px; font-weight: 600;
  white-space: nowrap; transition: .18s;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }
.tag-pill.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- 内容头部右侧：结果数 + 视图切换 ---------- */
.content-head { align-items: center; }
.content-head-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.view-switch {
  display: inline-flex; padding: 3px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 9px;
}
.view-switch-btn {
  width: 30px; height: 28px; border: 0; background: transparent;
  border-radius: 6px; color: var(--muted); display: flex;
  align-items: center; justify-content: center;
}
.view-switch-btn svg { width: 16px; height: 16px; stroke: var(--muted); }
.view-switch-btn.active { background: #fff; box-shadow: 0 1px 5px rgba(17,30,47,.12); }
.view-switch-btn.active svg { stroke: var(--accent); }

/* ---------- 列表/网格卡片 ---------- */
.article-grid.view-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
}
.card.grid-item {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  border-radius: 13px;
}
.card.grid-item:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(17,30,47,.12); }
.grid-thumb-wrap { position: relative; width: 100%; height: 140px; overflow: hidden; background: var(--accent-soft); }
.grid-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid-badges {
  position: absolute; left: 8px; bottom: 8px; display: flex; gap: 5px; flex-wrap: wrap;
}
.grid-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.grid-title {
  font-size: 15px; font-weight: 700; line-height: 1.4; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 42px;
}
.grid-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.grid-meta .badge-cat { flex: none; }
.grid-stats { display: inline-flex; gap: 10px; }

/* 列表项内的标签 & 统计 */
.mini-tag {
  font-size: 10px; padding: 1px 7px; border-radius: 5px; font-weight: 600;
  background: #fff0f2; color: #d0456b; flex: none; line-height: 1.6;
}
.list-title-row .mini-tag { font-size: 10px; }
.stat-item { display: inline-flex; align-items: center; gap: 3px; }
.stat-item svg { width: 13px; height: 13px; stroke: var(--muted); }
.list-stats { display: inline-flex; gap: 10px; }

/* ---------- 详情（无封面） ---------- */
.detail-content-wrap { padding-bottom: 90px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.badge-ended { background: #fde8e8; color: var(--danger); }
.detail-title { font-size: 24px; line-height: 1.4; margin: 0 0 16px; }
.detail-stats {
  display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted);
  padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.detail-stats span { display: inline-flex; align-items: center; gap: 6px; }
.detail-stats svg { width: 15px; height: 15px; stroke: var(--muted); }
.detail-stats b { color: var(--ink-2); }
.detail-copy { font-size: 15px; line-height: 1.9; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.content-link { color: var(--accent); text-decoration: underline; word-break: break-all; }
.detail-copy-row { margin-top: 16px; }

/* ---------- 详情右侧悬浮互动栏 ---------- */
.detail-fab {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 6; display: flex; flex-direction: column; gap: 10px;
}
.fab-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; color: var(--ink-2); display: flex; align-items: center;
  justify-content: center; box-shadow: 0 4px 14px rgba(17,30,47,.12); transition: .18s;
}
.fab-btn svg { width: 21px; height: 21px; stroke: var(--ink-2); }
.fab-btn:hover { border-color: var(--accent); }
.fab-btn:hover svg { stroke: var(--accent); }
.fab-btn.active { background: var(--accent-soft); border-color: var(--accent); }
.fab-btn.active svg { stroke: var(--accent); fill: rgba(40,133,255,.12); }
#fabTop { transform: rotate(0deg); }

/* ---------- 留言区 ---------- */
.comment-section { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }
.comment-head { display: flex; align-items: center; gap: 7px; font-size: 16px; margin: 0 0 16px; }
.comment-head svg { stroke: var(--accent); }
.comment-head span { font-size: 13px; color: var(--muted); font-weight: 400; }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.comment-form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 10px; background: #fbfcfe; resize: vertical;
}
.comment-form textarea:focus { border-color: var(--accent); background: #fff; outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.comment-form .btn { align-self: flex-end; }
.comment-login, .comment-empty { color: var(--muted); font-size: 13px; padding: 14px; text-align: center; background: var(--bg); border-radius: 10px; }
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item { display: flex; gap: 11px; }
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.comment-main { flex: 1; min-width: 0; }
.comment-top { display: flex; align-items: baseline; gap: 10px; }
.comment-top strong { font-size: 13px; }
.comment-top span { font-size: 11px; color: var(--muted); }
.comment-main p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.comment-del {
  margin-top: 6px; border: 0; background: transparent; color: var(--muted);
  font-size: 11px; padding: 0;
}
.comment-del:hover { color: var(--danger); }

/* ---------- 后台：文章表格补充 ---------- */
.id-cell { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--accent); font-weight: 700; }
.cell-sub { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 3px; margin-top: 3px; }
.cell-sub svg { width: 12px; height: 12px; stroke: var(--muted); }
.cell-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.btn-xs { padding: 4px 9px !important; font-size: 11px !important; border-radius: 6px !important; }
.btn.on, .row-actions button.on { background: var(--accent-soft) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
.mini-vis.admin { background: #eef0ff; color: #5b5bd6; }
.mini-vis.normal { background: var(--bg); color: var(--ink-2); }
.mini-status { font-size: 11px; padding: 2px 9px; border-radius: 20px; font-weight: 600; }
.mini-status.ok { background: #e7f7ee; color: var(--success); }
.mini-status.blocked { background: #fde8e8; color: var(--danger); }
.user-actions { flex-wrap: wrap; }
.user-actions button { padding: 4px 8px; font-size: 11px; }
.user-table { min-width: 680px; }

/* ---------- 标签选择器 ---------- */
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-choice {
  padding: 6px 13px; border: 1px solid var(--border); background: #fff;
  color: var(--ink-2); border-radius: 16px; font-size: 13px; font-weight: 600; transition: .18s;
}
.tag-choice:hover { border-color: var(--accent); color: var(--accent); }
.tag-choice.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 轮播管理 ---------- */
.carousel-admin-list { display: flex; flex-direction: column; gap: 12px; }
.carousel-edit-row { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #fff; }
.carousel-edit-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.carousel-edit-head strong { font-size: 14px; }
.carousel-edit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.carousel-edit-fields .field { margin-bottom: 0; }
.carousel-edit-fields .field:last-child { grid-column: 1 / -1; }

/* ---------- 卡密管理补充 ---------- */
.card-row { flex-wrap: wrap; }
.card-row.expired { opacity: .62; }
.card-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.card-row-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-days-input {
  width: 64px; padding: 5px 7px; border: 1px solid var(--border);
  border-radius: 7px; font-size: 12px; text-align: center;
}

/* ---------- 侧滑栏：历史 / 收藏 ---------- */
.sidebar-extra { padding: 8px 12px; border-top: 1px solid var(--border); max-height: 34vh; overflow-y: auto; }
.side-group { border-bottom: 1px solid var(--border); }
.side-group:last-child { border-bottom: 0; }
.side-group summary {
  display: flex; align-items: center; gap: 9px; padding: 11px 8px;
  font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; list-style: none;
}
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary::after { content: '›'; margin-left: auto; color: var(--muted); transition: transform .2s; font-size: 18px; }
.side-group[open] summary::after { transform: rotate(90deg); }
.side-group-icon { display: flex; }
.side-group-icon svg { width: 17px; height: 17px; stroke: var(--accent); }
.side-group-count { background: var(--bg); color: var(--muted); font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 400; }
.side-group-body { padding: 2px 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 8px 10px; border: 0; background: transparent;
  border-radius: 8px; text-align: left; color: var(--ink-2);
}
.side-item:hover { background: var(--bg); }
.side-item-title { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.side-item-time { font-size: 11px; color: var(--muted); flex: none; display: inline-flex; }
.side-empty { font-size: 12px; color: var(--muted); padding: 6px 10px; margin: 0; }

/* ---------- 响应式补充 ---------- */
@media (max-width: 760px) {
  .carousel-wrap { padding: 0 14px; margin-top: 12px; }
  .carousel-track { height: 180px; border-radius: 12px; }
  .carousel-title { font-size: 16px; max-width: 74%; }
  .carousel-prev { left: 20px; }
  .carousel-next { right: 20px; }
  .carousel-arrow { width: 32px; height: 32px; }
  .tag-bar { padding: 9px 14px; }
  .content-head-right { gap: 8px; }
  .article-grid.view-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .grid-thumb-wrap { height: 108px; }
  .grid-title { font-size: 13px; min-height: 36px; }
  .grid-info { padding: 10px; }
  .detail-fab { right: 8px; gap: 8px; }
  .fab-btn { width: 40px; height: 40px; }
  .fab-btn svg { width: 18px; height: 18px; }
  .detail-title { font-size: 20px; }
  .carousel-edit-fields { grid-template-columns: 1fr; }
  .card-row-controls { width: 100%; }
}

