/* ============================================================
 * 管理后台样式（红金主题美化版）
 * ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body.admin-layout {
  background: #f3f5f9;
  color: #2c2c2c;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  padding-left: 200px;
  min-height: 100vh;
  margin: 0;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  transition: padding-left .28s ease;
}
body.admin-layout.side-collapsed {
  padding-left: 52px;
}

body.admin-login {
  background: linear-gradient(135deg, #2c2316 0%, #4a3318 50%, #5c3a1c 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #fff;
}

.admin-login .login-wrap {
  width: 420px;
  background: #fff;
  color: #222;
  padding: 36px 32px 28px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.05);
}
.admin-login .login-wrap h2 {
  color: #c92b1b;
  text-align: center;
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
}
.admin-login .form-row { margin-bottom: 16px; }
.admin-login .muted { color: #8a7144; font-size: 12px; margin-top: 14px; text-align: center; }

/* --------- 侧边栏 --------- */
.admin-side {
  background: linear-gradient(180deg, #3a2a17 0%, #2c2316 100%);
  color: #e8dcb8;
  padding: 18px 0 20px;
  box-shadow: 2px 0 12px rgba(0,0,0,.15);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .28s ease;
  width: 200px;
  z-index: 20;
}
.admin-side .logo {
  padding: 6px 18px 18px;
  font-size: 16px;
  font-weight: 700;
  color: #f3d47c;
  border-bottom: 1px solid rgba(243,212,124,.15);
  margin-bottom: 12px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #f3d47c, #e8b94a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
}
.admin-side .logo .logo-text { transition: opacity .2s ease; }
.admin-side .side-menu { display: flex; flex-direction: column; list-style: none; padding: 0; margin: 0; }
.admin-side .side-menu > li { list-style: none; }
.admin-side .side-menu > li > a {
  display: flex;
  align-items: center;
  padding: 11px 18px;
  color: #c7b68d;
  text-decoration: none;
  font-size: 15.6px;
  border-left: 3px solid transparent;
}
.admin-side .side-menu > li > a:link,
.admin-side .side-menu > li > a:visited {
  color: #c7b68d;
  text-decoration: none;
}
.admin-side .side-menu > li > a .menu-text { }
.admin-side .side-menu > li > a:hover {
  color: #fff;
  background: rgba(243,212,124,.08);
  border-left-color: #f3d47c;
}
.admin-side .side-menu > li.sep { height: 12px; }

/* 二级菜单（可折叠） */
.admin-side .side-menu .menu-group { margin: 0; }
.admin-side .side-menu .menu-group-header {
  display: flex;
  align-items: center;
  padding: 11px 18px;
  color: #f3d47c;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-left: 3px solid transparent;
  user-select: none;
}
.admin-side .side-menu .menu-group-header:hover {
  color: #fff;
  background: rgba(243,212,124,.08);
  border-left-color: #f3d47c;
}
.admin-side .side-menu .menu-group-header .menu-icon { margin-right: 8px; font-size: 16px; }
.admin-side .side-menu .menu-group-header .menu-text { flex: 1; }
.admin-side .side-menu .menu-group-header .menu-arrow {
  font-size: 12px;
  opacity: .7;
}
.admin-side .side-menu .menu-group.open > .menu-group-header .menu-arrow {
  transform: rotate(180deg);
}
.admin-side .side-menu .submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  background: rgba(0,0,0,.15);
}
.admin-side .side-menu .menu-group.open > .submenu {
  max-height: 500px;
}
.admin-side .side-menu .submenu li { list-style: none; }
.admin-side .side-menu .submenu > li > a {
  display: flex;
  align-items: center;
  padding: 9px 18px 9px 42px;
  font-size: 13.5px;
  color: #b8a574;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.admin-side .side-menu .submenu > li > a:link,
.admin-side .side-menu .submenu > li > a:visited {
  color: #b8a574;
  text-decoration: none;
}
.admin-side .side-menu .submenu > li > a:hover {
  color: #fff;
  background: rgba(243,212,124,.08);
  border-left-color: #f3d47c;
}
.admin-side .side-menu .submenu li .menu-icon { margin-right: 6px; font-size: 13px; }

/* 折叠状态下隐藏二级菜单 */
body.side-collapsed .admin-side .menu-group-header .menu-text,
body.side-collapsed .admin-side .menu-group-header .menu-arrow { display: none; }
body.side-collapsed .admin-side .submenu { display: none; }
body.side-collapsed .admin-side .menu-group-header {
  padding: 11px 0;
  justify-content: center;
}

/* 折叠按钮 */
.admin-side .side-toggle {
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f3d47c, #d4a017);
  border: 2px solid #fff;
  color: #3a2a17;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: transform .28s ease, background .2s;
  z-index: 5;
  padding: 0;
}
.admin-side .side-toggle:hover {
  background: linear-gradient(135deg, #e8b94a, #b8860b);
}

/* 折叠状态 */
body.side-collapsed .admin-side { width: 52px; }
body.side-collapsed .admin-side .logo-text,
body.side-collapsed .admin-side .menu-text,
body.side-collapsed .admin-side .sep {
  opacity: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}
body.side-collapsed .admin-side .logo {
  padding: 6px 8px 18px;
  font-size: 14px;
  text-align: center;
}
body.side-collapsed .admin-side .side-menu > li > a {
  padding: 11px 0;
  justify-content: center;
  font-size: 18px;
}
body.side-collapsed .admin-side .side-toggle {
  transform: translateY(-50%) rotate(180deg);
}

/* --------- 顶部栏 --------- */
.admin-body { display: flex; flex-direction: column; min-width: 0; }
.admin-top {
  background: #fff;
  padding: 14px 24px;
  border-bottom: 1px solid #ececec;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-top .muted { color: #999; margin-left: 6px; font-size: 13px; }
.admin-top .top-info { display: flex; align-items: center; gap: 12px; }
.admin-top .top-link {
  color: #666;
  text-decoration: none;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 4px;
  transition: all .15s;
}
.admin-top .top-link:hover {
  color: #c92b1b;
  background: rgba(201,43,27,.06);
}
.admin-top .top-link.logout:hover {
  color: #fff;
  background: #c92b1b;
}
.admin-main { padding: 22px; flex: 1; }

/* --------- 统计卡片 --------- */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: #fff;
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid #ececec;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: all .2s ease;
}
.stat-card:hover {
  box-shadow: 0 6px 18px rgba(201,43,27,.08);
  transform: translateY(-2px);
  border-color: rgba(201,43,27,.2);
}
.stat-card .k { color: #888; font-size: 12px; }
.stat-card .v { font-size: 26px; font-weight: 700; color: #2c2c2c; margin-top: 6px; letter-spacing: -.5px; }
.stat-card .v.ok { color: #2f8545; }
.stat-card .v.warn { color: #c97a1b; }
.stat-card .v.danger { color: #c92b1b; }

/* --------- 面板 --------- */
.panel {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
/* 表格滚动容器（PC和移动端通用） */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.panel-head {
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #2c2c2c;
}
.panel-head .muted { color: #999; font-weight: 400; font-size: 13px; }
.panel-head .inline { display: flex; align-items: center; gap: 8px; }
.panel-head .inline input, .panel-head .inline select {
  padding: 7px 11px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  transition: border-color .18s;
}
.panel-head .inline input:focus, .panel-head .inline select:focus {
  border-color: #c92b1b;
  outline: none;
}

/* --------- 按钮 --------- */
.btn {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s ease;
  line-height: 1.4;
}
.btn:hover {
  border-color: #c92b1b;
  color: #c92b1b;
  box-shadow: 0 2px 6px rgba(201,43,27,.12);
}
.btn-primary {
  background: linear-gradient(135deg, #d33524 0%, #c92b1b 100%);
  color: #fff;
  border-color: #c92b1b;
  box-shadow: 0 2px 6px rgba(201,43,27,.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #b02516 0%, #a01f10 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(201,43,27,.35);
}
.btn-success {
  background: linear-gradient(135deg, #34a358 0%, #2f8545 100%);
  color: #fff;
  border-color: #2f8545;
}
.btn-success:hover {
  background: linear-gradient(135deg, #288a3a 0%, #247439 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(47,133,69,.3);
}
.btn-warn {
  background: linear-gradient(135deg, #e89517 0%, #c97a1b 100%);
  color: #fff;
  border-color: #c97a1b;
}
.btn-warn:hover { background: #b06912; color: #fff; }
.btn-danger {
  background: linear-gradient(135deg, #d33524 0%, #a01f10 100%);
  color: #fff;
  border-color: #a01f10;
}
.btn-danger:hover { background: #82180c; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 22px; font-size: 15px; }
.btn.full { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* --------- 表单 --------- */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 500; }
.form-row.grid-2, .form-row.grid-3, .form-row.grid-4 { display: grid; gap: 14px; }
.form-row.grid-2 { grid-template-columns: 1fr 1fr; }
.form-row.grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.grid-4 { grid-template-columns: repeat(4, 1fr); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  outline: none;
  transition: all .18s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: #c92b1b;
  box-shadow: 0 0 0 3px rgba(201,43,27,.1);
}
.form-row textarea { resize: vertical; min-height: 80px; }
.form.wide { max-width: 900px; }
.form-row .chk { display: flex; align-items: center; gap: 6px; }
.chk input { width: auto; }

/* --------- 表格 --------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 11px 14px; border-bottom: 1px solid #f0f0f0; text-align: left; vertical-align: top; }
.tbl th {
  background: #fafafa;
  color: #555;
  font-weight: 600;
  border-bottom: 2px solid #ececec;
  font-size: 12.5px;
  letter-spacing: .3px;
}
.tbl tr { transition: background .15s; }
.tbl tr:hover td { background: #fffbf5; }
.tbl .muted { color: #999; }
.tbl .ok { color: #2f8545; }
.tbl .warn { color: #c97a1b; }
.tbl .danger { color: #c92b1b; }
.tbl .small { font-size: 12.5px; color: #555; }

/* --------- 徽章 --------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  background: #ffe7e7;
  color: #c92b1b;
  font-size: 12px;
  margin-right: 4px;
  font-weight: 500;
}
.badge.top { background: #2c2316; color: #f3d47c; }
.badge.gift { background: #fff4d6; color: #8a5e10; }
.badge.ok { background: #e6f7ed; color: #2f8545; }
.badge.warn { background: #fff4e6; color: #c97a1b; }

/* --------- 图表 --------- */
.chart-bar { display: flex; align-items: flex-end; gap: 14px; height: 240px; padding: 14px 6px; border-top: 1px dashed #eee; }
.chart-bar .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar .bar { width: 100%; background: linear-gradient(180deg, #e23f2e, #c92b1b); border-radius: 4px 4px 0 0; transition: opacity .2s; }
.chart-bar .col:hover .bar { opacity: .85; }
.chart-bar .num { font-size: 12px; color: #555; font-weight: 600; }
.chart-bar .lbl { font-size: 12px; color: #888; }

/* --------- 分页 --------- */
.pager { padding: 14px 4px; color: #666; font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pager ul.pagination, .pager ul.pagination li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.pager ul.pagination { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager ul.pagination li { display: inline-block; }
.pager a, .pager span, .pager ul.pagination .page-link {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #e0d2b0;
  border-radius: 6px;
  background: #fff;
  color: #555;
  text-decoration: none;
  transition: all .15s;
  line-height: 1.4;
}
.pager a:hover, .pager ul.pagination .page-link:hover { border-color: #c92b1b; color: #c92b1b; box-shadow: 0 1px 4px rgba(201,43,27,.12); }
.pager .current, .pager ul.pagination li.active span, .pager ul.pagination .active .page-link { background: linear-gradient(135deg, #d33524, #c92b1b); color: #fff; border-color: #c92b1b; font-weight: 600; }
.pager .disabled, .pager ul.pagination li.disabled span, .pager ul.pagination .disabled .page-link { background: #f5f5f5; color: #bbb; cursor: not-allowed; }
.pager ul.pagination .page-item.active .page-link { background: linear-gradient(135deg, #d33524, #c92b1b); color: #fff; border-color: #c92b1b; font-weight: 600; }
.pager ul.pagination .page-item.disabled .page-link { background: #f5f5f5; color: #bbb; cursor: not-allowed; }

/* --------- 信息列表 --------- */
.info-list li { display: flex; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; font-size: 13px; }
.info-list li span { width: 120px; color: #777; }

/* --------- Toast 提示 --------- */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  background: rgba(0,0,0,.82);
  color: #fff;
  border-radius: 8px;
  z-index: 12000;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: toastSlide .3s ease;
}
@keyframes toastSlide {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast.ok { background: linear-gradient(135deg, #34a358, #2f8545); }
.toast.err { background: linear-gradient(135deg, #d33524, #c92b1b); }
.toast.warn { background: linear-gradient(135deg, #e89517, #c97a1b); }

/* --------- 广告格式卡片 --------- */
.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.format-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .22s ease;
}
.format-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
  border-color: rgba(201,43,27,.2);
}
.format-card-head {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}
.format-card-head .title { font-size: 15px; font-weight: 600; color: #333; }
.format-card-head .type-tag { font-size: 12px; padding: 3px 10px; border-radius: 4px; font-weight: 500; }
.format-card-head .type-1 { background: #e7f4ff; color: #2173c5; }
.format-card-head .type-2 { background: #fff4d6; color: #8a5e10; }
.format-card-head .type-3 { background: #f0e7ff; color: #6b3cc5; }
.format-card-body {
  flex: 1;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.8;
  color: #444;
  white-space: pre-wrap;
  word-break: break-all;
  background: #fcfcfc;
}
.format-card-foot {
  padding: 10px 16px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #fff;
}
.format-card-foot .btn { padding: 5px 12px; font-size: 12px; }
.format-card-foot .copy-btn { background: linear-gradient(135deg, #d33524, #c92b1b); color: #fff; border-color: #c92b1b; }
.format-card-foot .copy-btn:hover { background: #b02516; color: #fff; }
.format-card-foot .del-btn { color: #999; }
.format-card-foot .del-btn:hover { color: #c92b1b; }
.format-card-foot .edit-btn { color: #555; }
.format-card-foot .edit-btn:hover { color: #c92b1b; }

/* --------- 弹窗 --------- */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFade .2s ease;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: modalScale .25s ease;
}
@keyframes modalScale {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-head {
  padding: 16px 22px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(135deg, #fafafa, #f5f5f5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #2c2c2c;
}
.modal-head .modal-close {
  cursor: pointer;
  color: #999;
  font-size: 22px;
  line-height: 1;
  transition: color .15s;
  padding: 0 4px;
}
.modal-head .modal-close:hover { color: #c92b1b; }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fafafa;
}
.modal-box .form-row select, .modal-box .form-row input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
}

/* --------- 自定义弹窗（alert/confirm/prompt） --------- */
.modal-alert, .modal-confirm, .modal-prompt {
  z-index: 11000 !important;
}
.modal-alert .modal-box, .modal-confirm .modal-box, .modal-prompt .modal-box { min-width: 360px; max-width: 460px; }
.modal-alert .modal-body, .modal-confirm .modal-body {
  padding: 24px 22px;
  font-size: 14px;
  color: #333;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: center;
}
.modal-alert .modal-icon, .modal-confirm .modal-icon {
  display: inline-block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin-bottom: 14px;
  font-size: 28px;
  line-height: 52px;
  text-align: center;
}
.modal-alert .modal-icon.info, .modal-confirm .modal-icon.info { background: #e7f4ff; color: #2173c5; }
.modal-alert .modal-icon.success, .modal-confirm .modal-icon.success { background: #e6f7ed; color: #2f8545; }
.modal-alert .modal-icon.warning, .modal-confirm .modal-icon.warning { background: #fff4e6; color: #c97a1b; }
.modal-alert .modal-icon.error, .modal-confirm .modal-icon.error { background: #ffe7e7; color: #c92b1b; }
.modal-alert .modal-icon.question, .modal-confirm .modal-icon.question { background: #f0e7ff; color: #6b3cc5; }

/* --------- 可点击徽章 --------- */
.vip-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .15s;
}
.vip-badge:hover { opacity: .85; border-color: rgba(0,0,0,.15); }
.coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #c97a1b;
  background: #fff7e6;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid #ffe7c0;
  transition: all .15s;
}
.coin-badge:hover { background: #fff0d0; border-color: #ffc97a; }
.coin-badge .coin-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f3d47c, #d4a017);
  border: 1px solid #b8860b;
  color: #8a5e10;
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  margin-right: 2px;
  position: relative;
  vertical-align: middle;
}
.coin-badge .coin-icon::after {
  content: '¥';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  line-height: 1;
}

/* --------- 复选框 --------- */
input[type="checkbox"] {
  cursor: pointer;
  accent-color: #c92b1b;
  width: 15px;
  height: 15px;
  vertical-align: middle;
}

/* --------- 链接 --------- */
a { color: #c92b1b; text-decoration: none; transition: color .15s; }
a:hover { color: #b02516; text-decoration: underline; }

/* --------- 滚动条 --------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* ============================================================
 * 移动端响应式适配
 * ============================================================ */

/* 平板（≤1024px）：侧边栏可折叠，统计卡片3列 */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .format-grid { grid-template-columns: 1fr !important; }
  .form-row.grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* 手机（≤768px）：单列布局，侧边栏抽屉式 */
@media (max-width: 768px) {
  body.admin-layout {
    padding-left: 0 !important;
  }
  body.admin-layout.side-collapsed {
    padding-left: 0 !important;
  }

  /* 侧边栏改为抽屉式：默认隐藏在左侧 */
  .admin-side {
    width: 240px !important;
    transform: translateX(-100%);
    transition: transform .28s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,.3);
    z-index: 1000;
  }
  body.admin-layout.side-open .admin-side {
    transform: translateX(0) !important;
  }
  body.side-collapsed .admin-side {
    width: 240px !important;
  }
  body.side-collapsed .admin-side .logo-text,
  body.side-collapsed .admin-side .menu-text {
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
  }
  body.side-collapsed .admin-side .logo {
    padding: 6px 18px 18px;
    font-size: 16px;
    text-align: left;
  }
  body.side-collapsed .admin-side .side-menu li a {
    padding: 11px 18px;
    justify-content: flex-start;
    font-size: 15.6px;
  }
  .admin-side .side-toggle { display: none; }

  /* 遮罩层 */
  .side-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
  }
  body.admin-layout.side-open .side-overlay { display: block; }

  /* 顶部栏增加汉堡菜单按钮 */
  .admin-top {
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .admin-top .menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 20px;
    color: #555;
    margin-right: 12px;
  }
  .admin-top .top-info { flex: 1; }
  .admin-top .muted { font-size: 12px; }

  /* 主内容区缩小内边距 */
  .admin-main { padding: 12px 10px; }

  /* 统计卡片改为2列 */
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; margin-bottom: 14px !important; }
  .stat-card { padding: 12px 14px; }
  .stat-card .v { font-size: 20px; }
  .stat-card .k { font-size: 11px; }

  /* 面板内边距缩小 */
  .panel { padding: 12px 14px; margin-bottom: 12px; }
  .panel-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-size: 15px;
  }
  .panel-head .inline {
    flex-wrap: wrap;
    gap: 6px;
  }
  .panel-head .inline input,
  .panel-head .inline select {
    padding: 6px 8px;
    font-size: 12px;
    flex: 1;
    min-width: 100px;
  }
  .panel-head .inline .btn { padding: 6px 12px; font-size: 12px; }

  /* 表单网格改为单列 */
  .form-row.grid-2, .form-row.grid-3, .form-row.grid-4 {
    grid-template-columns: 1fr !important;
  }

  /* 表格水平滚动：仅表格滚动，不影响panel-head和筛选表单 */
  .tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 12px; }
  .tbl th, .tbl td { padding: 8px 6px; }
  /* 关键列防止换行 */
  .tbl th, .tbl td .nowrap, .tbl td.code { white-space: nowrap; }
  .tbl td .small, .tbl td.muted { white-space: normal; }

  /* 弹窗全屏 */
  .modal-box {
    max-width: 96vw !important;
    max-height: 90vh !important;
    border-radius: 8px;
  }
  .modal-alert .modal-box, .modal-confirm .modal-box, .modal-prompt .modal-box {
    min-width: auto !important;
    width: 92vw !important;
  }
  .modal-body { padding: 16px 14px; }
  .modal-foot { padding: 10px 14px; }

  /* 格式卡片单列 */
  .format-grid { grid-template-columns: 1fr !important; }

  /* 分页紧凑 */
  .pager { gap: 4px; }
  .pager a, .pager span, .pager ul.pagination .page-link {
    padding: 5px 8px;
    font-size: 12px;
  }

  /* VIP卡片和金币弹窗紧凑 */
  .modal-box .form-row select, .modal-box .form-row input {
    font-size: 14px;
    padding: 10px 12px;
  }

  /* 图表紧凑 */
  .chart-bar { height: 160px; gap: 8px; padding: 8px 2px; }
}
