/* ================= 后台通用样式（手机/平板/电脑自适应） ================= */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
:root{
  --pri:#4f6ef7; --pri-d:#3d5ae0; --pri-l:#eef2ff;
  --ok:#16b374; --err:#f05252; --warn:#f5a524; --info:#3b7bff;
  --ink:#1f2740; --muted:#8a93a8; --line:#edf0f6; --bg:#f4f6fb;
  --sidebar:#1f2740; --side2:#283255;
}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;
  background:var(--bg); color:var(--ink); font-size:14px; line-height:1.6;
}
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }

/* ---------- 登录页 ---------- */
.login-bg{ min-height:100vh; background:linear-gradient(135deg,#4f6ef7 0%,#6d5df6 55%,#8b5cf6 100%);
  display:flex; align-items:center; justify-content:center; padding:20px; }
.login-card{ width:100%; max-width:410px; background:#fff; border-radius:22px; padding:38px 32px 30px;
  box-shadow:0 24px 70px rgba(31,39,64,.3); }
.login-logo{ text-align:center; margin-bottom:22px; }
.login-logo .lg-ico{ width:64px; height:64px; border-radius:18px; margin:0 auto 12px;
  background:linear-gradient(135deg,#4f6ef7,#8b5cf6); display:flex;align-items:center;justify-content:center;
  font-size:30px; box-shadow:0 12px 26px rgba(79,110,247,.4); }
.login-logo h1{ font-size:20px; }
.login-logo p{ font-size:12.5px; color:var(--muted); margin-top:5px; }
.lg-tabs{ display:flex; background:#f3f5f9; border-radius:12px; padding:4px; margin-bottom:22px; }
.lg-tabs a{ flex:1; text-align:center; padding:9px 0; border-radius:9px; font-size:14px; color:var(--muted); font-weight:600; }
.lg-tabs a.on{ background:#fff; color:var(--pri); box-shadow:0 3px 10px rgba(20,30,60,.08); }

/* ---------- 表单元素 ---------- */
.f-item{ margin-bottom:16px; }
.f-item label{ display:block; font-size:13px; font-weight:600; margin-bottom:7px; }
.f-item label .req{ color:var(--err); }
.f-item label .hint{ color:var(--muted); font-weight:400; font-size:12px; }
.inp{ width:100%; height:44px; padding:0 13px; border:1.5px solid var(--line); border-radius:10px;
  font-size:14px; background:#fafbfe; color:var(--ink); transition:.18s; font-family:inherit; }
.inp:focus{ outline:none; border-color:var(--pri); background:#fff; box-shadow:0 0 0 3px rgba(79,110,247,.12); }
select.inp{ appearance:none; background-image:linear-gradient(45deg,transparent 50%,#8a93a8 50%),linear-gradient(135deg,#8a93a8 50%,transparent 50%);
  background-position:calc(100% - 18px) 18px,calc(100% - 13px) 18px; background-size:5px 5px; background-repeat:no-repeat; padding-right:34px; }
textarea.inp{ height:auto; padding:11px 13px; resize:vertical; min-height:88px; }
.inp-row{ display:flex; gap:9px; }
.inp-row .inp{ flex:1; }
.inp-sms{ flex:1; }
.btn-sms{ white-space:nowrap; height:44px; padding:0 15px; border:1.5px solid var(--pri); background:#fff;
  color:var(--pri); border-radius:10px; font-size:13px; font-weight:600; cursor:pointer; }
.btn-sms:disabled{ border-color:#c8cee0; color:#aab1c4; cursor:not-allowed; }
.captcha-img{ height:44px; width:120px; border-radius:10px; cursor:pointer; border:1.5px solid var(--line); }

.btn{ display:inline-flex; align-items:center; justify-content:center; gap:5px; height:40px; padding:0 18px;
  border:none; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; transition:.18s; white-space:nowrap; }
.btn:active{ transform:scale(.97); }
.btn-pri{ background:linear-gradient(135deg,var(--pri),#6d5df6); color:#fff; box-shadow:0 8px 18px rgba(79,110,247,.3); }
.btn-pri:hover{ box-shadow:0 10px 24px rgba(79,110,247,.42); }
.btn-ok{ background:var(--ok); color:#fff; }
.btn-err{ background:var(--err); color:#fff; }
.btn-warn{ background:var(--warn); color:#fff; }
.btn-ghost{ background:#f1f3f9; color:var(--ink); }
.btn-line{ background:#fff; border:1.5px solid var(--line); color:#5d6678; }
.btn-sm{ height:32px; padding:0 12px; font-size:12.5px; border-radius:8px; }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:.55; cursor:not-allowed; }

/* 提示条 */
.alert{ padding:11px 15px; border-radius:11px; font-size:13.5px; margin-bottom:16px; display:flex; gap:8px; align-items:center; }
.alert.success{ background:#e7f9f1; color:#0c8f5c; border:1px solid #bdeedd }
.alert.error{ background:#fdecec; color:#d93636; border:1px solid #f8c9c9 }
.alert.info{ background:#eef2ff; color:var(--pri); border:1px solid #cfd9ff }
.alert a{ text-decoration:underline; }

/* ---------- 后台框架 ---------- */
.layout{ min-height:100vh; display:flex; }
.sidebar{ width:232px; background:var(--sidebar); color:#c6cde3; position:fixed; left:0; top:0; bottom:0;
  display:flex; flex-direction:column; z-index:100; transition:transform .28s ease; overflow-y:auto; }
.sb-brand{ display:flex; align-items:center; gap:10px; padding:19px 18px; color:#fff; border-bottom:1px solid rgba(255,255,255,.07); }
.sb-brand .ico{ width:38px; height:38px; border-radius:11px; background:linear-gradient(135deg,#4f6ef7,#8b5cf6);
  display:flex;align-items:center;justify-content:center;font-size:19px; flex:0 0 38px; }
.sb-brand b{ font-size:15.5px; display:block; line-height:1.3; }
.sb-brand small{ font-size:11px; color:#8b95b8; }
.sb-group{ padding:14px 12px 6px; }
.sb-group .g-t{ font-size:11px; color:#6b7599; padding:0 12px 7px; letter-spacing:1px; }
.sb-group a{ display:flex; align-items:center; gap:10px; padding:10.5px 13px; border-radius:10px; font-size:13.5px;
  color:#c6cde3; margin-bottom:2px; transition:.15s; }
.sb-group a .ic{ width:18px; text-align:center; font-size:15px; }
.sb-group a:hover{ background:rgba(255,255,255,.07); color:#fff; }
.sb-group a.on{ background:linear-gradient(135deg,#4f6ef7,#6d5df6); color:#fff; box-shadow:0 6px 16px rgba(79,110,247,.35); font-weight:600; }
.sb-foot{ margin-top:auto; padding:14px 18px; font-size:11.5px; color:#6b7599; border-top:1px solid rgba(255,255,255,.07); line-height:1.8; }

.main{ flex:1; margin-left:232px; min-width:0; display:flex; flex-direction:column; }
.topbar{ height:60px; background:#fff; display:flex; align-items:center; padding:0 22px; gap:14px;
  box-shadow:0 2px 12px rgba(20,30,60,.05); position:sticky; top:0; z-index:50; }
.tb-menu{ display:none; font-size:22px; cursor:pointer; width:38px; height:38px; align-items:center; justify-content:center; }
.tb-title{ font-size:17px; font-weight:700; }
.tb-right{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.tb-user{ display:flex; align-items:center; gap:9px; font-size:13.5px; }
.tb-user .ava{ width:36px; height:36px; border-radius:10px; color:#fff; display:flex;align-items:center;justify-content:center;
  font-size:15px; font-weight:700; background:linear-gradient(135deg,#4f6ef7,#8b5cf6); }
.tb-user .u-meta{ line-height:1.25; }
.tb-user .u-meta small{ display:block; color:var(--muted); font-size:11px; }
.tb-logout{ font-size:12.5px; color:var(--muted); border:1px solid var(--line); padding:6px 13px; border-radius:999px; }
.tb-logout:hover{ color:var(--err); border-color:#f8c9c9; }

.content{ padding:22px; flex:1; }

/* 小徽章/状态 */
.badge{ display:inline-flex; align-items:center; gap:4px; padding:2.5px 10px; border-radius:999px; font-size:12px; font-weight:600; }
.badge.ok{ background:#e7f9f1; color:#0c8f5c; }
.badge.no{ background:#fdecec; color:#d93636; }
.badge.warn{ background:#fff5e6; color:#c2790b; }
.badge.info{ background:#eef2ff; color:var(--pri); }
.badge.gray{ background:#f1f3f9; color:#7a8299; }

/* 卡片/统计 */
.card{ background:#fff; border-radius:15px; padding:20px; box-shadow:0 4px 16px rgba(20,30,60,.05); margin-bottom:18px; }
.card-hd{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; gap:10px; flex-wrap:wrap; }
.card-hd h3{ font-size:16px; display:flex; align-items:center; gap:8px; }
.card-hd h3::before{ content:""; width:4px; height:16px; border-radius:2px; background:linear-gradient(var(--pri),#8b5cf6); }
.card-hd .hd-extra{ display:flex; gap:9px; align-items:center; flex-wrap:wrap; }

.stat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:15px; margin-bottom:18px; }
.stat{ background:#fff; border-radius:15px; padding:19px 18px; box-shadow:0 4px 16px rgba(20,30,60,.05); position:relative; overflow:hidden; }
.stat .s-ico{ width:44px; height:44px; border-radius:13px; display:flex;align-items:center;justify-content:center;
  font-size:21px; margin-bottom:12px; }
.si-1{ background:#eef2ff; } .si-2{ background:#e7f9f1; } .si-3{ background:#fff5e6; } .si-4{ background:#fdeef4; }
.stat .s-num{ font-size:26px; font-weight:800; letter-spacing:-.5px; }
.stat .s-lb{ font-size:12.5px; color:var(--muted); margin-top:2px; }

/* 搜索筛选条 */
.filter-bar{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.filter-bar .inp{ width:auto; height:38px; min-width:150px; }
.filter-bar .btn{ height:38px; }
.filter-bar form{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

/* 表格 */
.table-wrap{ background:#fff; border-radius:15px; box-shadow:0 4px 16px rgba(20,30,60,.05); overflow:hidden; margin-bottom:18px; }
.table-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
table.tb{ width:100%; border-collapse:collapse; font-size:13.5px; min-width:680px; }
.tb th,.tb td{ padding:13px 15px; text-align:left; border-bottom:1px solid var(--line); white-space:nowrap; }
.tb th{ background:#fafbfe; color:#6b7596; font-weight:600; font-size:12.5px; }
.tb tbody tr:last-child td{ border-bottom:none; }
.tb tbody tr:active{ background:#fafbff; }
.tb .td-main{ white-space:normal; min-width:180px; }
.tb .ops{ display:flex; gap:7px; }
.tb .muted{ color:var(--muted); font-size:12.5px; }
.tb b.pri{ color:var(--err); font-size:15px; }
.avatar-sm{ width:32px; height:32px; border-radius:9px; background:linear-gradient(135deg,#4f6ef7,#8b5cf6); color:#fff;
  display:inline-flex; align-items:center; justify-content:center; font-weight:700; vertical-align:middle; margin-right:8px; }
.shop-cell{ display:flex; align-items:center; }
.shop-cell .sc-info{ line-height:1.3; }
.shop-cell .sc-info small{ color:var(--muted); font-size:11.5px; }

.pager{ padding:16px; text-align:center; }
.pager ul{ display:inline-flex; gap:6px; list-style:none; flex-wrap:wrap; justify-content:center; padding:0; }
.pager li a,.pager li span{ display:inline-flex; min-width:34px; height:34px; padding:0 10px; align-items:center; justify-content:center;
  background:#f6f8fc; border-radius:9px; font-size:13px; color:#5d6678; }
.pager li.active span{ background:linear-gradient(135deg,var(--pri),#6d5df6); color:#fff; font-weight:600; }
.pager li.disabled span{ color:#b8bfd0; }

/* 表单布局 */
.form-card{ max-width:760px; }
.form-grid2{ display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
.form-foot{ margin-top:20px; display:flex; gap:10px; }

/* 开关式复选 */
.switch-line{ display:flex; align-items:center; gap:9px; font-size:13.5px; padding:8px 0; }
.switch-line input{ width:17px; height:17px; accent-color:var(--pri); }

/* 弹窗确认（纯CSS） */
.modal-mask{ position:fixed; inset:0; background:rgba(20,28,55,.5); z-index:200; display:none;
  align-items:center; justify-content:center; padding:20px; }
.modal-mask.show{ display:flex; }
.modal{ background:#fff; border-radius:16px; padding:26px 24px 22px; max-width:380px; width:100%; text-align:center; }
.modal .m-ico{ font-size:40px; margin-bottom:10px; }
.modal h4{ font-size:17px; margin-bottom:8px; }
.modal p{ color:var(--muted); font-size:13.5px; margin-bottom:20px; }
.modal .m-actions{ display:flex; gap:10px; }
.modal .m-actions form,.modal .m-actions a{ flex:1; }
.modal .m-actions .btn{ width:100%; }

/* 备份列表 */
.backup-item{ display:flex; align-items:center; gap:14px; padding:15px 17px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.backup-item:last-child{ border-bottom:none; }
.backup-item .bk-ico{ width:42px; height:42px; border-radius:12px; background:#eef2ff; display:flex;align-items:center;justify-content:center;font-size:20px; }
.backup-item .bk-info{ flex:1; min-width:180px; }
.backup-item .bk-info b{ display:block; font-size:14px; word-break:break-all; }
.backup-item .bk-info small{ color:var(--muted); font-size:12.5px; }
.backup-item .bk-ops{ display:flex; gap:8px; }

/* 会话列表 */
.sess-item{ display:flex; align-items:center; gap:13px; padding:15px 17px; border-bottom:1px solid var(--line); }
.sess-item:last-child{ border-bottom:none; }
.sess-item .se-ico{ font-size:24px; }
.sess-item .se-info{ flex:1; min-width:0; }
.sess-item .se-info b{ font-size:14px; display:block; }
.sess-item .se-info small{ color:var(--muted); font-size:12.5px; display:block; word-break:break-all; }

/* 到期色 */
.text-err{ color:var(--err); } .text-ok{ color:var(--ok); } .text-muted{ color:var(--muted); }

/* 遮罩（移动端侧边栏） */
.mask{ display:none; position:fixed; inset:0; background:rgba(20,28,55,.45); z-index:90; }
.mask.show{ display:block; }

/* ---------- 平板 ---------- */
@media(max-width:1024px){
  .stat-grid{ grid-template-columns:repeat(2,1fr); }
}
/* ---------- 手机 ---------- */
@media(max-width:768px){
  .sidebar{ transform:translateX(-100%); width:250px; }
  .sidebar.open{ transform:none; }
  .main{ margin-left:0; }
  .tb-menu{ display:flex; }
  .content{ padding:14px; }
  .topbar{ padding:0 14px; }
  .tb-user .u-meta{ display:none; }
  .form-grid2{ grid-template-columns:1fr; }
  .stat-grid{ grid-template-columns:1fr 1fr; gap:11px; }
  .stat{ padding:15px 14px; }
  .stat .s-ico{ width:38px; height:38px; font-size:18px; margin-bottom:8px; }
  .stat .s-num{ font-size:21px; }
  .card{ padding:15px; }
  .tb-title{ font-size:15.5px; }
  .filter-bar .inp{ min-width:0; flex:1; }
}
@media(max-width:380px){
  .stat-grid{ grid-template-columns:1fr; }
}

/* 后台底部版权（固定信息，请勿修改） */
.be-copy{ text-align:center; color:#9aa1af; font-size:12px; padding:8px 20px 24px; }
