/* ============================================
   后台管理样式
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #f0f4f9; color: #333; font-size: 14px;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ---------- 登录页 ---------- */
.login-body { background: linear-gradient(135deg, #0B3D74 0%, #0B4C8C 60%, #1668B0 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { background: #fff; border-radius: 12px; width: 400px; padding: 40px 36px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.login-head { text-align: center; margin-bottom: 26px; }
.login-head h1 { font-size: 22px; color: #0B4C8C; }
.login-head p { color: #94a6ba; font-size: 13px; margin-top: 6px; }
.login-error { background: #fdecec; color: #c0392b; border: 1px solid #f5c6c6; border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: #55677c; margin-bottom: 6px; }
.form-item input { width: 100%; padding: 10px 12px; border: 1px solid #d4dfea; border-radius: 6px; font-size: 14px; outline: none; }
.form-item input:focus { border-color: #0B4C8C; box-shadow: 0 0 0 3px rgba(11,76,140,.12); }
.btn-submit { width: 100%; padding: 11px; background: #0B4C8C; color: #fff; border: none; border-radius: 6px; font-size: 15px; cursor: pointer; }
.btn-submit:hover { background: #0d5aa5; }
.login-tip { margin-top: 16px; text-align: center; font-size: 12px; color: #94a6ba; }
.login-back { margin-top: 10px; text-align: center; }
.login-back a { font-size: 13px; color: #0B4C8C; }

/* ---------- 后台框架 ---------- */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side { width: 220px; background: #0a2c52; color: #b7c9dc; flex: none; display: flex; flex-direction: column; }
.side-head { padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.side-head h2 { color: #fff; font-size: 17px; }
.side-head p { font-size: 12px; color: #7e96b0; margin-top: 4px; }
.side-nav { flex: 1; padding: 12px 0; }
.side-nav a { display: block; padding: 11px 20px; font-size: 14px; color: #b7c9dc; border-left: 3px solid transparent; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: #E8B13A; }
.side-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.side-foot a { color: #7e96b0; }
.side-foot a:hover { color: #E8B13A; }

.admin-main { flex: 1; padding: 24px; min-width: 0; }
.admin-topbar { background: #fff; border-radius: 10px; padding: 16px 20px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(11,60,116,.05); }
.admin-topbar h3 { color: #123a63; font-size: 18px; }
.admin-topbar .user { font-size: 13px; color: #55677c; }
.admin-topbar .user a { color: #0B4C8C; margin-left: 10px; }

.panel { background: #fff; border-radius: 10px; padding: 22px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(11,60,116,.05); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-head h4 { font-size: 16px; color: #123a63; }
.btn { display: inline-block; padding: 7px 16px; border-radius: 5px; font-size: 13px; border: none; cursor: pointer; }
.btn-primary { background: #0B4C8C; color: #fff; }
.btn-primary:hover { background: #0d5aa5; }
.btn-warn { background: #E8B13A; color: #1d2c3f; }
.btn-warn:hover { background: #f0c053; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-gray { background: #eef2f7; color: #55677c; }
.btn-gray:hover { background: #dfe7f0; }

/* ---------- 仪表盘 ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 10px; padding: 22px; box-shadow: 0 2px 8px rgba(11,60,116,.05); }
.stat-card .num { font-size: 34px; font-weight: 700; color: #0B4C8C; }
.stat-card .label { color: #94a6ba; font-size: 13px; margin-top: 6px; }
.recent-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #e8eef5; font-size: 14px; }
.recent-list .t { color: #2b3a4c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list .d { color: #94a6ba; font-size: 13px; flex: none; margin-left: 12px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { background: #f4f7fb; color: #55677c; font-weight: 600; text-align: left; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #e4ecf4; }
.table td { padding: 10px 12px; border-bottom: 1px solid #eef3f8; font-size: 13.5px; vertical-align: middle; }
.table tr:hover td { background: #fafcfe; }
.table .ops a { margin-right: 10px; color: #0B4C8C; font-size: 13px; }
.table .ops a.del { color: #e74c3c; }
.badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 3px; }
.badge-blue { background: #e8f1fb; color: #0B4C8C; }
.badge-green { background: #e9f7ef; color: #1e8449; }
.badge-gray { background: #eef2f7; color: #7d8fa3; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { display: block; font-size: 13px; color: #55677c; margin-bottom: 6px; }
.form-item label .req { color: #e74c3c; }
.form-item input[type=text], .form-item input[type=password], .form-item select, .form-item textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d4dfea; border-radius: 6px; font-size: 14px; outline: none; font-family: inherit;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: #0B4C8C; box-shadow: 0 0 0 3px rgba(11,76,140,.1); }
.form-item textarea { resize: vertical; min-height: 120px; line-height: 1.8; }
.form-item .hint { font-size: 12px; color: #94a6ba; margin-top: 5px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-bar input, .search-bar select { padding: 8px 12px; border: 1px solid #d4dfea; border-radius: 6px; font-size: 13px; outline: none; }
.search-bar input:focus, .search-bar select:focus { border-color: #0B4C8C; }

@media (max-width: 900px) {
  .admin-side { display: none; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}
