/* ============ 后台 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px; line-height: 1.6; color: #2a2a2a; background: #f2f3f5;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* 登录 */
.login-body {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(135deg, #1257c4, #0d3f8f);
}
.login-box {
  width: 380px; background: #fff; border-radius: 10px; padding: 40px 36px 36px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.login-box h1 { font-size: 22px; font-weight: 700; text-align: center; }
.login-sub { text-align: center; font-size: 13px; color: #999; margin: 6px 0 26px; }
.login-box label { display: block; font-size: 13px; color: #666; margin-bottom: 16px; }
.login-box input {
  width: 100%; height: 40px; border: 1px solid #dde0e5; border-radius: 5px;
  padding: 0 12px; font-size: 14px; margin-top: 6px; outline: 0;
}
.login-box input:focus { border-color: #1257c4; }
.login-box button {
  width: 100%; height: 42px; border: 0; border-radius: 5px; background: #1257c4;
  color: #fff; font-size: 15px; cursor: pointer; margin-top: 6px;
}
.login-box button:hover { background: #0e46a3; }

/* 布局 */
.adm-shell { display: flex; min-height: 100vh; }
.adm-side {
  width: 200px; background: #1d2430; color: #b8c0cd; flex-shrink: 0;
  display: flex; flex-direction: column; padding: 0 0 20px;
}
.adm-brand {
  height: 58px; line-height: 58px; text-align: center; color: #fff;
  font-size: 16px; font-weight: 700; letter-spacing: 1px; border-bottom: 1px solid #2b3341;
}
.adm-side nav { padding: 12px 0; flex: 1; }
.adm-nav {
  display: block; padding: 11px 22px; font-size: 14px; color: #b8c0cd;
  border-left: 3px solid transparent; transition: all .15s;
}
.adm-nav:hover { background: #262f3d; color: #fff; }
.adm-nav.on { background: #262f3d; color: #fff; border-left-color: #2f7ef0; font-weight: 600; }
.adm-view, .adm-logout {
  display: block; margin: 6px 18px 0; padding: 9px 0; text-align: center;
  font-size: 13px; border: 1px solid #3a4353; border-radius: 4px; color: #9aa3b2;
}
.adm-view:hover, .adm-logout:hover { color: #fff; border-color: #5a657a; }

.adm-main { flex: 1; padding: 24px 28px 50px; min-width: 0; }
.adm-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.adm-top h1 { font-size: 21px; font-weight: 700; }
.adm-msg {
  background: #eaf6ee; border: 1px solid #b9e2c6; color: #1f7a3d;
  padding: 10px 14px; border-radius: 5px; margin-bottom: 18px; font-size: 13.5px;
}

/* 统计卡 */
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: #fff; border-radius: 8px; padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.stat-card span { display: block; font-size: 12.5px; color: #999; }
.stat-card strong { display: block; font-size: 28px; font-weight: 700; color: #1257c4; margin-top: 4px; font-family: Arial, sans-serif; }

/* 面板 */
.adm-panel {
  background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 22px; overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 20px; border-bottom: 1px solid #eef0f3; flex-wrap: wrap;
}
.panel-head h2 { font-size: 16px; font-weight: 700; }
.filter-bar { display: flex; gap: 10px; align-items: center; }
.filter-bar input, .filter-bar select {
  height: 34px; border: 1px solid #dde0e5; border-radius: 4px; padding: 0 10px;
  font-size: 13.5px; outline: 0; background: #fff;
}
.filter-bar input { width: 200px; }
.filter-bar input:focus, .filter-bar select:focus { border-color: #1257c4; }

/* 表格 */
.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th {
  background: #f7f8fa; font-size: 12.5px; font-weight: 600; color: #666;
  text-align: left; padding: 10px 14px; border-bottom: 1px solid #eef0f3; white-space: nowrap;
}
.adm-table td { padding: 12px 14px; border-bottom: 1px solid #f4f5f7; font-size: 13.5px; vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tr:hover td { background: #fafbfc; }
.t-title { max-width: 380px; }
.t-title a { color: #1257c4; }
.t-title a:hover { text-decoration: underline; }
.t-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline { display: inline; }

.pill {
  display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 3px;
  background: #eceef1; color: #888; margin-left: 4px; vertical-align: middle;
}
.pill.on { background: #e6f4ea; color: #1f7a3d; }
.pill.top { background: #fdecea; color: #c0392b; }
.pill.rec { background: #eef3ff; color: #1257c4; }

/* 按钮 */
.btn-primary {
  display: inline-block; background: #1257c4; color: #fff; border: 0;
  padding: 9px 18px; border-radius: 4px; font-size: 13.5px; cursor: pointer;
}
.btn-primary:hover { background: #0e46a3; }
.btn-sm {
  display: inline-block; background: #fff; color: #444; border: 1px solid #dde0e5;
  padding: 4px 11px; border-radius: 4px; font-size: 12.5px; cursor: pointer;
}
.btn-sm:hover { border-color: #1257c4; color: #1257c4; }
.btn-sm.danger:hover { border-color: #e63a1f; color: #e63a1f; }

/* 表单 */
.adm-form { padding: 22px 24px 26px; }
.form-row { margin-bottom: 18px; }
.form-row.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row label { display: block; font-size: 13px; color: #555; font-weight: 500; }
.form-row label em { color: #e63a1f; font-style: normal; margin-left: 2px; }
.form-row input[type=text], .form-row input[type=number], .form-row select, .form-row textarea {
  width: 100%; border: 1px solid #dde0e5; border-radius: 5px; padding: 9px 12px;
  font-size: 14px; margin-top: 7px; outline: 0; font-family: inherit; background: #fff;
}
.form-row textarea { line-height: 1.7; resize: vertical; font-family: Consolas, Monaco, monospace; font-size: 13.5px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: #1257c4; box-shadow: 0 0 0 3px rgba(18,87,196,.08); }
.form-checks { display: flex; gap: 26px; flex-wrap: wrap; }
.form-checks .ck { display: flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; font-weight: 400; }
.form-checks input[type=checkbox] { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.form-actions { display: flex; align-items: center; gap: 12px; padding-top: 6px; border-top: 1px solid #f0f1f3; margin-top: 22px; }

code { background: #f2f4f7; padding: 1px 6px; border-radius: 3px; font-size: 12.5px; color: #c0392b; }

@media (max-width: 900px) {
  .adm-shell { flex-direction: column; }
  .adm-side { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 0; }
  .adm-brand { height: auto; padding: 14px 18px; border-bottom: 0; }
  .adm-side nav { display: flex; flex: 1; padding: 0; overflow-x: auto; }
  .adm-nav { padding: 14px 14px; border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .adm-nav.on { border-left: 0; border-bottom-color: #2f7ef0; }
  .adm-view, .adm-logout { margin: 8px; padding: 6px 12px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .form-row.form-2 { grid-template-columns: 1fr; }
  .adm-main { padding: 18px 16px 40px; }
  .adm-table { font-size: 12.5px; }
  .adm-table th, .adm-table td { padding: 9px 8px; }
}

/* ==================== 图片上传控件 ==================== */
.adm-sec-title{margin:22px 0 10px;padding-left:9px;border-left:3px solid #d9534f;
  font-size:14px;font-weight:700;color:#22282f;line-height:1.4;}
.up-row{margin-top:7px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.up-btn{position:relative;display:inline-block;padding:5px 13px;border-radius:4px;
  background:#eef3fb;color:#1a5fb4;border:1px solid #cfe0f5;font-size:12.5px;
  cursor:pointer;overflow:hidden;line-height:18px;}
.up-btn:hover{background:#e2ecfa;}
.up-btn input[type=file]{position:absolute;left:0;top:0;width:100%;height:100%;
  opacity:0;cursor:pointer;}
.up-msg{font-size:12px;color:#8a95a3;}
.up-msg.ok{color:#2e7d32;}
.up-msg.err{color:#c62828;}
.up-prev{height:46px;max-width:150px;object-fit:contain;border:1px solid #e2e6ec;
  border-radius:4px;background:#fafbfc;}

/* ===== 留言管理 / 排序 / SEO 新增样式 ===== */
.nav-badge{display:inline-block;min-width:18px;height:18px;line-height:18px;padding:0 5px;margin-left:6px;border-radius:9px;background:#e6212a;color:#fff;font-size:11px;font-weight:400;text-align:center;vertical-align:middle}

.adm-stats{display:flex;gap:14px;margin-bottom:16px}
.stat-card{flex:1;background:#fff;border:1px solid #e8ebf0;border-radius:8px;padding:16px 18px;display:flex;flex-direction:column;gap:4px}
.stat-card .stat-num{font-size:26px;font-weight:700;color:#1a2b4c;line-height:1.1}
.stat-card .stat-label{font-size:13px;color:#8a93a3}
.stat-card.hot{background:#fff5f5;border-color:#ffd9d9}
.stat-card.hot .stat-num{color:#e6212a}

.msg-table td{vertical-align:middle}
.msg-table tr.unread td{background:#fffbf0}
.msg-note{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#555}
.nowrap{white-space:nowrap}
.pill.hot{background:#e6212a;color:#fff}
.pill.warn{background:#fff3e0;color:#d97706;border:1px solid #ffd8a8}
.head-tip{font-size:12px;color:#8a93a3}

.t-sort{white-space:nowrap;text-align:center}
.t-sort .inline{display:inline-block}
.sort-num{display:inline-block;min-width:26px;text-align:center;font-size:12px;color:#8a93a3;font-weight:600}
.btn-move{border:1px solid #dfe3ea;background:#fff;color:#5b6472;border-radius:4px;width:20px;height:20px;line-height:1;font-size:10px;cursor:pointer;padding:0}
.btn-move:hover{border-color:#e6212a;color:#e6212a}

.seo-box{border:1px dashed #d6dbe4;border-radius:8px;padding:14px 16px;background:#fafbfd}
.seo-head{display:flex;align-items:center;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.seo-title{font-weight:700;color:#1a2b4c;font-size:14px}
.btn-seo{background:#1a2b4c;color:#fff;border:none;padding:7px 14px;border-radius:5px;cursor:pointer;font-size:13px}
.btn-seo:hover{background:#25395f}
.seo-box label{display:block;margin-bottom:12px}
.seo-box label:last-child{margin-bottom:0}
.mail-ck{display:flex;align-items:center;gap:8px;margin-top:26px}
.up-msg.ok{color:#15803d}
.up-msg.err{color:#e6212a}
