/* ============================================================
   Hugo CMS · Vue 3 + Element Plus 主题
   品牌色：靛蓝；内容区浅色，导航深色
   ============================================================ */
:root {
  --brand: #5b7cfa;
  --brand-2: #7c6cf5;
  --ink: #243045;
  --muted: #8895a8;
  --line: #e9edf3;
  --bg: #f4f6fb;
  --nav-bg: #162032;

  --el-color-primary: #5b7cfa;
  --el-color-primary-light-3: #829bfb;
  --el-color-primary-light-5: #a9bafc;
  --el-color-primary-light-7: #d0dafd;
  --el-color-primary-light-8: #e0e7fe;
  --el-color-primary-light-9: #eef1ff;
  --el-color-primary-dark-2: #4a66d8;
  --el-border-radius-base: 8px;
  --el-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --el-text-color-primary: var(--ink);
}

html, body { height: 100%; margin: 0; }
[v-cloak] { display: none !important; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.ml5 { margin-left: 5px; }
.mr15 { margin-right: 15px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd3e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #aeb9cc; }

/* ---------- 登录 ---------- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-screen::before, .login-screen::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.login-screen::before { width: 440px; height: 440px; top: -170px; left: -130px; }
.login-screen::after { width: 340px; height: 340px; bottom: -140px; right: -90px; }
.login-card { position: relative; z-index: 1; width: 400px; border: 0; border-radius: 16px; box-shadow: 0 16px 48px rgba(24,39,75,.16); overflow: hidden; }
.login-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #667eea, #764ba2); }
.login-card > .el-card__body { padding: 40px 38px 34px; text-align: center; }
.login-logo { width: 62px; height: 62px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #667eea, #764ba2); box-shadow: 0 8px 20px rgba(102,126,234,.35); margin: 0 auto 20px; }
.login-title { font-size: 22px; margin: 0 0 6px; font-weight: 600; letter-spacing: .5px; }
.login-tip { color: var(--muted); margin: 0 0 24px; }
.login-btn { width: 100%; margin-top: 18px; height: 44px; font-size: 15px; }

/* ---------- 布局 ---------- */
.admin-layout { height: 100vh; padding: 0; }
.admin-header { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(90deg, #1e2a44 0%, #243a5e 100%) !important; height: 60px !important; padding: 0 22px; box-shadow: 0 1px 8px rgba(0,0,0,.14); }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.brand .el-icon { color: #8fa6ff; }
.header-right { display: flex; align-items: center; gap: 18px; }
.status-text { color: #c8d2e4; font-size: 13px; }
.logout-btn { color: #c8d2e4 !important; }
.logout-btn:hover { color: #fff !important; background: rgba(255,255,255,.08) !important; }
.admin-body-row { height: calc(100vh - 60px); }
.admin-aside { background: var(--nav-bg) !important; overflow-y: auto; }
.side-menu { border: 0 !important; background: transparent !important; }
.side-menu .el-menu-item { color: #a8b4c8 !important; height: 50px; line-height: 50px; margin: 2px 0; }
.side-menu .el-menu-item .el-icon { color: inherit; }
.side-menu .el-menu-item:hover { background: rgba(255,255,255,.06) !important; color: #fff !important; }
.side-menu .el-menu-item.is-active { background: linear-gradient(90deg, rgba(91,124,250,.3), rgba(91,124,250,.04)) !important; color: #fff !important; border-left: 3px solid var(--brand); padding-left: 17px !important; }
.side-menu .el-menu-item.is-active .el-icon { color: #93a8ff !important; }
.admin-main { background: var(--bg); padding: 18px !important; overflow-y: auto; }

/* ---------- 卡片 / 表格 ---------- */
.view-card { border-radius: 10px !important; border: 1px solid rgba(228,233,241,.8) !important; box-shadow: 0 1px 2px rgba(24,39,75,.04), 0 4px 14px rgba(24,39,75,.06); margin-bottom: 15px; }
.view-card > .el-card__header { border-bottom: 1px solid var(--line); padding: 0 18px; min-height: 50px; display: flex; align-items: center; }
.card-header { width: 100%; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 15px; }
.view-card > .el-card__body { padding: 18px; }
.search-input { max-width: 480px; margin-bottom: 14px; }
.filter-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.comment-counts { color: var(--muted); font-size: 13px; }
.table-pager { margin-top: 16px; justify-content: flex-end; }
.cell-title { font-weight: 600; color: var(--brand); }
.cell-sub { color: var(--muted); font-size: 12px; word-break: break-all; }
.tag-pill { display: inline-block; padding: 1px 8px; margin: 2px 4px 2px 0; background: var(--el-color-primary-light-9); color: var(--brand); border-radius: 4px; font-size: 12px; }
.icon-cell { display: inline-flex; align-items: center; gap: 6px; }
.thumb { max-height: 48px; max-width: 100px; border-radius: 4px; display: block; }
.el-table { border-radius: 8px; }
.el-table th.el-table__cell { background: #f8fafc !important; color: #5a677d; font-weight: 600; }
.code-input textarea { font-family: Consolas, 'Courier New', monospace; }
.collection-tip { margin-top: 12px; color: var(--muted); font-size: 12px; }

/* ---------- 编辑器 ---------- */
.editor-toolbar-card { margin-bottom: 15px; }
.editor-form { padding-top: 4px; }
.editor-row { align-items: stretch; }
.editor-pane { height: calc(100vh - 330px); min-height: 520px; }
.editor-pane > .el-card__body { height: calc(100% - 51px); padding: 0 !important; overflow: hidden; }
.vditor-host { height: 100%; }
.preview-frame { width: 100%; height: 100%; border: 0; background: #EFEFEF; display: block; }
.full-preview-frame { width: 100%; height: 72vh; border: 0; background: #EFEFEF; }
.page-vditor { min-height: 480px; }
#pageMdEditor .vditor { border: 0; }

/* Vditor 字体对齐博客主题正文（main.css：open sans 系列 / 16px / 1.725） */
#mdEditor .vditor-sv .CodeMirror,
#mdEditor .vditor-sv .CodeMirror pre,
#mdEditor .vditor-sv .CodeMirror-code,
#mdEditor .vditor-sv .CodeMirror-lines,
#mdEditor .vditor-wysiwyg,
#mdEditor .vditor-wysiwyg .vditor-reset,
#mdEditor .vditor-ir,
#mdEditor .vditor-ir .vditor-reset,
#pageMdEditor .vditor-sv .CodeMirror,
#pageMdEditor .vditor-sv .CodeMirror pre,
#pageMdEditor .vditor-sv .CodeMirror-code,
#pageMdEditor .vditor-sv .CodeMirror-lines,
#pageMdEditor .vditor-wysiwyg,
#pageMdEditor .vditor-wysiwyg .vditor-reset,
#pageMdEditor .vditor-ir,
#pageMdEditor .vditor-ir .vditor-reset {
  font-family: 'open sans', 'lucida grande', 'lucida sans unicode', lucida, helvetica,
               'Hiragino Sans GB', 'Microsoft YaHei UI Light', 'Microsoft YaHei',
               'WenQuanYi Micro Hei', sans-serif !important;
  font-size: 16px !important;
  line-height: 1.725 !important;
}

/* ---------- 标签分类 ---------- */
.tax-list { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; }
.tax-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tax-item:hover { border-color: var(--el-color-primary-light-7); background: #fbfcff; }

/* ---------- 发布 / 设置 ---------- */
.stats-row { margin-bottom: 4px; }
.stat-card > .el-card__body { text-align: center; padding: 18px 10px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { color: var(--brand); font-size: 22px; font-weight: 600; margin-top: 6px; word-break: break-all; }
.btn-group { display: flex; flex-wrap: wrap; gap: 10px; }
.info-line { margin-top: 14px; color: var(--muted); font-size: 13px; }
.code-output { background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 380px; overflow: auto; margin: 14px 0 0; font-family: Consolas, 'Courier New', monospace; }
.job-logs { max-height: 300px; }
.status-output { margin-top: 0; }
.field-tip { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
