/* 零雪 CMS —— 豆绿主题 V2（色板锚点 --sage #9baf95） */
:root {
  --ice: #eaeae8;
  --sage-soft: #e5eae4;
  --line: #d5ded3;
  --sage: #9baf95;
  --muted: #869283;
  --sage-deep: #7e9775;
  --ink: #3f5039;
  --text: #2b332c;
  --text-2: #5c675e;
  --text-3: #8a958b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "微软雅黑", -apple-system, "PingFang SC", "Segoe UI", sans-serif;
  background: var(--ice); color: var(--text); min-height: 100vh;
}
a { color: var(--ink); text-decoration: none; }

/* ---------- 登录页（竖版） ---------- */
.login-bg {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 18px;
  background:
    radial-gradient(680px 340px at 12% -8%, rgba(155,175,149,.28), transparent 60%),
    radial-gradient(560px 300px at 96% 108%, rgba(126,151,117,.22), transparent 60%),
    linear-gradient(178deg, var(--ice) 0%, var(--sage-soft) 100%);
}
.login-card {
  width: 100%; max-width: 430px; background: #fff;
  border: 1px solid var(--line); border-radius: 22px;
  padding: 46px 42px 34px; text-align: center;
  box-shadow: 0 18px 50px rgba(63,80,57,.10);
}
.login-card img.word-logo { width: 216px; max-width: 78%; }
.login-card .sys-name { margin-top: 26px; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: 1px; }
.login-card .sys-sub { margin-top: 7px; font-size: 13px; color: var(--text-3); }
.login-card form { margin-top: 28px; text-align: left; }
.login-card label { display: block; font-size: 13px; color: var(--text-2); margin: 16px 0 7px; }
.login-card input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; outline: none; background: #fbfcfb;
}
.login-card input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(155,175,149,.22); background: #fff; }
.login-card .hint { font-size: 12px; color: var(--text-3); margin: 14px 0 20px; }
.btn-primary {
  width: 100%; padding: 13px; background: var(--sage-deep); color: #fff; border: 0;
  border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
  letter-spacing: 2px;
}
.btn-primary:hover { background: var(--ink); }
.err {
  background: #fbeeec; border: 1px solid #eccfc9; color: #a23b2e;
  border-radius: 9px; padding: 9px 12px; font-size: 13px; margin-top: 16px; text-align: left;
}
.login-foot { margin-top: 30px; font-size: 12px; color: var(--text-3); letter-spacing: 1px; }

/* ---------- 后台框架 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px; border-bottom: 1px solid var(--line); background: #fff;
  position: sticky; top: 0; z-index: 5;
}
.topbar .left { display: flex; align-items: center; gap: 12px; }
.topbar .mark { width: 38px; height: 38px; border-radius: 10px; }
.topbar .title { font-weight: 700; font-size: 16px; color: var(--ink); }
.topbar .title small { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); letter-spacing: 2px; margin-top: 1px; }
.topbar .right { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.btn-ghost {
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; color: var(--text-2); background: #fff; cursor: pointer; text-decoration: none;
  font-family: inherit;
}
.btn-ghost:hover { border-color: var(--sage-deep); color: var(--ink); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 34px 24px 70px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-head h2 { font-size: 20px; color: var(--ink); }
.section-head .count { font-size: 13px; color: var(--text-3); }

/* 列表 */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; font-size: 12px; color: var(--text-3); font-weight: 500;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--sage-soft);
}
table.list td { padding: 14px 16px; border-bottom: 1px solid #edf1ec; font-size: 14px; vertical-align: middle; }
table.list tr:hover td { background: #f7f9f6; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 12px; }
.badge.draft { background: #f1f2f0; color: var(--text-2); }
.badge.published { background: var(--sage-soft); color: var(--ink); border: 1px solid var(--sage); }
.badge.offline { background: #fbeeec; color: #a23b2e; }
.btn { display: inline-block; padding: 8px 16px; border-radius: 9px; font-size: 13px; border: 1px solid transparent; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn.new { background: var(--sage-deep); color: #fff; padding: 10px 20px; font-weight: 700; }
.btn.new:hover { background: var(--ink); }
.btn.mini { padding: 5px 12px; border-color: var(--line); color: var(--text-2); background: #fff; }
.btn.mini:hover { border-color: var(--sage-deep); color: var(--ink); }

/* 空状态 */
.empty-card {
  background: #fff; border: 1px dashed var(--sage); border-radius: 18px;
  padding: 64px 30px; text-align: center;
}
.empty-card .big { font-size: 44px; }
.empty-card h3 { margin-top: 14px; font-size: 17px; color: var(--ink); }
.empty-card p { margin-top: 8px; font-size: 13px; color: var(--text-3); line-height: 1.8; }
.empty-card .btn { margin-top: 20px; }

/* ---------- 编辑页 ---------- */
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.block-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; color: var(--ink); margin: 4px 0 16px;
}
.block-title .no {
  width: 24px; height: 24px; border-radius: 7px; background: var(--sage-soft);
  color: var(--ink); font-size: 12px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--sage);
}
.block-title + .form-grid, .block-title + .field { margin-bottom: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; font-family: inherit; outline: none; background: #fbfcfb;
}
.field input:focus, .field textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(155,175,149,.2); background: #fff; }
.field textarea { resize: vertical; }
.field .tip { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.content-md { min-height: 380px; font-family: ui-monospace, Consolas, "Microsoft YaHei", monospace; font-size: 13px; line-height: 1.75; }
.actions {
  display: flex; gap: 12px; margin-top: 8px; padding-top: 20px; border-top: 1px solid #edf1ec; align-items: center;
}
.btn.save-draft { background: #fff; border: 1px solid var(--line); color: var(--text-2); }
.btn.save-draft:hover { border-color: var(--sage-deep); color: var(--ink); }
.btn.publish { background: var(--sage-deep); color: #fff; padding: 11px 28px; font-weight: 700; font-size: 14px; }
.btn.publish:hover { background: var(--ink); }
.saved-tip { color: var(--sage-deep); font-size: 13px; }
.meta-line { font-size: 12px; color: var(--text-3); margin-top: 12px; }

/* 侧栏提示卡 */
.side-tips { position: sticky; top: 84px; display: grid; gap: 14px; }
.tip-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.tip-card h4 { font-size: 13px; color: var(--ink); margin-bottom: 10px; }
.tip-card ul { list-style: none; }
.tip-card li { font-size: 12px; color: var(--text-2); line-height: 1.7; padding: 5px 0 5px 20px; position: relative; border-bottom: 1px dashed #edf1ec; }
.tip-card li:last-child { border-bottom: 0; }
.tip-card li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }

@media (max-width: 980px) {
  .edit-layout { grid-template-columns: 1fr; }
  .side-tips { position: static; }
  .form-grid { grid-template-columns: 1fr; }
}

/* 空状态增强 */
.empty-card { background: linear-gradient(180deg, #fff 0%, #f6f8f4 100%); }
.empty-card .empty-logo { width: 84px; height: 84px; border-radius: 20px; opacity: .92; }
.empty-card h3 { margin-top: 18px; }
.steps {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 26px auto 6px; flex-wrap: wrap;
}
.steps .step {
  display: flex; align-items: center; gap: 9px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px;
  font-size: 13px; color: var(--text-2); text-align: left; line-height: 1.5;
}
.steps .step em { font-style: normal; font-size: 11px; color: var(--text-3); }
.steps .no {
  width: 22px; height: 22px; border-radius: 50%; background: var(--sage-deep);
  color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.steps .arrow { color: var(--sage); font-size: 18px; }
