/* ============ 后台管理端样式 ============ */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFeng SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6f9; color: #22272e; font-size: 14px;
}
a { color: #2f6fed; text-decoration: none; }

/* 顶部导航 */
.topbar { background: #1d2733; color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; height: 52px; }
.brand { font-weight: 700; font-size: 16px; }
.topbar nav a { color: #aeb7c4; padding: 6px 12px; border-radius: 6px; font-size: 14px; }
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.topbar nav a.active { color: #fff; background: #2f6fed; }

/* 布局 */
.container { max-width: 1280px; margin: 20px auto; padding: 0 16px; }
.container.narrow { max-width: 640px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.page-head h2 { font-size: 20px; }
.page-head h2 small { color: #8a919f; font-size: 13px; font-weight: 400; margin-left: 8px; }
.head-actions { display: flex; gap: 10px; align-items: center; }

/* 按钮 */
.btn { display: inline-block; padding: 8px 16px; border: 1px solid #d0d5dd; border-radius: 6px;
  background: #fff; color: #333; cursor: pointer; font-size: 14px; text-align: center; }
.btn:hover { border-color: #2f6fed; color: #2f6fed; }
.btn-primary { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.btn-primary:hover { background: #245cd4; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; }
.form-item .req { color: #e5484d; font-style: normal; }
.form-item input[type=text], .form-item input[type=password], .form-item input[type=number], .form-item input[type=date], .form-item input[type=file],
.form-item select, .form-item textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 14px;
  font-family: inherit; background: #fff;
}
.form-item input:focus, .form-item textarea:focus { outline: none; border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; font-size: 14px; cursor: pointer; }

/* 表格 */
.table-wrap { background: #fff; border-radius: 10px; overflow-x: auto; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.table { width: 100%; border-collapse: collapse; min-width: 900px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid #eef0f4; font-size: 13px; }
.table th { background: #f8f9fb; color: #5a6472; font-weight: 600; white-space: nowrap; }
.table tr:hover td { background: #f8faff; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .ops a { margin-right: 10px; }
.table .ops a.del-link { color: #e5484d; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #eef2ff; color: #2f6fed; font-size: 12px; }

/* 分页 */
.pagination { margin: 16px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pagination a, .pagination .pg-cur { display: inline-block; padding: 6px 12px; border-radius: 6px; font-size: 13px; background: #fff; border: 1px solid #e2e6ec; }
.pagination .pg-cur { background: #2f6fed; color: #fff; border-color: #2f6fed; }
.pg-info { color: #8a919f; margin-right: 10px; }

/* 卡片 / 提示 */
.card { background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.card h3 { font-size: 15px; margin-bottom: 10px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-ok { background: #e8f7ee; color: #1a7f37; }
.alert-err { background: #fdeaea; color: #c0353a; }
.empty { text-align: center; padding: 60px 20px; color: #9aa1ac; background: #fff; border-radius: 10px; }
.muted { color: #8a919f; }
.small { font-size: 12px; }
.tips { padding-left: 18px; color: #555; line-height: 2; }

/* 搜索 */
.search-form { display: flex; gap: 8px; align-items: center; }
.search-form input { padding: 8px 12px; border: 1px solid #d0d5dd; border-radius: 6px; width: 260px; font-size: 14px; }
.search-form input:focus { outline: none; border-color: #2f6fed; }

/* 二维码页面 */
.qr-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; flex-wrap: wrap; gap: 10px; }
.qr-preview { width: 46px; height: 46px; border: 1px solid #eef0f4; border-radius: 4px; }

/* 登录页 */
.login-body { background: linear-gradient(135deg, #1d2733, #2f6fed); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { background: #fff; border-radius: 14px; padding: 36px 32px; width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-box h1 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.login-sub { text-align: center; color: #8a919f; font-size: 13px; margin-bottom: 24px; }
