/* ================================================
   原版样式还原 —— NET防破专业卖料程序
   来自 /tmp/huavi/skin/style.css (GBK转码)
   在此基础上叠加新版功能 (会员栏/后台/卡片/表格)
   ================================================ */

*, html, body { margin:0; padding:0; }
body { margin:0; padding:0; background:#fff url(/views/skins/skin.gif); }
body, input { line-height:20px; font-size:20px; color:#000; font-family:"Adobe黑体","黑体","宋体",Arial; }
body, html { overflow-x:hidden; }
p, div, img { margin:0; padding:0; }
input { font-size:16px; -webkit-appearance:none; border-radius:0px; }
/* 关键修复：复选框/单选框必须恢复原生外观，否则 -webkit-appearance:none 会让它们完全看不见 */
input[type=checkbox], input[type=radio] {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  width:18px; height:18px; min-width:18px; margin:0 4px;
  cursor:pointer; accent-color:#1e79ce; vertical-align:middle;
  display:inline-block; opacity:1; visibility:visible;
}
form { display:inline; }
form.bm-form, form.af-form { display:block; }
img { max-width:300px; border:0; }
li, ul, ol { list-style:none; }
a:link, a:visited { text-decoration:none; color:#0066CC; }
a:hover, a:active, a:focus { color:#2263a5; text-decoration:none; }

/* ===== 原版 DIV 颜色条 (UBB 风格) ===== */
.logo  { background:#FFFFFF; color:#000; padding:0 8px; margin:0; text-align:center; }
.logo a { color:blue; line-height:28px; letter-spacing:1px; }
.list  { background:#feeb99; color:#000; padding:0 8px; margin:0; text-align:left; }
.list a { color:#000; line-height:28px; letter-spacing:1px; }
.list1 { background:#0852AD; color:#FFFFFF; padding:0 8px; margin:0; text-align:left; }
.list1 a { color:#000; line-height:28px; letter-spacing:1px; }
.list2 { background:#DC8700; color:#FFFFFF; padding:0 8px; margin:0; text-align:left; }
.list2 a { color:#000; line-height:28px; letter-spacing:1px; }
.list3 { background:#D02232; color:#FFFFFF; padding:0 8px; margin:0; text-align:left; }
.list3 a { color:#000; line-height:28px; letter-spacing:1px; }
.list4 { background:#0FD000; color:#FFFFFF; padding:0 8px; margin:0; text-align:left; }
.list4 a { color:#000; line-height:28px; letter-spacing:1px; }
.list5 { background:#FF0000; color:#FFFFFF; padding:0 8px; margin:0; text-align:left; }
.list5 a { color:#000; line-height:28px; letter-spacing:1px; }
.list6 { background:#009448; color:#FFFFFF; padding:0 8px; margin:0; text-align:left; }
.list6 a { color:#000; line-height:28px; letter-spacing:1px; }
.list7 { background:#1e79ce; color:#FFFFFF; padding:0 8px; margin:0; text-align:left; }
.list7 a { color:#000; line-height:28px; letter-spacing:1px; }

/* ===== 主容器 ===== */
.main {
  line-height:26px; padding:4px 4px 3px; font-size:16px;
  margin:0 auto; word-break:break-all;
  box-shadow:0 0 15px #ccc; overflow:hidden;
  background:#fff;
}
.main1 {
  line-height:26px; font-size:16px; margin:0 auto; word-break:break-all;
  max-width:800px; box-shadow:0 0 15px #ccc; overflow:hidden;
  border:1px solid #c6c6c6; background:#fff;
}
.main2 {
  line-height:26px; font-size:16px; margin:0 auto; word-break:break-all;
  max-width:321px; box-shadow:0 0 15px #ccc; overflow:hidden;
  border:1px solid #c6c6c6; background:#fff;
}

/* ===== 顶部 ding 栏 ===== */
.ding {
  padding: 5px 10px; font-size: 14px; color: #039;
  background: #e8f4ff; border-bottom: 1px solid #1e79ce;
  line-height: 28px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ding a { margin: 0 4px; }
.ding a:hover { color: #039; text-decoration: underline; }
.ding .ding-right { margin-left: auto; white-space: nowrap; }

/* 顶栏下拉菜单 */
.ding .topmenu { position: relative; display: inline-block; }
.ding .topmenu-btn {
  height: 28px; padding: 0 10px; font-size: 14px; color: #039;
  background: #fff; border: 1px solid #b3d3f0; border-radius: 4px;
  cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 3px;
}
.ding .topmenu-btn:hover { background: #eaf4ff; border-color: #1e79ce; }
.ding .topmenu-btn .caret { font-size: 10px; opacity: .75; }
.ding .topmenu-panel {
  display: none; position: absolute; left: 0; top: 100%; margin-top: 6px;
  min-width: 170px; background: #fff; border: 1px solid #cfe0f2; border-radius: 6px;
  box-shadow: 0 6px 20px rgba(30,121,206,.2); z-index: 999;
  padding: 6px 0;
}
.ding .topmenu-panel a {
  display: block; margin: 0; padding: 8px 14px; color: #26476b; font-size: 14px;
  line-height: 1.4; text-decoration: none; white-space: nowrap;
}
.ding .topmenu-panel a:hover {
  background: #eaf4ff; color: #0f5fae; text-decoration: none;
}
.ding .topmenu.on .topmenu-panel { display: block; }
.ding .topmenu.on .topmenu-btn { background: #eaf4ff; border-color: #1e79ce; }

/* ===== 原版底部 footer ===== */
.footer {
  background:#1e79ce; color:#fff; padding:3px 10px; margin-top:-1px;
  font-size:13px; text-align:center;
}
.footer a { color:#fff; margin:0 10px; }
.footer a:hover { color:#c4e2ef; }
.footer span { color:#fff; }

/* ===== 版权 ===== */
.copyright { padding:5px; border-top:1px solid #d6d6d6; font-size:13px; line-height:23px; color:#616161; text-align:center; }
.copyright a { margin:0 20px; }

/* ===== 分隔 ===== */
.hr { margin:10px 0; height:0; border:none; border-top:1px #999 solid; color:#999; }

/* ===== 状态条 ===== */
.status-bar { padding:4px 8px; font-size:14px; background:#fff; border-bottom:1px dashed #ccc; color:#555; }
.status-bar b { color:#039; }
.status-bar .sep { margin:0 8px; color:#ccc; }
.status-bar a { margin:0 6px; font-size:13px; }

/* ===== 卡片 (新版加) ===== */
.card { margin:6px 0; border:1px solid #e0e0e0; background:#fff; }
.card-head {
  padding:5px 10px; font-size:15px; font-weight:bold;
  background:linear-gradient(#f5f9ff,#e8f4ff); color:#039;
  border-bottom:1px solid #c6d9ee;
}
.card-body { padding:8px 10px; font-size:15px; }

/* ===== 资料列表 ===== */
.material-list li {
  padding:6px 10px; border-bottom:1px dashed #eee;
  display:flex; justify-content:space-between; align-items:center;
}
.material-list li:last-child { border-bottom:none; }
.material-list .title { color:#0066CC; font-size:15px; }
.material-list .title:hover { color:#2263a5; text-decoration:underline; }
.material-list .price { color:#dc2626; font-weight:bold; font-size:14px; }
.material-list .price.free { color:#16a34a; }

/* ===== 表格 (后台用) ===== */
.table { width:100%; border-collapse:collapse; font-size:14px; }
.table th {
  background:#e8f4ff; color:#039; font-weight:bold;
  padding:6px 8px; border:1px solid #c6d9ee; text-align:left;
}
.table td { padding:5px 8px; border:1px solid #eee; }
.table tr:nth-child(even) td { background:#fafafa; }
.table tr:hover td { background:#f0f7ff; }

/* ===== 表单 ===== */
.form-group { margin:8px 0; }
.form-group label { display:block; font-size:14px; color:#555; margin-bottom:3px; }
.form-control {
  padding:6px 8px; border:1px solid #c6c6c6; font-size:14px;
  background:#fff; color:#000;
}
.form-control:focus { border-color:#1e79ce; outline:none; }
.form-control[type=text], .form-control[type=password], select.form-control { width:250px; }
textarea.form-control { width:100%; min-height:120px; font-family:monospace; }

/* ===== 按钮 ===== */
.btn {
  display:inline-block; padding:6px 14px; font-size:14px;
  border:1px solid #c6c6c6; background:#f5f5f5; color:#000;
  cursor:pointer; text-decoration:none; border-radius:2px;
}
.btn:hover { background:#e8f4ff; border-color:#1e79ce; color:#039; text-decoration:none; }
.btn-primary { background:#1e79ce; border-color:#0852AD; color:#fff; }
.btn-primary:hover { background:#0852AD; color:#fff; }
.btn-danger { background:#D02232; border-color:#a01b26; color:#fff; }
.btn-danger:hover { background:#a01b26; color:#fff; }
.btn-sm { padding:3px 10px; font-size:12px; }

/* ===== 徽章 ===== */
.badge {
  display:inline-block; padding:1px 6px; font-size:12px;
  border-radius:2px; background:#eee; color:#333;
}
.badge-green { background:#0FD000; color:#fff; }
.badge-red   { background:#D02232; color:#fff; }
.badge-yellow{ background:#DC8700; color:#fff; }
.badge-blue  { background:#1e79ce; color:#fff; }
.badge-gray  { background:#999; color:#fff; }

/* ===== 消息 ===== */
.msg { padding:8px 12px; margin:6px 0; border:1px solid; font-size:14px; }
.msg-error   { background:#fee; border-color:#fcc; color:#D02232; }
.msg-success { background:#efe; border-color:#cfc; color:#009448; }
.msg-info    { background:#e8f4ff; border-color:#c6d9ee; color:#039; }

/* ===== 后台/会员页统一用 .wrap-sb 作为 flex 容器 ===== */
.wrap-sb { display:flex; gap:10px; padding:10px; min-height:400px; background:#fff; max-width:1200px; margin:0 auto; }
.wrap-sb > .main { flex:1; min-width:0; padding:0; overflow:hidden; box-shadow:none; border:none; max-width:none; }

/* 后台侧栏 */
.admin-sidebar, .sidebar {
  width:180px; flex-shrink:0;
  background:#1e293b; color:#fff; padding:10px 0;
  font-size:14px; line-height:24px;
}
.admin-sidebar h4, .sidebar h4 { padding:6px 12px; font-size:14px; color:#c4e2ef; background:#0f172a; margin-bottom:6px; }
.admin-sidebar ul, .sidebar ul { list-style:none; }
.admin-sidebar li a, .sidebar li a {
  display:block; padding:4px 14px; color:#e2e8f0; text-decoration:none;
  border-left:3px solid transparent;
}
.admin-sidebar li a:hover, .admin-sidebar li a.active,
.sidebar li a:hover, .sidebar li a.active {
  background:#0f172a; color:#fff; border-left-color:#38bdf8;
}
.admin-sidebar li a b, .sidebar li a b { font-weight:normal; }

/* 会员侧栏用浅色 */
.sidebar { background:#f5f9ff; border:1px solid #c6d9ee; color:#039; }
.sidebar h4 { color:#039; background:#e8f4ff; }
.sidebar li a { color:#039; }
.sidebar li a:hover, .sidebar li a.active { background:#e8f4ff; border-left-color:#1e79ce; color:#039; }

/* ===== 后台统计 —— 强制一排横向，手机不折行 ===== */
.admin-stats {
  display:flex; flex-wrap:nowrap; gap:8px; margin-bottom:15px;
  overflow-x:auto; -webkit-overflow-scrolling:touch;
}
.admin-stats::-webkit-scrollbar { height:4px; }
.admin-stats::-webkit-scrollbar-thumb { background:#ccc; border-radius:2px; }
.admin-stat-card {
  flex:1 1 0; min-width:0;
  padding:12px 8px; border:1px solid #e0e0e0; background:#fff; text-align:center;
}
.admin-stat-card .num { font-size:24px; font-weight:bold; line-height:1.2; }
.admin-stat-card .lbl { font-size:13px; color:#888; margin-top:3px; white-space:nowrap; }

/* ===== 导航栏(旧版顶部用) ===== */
.navbar {
  padding:6px 10px; font-size:14px;
  background:linear-gradient(#2563eb,#1e40af); color:#fff;
  border-bottom:2px solid #0852AD;
}
.navbar a { color:#fff; margin-right:12px; text-decoration:none; font-size:14px; }
.navbar a:hover { color:#c4e2ef; }
.navbar .navbar-user { float:right; }

/* ===== .wrap 兼容旧版主内容+侧栏布局 ===== */
.wrap.has-sidebar .main-col { flex:1; min-width:0; }

/* ===== 宽布局 (主内容+侧栏) ===== */
.wrap { display:flex; gap:10px; padding:10px; max-width:1200px; margin:0 auto; }
.wrap.has-sidebar .main-col { flex:1; min-width:0; }

/* ===== 会员详情页 ===== */
.user-detail-row { display:flex; border-bottom:1px dashed #eee; padding:5px 0; font-size:14px; }
.user-detail-row .label { width:100px; color:#888; }
.user-detail-row .value { color:#039; }

/* ===== 原始 form 风格覆盖 ===== */
.main form { display:block; margin:5px 0; }
.main input[type=text], .main input[type=password], .main input[type=submit],
.main select, .main textarea {
  font-size:14px; padding:5px 8px; border:1px solid #c6c6c6; margin:2px;
}
.main input[type=submit], .main button { background:#1e79ce; color:#fff; border-color:#0852AD; cursor:pointer; }
.main input[type=submit]:hover, .main button:hover { background:#0852AD; }

/* ===== 图片缩放 ===== */
.img-full { max-width:100%; height:auto; }

/* ============================================
   后台批量操作区 (bm- 前缀)
   ============================================ */
.bm-form input[type=checkbox] { width:18px; height:18px; cursor:pointer; margin:0; }
.bm-table th:first-child, .bm-table td:first-child { text-align:center; width:44px; }

/* 顶部工具栏（全选 + 已选 N 条 + 批量按钮） */
.bm-bar {
  display:flex; gap:8px; align-items:center; padding:9px 12px;
  background:#eef5fd; border:1px solid #c6d9ee; margin-bottom:6px;
}
.bm-bar .bm-selectall { display:flex; align-items:center; gap:4px; font-size:14px; color:#039; cursor:pointer; white-space:nowrap; }
.bm-bar .bm-selectall input { margin:0; }
.bm-info { font-size:13px; color:#555; white-space:nowrap; }
.bm-count { color:#D02232; font-size:16px; padding:0 2px; }
.bm-total { margin-left:auto; font-size:12px; color:#888; white-space:nowrap; }

/* 批量按钮 —— 明确可见的实色按钮 */
.bm-batch-btn {
  display:inline-block; padding:5px 12px; font-size:13px; line-height:1.4;
  border:1px solid #7aa7d8; background:#fff; color:#1e5fa8 !important;
  cursor:pointer; border-radius:2px; white-space:nowrap;
}
.bm-batch-btn:hover { background:#e8f4ff; }
.bm-batch-btn.bm-del { border-color:#a01b26; background:#D02232; color:#fff !important; }
.bm-batch-btn.bm-del:hover { background:#a01b26; }
.bm-batch-btn:disabled { opacity:.45; cursor:not-allowed; }

/* 手机端批量条 */
@media (max-width: 600px) {
  .bm-bar { flex-wrap:wrap; padding:8px; gap:6px; }
  .bm-batch-btn { flex:1; min-width:78px; }
  .bm-total { margin-left:0; width:100%; text-align:right; }
  .bm-form input[type=checkbox] { width:20px; height:20px; }
}
@media (max-width: 768px) {
  body { font-size:14px; background:#fff; }
  .ding { font-size:13px; padding:5px 8px; line-height:22px; word-break:break-all; }
  .ding a { margin:0 4px; }
  .ding .ding-right { margin-left: auto; font-size: 12px; }
  .ding .topmenu-btn { height: 24px; font-size: 13px; padding: 0 8px; }
  .ding .topmenu-panel {
    left: 0; right: 0; top: 100%; min-width: 0;
    border-radius: 6px; margin-top: 4px;
  }
  .ding .topmenu-panel a { padding: 9px 12px; border-bottom: 1px dashed #e3edf7; font-size: 14px; }
  .ding .topmenu-panel a:last-child { border-bottom: none; }
  .main, .main1, .main2 { font-size:14px; line-height:22px; padding:3px; }
  .footer { font-size:12px; padding:4px; }

  /* wrap-sb 后台/会员页变单列 */
  .wrap-sb { flex-direction:column; padding:6px; gap:6px; }
  .wrap-sb .admin-sidebar,
  .wrap-sb .sidebar {
    width:100%; position:static; padding:0;
    display:flex; flex-wrap:wrap; gap:0;
  }
  .wrap-sb .admin-sidebar h4,
  .wrap-sb .sidebar h4 { width:100%; padding:5px 10px; font-size:13px; }
  .wrap-sb .admin-sidebar ul,
  .wrap-sb .sidebar ul { display:flex; flex-wrap:wrap; width:100%; margin:0; padding:0; }
  .wrap-sb .admin-sidebar li,
  .wrap-sb .sidebar li { width:50%; }
  .wrap-sb .admin-sidebar li a { padding:4px 10px; font-size:13px; border-left:none; border-bottom:1px solid #1e293b; }
  .wrap-sb .admin-sidebar li a.active { background:#0f172a; border-bottom-color:#38bdf8; }
  .wrap-sb .sidebar li a { padding:4px 10px; font-size:13px; border-left:none; border-bottom:1px dashed #c6d9ee; }

  /* 后台 stat cards —— 保持一排横向可滚动 */
  .admin-stats { gap:6px; }
  .admin-stat-card { padding:8px 4px; }
  .admin-stat-card .num { font-size:18px; }
  .admin-stat-card .lbl { font-size:11px; }

  /* 表格横滑 */
  .table { display:block; overflow-x:auto; }
  .table th, .table td { font-size:13px; padding:4px 6px; white-space:nowrap; }

  /* 卡片紧凑 */
  .card-head { font-size:14px; padding:4px 8px; }
  .card-body { padding:6px 8px; font-size:14px; }

  /* 资料列表 */
  .material-list li { flex-wrap:wrap; gap:4px; }
  .material-list .title { font-size:14px; flex:1 1 100%; }
  .material-list .price { font-size:13px; }

  /* 旧版 .wrap 布局也变单列 */
  .wrap { flex-direction:column; padding:6px; gap:6px; }

  /* 表单 */
  .form-control[type=text], .form-control[type=password], select.form-control { width:100%; max-width:300px; }

  /* 顶部状态 */
  .status-bar { font-size:12px; padding:3px 6px; }
  .status-bar .sep { display:none; }
  .status-bar span { display:inline-block; margin-right:4px; }

  /* 导航栏 */
  .navbar { font-size:13px; padding:4px 8px; }
  .navbar a { margin-right:6px; font-size:13px; }
}

/* 手机竖屏小屏 (< 480px) */
@media (max-width: 480px) {
  body { font-size:13px; }
  .ding { font-size:12px; padding:4px 6px; }
  .ding a { margin:0 3px; font-size:12px; }
  .main, .main1, .main2 { font-size:13px; line-height:20px; }
  .admin-stat-card .num { font-size:16px; }
  .admin-stat-card .lbl { font-size:10px; }
  .wrap-sb .admin-sidebar li,
  .wrap-sb .sidebar li { width:100%; }
  .table th, .table td { font-size:12px; padding:3px 5px; }
  .material-list .title { font-size:13px; }
  .card-head { font-size:13px; }
  .footer { font-size:11px; padding:3px; }
}

/* 超大屏 (>= 1200px) —— 居中限宽防太散 */
@media (min-width: 1200px) {
  .main { max-width:1200px; margin:0 auto; }
  .wrap { max-width:1200px; margin:0 auto; }
}

/* 打印 */
@media print {
  body { background:#fff; }
  .ding, .footer, .admin-sidebar, .sidebar, .navbar { display:none !important; }
  .wrap-sb { display:block; }
  a { color:#000; text-decoration:underline; }
}

/* 平板 (768-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .admin-sidebar, .sidebar { width:150px; }
  .admin-stat-card .num { font-size:20px; }
}

/* ============================================
   全局自适应（全站兜底，PC/平板/手机通用）
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, embed, object { max-width: 100%; height: auto; }
table { max-width: 100%; }
td, th, p, div, a, span, li { overflow-wrap: break-word; word-wrap: break-word; }

/* 表格容器：窄屏横向滚动，不撑破页面 */
.table { width: 100%; border-collapse: collapse; }
@media (max-width: 900px) {
  .table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table::-webkit-scrollbar { height: 6px; }
  .table::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }
}

/* 表单：手机端全部拉满一行，避免控件溢出 */
@media (max-width: 768px) {
  .form-control,
  .main input[type=text], .main input[type=password], .main input[type=number],
  .main input[type=email], .main input[type=tel], .main select, .main textarea,
  .main input[type=submit], .main button, .main .btn {
    max-width: 100%;
  }
  .form-control { width: 100%; }
  .main form > div { width: 100%; }
  .af-form input, .af-form select, .af-form textarea { width: 100% !important; max-width: 100% !important; }
  .af-form .btn { width: auto; }
  .wrap-sb .main { width: 100%; min-width: 0; }
  .msg { font-size: 13px; padding: 7px 10px; }
  h2 { font-size: 17px; }
  h3 { font-size: 15px; }
  .pagination { flex-wrap: wrap; }
  .pagination a, .pagination span { padding: 4px 8px; font-size: 13px; }
  .admin-stats { padding-bottom: 4px; }
}

/* 超小屏（老手机 320-360px） */
@media (max-width: 360px) {
  body, input { font-size: 12px; }
  .ding a { margin: 0 2px; font-size: 11px; }
  .admin-stat-card { padding: 6px 3px; }
  .admin-stat-card .num { font-size: 14px; }
  .admin-stat-card .lbl { font-size: 9px; }
  .bm-bar { gap: 4px; }
  .bm-batch-btn { min-width: 64px; font-size: 11px; padding: 4px 6px; }
}

/* 横屏手机 */
@media (max-height: 500px) and (orientation: landscape) {
  .ding { position: static; }
  .admin-sidebar ul, .sidebar ul { max-height: 160px; overflow-y: auto; }
}

/* ============================================
   手机端强制适配（放在最后，优先级最高）
   覆盖 HTML 里的内联宽度/内联 flex，保证窄屏不溢出
   ============================================ */
@media (max-width: 768px) {
  html, body {
    width: 100% !important; max-width: 100% !important;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
  }
  body, input, select, textarea, button { font-size: 14px !important; }
  .main, .main1, .main2, .wrap-sb, .wrap {
    width: 100% !important; max-width: 100% !important;
    margin: 0 !important; padding: 4px !important;
    box-shadow: none !important;
  }
  /* 顶栏：右侧浮动信息改为独立一行，避免挤压 */
  .ding { padding: 5px 6px !important; line-height: 26px !important; }
  .ding a { margin: 0 3px !important; font-size: 13px !important; }
  .ding span, .ding span[style] {
    float: none !important; display: block !important;
    margin-top: 2px; padding-top: 3px; border-top: 1px dashed #bcd8f2;
  }
  /* 后台/会员布局：侧栏 + 主内容上下堆叠 */
  .wrap-sb { display: block !important; }
  .wrap-sb .admin-sidebar, .wrap-sb .sidebar {
    width: 100% !important; max-width: 100% !important;
    margin: 0 0 6px 0 !important;
  }
  .wrap-sb .admin-sidebar ul, .wrap-sb .sidebar ul {
    display: flex !important; flex-wrap: wrap !important;
  }
  .wrap-sb .admin-sidebar li, .wrap-sb .sidebar li { width: 50% !important; }
  /* 所有内联 flex 行强制换行 */
  .main div[style*="display:flex"],
  .main div[style*="display: flex"] { flex-wrap: wrap !important; }
  /* 表单控件拉满，覆盖内联 width:xxx px */
  .main input[type=text], .main input[type=password], .main input[type=number],
  .main input[type=email], .main input[type=tel], .main input[type=date],
  .main input[type=search], .main select, .main textarea,
  .main .form-control, .af-form input, .af-form select, .af-form textarea {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    margin: 3px 0 !important; display: block;
  }
  .main input[type=checkbox], .main input[type=radio],
  .af-form input[type=checkbox], .af-form input[type=radio] {
    width: 18px !important; height: 18px !important;
    min-width: 18px !important; display: inline-block !important;
    margin: 0 4px !important;
  }
  .main button, .main input[type=submit], .main .btn, .af-form .btn {
    width: auto !important; max-width: 100% !important;
  }
  /* 表格：横向滚动，不撑破屏幕 */
  table, .table, .bm-table {
    width: 100% !important; max-width: 100% !important;
    display: block !important; overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .table th, .table td { white-space: nowrap; font-size: 12px !important; padding: 4px 6px !important; }
  /* 会员中心等带侧栏的页面：改为上下堆叠 */
  .wrap.has-sidebar { flex-direction: column !important; display: flex !important; }
  .wrap.has-sidebar .sidebar,
  .wrap.has-sidebar .main-col { width: 100% !important; max-width: 100% !important; }
  .wrap.has-sidebar .sidebar ul { display: flex !important; flex-wrap: wrap !important; }
  .wrap.has-sidebar .sidebar li { width: 50% !important; }
  /* 统计卡片：一排横向滚动 */
  .admin-stats {
    display: flex !important; flex-wrap: nowrap !important;
    overflow-x: auto !important; overflow-y: hidden;
  }
  .admin-stat-card { flex: 1 1 0 !important; min-width: 0 !important; }
  /* 批量操作条 */
  .bm-bar { flex-wrap: wrap !important; }
  .bm-total { margin-left: 0 !important; width: 100%; text-align: right; }
  /* 图片 */
  .main img, .main1 img, .main2 img { max-width: 100% !important; height: auto !important; }
  /* 资料列表 */
  .material-list li { display: flex; flex-wrap: wrap; }
  .material-list .title { flex: 1 1 100%; }
  /* 标题与提示 */
  h2 { font-size: 17px !important; }
  h3 { font-size: 15px !important; }
  .msg { font-size: 13px !important; padding: 6px 8px !important; }
}

/* ============ 富文本编辑器 ============ */
.rte {
  border: 1px solid #c6d9ee; border-radius: 3px; background: #fff; margin-top: 6px;
}
.rte.rte-full {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  z-index: 9999; margin: 0; border-radius: 0; display: flex; flex-direction: column;
}
.rte-full .rte-area { flex: 1; max-height: none !important; }
.rte-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px;
  padding: 5px 6px; background: #f4f8fd; border-bottom: 1px solid #dce8f5;
}
.rte-toolbar .rte-sep { width: 1px; height: 20px; background: #cfe0f2; margin: 0 3px; }
.rte-toolbar button {
  min-width: 28px; height: 26px; padding: 0 6px; cursor: pointer;
  border: 1px solid #cbd9e8; background: #fff; border-radius: 3px;
  font-size: 13px; line-height: 24px; color: #26476b;
}
.rte-toolbar button:hover { background: #e8f2ff; border-color: #7fb0e0; }
.rte-toolbar button.on { background: #1e79ce; color: #fff; border-color: #1e79ce; }
.rte-toolbar select, .rte-toolbar input[type=color] {
  height: 26px; border: 1px solid #cbd9e8; border-radius: 3px; background: #fff;
  font-size: 12px; padding: 0 2px;
}
.rte-toolbar input[type=color] { width: 30px; padding: 1px; cursor: pointer; }
.rte-area {
  min-height: 320px; max-height: 620px; overflow-y: auto;
  padding: 12px; font-size: 14px; line-height: 1.75; outline: none;
  word-wrap: break-word; overflow-wrap: break-word;
}
.rte-area:empty:before { content: attr(data-placeholder); color: #9aa8b6; }
.rte-area img, .rte-content img { max-width: 100% !important; height: auto; }
.rte-source {
  display: none; width: 100%; min-height: 320px; max-height: 620px;
  padding: 10px; font: 12px/1.6 Consolas, Monaco, monospace;
  border: 0; border-top: 1px solid #dce8f5; box-sizing: border-box; resize: vertical;
}
.rte-srcmode .rte-area { display: none; }
.rte-srcmode .rte-source { display: block; }
.rte-count { padding: 3px 8px; font-size: 12px; color: #7d8b99; background: #fafcff; border-top: 1px solid #eef4fb; text-align: right; }

/* 前台正文渲染区（保留复制来的颜色/字体/排版） */
.rte-content { font-size: 15px; line-height: 1.8; color: #222; overflow-wrap: break-word; }
.rte-content p { margin: 6px 0; }
.rte-content table { border-collapse: collapse; max-width: 100%; }
.rte-content td, .rte-content th { border: 1px solid #c9d6e3; padding: 4px 8px; }
.rte-content blockquote { border-left: 4px solid #c6d9ee; margin: 10px 0; padding: 4px 12px; color: #555; background: #f7fbff; }
.rte-content ul, .rte-content ol { padding-left: 24px; margin: 6px 0; }
.rte-content img { max-width: 100%; height: auto; }
.rte-content h1, .rte-content h2, .rte-content h3 { margin: 10px 0 6px; }

/* 正文中的「本期加密」取料框 */
.lock-box {
  margin: 14px 0; padding: 14px 16px; border: 1px dashed #d9a441;
  background: #fffbf0; border-radius: 4px;
}
.lock-box .lock-title { font-size: 14px; color: #8a5a00; margin-bottom: 8px; font-weight: 600; }
.lock-box form { display: flex; gap: 8px; flex-wrap: wrap; }
.lock-box input[type=password] { flex: 1 1 200px; max-width: 300px; }

@media (max-width: 768px) {
  .rte-toolbar { padding: 4px; gap: 2px; }
  .rte-toolbar button { min-width: 26px; height: 24px; font-size: 12px; padding: 0 4px; line-height: 22px; }
  .rte-toolbar select { max-width: 84px; }
  .rte-area { min-height: 240px; padding: 8px; font-size: 14px; }
  .rte-content { font-size: 14px; }
}

/* ============ 会员中心：横排卡片 ============ */
.uc-wrap {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 1200px; margin: 0 auto; padding: 10px;
}
.uc-wrap > .main {
  padding: 18px 20px; border: 1px solid #dbe7f3; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(30, 121, 206, .07); overflow: visible;
}
.uc-wrap > .main > h2:first-child { margin-top: 0; }

.uc-nav {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}
.uc-card {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 13px; background: #fff; border: 1px solid #dbe7f3;
  border-radius: 10px; text-decoration: none; color: #26476b;
  box-shadow: 0 1px 4px rgba(30, 121, 206, .08);
  transition: transform .15s, box-shadow .15s, border-color .15s, background .15s;
  min-width: 0;
}
.uc-card:hover {
  transform: translateY(-2px); border-color: #1e79ce; color: #0852AD;
  box-shadow: 0 4px 14px rgba(30, 121, 206, .18); text-decoration: none;
}
.uc-card .ico { font-size: 21px; line-height: 1; flex: none; }
.uc-card .txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.uc-card .txt b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.uc-card .txt small { font-size: 11px; color: #93a3b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-card.on {
  background: linear-gradient(135deg, #1e79ce, #0f5fae);
  border-color: #0f5fae; color: #fff;
  box-shadow: 0 3px 12px rgba(15, 95, 174, .3);
}
.uc-card.on .txt b { color: #fff; }
.uc-card.on .txt small { color: #d8e9fb; }

/* 个人资料信息块也做成小卡片 */
.uc-wrap .user-profile { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.uc-wrap .user-profile .item {
  background: #f7fbff; border: 1px solid #e3edf7; border-radius: 8px;
  padding: 10px 12px; text-align: left;
}
.uc-wrap .user-profile .label { color: #8a99a8; font-size: 12px; }
.uc-wrap .user-profile .value { font-size: 16px; margin-top: 2px; word-break: break-all; }

/* 会员中心里的表单/表格卡片化 */
.uc-wrap .main form { background: #fbfdff; border: 1px solid #e8f1fa; border-radius: 8px; padding: 14px 16px; }
.uc-wrap .main form .form-group:last-of-type { margin-bottom: 10px; }
.uc-wrap .main .table { border-radius: 8px; overflow: hidden; }
.uc-wrap .main .msg { border-radius: 8px; }

@media (max-width: 768px) {
  .uc-wrap { padding: 8px; gap: 10px; }
  .uc-wrap > .main { padding: 12px; }
  .uc-nav { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .uc-card { padding: 9px 10px; gap: 7px; }
  .uc-card .ico { font-size: 18px; }
  .uc-card .txt b { font-size: 13px; }
  .uc-card .txt small { font-size: 10px; }
}

@media (max-width: 360px) {
  .uc-nav { grid-template-columns: 1fr; }
}
