/* ============ ct.haz.com.cn 风格统一 ============ */
/* 主色 #2F855A 绿  |  侧边栏 #2F4F4F 深绿  |  页面底 #F7FAFC  |  卡片白 #fff  |  边框 #e2e8f0  |  文字 #1a202c */

:root {
  --primary: #2F855A;
  --primary-hover: #276749;
  --primary-light: #C6F6D5;
  --primary-lighter: #F0FFF4;
  --sidebar-bg: #27493B;
  --sidebar-text: #cbd5d0;
  --sidebar-active-bg: #396050;
  --sidebar-active-text: #ffffff;
  --sidebar-hover-bg: rgba(57, 96, 80, .6);
  --bg-page: #F7FAFC;
  --bg-card: #ffffff;
  --bg-soft: #f4f7f9;
  --border: #e2e8f0;
  --border-soft: #edf2f7;
  --text-primary: #1a202c;
  --text-regular: #2d3748;
  --text-secondary: #718096;
  --text-placeholder: #a0aec0;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .06);
}

/* ---------- Element Plus 主题色变量 ---------- */
body {
  --el-color-primary: #2F855A;
  --el-color-primary-light-3: #4ea877;
  --el-color-primary-light-5: #7fc49e;
  --el-color-primary-light-7: #b3dfc3;
  --el-color-primary-light-8: #cde9d6;
  --el-color-primary-light-9: #e6f4ec;
  --el-color-primary-dark-2: #276749;
  --el-border-radius-base: 6px;
  --el-border-color: #e2e8f0;
  --el-border-color-light: #edf2f7;
  --el-text-color-primary: #1a202c;
  --el-text-color-regular: #2d3748;
  --el-text-color-secondary: #718096;
  --el-fill-color-blank: #F7FAFC;
}

/* ---------- Element Plus 组件覆盖 ---------- */
.el-button--primary {
  --el-button-bg-color: var(--primary);
  --el-button-border-color: var(--primary);
  --el-button-hover-bg-color: var(--primary-hover);
  --el-button-hover-border-color: var(--primary-hover);
  --el-button-active-bg-color: var(--primary-hover);
  --el-button-active-border-color: var(--primary-hover);
  border-radius: var(--radius-sm);
}
.el-button { border-radius: var(--radius-sm); }
.el-input__wrapper { border-radius: var(--radius-sm); background: var(--bg-page); box-shadow: 0 0 0 1px var(--border) inset; }
.el-input__wrapper.is-focus { box-shadow: 0 0 0 1px var(--primary) inset; }
.el-textarea__inner { border-radius: var(--radius-sm); background: var(--bg-page); border-color: var(--border); }
.el-textarea__inner:focus { border-color: var(--primary); }
.el-card { border-radius: var(--radius-lg); border-color: var(--border); box-shadow: var(--shadow-card); }
.el-tag { border-radius: var(--radius-sm); }
.el-menu-item.is-active { color: var(--primary) !important; }
.el-dialog { border-radius: var(--radius-lg); }
.el-drawer { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.el-table { border-radius: var(--radius-md); }
.el-pagination button, .el-pager li { border-radius: var(--radius-sm); }
.el-tabs__item.is-active { color: var(--primary); }
.el-tabs__active-bar { background-color: var(--primary); }
.el-collapse-item__header { border-bottom: 1px solid var(--border-soft); }
.el-collapse-item__wrap { border-bottom: 1px solid var(--border-soft); }
.el-checkbox__input.is-checked .el-checkbox__inner { background-color: var(--primary); border-color: var(--primary); }
.el-checkbox__input.is-checked + .el-checkbox__label { color: var(--primary); }
.el-radio__input.is-checked .el-radio__inner { border-color: var(--primary); background: var(--primary); }
.el-radio__input.is-checked + .el-radio__label { color: var(--primary); }
.el-progress-bar__inner { background-color: var(--primary); }

body {
  margin: 0;
  background: var(--bg-page);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "LarkHackSafariFont", sans-serif;
  color: var(--text-primary);
  font-size: 14px;
}
#app { height: 100vh; }

/* ---------- 布局 ---------- */
.layout { height: 100vh; }
.aside {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: none;
  width: 240px;
}
.logo { height: 76px; padding: 20px; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid rgba(255,255,255,.08); box-sizing: border-box; }
.logo .t { font-size: 16px; font-weight: 600; color: #f5f5f5; letter-spacing: .5px; }
.logo .s { font-size: 12px; color: rgba(245,245,245,.55); margin-top: 4px; }
.aside .el-menu { border-right: none; background: transparent; padding: 8px 0;
  --el-menu-text-color: var(--sidebar-text);
  --el-menu-active-color: #ffffff;
  --el-menu-hover-bg-color: transparent;
}
.aside .el-menu-item { color: var(--sidebar-text); padding: 8px 12px; height: 36px; line-height: 36px; font-size: 14px; margin: 0; border-radius: 0; }
.aside .el-menu-item.is-active { color: var(--sidebar-active-text) !important; background: var(--sidebar-active-bg); font-weight: 400; }
.aside .el-menu-item.is-active .el-icon { color: var(--sidebar-active-text) !important; }
.aside .el-menu-item:hover { background: var(--sidebar-hover-bg); color: var(--sidebar-active-text); }
.aside .el-menu-item:hover .el-icon { color: var(--sidebar-active-text); }
.aside .el-menu-item .el-icon { margin-right: 10px; font-size: 16px; }

.main { padding: 16px 20px; overflow-y: auto; background: var(--bg-page); }
.page-card { width: 100%; }
.mr4 { margin-right: 4px; }
.mb12 { margin-bottom: 12px; }
.sec-title { font-weight: 600; margin: 14px 0 8px; color: var(--text-primary); }
.job-box { margin-top: 16px; padding: 16px; background: var(--bg-soft); border-radius: var(--radius-md); border: 1px solid var(--border-soft); }
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.f-wide { flex: 1 1 200px; min-width: 0 !important; }

/* ---------- 选题池 · 想法列表 ---------- */
.topic-check-list { display: block; max-height: 420px; overflow: auto; padding: 2px 4px 2px 2px; }
.topic-check-item { display: block; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-md); margin-bottom: 8px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.topic-check-item:hover { border-color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.topic-item-main { display: flex; align-items: flex-start; gap: 8px; }
.topic-item-main .el-checkbox { margin-top: 1px; }
.topic-item-main .el-checkbox__label { white-space: normal; line-height: 1.5; }
.topic-item-main .t-title { flex: 1; min-width: 0; font-size: 14px; color: var(--text-primary); line-height: 1.5; }
.topic-item-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; padding-left: 26px; }
.topic-ops { margin-left: auto; display: flex; gap: 2px; flex-shrink: 0; }
.picked-tags { display: flex; flex-wrap: wrap; max-height: 120px; overflow: auto; }

/* ---------- 同行清单 ---------- */
.blogger-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.blogger-card .b-name { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.blogger-card .b-note { color: var(--text-secondary); font-size: 13px; margin: 6px 0; min-height: 18px; }
.blogger-card .b-ops { margin-top: 6px; }
.b-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.b-head { flex: 1; min-width: 0; }
.b-home { font-size: 12px; margin-top: 2px; }
.b-desc { color: var(--text-secondary); font-size: 13px; margin: 6px 0; white-space: pre-wrap; }
.b-name { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.b-stats { display: flex; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); margin: 0 0 6px; }
.b-stat { flex: 1; text-align: center; padding: 6px 0; display: flex; flex-direction: column; }
.b-stat + .b-stat { border-left: 1px solid var(--border-color); }
.b-stat-v { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.b-stat-k { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.b-recent { border-top: 1px dashed var(--border-color); margin-top: 8px; padding-top: 8px; }
.b-recent-hint { color: var(--text-secondary); font-size: 12px; padding: 6px 0; }
.b-recent-tip { color: var(--text-secondary); font-size: 12px; padding: 0 0 4px; }
.b-login-hint { color: var(--warning, #d97706); }
.b-video { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--bg-light); }
.b-video:last-child { border-bottom: none; }
.b-video-cover { width: 56px; height: 72px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: var(--bg-light); }
.b-video-body { flex: 1; min-width: 0; }
.b-progress { font-size: 12px; color: var(--primary, #2F855A); padding: 4px 0 2px; }
.login-status { display: inline-block; margin-left: 10px; padding: 3px 10px; border-radius: 12px; font-size: 12.5px; font-weight: 600; vertical-align: middle; }
.login-status.ls-on { background: var(--primary-light, #C6F6D5); color: var(--primary-hover, #276749); }
.login-status.ls-off { background: #FED7D7; color: #C53030; }
.b-video-meta { font-size: 12px; color: var(--text-secondary); margin: 2px 0; }
.b-video-meta span { margin-right: 10px; }
.b-video-tags { color: var(--primary, #2F855A); background: var(--primary-light, #C6F6D5); padding: 0 5px; border-radius: 3px; display: inline-block; margin-top: 2px; white-space: nowrap; }
.b-video-title { font-size: 13px; color: var(--text-primary); line-height: 1.4; margin-bottom: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.b-preview { display: flex; align-items: center; gap: 10px; width: 100%; }
.b-pv-body { flex: 1; min-width: 0; }
.b-pv-body .b-desc { color: var(--text-secondary); font-size: 13px; white-space: pre-wrap; }

.drawer-ops { margin-top: 14px; display: flex; gap: 10px; align-items: center; }
.tip { color: var(--text-secondary); font-size: 12px; line-height: 1.6; }

/* ---------- 中考进度日历 ---------- */
.cal-card { border: 1px solid var(--border); background: var(--bg-card); }
.cal-card :deep(.el-card__body), .cal-card .el-card__body { padding: 14px 18px; }
.cal-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cal-stage b { font-size: 16px; color: var(--primary); }
.cal-stage .tip { margin-top: 4px; font-size: 12.5px; }
.cal-cd { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border-radius: var(--radius-md); padding: 8px 16px; border: 1px solid var(--border-soft); }
.cd-num { font-size: 30px; font-weight: 700; color: var(--primary); line-height: 1; }
.cd-text { font-size: 12.5px; color: var(--text-regular); line-height: 1.5; }
.cd-text span { color: var(--text-secondary); }
.cal-collapse { margin-top: 6px; border-top: 1px dashed var(--border); }
.cal-collapse .el-collapse-item__header { border-bottom: none; background: transparent; }
.cal-panel-title { font-weight: 600; color: var(--primary); }
.cal-collapse .el-collapse-item__wrap { border-bottom: none; }

.month-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 8px 0 4px; }
.m-cell { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 10px; cursor: pointer; background: var(--bg-card); transition: all .15s; }
.m-cell b { display: block; font-size: 13.5px; color: var(--text-primary); }
.m-cell span { font-size: 12px; color: var(--text-secondary); }
.m-cell:hover { border-color: var(--primary); box-shadow: 0 1px 4px rgba(51,113,88,.18); }
.m-cell.on { border-color: var(--primary); background: var(--primary); }
.m-cell.on b, .m-cell.on span { color: #fff; }
.m-cell.now { position: relative; }
.m-cell.now::after { content: "本月"; position: absolute; top: -8px; right: 6px; font-size: 10px; background: var(--primary); color: #fff; border-radius: 4px; padding: 0 5px; line-height: 16px; }

.m-detail { margin-top: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; }
.m-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.dir-list { list-style: none; margin: 0; padding: 0; }
.dir-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border-soft); }
.dir-list li:last-child { border-bottom: none; }
.dir-text { font-size: 13.5px; color: var(--text-regular); }

/* ---------- 文案工厂 ---------- */
.f-head { display: flex; align-items: center; justify-content: space-between; }
.ver-list { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.ver-card { border-left: 4px solid var(--primary); }
.ver-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.ver-hook { font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.ver-script { white-space: pre-wrap; font-size: 13.5px; line-height: 1.8; background: var(--bg-soft); border: 1px dashed var(--border); border-radius: var(--radius-md); padding: 10px 12px; max-height: 300px; overflow: auto; }
.ver-meta { color: var(--text-secondary); font-size: 12.5px; margin-top: 6px; line-height: 1.6; }
.ver-hits { margin-top: 8px; }
.ver-ops { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.hook-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px dashed var(--border-soft); font-size: 13px; color: var(--text-regular); }
.hook-row:last-child { border-bottom: none; }
.fld-label { font-size: 12.5px; color: var(--text-secondary); margin: 8px 0 4px; font-weight: 600; }
.chk-hl { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; max-height: 220px; overflow: auto; font-size: 13px; line-height: 1.9; background: var(--bg-soft); }
.banned-hit { padding: 0 3px; border-radius: 3px; font-weight: 600; }
.banned-hit.lv-高危 { background: #fee2e2; color: #b91c1c; }
.banned-hit.lv-中危 { background: #fef3c7; color: #b45309; }
.banned-hit.lv-低危 { background: #e0f2fe; color: #0369a1; }

/* ---------- 内容流水线 ---------- */
.flow-tip { margin-bottom: 14px; }
.pool-stack { display: flex; flex-direction: column; gap: 14px; }
.pool-box { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; height: 100%; background: var(--bg-card); }
.pool-t { font-weight: 700; color: var(--text-primary); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.dir-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.dir-checks .el-checkbox { margin-right: 0; height: auto; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-sizing: border-box; transition: all .15s; }
.dir-checks .el-checkbox:hover { border-color: var(--primary); }
.dir-checks .el-checkbox.is-checked { border-color: var(--primary); background: var(--primary-lighter); }
.dir-checks .el-checkbox__label { white-space: normal; }

/* ============ 页面访问密码锁 ============ */
#loginGate { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: radial-gradient(circle at 30% 20%, #2F4F4F, #1e3a2f); }
.lg-card { width: 320px; max-width: 86vw; background: #fff; border-radius: 14px; padding: 30px 26px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.lg-t { font-size: 22px; font-weight: 700; color: var(--primary); text-align: center; }
.lg-s { font-size: 13px; color: var(--text-secondary); text-align: center; margin: 8px 0 20px; }
#lgPass { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; transition: border-color .15s; }
#lgPass:focus { border-color: var(--primary); }
.lg-err { color: #C53030; font-size: 13px; text-align: center; margin-top: 10px; }
#lgBtn { width: 100%; margin-top: 18px; padding: 11px; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; }
#lgBtn:hover { background: var(--primary-hover); }
#lgBtn:disabled { opacity: .6; cursor: not-allowed; }

/* ============ 手机适配 ============ */
.m-hamb { display: none; position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 12px; z-index: 180; width: 44px; height: 44px; border-radius: 10px; background: var(--primary); color: #fff; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25); font-size: 20px; }
.m-mask { display: none; position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.5); }

@media (max-width: 900px) {
  .m-hamb { display: flex; }
  .m-mask { display: block; }
  .layout { display: block !important; }
  .aside { position: fixed !important; top: 0; left: 0; bottom: 0; width: 240px !important; z-index: 160; transform: translateX(-100%); transition: transform .28s ease; box-shadow: none; padding-top: env(safe-area-inset-top, 0px); }
  .aside.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.18); }
  .main { width: 100% !important; padding: 60px 12px 20px; }
  .page-card { width: 100%; }

  /* 日历月份格：6 列 → 3 列 */
  .month-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .cal-banner { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* 同行清单卡片单列 */
  .blogger-grid { grid-template-columns: 1fr; }

  /* 表单项上下排布，避免横向挤压 */
  .el-form-item { display: block !important; }
  .el-form-item__label { display: block; text-align: left; width: auto !important; margin-bottom: 4px; line-height: 1.4; }
  .el-form-item__content { margin-left: 0 !important; }
  .el-form { width: 100%; box-sizing: border-box; }

  /* 操作按钮换行 */
  .drawer-ops, .ver-ops, .f-head, .ver-head { flex-wrap: wrap; }

  /* 表格横向滚动，防内容挤压 */
  .el-table { width: 100%; min-width: 0; }
  .el-table__body-wrapper { overflow-x: auto; }
  .el-card { width: 100%; box-sizing: border-box; }
  .el-tabs__nav-wrap { overflow-x: auto; }

  /* 弹窗更贴合手机 */
  .el-dialog, .el-drawer { width: 92vw !important; margin: 8vh auto 0 !important; }
  .topic-check-item, .b-video { flex-wrap: wrap; }
  .b-pv-body { min-width: 0; }

  /* ---- 移动端触控与防溢出 ---- */
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
  /* 输入控件 16px，避免 iOS 聚焦自动放大页面 */
  .el-input__inner, .el-textarea__inner, input, textarea { font-size: 16px !important; }
  /* 主按钮/主要操作在窄屏铺满，便于点按 */
  .el-button--primary { min-width: 44px; min-height: 40px; }
  .el-button { min-height: 38px; }
  .el-menu-item { min-height: 44px; line-height: 44px; }
  .el-checkbox, .el-radio { min-height: 40px; }
  .el-menu-item-group__title { padding-left: 12px; }
  /* 卡片内边距压缩，信息更紧凑 */
  .el-card__body { padding: 12px; }
  /* 表格首列可伸缩，避免被固定列撑破 */
  .el-table .cell { padding: 0 8px; }
  .filter-bar .el-input { flex: 1 1 100%; }
  .filter-bar .el-button { flex: 1 1 auto; }
  /* 底部安全区 */
  .main { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); }
}
/* 移动端触控（覆盖所有宽度的触屏设备） */
html { -webkit-text-size-adjust: 100%; }
@media (hover: none) and (pointer: coarse) {
  .el-button, .el-menu-item, .el-checkbox, .el-radio { min-height: 42px; }
}
.idea-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 12px 7px 18px; border-bottom: 1px dashed var(--border-soft); font-size: 13px; }
.idea-text { flex: 1; min-width: 0; color: var(--text-regular); line-height: 1.6; word-break: break-word; }
.idea-row .el-button { flex-shrink: 0; margin-left: 8px; align-self: center; }
/* 支柱点子：确保列表文字不贴左边缘 */
.pool-box .el-collapse-item__content { padding-left: 4px; padding-right: 8px; }
/* 蓄水池 AI 任务状态条 */
.pool-status { margin-top: 12px; padding: 9px 12px; background: var(--primary-lighter); border: 1px solid var(--primary-light); border-radius: var(--radius-md); color: var(--primary-hover); font-size: 13px; display: flex; align-items: center; gap: 9px; }
.pool-status .spin { width: 14px; height: 14px; border: 2px solid var(--primary-light); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.tpick-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; max-height: 300px; overflow: auto; padding: 4px; }
.tpick-box { margin-right: 0 !important; height: auto; padding: 6px 10px; white-space: normal; max-width: 100%; }
.t-score { color: #d4a017; font-size: 12.5px; letter-spacing: 1px; white-space: nowrap; }
.job-card { margin-top: 14px; border: 1px solid var(--primary-light); background: var(--primary-lighter); border-radius: var(--radius-md); padding: 14px 16px; }
.draft-card { margin-bottom: 12px; border-left: 4px solid #d4a017; }
.draft-topic { font-weight: 700; color: var(--text-primary); font-size: 14px; margin-left: 4px; }
.pool-list { max-height: 460px; overflow: auto; margin-top: 8px; }
.pool-row { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px dashed var(--border-soft); cursor: pointer; }
.pool-title { font-weight: 600; color: var(--text-primary); font-size: 13.5px; white-space: nowrap; }
.pool-note { flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 120px; color: var(--text-secondary); }
