/* ============ BEYOND CMS 后台样式 ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
body, input, select, textarea, button { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }

.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0e2439 0%, #1d3a57 55%, #336699 100%); }
.login-card { width: 360px; max-width: 92vw; background: #fff; border-radius: 10px; padding: 34px 32px 26px;
  box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.login-card h1 { font-size: 20px; color: #0e2439; margin-bottom: 22px; text-align: center; }
.login-card h1 small { display: block; font-size: 12px; color: #888; font-weight: normal; margin-top: 6px; }
.login-card label { display: block; font-size: 13px; color: #555; margin-bottom: 14px; }
.login-card input { width: 100%; padding: 10px 12px; margin-top: 5px; border: 1px solid #ccd5de;
  border-radius: 6px; font-size: 14px; }
.login-card input:focus { outline: none; border-color: #336699; box-shadow: 0 0 0 3px rgba(51,102,153,.15); }
.login-card button { width: 100%; padding: 11px; background: #336699; color: #fff; border: 0; border-radius: 6px;
  font-size: 15px; cursor: pointer; letter-spacing: 6px; }
.login-card button:hover { background: #28527c; }
.login-err { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; border-radius: 6px;
  padding: 8px 12px; font-size: 13px; margin-bottom: 14px; text-align: center; }
.login-tip { text-align: center; margin-top: 14px; font-size: 12px; }
.login-tip a { color: #336699; }

/* ---------- 后台框架 ---------- */
.admin-body { display: flex; min-height: 100vh; background: #eef1f5; }
.side { width: 200px; flex: none; background: linear-gradient(180deg, #10263c, #16324f); color: #cfe0f0;
  display: flex; flex-direction: column; }
.side-logo { padding: 20px 16px; font-size: 17px; font-weight: bold; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08); letter-spacing: 1px; }
.side nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.side a { display: flex; align-items: center; gap: 9px; padding: 10px 18px; color: #b9cde1;
  text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.on { background: rgba(51,102,153,.35); color: #fff; border-left-color: #e33; }
.side .ico { width: 20px; text-align: center; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 52px; background: #fff; border-bottom: 1px solid #dde4ec; display: flex;
  align-items: center; justify-content: space-between; padding: 0 22px; }
.tb-title { font-size: 16px; font-weight: bold; color: #16324f; }
.tb-right { font-size: 13px; }
.tb-right a { color: #336699; text-decoration: none; }
.content { flex: 1; padding: 20px 22px; overflow-x: auto; }
.admin-foot { text-align: center; color: #98a5b3; font-size: 12px; padding: 12px; }

.notice { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.notice.ok { background: #e8f7ee; color: #1e7e46; border: 1px solid #b7e4c9; }
.notice.err { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }
.notice.warn { background: #fff8e1; color: #8a6d1a; border: 1px solid #f0dfa0; }

/* ---------- 卡片 / 统计 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: 8px; padding: 16px 18px; border: 1px solid #e4e9f0;
  display: block; text-decoration: none; transition: all .15s; }
.stat-card:hover { box-shadow: 0 4px 14px rgba(22,50,79,.12); transform: translateY(-2px); }
.stat-num { font-size: 26px; font-weight: bold; color: #16324f; }
.stat-lbl { font-size: 12px; color: #8896a6; margin-top: 4px; }
.panel { background: #fff; border: 1px solid #e4e9f0; border-radius: 8px; padding: 16px 18px; margin-bottom: 18px; }
.panel h3 { font-size: 15px; color: #16324f; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #eef1f5; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- 图表 ---------- */
.chart-box svg { width: 100%; height: auto; display: block; }
.chart-legend { font-size: 12px; color: #667; margin-top: 6px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; }

/* ---------- 表格 ---------- */
table.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid #edf1f5; text-align: left; vertical-align: middle; }
.tbl th { background: #f4f7fa; color: #456; font-weight: bold; white-space: nowrap; }
.tbl tr:hover td { background: #f8fafc; }
.tbl .t-title { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .t-title a { color: #2c5f9e; text-decoration: none; }
.tbl .t-title a:hover { color: #e33; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; }
.badge.b-green { background: #e8f7ee; color: #1e7e46; }
.badge.b-gray { background: #eef1f5; color: #889; }
.badge.b-red { background: #fdecea; color: #c0392b; }
.badge.b-blue { background: #e8f1fb; color: #2c5f9e; }
.badge.b-gold { background: #fff6dd; color: #a67c00; }

/* ---------- 按钮 / 表单 ---------- */
.btn { display: inline-block; padding: 7px 16px; border: 1px solid #ccd5de; background: #fff; color: #456;
  border-radius: 6px; font-size: 13px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f4f7fa; }
.btn-pri { background: #336699; border-color: #336699; color: #fff; }
.btn-pri:hover { background: #28527c; }
.btn-danger { color: #c0392b; border-color: #eec2bd; }
.btn-danger:hover { background: #fdecea; }
.btn-sm { padding: 3px 10px; font-size: 12px; border-radius: 4px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=text], .toolbar select { padding: 7px 10px; border: 1px solid #ccd5de; border-radius: 6px; font-size: 13px; }

.form-card { background: #fff; border: 1px solid #e4e9f0; border-radius: 8px; padding: 20px 22px; max-width: 1080px; }
.form-row { margin-bottom: 14px; }
.form-row > label { display: block; font-size: 13px; color: #456; margin-bottom: 6px; font-weight: bold; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=url],
.form-row select, .form-row textarea { width: 100%; padding: 9px 12px; border: 1px solid #ccd5de;
  border-radius: 6px; font-size: 14px; }
.form-row textarea { resize: vertical; }
.form-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.form-inline .form-row { flex: 1; min-width: 160px; }
.form-help { font-size: 12px; color: #98a5b3; margin-top: 4px; }
.form-check { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; font-size: 13px; color: #456; }

/* ---------- 富文本编辑器 ---------- */
.ed-toolbar { display: flex; flex-wrap: wrap; gap: 4px; border: 1px solid #ccd5de; border-bottom: 0;
  background: #f4f7fa; padding: 7px 9px; border-radius: 8px 8px 0 0; }
.ed-btn { min-width: 30px; height: 30px; padding: 0 7px; border: 1px solid transparent; background: none;
  border-radius: 5px; cursor: pointer; font-size: 14px; color: #345; }
.ed-btn:hover { background: #e2eaf2; border-color: #c3d2e0; }
.ed-sep { width: 1px; background: #d4dce4; margin: 3px 4px; }
.ed-area { width: 100%; min-height: 380px; padding: 14px 16px; border: 1px solid #ccd5de; border-radius: 0 0 8px 8px;
  font-size: 15px; line-height: 1.8; outline: none; overflow-y: auto; background: #fff; }
.ed-area img { max-width: 100%; height: auto; }
.ed-area:focus { box-shadow: 0 0 0 3px rgba(51,102,153,.12); }
.ed-src { font-family: Consolas, monospace; font-size: 13px; white-space: pre-wrap; }
.ed-uploading { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: #16324f; color: #fff;
  padding: 8px 22px; border-radius: 20px; font-size: 13px; z-index: 99; box-shadow: 0 4px 14px rgba(0,0,0,.3); }

/* ---------- 弹层 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(10,20,35,.55); display: flex;
  align-items: center; justify-content: center; z-index: 100; }
.modal-mask[hidden] { display: none; }
.modal { width: 460px; max-width: 92vw; background: #fff; border-radius: 10px; padding: 20px 22px;
  box-shadow: 0 16px 50px rgba(0,0,0,.35); }
.modal h4 { font-size: 15px; color: #16324f; margin-bottom: 14px; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 9px 12px; border: 1px solid #ccd5de;
  border-radius: 6px; font-size: 13px; margin-bottom: 10px; }
.modal .m-btns { text-align: right; margin-top: 6px; }

/* ---------- 上传控件 ---------- */
.up-zone { border: 2px dashed #b9cde1; border-radius: 8px; padding: 22px; text-align: center;
  color: #789; font-size: 13px; background: #f8fbfe; cursor: pointer; }
.up-zone:hover { border-color: #336699; color: #336699; }
.thumb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb-item { position: relative; border: 1px solid #dde4ec; border-radius: 6px; overflow: hidden; background: #fff; }
.thumb-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.thumb-item .t-del { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: rgba(200,40,40,.85); color: #fff; cursor: pointer; font-size: 11px; }
.thumb-item input { width: 100%; border: 0; border-top: 1px solid #edf1f5; padding: 5px 6px; font-size: 11px; }

.pager-adm { text-align: center; padding: 16px 0; }
.pager-adm a, .pager-adm span { display: inline-block; padding: 4px 11px; margin: 0 3px; border: 1px solid #ccd5de;
  border-radius: 5px; font-size: 13px; color: #456; text-decoration: none; background: #fff; }
.pager-adm .cur { background: #336699; color: #fff; border-color: #336699; }

@media (max-width: 860px) {
  .admin-body { display: block; }
  .side { width: auto; }
  .side nav { display: flex; flex-wrap: wrap; padding: 0; }
  .side a { padding: 9px 12px; font-size: 12px; }
}
