* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f6f8; color: #1f2329; }
.hidden { display: none !important; }
button { cursor: pointer; border: none; border-radius: 6px; padding: 8px 14px; background: #2f6fed; color: #fff; font-size: 14px; }
button.ghost { background: #e7eaf0; color: #333; }
button:hover { opacity: .9; }
input, select { padding: 8px 10px; border: 1px solid #d0d4dc; border-radius: 6px; font-size: 14px; }
.err { color: #d4380d; min-height: 18px; margin-top: 8px; font-size: 13px; }

.login-wrap { height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 340px; background: #fff; padding: 28px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card .sub { color: #8a9099; font-size: 13px; margin: 0 0 18px; }
.login-card input { width: 100%; margin-bottom: 12px; }
.login-card button { width: 100%; }

.app header { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: #fff; border-bottom: 1px solid #e6e8eb; }
.app header strong { font-size: 16px; }
.app header .who { color: #8a9099; font-size: 13px; }
.app header .ghost { margin-left: auto; }

.stats { display: flex; gap: 16px; padding: 18px 20px 0; }
.stat { background: #fff; border-radius: 10px; padding: 14px 18px; min-width: 140px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.stat .num { font-size: 24px; font-weight: 700; }
.stat .lbl { color: #8a9099; font-size: 13px; }

.panel { background: #fff; margin: 18px 20px; padding: 16px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eef0f3; }
th { color: #8a9099; font-weight: 600; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag.ok { background: #e6f4ea; color: #1a7f37; }
.tag.bad { background: #fdecea; color: #d4380d; }
.tag.warn { background: #fff4e5; color: #b76e00; }

.detail-actions { display: flex; gap: 10px; margin-bottom: 10px; }
.modules { display: flex; gap: 12px; flex-wrap: wrap; }
.mod { display: flex; align-items: center; gap: 6px; background: #f5f6f8; padding: 6px 12px; border-radius: 8px; }
.info { color: #1a7f37; font-size: 13px; }
.logs { max-height: 260px; overflow: auto; font-size: 13px; }
.logs div { padding: 4px 0; border-bottom: 1px dashed #eee; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1f2329; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; }

/* 卡密 / 店铺名额（P2） */
button.unbindBtn { background: #e5484d; }
button.unbindBtn:hover { background: #cf3b40; }
#shopTable th, #shopTable td, #cardTable th, #cardTable td { padding: 8px 10px; border-bottom: 1px solid #eef1f6; text-align: left; }
.tbl { width: 100%; border-collapse: collapse; margin: 10px 0; }
.tbl th { background: #f7f8fa; font-size: 13px; color: #4a5058; }
/* 卡密生成 / 套餐配置（P4） */
.gen-label { font-size: 13px; color: #6b7280; }
.gen-mods { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.gen-mods .mod { font-size: 13px; }
.gen-mods .mod.off { opacity: .55; }
.planinfo { background: #f7f9fc; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 10px; color: #333; }
.planinfo b { color: #2f6fed; }
.gen-out { font-size: 13px; max-height: 220px; overflow: auto; background: #fafbfc; border-radius: 8px; padding: 10px 12px; }
.gen-out .code { font-family: Consolas, Monaco, monospace; letter-spacing: .5px; }

/* 备案信息（合规必填：ICP 备案号须常驻展示 + 可跳转工信部平台） */
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  text-align: center; padding: 8px 12px;
  font-size: 13px; color: #8a9099;
  background: #f5f6f8; border-top: 1px solid #e6e8eb; z-index: 40;
}
.site-footer a { color: #8a9099; text-decoration: none; }
.site-footer a:hover { color: #2f6fed; text-decoration: underline; }
.site-footer .sep { margin: 0 6px; color: #c9ced6; }
body { padding-bottom: 44px; }

/* 新增账号弹窗（P7） */
.modal { position: fixed; inset: 0; background: rgba(15, 20, 30, .45); display: flex; align-items: center; justify-content: center; z-index: 60; }
.modal-card { width: 520px; max-width: 94vw; max-height: 90vh; overflow: auto; background: #fff; border-radius: 12px; padding: 22px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); }
.modal-card h3 { margin: 0 0 14px; }
.modal-card input { min-width: 100%; box-sizing: border-box; }
