/* PC 管理页·知识内容审核发布（连锁培训平台 Task 2 后半）——样式表
 * 视觉基准：老板选定的演示稿 demo-c1（C 方案·现代醒目风）：大色块状态、大圆角、黑白强对比。
 * 状态色：草稿灰 / 已发布绿 / 有更新橙 / 已下架红，与演示稿同一组色值。
 * 对应 API 见 index.html 顶部注释（本文件纯样式，不调接口）。 */
:root{
  --bg:#f4f2ee; --ink:#141414; --muted:#6f6a63; --card:#ffffff;
  --draft:#6b7280; --draft-bg:#dfe1e5;
  --pub:#16a34a; --pub-bg:#c9edd6;
  --upd:#f97316; --upd-bg:#ffe0c2;
  --off:#ef4444; --off-bg:#ffd5d5;
}
*{box-sizing:border-box;}
html,body{margin:0;}
body{
  background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif;
  font-size:17px; line-height:1.7;
}
/* ---------- 顶部条 ---------- */
.topbar{
  background:var(--ink); color:#fff; padding:22px 34px;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px;
}
.brand{display:flex; align-items:center; gap:18px;}
.logo{width:52px; height:52px; border-radius:18px;
  background:linear-gradient(135deg,#ff7a45,#f97316 55%,#16a34a);}
.brand h1{margin:0; font-size:30px; letter-spacing:.02em; line-height:1.2;}
.brand .sub{font-size:13px; letter-spacing:.28em; color:#c9c4bd; text-transform:uppercase;}
.user{display:flex; align-items:center; gap:14px;}
.avatar{width:46px; height:46px; border-radius:50%; background:#f97316; color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:700;}
.user .name{font-size:15px; font-weight:600; line-height:1.3;}
.user .role{font-size:12px; color:#c9c4bd;}
.logout{
  font-family:inherit; font-size:13px; font-weight:700; letter-spacing:.08em; cursor:pointer;
  background:transparent; color:#c9c4bd; border:2px solid #555; border-radius:999px; padding:6px 16px;
}
.logout:hover{color:#fff; border-color:#fff;}

.layout{display:flex;}
/* ---------- 左侧导航 ---------- */
.sidebar{width:250px; padding:34px 22px; flex-shrink:0;}
.nav-cap{font-size:12px; letter-spacing:.3em; color:#a49c91; margin:0 0 16px 10px;}
.nav-item{
  display:flex; align-items:center; gap:13px; padding:15px 22px; border-radius:20px;
  color:#57514a; text-decoration:none; margin-bottom:12px; font-size:19px; font-weight:600;
}
.nav-item .sq{width:13px; height:13px; border-radius:5px; background:#d8d2c8;}
.nav-item.active{background:var(--ink); color:#fff;}
.nav-item.active .sq{background:#ff7a45;}
.nav-item.off{color:#bdb5a9;}
.nav-item.off .sq{background:#e4ded4;}
.nav-item .soon{margin-left:auto; font-size:12px; font-weight:700; color:#bdb5a9;
  border:2px solid #e4ded4; border-radius:999px; padding:1px 12px;}
.side-stat{margin-top:26px; background:#fff; border-radius:22px; padding:20px 22px;}
.side-stat .big{font-size:36px; font-weight:800; line-height:1.1;}
.side-stat .lab{font-size:13px; color:var(--muted);}
.side-stat .split{display:flex; gap:10px; margin-top:14px;}
.side-stat .split div{flex:1; border-radius:14px; padding:8px 10px; font-size:13px; font-weight:700;}
.side-stat .split .g{background:var(--upd-bg); color:#b45309;}
.side-stat .split .r{background:var(--draft-bg); color:#4b5563;}
.side-note{margin-top:18px; font-size:12px; color:#a49c91; line-height:1.9; padding:0 10px;}

/* ---------- 主区 ---------- */
.main{flex:1; padding:34px 40px 60px; min-width:0;}
.page-head{margin-bottom:26px;}
.page-head h2{font-size:38px; margin:0 0 8px; line-height:1.2;}
.page-head p{margin:0; color:var(--muted); font-size:17px;}

.filter-block{
  background:var(--card); border-radius:26px; padding:22px 26px; margin-bottom:24px;
  box-shadow:0 10px 30px rgba(20,20,20,.05);
}
.filter-row{display:flex; align-items:center; gap:16px; margin-bottom:14px; flex-wrap:wrap;}
.filter-row:last-child{margin-bottom:0;}
.filter-row .lab{font-size:13px; font-weight:800; letter-spacing:.22em; color:#a49c91; width:52px;}
.segs{display:flex; gap:10px; flex-wrap:wrap;}
.seg{
  font-family:inherit; font-size:17px; font-weight:700; padding:10px 24px; border-radius:999px;
  border:none; background:#ece8e1; color:#57514a; cursor:pointer;
}
.seg:hover{background:#e0dad0;}
.seg.on{background:var(--ink); color:#fff;}
.search-wrap{flex:1; display:flex; gap:12px;}
.search{
  flex:1; max-width:380px; border:3px solid var(--ink); background:#fff; border-radius:999px;
  padding:11px 24px; font-size:17px; font-family:inherit; outline:none; color:var(--ink);
}
.search::placeholder{color:#b3aa9d;}
.btn-ghost-big{
  font-family:inherit; font-size:16px; font-weight:700; border-radius:999px; cursor:pointer;
  border:none; background:#ece8e1; color:#57514a; padding:11px 24px;
}

.list-meta{font-size:15px; color:var(--muted); margin:0 0 18px 6px;}
.list-meta b{color:var(--ink); font-size:19px;}

.item{
  display:flex; background:var(--card); border-radius:26px; overflow:hidden; margin-bottom:22px;
  box-shadow:0 12px 34px rgba(20,20,20,.06);
}
.status-block{
  width:118px; flex-shrink:0; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:4px; color:#fff; text-align:center; padding:18px 8px;
}
.status-block .word{font-size:21px; font-weight:800; letter-spacing:.08em; line-height:1.3;}
.status-block .en{font-size:11px; letter-spacing:.24em; opacity:.85;}
.sb-draft{background:var(--draft);}
.sb-pub{background:var(--pub);}
.sb-upd{background:var(--upd);}
.sb-off{background:var(--off);}
.item-body{flex:1; padding:22px 28px 22px; min-width:0;}
.item-tags{display:flex; gap:10px; margin-bottom:10px; flex-wrap:wrap;}
.big-tag{font-size:13px; font-weight:800; letter-spacing:.12em; padding:4px 15px; border-radius:999px;}
.tt-doc{background:#e8e2ff; color:#5b3fd6;}
.tt-course{background:#ffe0c2; color:#b45309;}
.tt-req{background:#ffd5d5; color:#b91c1c;}
.tt-cat{background:#f0ece4; color:#8a8172;}
.item h3{margin:0 0 8px; font-size:25px; font-weight:800; line-height:1.35;}
.meta-line{display:flex; flex-wrap:wrap; gap:22px; font-size:14px; color:var(--muted); margin-bottom:12px;}
.meta-line b{color:var(--ink); font-size:16px;}
.type-hint{
  margin:0 0 16px; font-size:14px; font-weight:700; color:#8a5a12;
  background:#fff7ec; border-radius:14px; padding:9px 16px; display:inline-block;
}
.type-hint.grey{color:#4b5563; background:#f1f0ee;}
.type-hint.red{color:#b91c1c; background:#fff1f1;}
.ops{display:flex; gap:12px; flex-wrap:wrap;}
.op{
  font-family:inherit; font-size:17px; font-weight:800; border-radius:16px; cursor:pointer;
  padding:11px 28px; border:3px solid transparent;
}
.op.preview{background:#fff; border-color:var(--ink); color:var(--ink);}
.op.publish{background:var(--ink); color:#fff;}
.op.publish:hover{background:#333;}
.op.offline{background:#fff; border-color:#ffbcbc; color:#dc2626;}
.op.offline:hover{background:#fff2f2;}
.op:disabled{opacity:.32; cursor:not-allowed;}

.pager{display:flex; gap:10px; align-items:center; justify-content:center; margin:30px 0 10px;}
.page-btn, .page-nav{
  font-family:inherit; font-size:16px; font-weight:800; border-radius:14px; cursor:pointer;
  border:none; background:#fff; color:#57514a; padding:10px 20px;
  box-shadow:0 6px 18px rgba(20,20,20,.06);
}
.page-btn.on{background:var(--ink); color:#fff;}
.page-nav:disabled{opacity:.35; cursor:not-allowed;}
.empty{display:none; text-align:center; padding:60px 0; color:var(--muted); font-size:19px;}

/* ---------- 弹窗（发布/下架确认、预览面板共用） ---------- */
.overlay{position:fixed; inset:0; background:rgba(20,20,20,.55); z-index:60;
  display:flex; align-items:center; justify-content:center; padding:24px 0; overflow:auto;}
.overlay[hidden]{display:none;}
.modal{
  width:540px; max-width:92vw; background:#fff; border-radius:30px; padding:36px 40px 32px;
  box-shadow:0 30px 80px rgba(20,20,20,.35);
}
.modal .icon{
  width:62px; height:62px; border-radius:22px; background:var(--upd-bg); color:#c2410c;
  display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:800; margin-bottom:18px;
}
.modal .icon.down{background:var(--off-bg); color:#b91c1c;}
.modal h3{margin:0 0 10px; font-size:28px;}
.modal p{margin:0 0 20px; color:var(--muted); font-size:16px;}
.info-card{background:#f4f2ee; border-radius:20px; padding:16px 22px; margin-bottom:26px;}
.info-card div{display:flex; justify-content:space-between; gap:18px; font-size:15px; padding:5px 0;}
.info-card span{color:var(--muted);}
.info-card b{font-size:16px; text-align:right;}
.acts{display:flex; gap:14px; justify-content:flex-end;}
.btn-big{font-family:inherit; font-size:18px; font-weight:800; border-radius:18px; cursor:pointer;
  padding:13px 32px; border:3px solid transparent;}
.btn-big.ghost{background:#fff; border-color:#d8d2c8; color:#57514a;}
.btn-big.main{background:var(--pub); color:#fff;}
.btn-big.main:hover{background:#128c3e;}
.btn-big.danger{background:var(--off); color:#fff;}
.btn-big.danger:hover{background:#dc2626;}

/* ---------- 预览面板：五类块渲染 ---------- */
.pv-modal{width:760px;}
.pv-head{display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:6px;}
.pv-head h3{margin:0 0 8px;}
.pv-cap{font-size:11px; font-weight:800; letter-spacing:.26em; color:#a49c91; margin:0 0 10px;}
.pv-sec{background:#faf8f5; border-radius:18px; padding:18px 22px; margin-bottom:18px;}
.pv-sec.pending{background:#fff7ec;}
.pv-sec .pv-cap.upd{color:#b45309;}
.bp-chips{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px;}
.bp-chips span{font-size:12px; font-weight:800; letter-spacing:.14em; background:var(--ink); color:#fff;
  border-radius:999px; padding:4px 14px;}
.blk-h{margin:14px 0 8px; line-height:1.35; color:var(--ink);}
.blk-h.lv1{font-size:24px;} .blk-h.lv2{font-size:21px;}
.blk-h.lv3{font-size:19px;} .blk-h.lv4{font-size:17px;}
.blk-h.lv5,.blk-h.lv6,.blk-h.lv7,.blk-h.lv8,.blk-h.lv9{font-size:16px;}
.blk-p{margin:0 0 10px; font-size:15px; color:#57514a; line-height:1.9;}
.blk-img{display:block; max-width:100%; border-radius:14px; margin:0 0 12px;}
.blk-img-ph{
  background:#ece8e1; color:#8a8172; border-radius:14px; padding:26px 18px; margin:0 0 12px;
  text-align:center; font-size:14px; font-weight:700;
}
.blk-table{border-collapse:collapse; width:100%; margin:0 0 12px; background:#fff; border-radius:12px;
  overflow:hidden; font-size:14px;}
.blk-table th, .blk-table td{border:1px solid #e4ded4; padding:8px 12px; text-align:left; color:#57514a;}
.blk-table th{background:#f1f0ee; color:var(--ink); font-weight:800;}
.blk-att{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  background:#fff; border:2px solid #e4ded4; border-radius:16px; padding:14px 20px; margin:0 0 12px;
}
.blk-att .att-name{font-size:15px; font-weight:800; color:var(--ink); word-break:break-all;}
.blk-att .att-dl{font-size:14px; font-weight:800; color:#fff; background:var(--ink);
  border-radius:999px; padding:5px 18px; text-decoration:none; flex-shrink:0;}

/* ---------- 登录 / 无权限视图 ---------- */
.login-wrap{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:40px 20px;}
.login-wrap[hidden]{display:none;}
.login-card{
  width:460px; max-width:100%; background:#fff; border-radius:30px; padding:44px 46px 40px;
  box-shadow:0 30px 80px rgba(20,20,20,.12); text-align:center;
}
.login-card .logo{margin:0 auto 18px;}
.login-card h1{margin:0 0 6px; font-size:30px; line-height:1.25;}
.login-sub{margin:0 0 28px; color:var(--muted); font-size:15px;}
.field{display:block; text-align:left; margin-bottom:18px;}
.field span{display:block; font-size:13px; font-weight:800; letter-spacing:.22em; color:#a49c91; margin:0 0 8px 6px;}
.field input{
  width:100%; border:3px solid var(--ink); background:#fff; border-radius:18px;
  padding:12px 20px; font-size:17px; font-family:inherit; outline:none; color:var(--ink);
}
.field input::placeholder{color:#b3aa9d;}
.login-err{margin:0 0 16px; font-size:15px; font-weight:700; color:#b91c1c; background:#fff1f1;
  border-radius:14px; padding:10px 16px;}
.login-btn{width:100%; margin-top:6px;}

/* ---------- 提示条 ---------- */
.toast{
  position:fixed; left:50%; bottom:40px; transform:translateX(-50%) translateY(20px);
  background:var(--ink); color:#fff; font-size:17px; font-weight:700;
  padding:14px 32px; border-radius:999px; opacity:0; pointer-events:none;
  transition:all .25s ease; z-index:70;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
