/* 后台管理样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif; background: #f0f3f8; color: #26304a; font-size: 14px; }
a { text-decoration: none; color: inherit; }

.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #14224a; color: #b9c6e8; flex-shrink: 0; display: flex; flex-direction: column; }
.side-brand { padding: 26px 22px; color: #fff; font-size: 17px; font-weight: 700; letter-spacing: 2px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar nav { display: flex; flex-direction: column; padding: 14px 0; flex: 1; }
.sidebar nav a { padding: 13px 24px; font-size: 14.5px; transition: all .2s; border-left: 3px solid transparent; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.on { background: rgba(30,111,255,.22); color: #fff; border-left-color: #3d8bff; }

.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { height: 56px; background: #fff; border-bottom: 1px solid #e3e8f2; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; font-size: 15px; font-weight: 600; }
.admin-topbar .who { font-size: 13px; color: #8a94ad; font-weight: 400; }
.admin-content { padding: 28px; flex: 1; }

.panel { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(20,34,74,.06); padding: 24px 28px; margin-bottom: 22px; }
.panel h2 { font-size: 16px; margin-bottom: 18px; padding-left: 10px; border-left: 4px solid #1e6fff; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card { background: #fff; border-radius: 12px; padding: 22px 24px; box-shadow: 0 2px 12px rgba(20,34,74,.06); }
.stat-card b { font-size: 30px; color: #1e6fff; font-family: Georgia, serif; }
.stat-card span { display: block; color: #8a94ad; margin-top: 4px; font-size: 13px; }

table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td { padding: 11px 12px; border-bottom: 1px solid #edf1f7; text-align: left; font-size: 13.5px; }
table.tbl th { background: #f7f9fc; color: #5b6680; font-weight: 600; white-space: nowrap; }
table.tbl td img { width: 58px; height: 44px; object-fit: cover; border-radius: 6px; background: #eef2f9; }
.op { white-space: nowrap; }
.op a { color: #1e6fff; margin-right: 10px; }
.op a.del { color: #d64545; }

.btn { display: inline-block; padding: 9px 22px; border-radius: 8px; border: 0; font-size: 14px; cursor: pointer; transition: all .2s; }
.btn-primary { background: #1e6fff; color: #fff; }
.btn-primary:hover { background: #0f5ce8; }
.btn-light { background: #eef2f9; color: #4a5775; }
.btn-danger { background: #fbeaea; color: #d64545; }
.add-bar { display: flex; justify-content: flex-end; margin-bottom: 16px; }

form .frm { max-width: 760px; }
.frm label { display: block; font-size: 13.5px; color: #5b6680; margin: 16px 0 6px; }
.frm input[type=text], .frm input[type=password], .frm select, .frm textarea { width: 100%; padding: 10px 12px; border: 1px solid #d8dfec; border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; transition: border .2s; }
.frm input:focus, .frm select:focus, .frm textarea:focus { border-color: #1e6fff; }
.frm textarea { min-height: 220px; resize: vertical; line-height: 1.8; }
.frm .hint { font-size: 12.5px; color: #9aa4bd; margin-top: 4px; }
.frm .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.frm .actions { margin-top: 24px; display: flex; gap: 12px; }
.preview-img { margin-top: 8px; max-width: 280px; max-height: 180px; border-radius: 8px; border: 1px solid #e3e8f2; object-fit: contain; background: #f7f9fc; }

.notice { padding: 12px 18px; border-radius: 8px; margin-bottom: 18px; font-size: 13.5px; }
.notice.ok { background: #e8f7ee; color: #1d8a4e; }
.notice.err { background: #fbeaea; color: #c03535; }

/* 登录页 */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #14224a, #1e4a9e); }
.login-box { width: 360px; background: #fff; border-radius: 16px; padding: 40px 36px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-logo { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 14px; background: linear-gradient(135deg, #1e6fff, #19c3b1); color: #fff; font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.login-box h1 { font-size: 17px; margin-bottom: 24px; color: #26304a; }
.login-box input { width: 100%; padding: 12px 14px; border: 1px solid #d8dfec; border-radius: 8px; font-size: 14px; margin-bottom: 14px; outline: none; }
.login-box input:focus { border-color: #1e6fff; }
.login-box button { width: 100%; padding: 12px; border: 0; border-radius: 8px; background: #1e6fff; color: #fff; font-size: 15px; cursor: pointer; }
.login-box button:hover { background: #0f5ce8; }
.login-box .back { display: inline-block; margin-top: 16px; font-size: 13px; color: #8a94ad; }
.login-err { background: #fbeaea; color: #c03535; padding: 9px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }

@media (max-width: 860px) {
  .sidebar { width: 64px; }
  .side-brand { font-size: 20px; padding: 20px 0; text-align: center; }
  .sidebar nav a { font-size: 17px; padding: 14px 0; text-align: center; border-left: 0; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-content { padding: 16px; }
  .frm .row2 { grid-template-columns: 1fr; }
}
