/* 育创员工培训系统 - 全局样式（浅色暖色调） */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #e8833a;
  --primary-dark: #d06f28;
  --ink: #3a332c;
  --ink-2: #6f6558;
  --bg: #faf7f2;
  --card: #ffffff;
  --line: #eee6da;
  --hover: #fdf3e8;
  --radius: 14px;
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.7;
}
a { color: var(--primary-dark); text-decoration: none; }

/* ===== 顶栏 ===== */
.topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 0 28px; height: 60px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #e8833a, #d09a2e);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800;
}
.brand small { font-weight: 400; color: var(--ink-2); font-size: 12px; margin-left: 4px; }
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); }
.topbar .whoami { color: var(--ink); font-weight: 600; }
.btn-ghost {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.btn-ghost:hover { background: var(--hover); color: var(--primary-dark); border-color: var(--primary); }

/* ===== 布局 ===== */
.wrap { max-width: 1160px; margin: 0 auto; padding: 28px 24px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.page-sub { color: var(--ink-2); font-size: 14px; margin-bottom: 26px; }

/* ===== 登录页 ===== */
.login-bg {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #fdf6ec 0%, #faf7f2 45%, #f6efe3 100%);
}
.login-card {
  width: 400px; background: #fff; border-radius: 20px; padding: 44px 40px;
  box-shadow: 0 12px 40px rgba(160, 110, 40, .10); border: 1px solid var(--line);
}
.login-card .logo-big {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px;
  background: linear-gradient(135deg, #e8833a, #d09a2e); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800;
}
.login-card h1 { text-align: center; font-size: 21px; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--ink-2); font-size: 13px; margin-bottom: 30px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; outline: none; background: #fdfcfa; transition: border .15s;
}
.field input:focus { border-color: var(--primary); background: #fff; }
.btn-primary {
  width: 100%; padding: 12px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #e8833a, #d78a30); color: #fff; font-size: 16px; font-weight: 600;
}
.btn-primary:hover { opacity: .92; }
.login-tip { margin-top: 18px; text-align: center; font-size: 12px; color: #b8ab99; }

/* ===== 版块卡片网格 ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.sec-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 18px; cursor: pointer; transition: all .18s ease; position: relative; overflow: hidden;
}
.sec-card:hover { background: var(--hover); border-color: #f0d9bd; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(170,120,50,.08); }
.sec-card .emoji { font-size: 30px; }
.sec-card h3 { font-size: 17px; margin: 10px 0 6px; }
.sec-card p { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sec-card .tags { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: #f7efe3; color: #96743d; }
.sec-card .accent { position: absolute; top: 0; left: 0; width: 100%; height: 4px; }

/* ===== 详情页 ===== */
.detail-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.side-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; position: sticky; top: 84px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  color: var(--ink); font-size: 14px; margin-bottom: 2px;
}
.side-nav a:hover { background: var(--hover); }
.side-nav a.active { background: #f9ead6; color: var(--primary-dark); font-weight: 600; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; margin-bottom: 18px;
}
.panel h2 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--primary); display: inline-block; }
.panel p { color: #55503f; margin-bottom: 10px; }
.hl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.hl-item { background: #fbf5ea; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #7a5c2e; }
.aud-item { background: #fbf8f3; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.aud-item b { display: block; margin-bottom: 4px; }
.aud-item span { font-size: 13px; color: var(--ink-2); }
.step { display: flex; gap: 14px; margin-bottom: 14px; }
.step .num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: #f9ead6; color: var(--primary-dark);
  font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; margin-top: 2px;
}
.step b { display: block; margin-bottom: 2px; }
.step span { font-size: 13.5px; color: var(--ink-2); }
.script-block { background: #faf7f0; border-left: 3px solid var(--primary); border-radius: 0 10px 10px 0; padding: 14px 18px; margin-bottom: 12px; }
.script-block .label { font-size: 12px; color: #b08a4a; font-weight: 700; margin-bottom: 6px; letter-spacing: 1px; }
.objection { border: 1px dashed #e3d5bd; border-radius: 10px; padding: 14px 18px; margin-bottom: 12px; background: #fffdf8; }
.objection .q { font-weight: 700; color: #b0532f; margin-bottom: 6px; font-size: 14px; }
.objection .a { font-size: 14px; color: #55503f; }
.kb-item { border-bottom: 1px solid var(--line); padding: 14px 4px; }
.kb-item:last-child { border-bottom: none; }
.kb-item b { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.kb-item b .arrow { color: #c9b988; }
.kb-item .body { display: none; padding-top: 8px; font-size: 14px; color: #55503f; }
.kb-item.open .body { display: block; }
.material-link {
  display: flex; align-items: center; justify-content: space-between; background: #fbf5ea;
  border: 1px solid #eddfc4; border-radius: 10px; padding: 14px 18px; margin-bottom: 10px;
}
.material-link:hover { background: var(--hover); }
.material-link .name { font-weight: 600; }

/* ===== 管理后台 ===== */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--ink-2); font-weight: 600; font-size: 13px; padding: 10px 12px; border-bottom: 2px solid var(--line); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.tbl tr:hover td { background: #fdfaf4; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.badge.ok { background: #e8f5ec; color: #2e7d4f; }
.badge.off { background: #f7e8e5; color: #b0532f; }
.badge.admin { background: #ece5f7; color: #6b4fa8; }
.btn-sm { padding: 4px 12px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12.5px; color: var(--ink-2); margin-right: 6px; }
.btn-sm:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--hover); }
.btn-sm.danger:hover { border-color: #cf5b3d; color: #cf5b3d; background: #fdf0eb; }
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; outline: none; background: #fdfcfa;
}
.toolbar input:focus { border-color: var(--primary); }
.modal-mask { position: fixed; inset: 0; background: rgba(60,45,25,.35); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 28px 30px; width: 420px; }
.modal h3 { margin-bottom: 18px; font-size: 17px; }
.toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); background: #3a332c; color: #fff;
  padding: 10px 22px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .25s; z-index: 200; pointer-events: none;
}
.toast.show { opacity: .95; }
@media (max-width: 860px) {
  .detail-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; }
  .hl-list { grid-template-columns: 1fr; }
}
