/* 瓦房店热门 - 全站样式（响应式，浅色主题） */
:root {
  --primary: #e0453a;
  --primary-dark: #c73328;
  --primary-grad: linear-gradient(135deg, #e0453a 0%, #ff7a45 100%);
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #22252a;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --border: #e8eaee;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(20, 24, 34, 0.06);
  --shadow-lg: 0 8px 30px rgba(20, 24, 34, 0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 70px; /* 移动端底部导航留白 */
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.logo .logo-icon { width: 32px; height: 32px; border-radius: 9px; background: var(--primary-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.logo small { font-size: 11px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { padding: 6px 14px; border-radius: 8px; font-size: 15px; color: var(--text-2); }
.main-nav a:hover { background: #f0f1f4; color: var(--text); }
.main-nav a.active { color: var(--primary); font-weight: 600; background: #fdeeec; }
.header-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-user .user-chip { font-size: 13px; color: var(--text-2); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 10px; padding: 9px 18px; font-size: 15px; font-weight: 600; transition: 0.15s; }
.btn-primary { background: var(--primary-grad); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { background: #fff; border: 1px solid var(--border); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fdecec; color: #c02626; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== 底部导航（移动端） ===== */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: #fff; border-top: 1px solid var(--border); padding: 4px 0 env(safe-area-inset-bottom); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; color: var(--text-3); padding: 5px 0; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a .bn-icon { font-size: 20px; }

/* ===== 公告条 ===== */
.notice-bar { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px; padding: 8px 14px; border-radius: 10px; margin: 14px 0 0; display: flex; gap: 8px; align-items: center; }

/* ===== Hero 搜索 ===== */
.hero { padding: 24px 0 4px; }
.hero h1 { font-size: 25px; font-weight: 800; letter-spacing: 0.5px; }
.hero p { color: var(--text-2); font-size: 14px; margin-top: 3px; }
.search-box { margin-top: 14px; display: flex; gap: 10px; }
.search-box input { flex: 1; border: 1px solid var(--border); border-radius: 12px; padding: 11px 16px; background: #fff; outline: none; }
.search-box input:focus { border-color: var(--primary); }
.hero-foot { margin-top: 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* 首页数据条 */
.hero-stats { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); flex-wrap: wrap; }
.hero-stats b { color: var(--primary); font-weight: 700; }
.hero-stats .hs-dot { color: var(--text-3); }

/* 小节标题 */
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 0; }
.section-head h2 { font-size: 17px; font-weight: 700; }
.section-sub { font-size: 12.5px; color: var(--text-3); }

/* ===== 分类 chips ===== */
.cat-row { display: flex; gap: 10px; overflow-x: auto; padding: 16px 2px 6px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-chip { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 14px; color: var(--text-2); cursor: pointer; transition: 0.15s; }
.cat-chip.active { background: var(--primary-grad); border-color: transparent; color: #fff; font-weight: 600; }

/* ===== 卡片网格 ===== */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 14px 0 18px; }
.post-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: 0.18s; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-card .cover { height: 150px; background: linear-gradient(135deg, #ffe9e2, #ffd9c9); display: flex; align-items: center; justify-content: center; font-size: 44px; color: #c2604a; position: relative; overflow: hidden; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .cover .cover-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; color: #a4502f; background: rgba(255, 240, 232, 0.75); backdrop-filter: blur(2px); }
.post-card .body { padding: 13px 15px 15px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.post-card .title { font-size: 15.5px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .snippet { font-size: 13px; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; border-left: 3px solid #fde2dc; padding-left: 8px; margin: 1px 0 2px; }

/* 结构化信息行（营业时间 / 地点 / 费用 等，首页卡片与详情页共用） */
.info-row { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; line-height: 1.5; min-width: 0; }
.info-row .il { flex-shrink: 0; color: #b0714e; font-weight: 600; background: #fff4ec; padding: 1.5px 8px; border-radius: 6px; font-size: 11.5px; white-space: nowrap; }
.info-row .iv { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dp-info .info-row { align-items: flex-start; font-size: 13px; }
.dp-info .info-row .iv { white-space: normal; }
.post-card .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.post-card .meta .views { margin-left: auto; }

/* 活动时间胶囊 */
.post-card .time-row { display: flex; }
.time-pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; background: #fff4ec; color: #c2410c; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-pill .t-left { font-style: normal; font-weight: 500; color: #b0714e; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; background: #fdeeec; color: var(--primary); font-weight: 500; }
.tag-hot { background: #fff1e6; color: #d97706; }

.empty { text-align: center; padding: 60px 0; color: var(--text-3); }
.empty .empty-icon { font-size: 44px; margin-bottom: 8px; }
.load-more { text-align: center; padding: 6px 0 30px; }

/* ===== 状态徽章 ===== */
.badge { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-published { background: #e8f7ee; color: #15803d; }
.badge-pending_payment { background: #fef3c7; color: #b45309; }
.badge-off { background: #f3f4f6; color: #6b7280; }
.badge-created { background: #fef3c7; color: #b45309; }
.badge-paid { background: #e8f7ee; color: #15803d; }
.badge-pending_review { background: #fff7ed; color: #c2410c; }
.badge-rejected { background: #fef2f2; color: #b91c1c; }

/* ===== 个人微信收款码付款弹窗 ===== */
.qr-amount-box { text-align: center; padding: 2px 0 12px; }
.qr-amount { font-size: 34px; font-weight: 800; color: var(--primary); line-height: 1.15; }
.qr-days { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.qr-box { text-align: center; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.qr-box img { width: 240px; height: 240px; max-width: 100%; object-fit: contain; border-radius: 10px; }
.qr-save { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.qr-payee { text-align: center; font-size: 13.5px; color: var(--text-2); margin-top: 10px; }
.qr-payee b { color: var(--text); }
.qr-steps { margin: 12px 0 0; padding-left: 20px; font-size: 13px; color: var(--text-2); line-height: 1.85; }
.qr-steps b { color: var(--primary); }
.qr-tipnote { margin-top: 10px; font-size: 12.5px; color: #b45309; background: #fffbeb; border-radius: 8px; padding: 8px 11px; line-height: 1.6; }

/* ===== 后台：收款设置 / 待确认收款 ===== */
.tab-badge { display: inline-block; margin-left: 6px; background: #e0453a; color: #fff; border-radius: 9px; padding: 0 7px; font-size: 11.5px; line-height: 17px; vertical-align: 1px; }
.admin-tabs button.active .tab-badge { background: rgba(255, 255, 255, 0.28); }
.switch-row { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.switch-row input { width: 17px; height: 17px; accent-color: var(--primary); flex-shrink: 0; }
.qr-upload-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.qr-preview { width: 132px; height: 132px; border: 1px dashed var(--border); border-radius: 12px; background: #fafafa; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.qr-preview span { font-size: 12.5px; color: var(--text-3); }
.qr-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.toast-item.warn { background: rgba(180, 83, 9, 0.95); }

/* ===== 详情弹窗 / 通用弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 18, 25, 0.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal { background: #fff; border-radius: 18px; max-width: 620px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-header h3 { font-size: 17px; }
.modal-close { border: none; background: #f3f4f6; width: 30px; height: 30px; border-radius: 50%; font-size: 15px; color: var(--text-2); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.detail-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.detail-images img { border-radius: 10px; height: 120px; object-fit: cover; }
.detail-meta { font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.detail-content { white-space: pre-wrap; font-size: 15px; }
.contact-box { margin-top: 16px; background: #f9fafb; border: 1px dashed var(--border); border-radius: 12px; padding: 12px 16px; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.contact-box b { color: var(--primary); }
.contact-box .tel-btn { margin-left: auto; flex-shrink: 0; }

/* 一键拨打 / 分享 */
.card-actions { margin-top: auto; padding-top: 11px; display: flex; gap: 8px; }
.card-actions .tel-btn { flex: 1; }
.card-actions .share-btn { flex-shrink: 0; }

/* 分享弹窗 */
.share-link-row { display: flex; gap: 8px; align-items: center; }
.share-link-row input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: var(--text-2); background: #fafafa; }
.share-tip { margin-top: 10px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.share-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.share-actions .btn { flex: 1; min-width: 132px; }
#sh-card-img { width: 100%; border-radius: 12px; margin-top: 8px; border: 1px solid var(--border); }

/* ===== 分享朋友圈面板 ===== */
.sh-main { width: 100%; padding: 13px; font-size: 15px; }
.sh-card-tip { margin-top: 14px; padding: 9px 12px; border-radius: 10px; background: #fff4ef; color: #c2410c; font-size: 13px; line-height: 1.55; }
.sh-card-ops { display: flex; gap: 8px; margin-top: 10px; }
.sh-card-ops .btn { flex: 1; }
.sh-wx-link { cursor: pointer; }
.sh-wx-link:hover { color: var(--primary); }

/* 微信内「分享到朋友圈」引导浮层 */
/* 微信内置浏览器分享引导（底部步骤卡片） */
.wx-guide { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.72); color: #fff; display: flex; align-items: flex-end; justify-content: center; padding: 0 18px calc(26px + env(safe-area-inset-bottom)); }
.wx-guide-arrow { position: fixed; top: 10px; right: 20px; font-size: 54px; line-height: 1; color: #fff; animation: wx-arrow-pulse 1.2s ease-in-out infinite; }
@keyframes wx-arrow-pulse { 0%, 100% { transform: translate(0, 0); opacity: 0.8; } 50% { transform: translate(5px, -5px); opacity: 1; } }
.wx-guide-card { width: 100%; max-width: 420px; background: #fff; color: var(--text); border-radius: 18px; padding: 22px 20px 18px; box-shadow: var(--shadow-lg); animation: wx-guide-up 0.22s ease-out; }
@keyframes wx-guide-up { from { transform: translateY(34px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.wx-guide-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.wx-guide-steps { list-style: none; display: grid; gap: 12px; }
.wx-guide-steps li { display: flex; align-items: flex-start; gap: 11px; }
.wx-guide-steps .n { flex: 0 0 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wx-guide-steps b { display: block; font-size: 15.5px; line-height: 1.35; }
.wx-guide-steps span { color: var(--text-2); font-size: 13.5px; }
.wx-guide-note { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #fff7ed; color: #9a5b13; font-size: 13px; line-height: 1.65; }
.wx-guide-close { width: 100%; margin-top: 14px; border: none; background: var(--primary-grad); color: #fff; font-size: 15.5px; font-weight: 700; padding: 12px; border-radius: 12px; }

/* 微信内生成图片后的长按提示条 */
.sh-press-hint { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #fff7ed; border: 1.5px dashed #f0a44a; color: #9a5b13; font-size: 14.5px; font-weight: 700; text-align: center; animation: press-hint-pulse 1.6s ease-in-out infinite; }
@keyframes press-hint-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 164, 74, 0.35); } 50% { box-shadow: 0 0 0 7px rgba(240, 164, 74, 0); } }
.hero-share { margin-top: 0; }
.hero-share .btn { background: #fff; }

/* 搜索清空按钮 */
.search-clear { flex-shrink: 0; width: 38px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text-3); font-size: 15px; display: flex; align-items: center; justify-content: center; transition: 0.15s; }
.search-clear:hover { border-color: var(--primary); color: var(--primary); }

/* 卡片徽标（封面左上角） */
.cover-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; z-index: 1; }
.cb { padding: 3px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.18); }
.cb-top { background: var(--primary-grad); }
.cb-new { background: #16a34a; }
.cb-end { background: rgba(217, 119, 6, 0.92); }

/* 回到顶部 */
.back-top { position: fixed; right: 18px; bottom: 92px; z-index: 55; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--text-2); font-size: 19px; font-weight: 700; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; transition: 0.15s; }
.back-top:hover { color: var(--primary); border-color: var(--primary); }

/* ===== 独立详情页 ===== */
.dp-wrap { padding: 18px 16px 40px; }
.dp-crumb { margin-bottom: 12px; }
.dp-back { font-size: 14px; color: var(--text-2); }
.dp-back:hover { color: var(--primary); }
.dp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.dp-panel { padding: 18px; margin-bottom: 0; }
.dp-cover { position: relative; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #ffe9e2, #ffd9c9); display: flex; align-items: center; justify-content: center; font-size: 56px; color: #c2604a; }
.dp-cover img { width: 100%; max-height: 420px; object-fit: cover; }
.dp-cover-plain { height: 240px; }
.dp-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.dp-thumbs img { height: 92px; width: 100%; object-fit: cover; border-radius: 10px; cursor: pointer; }
.dp-title { font-size: 23px; font-weight: 800; line-height: 1.4; margin: 15px 0 10px; }
.dp-meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dp-meta-item { font-size: 13px; color: var(--text-3); }
.dp-lock-tip { margin-top: 10px; font-size: 13px; color: #a4502f; background: #fff7ed; border: 1px solid #fed7aa; padding: 8px 12px; border-radius: 10px; }
.dp-section { margin-top: 20px; }
.dp-section h2 { font-size: 16px; margin-bottom: 8px; }
.dp-content { white-space: pre-wrap; font-size: 15px; line-height: 1.8; color: var(--text); }
.dp-side { position: sticky; top: 76px; }
.dp-side-card { padding: 18px; margin-bottom: 0; }
.dp-side-title { font-size: 16px; margin-bottom: 12px; }
.dp-info { display: flex; flex-direction: column; gap: 10px; }
.dp-divider { height: 1px; background: var(--border); margin: 14px 0; }
.dp-side-meta { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.dp-side-meta .k { color: var(--text-3); margin-right: 10px; }
.dp-side-meta .v { color: var(--text-2); }
.dp-contact { margin-top: 14px; background: #f9fafb; border: 1px dashed var(--border); border-radius: 12px; padding: 12px 14px; }
.dp-contact-label { font-size: 12.5px; color: var(--text-3); }
.dp-contact-val { font-size: 15px; font-weight: 700; color: var(--primary); margin-top: 2px; word-break: break-all; }
.dp-side-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.dp-side-actions .btn { width: 100%; }
.dp-related { margin-top: 32px; }
.dp-related-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.dp-related-head h2 { font-size: 17px; }
.dp-more { font-size: 13px; color: var(--primary); }
.dp-empty { text-align: center; padding: 50px 20px; color: var(--text-2); }
.dp-empty p { margin: 10px 0 16px; }
.dp-bar { display: none; }

/* ===== 表单 ===== */
.form-page { max-width: 660px; margin: 0 auto; padding: 24px 0 50px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.panel h2 { font-size: 18px; margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field label .req { color: var(--primary); }
.field label .opt { font-size: 11px; font-weight: 400; color: var(--text-3); background: #f3f4f6; padding: 1px 7px; border-radius: 5px; margin-left: 4px; vertical-align: 1px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="tel"], .field input[type="number"], .field textarea, .field select {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; outline: none; background: #fff; transition: 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(224, 69, 58, 0.1); }
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

/* 套餐选择 */
.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pkg { border: 2px solid var(--border); border-radius: 12px; padding: 14px 10px; text-align: center; cursor: pointer; transition: 0.15s; }
.pkg.selected { border-color: var(--primary); background: #fff8f7; }
.pkg .pkg-days { font-size: 16px; font-weight: 700; }
.pkg .pkg-price { color: var(--primary); font-weight: 800; font-size: 20px; margin-top: 2px; }
.pkg .pkg-price small { font-size: 12px; font-weight: 400; color: var(--text-3); }

/* 图片上传 */
.upload-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.upload-item { width: 92px; height: 92px; border-radius: 10px; overflow: hidden; position: relative; }
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .rm { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; border: none; font-size: 11px; line-height: 1; }
.upload-add { width: 92px; height: 92px; border-radius: 10px; border: 1.5px dashed var(--border); background: #fafafa; color: var(--text-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; }

/* ===== 登录页 ===== */
.auth-wrap { max-width: 420px; margin: 40px auto 60px; padding: 0 16px; }
.auth-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 28px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 20px; background: #f3f4f6; border-radius: 11px; padding: 4px; }
.auth-tabs button { flex: 1; border: none; background: transparent; padding: 8px 0; border-radius: 8px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.auth-tabs button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.otp-row { display: flex; gap: 10px; }
.otp-row input { flex: 1; }
.code-btn { white-space: nowrap; }
.auth-tip { font-size: 12.5px; color: var(--text-3); margin-top: 12px; text-align: center; }
.auth-link { color: var(--primary); cursor: pointer; }

/* ===== 后台 ===== */
.admin-tabs { display: flex; gap: 8px; margin: 20px 0 18px; flex-wrap: wrap; }
.admin-tabs button { border: 1px solid var(--border); background: #fff; padding: 8px 20px; border-radius: 10px; font-size: 14.5px; color: var(--text-2); font-weight: 600; }
.admin-tabs button.active { background: var(--primary-grad); color: #fff; border-color: transparent; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { color: var(--text-3); font-weight: 600; font-size: 13px; white-space: nowrap; }
.pkg-editor-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.pkg-editor-row input { width: 110px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat-card .lbl { font-size: 13px; color: var(--text-2); }
.stat-card .num.money { color: #c02626; }
.stat-card.stat-warn { border: 1px solid #fcd9a5; background: #fffdf5; }
.stat-card.stat-warn .num { color: #d97706; }
.stat-card.stat-link { cursor: pointer; transition: 0.15s; }
.stat-card.stat-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ===== 后台：工具栏 / 筛选条 / 汇总条 ===== */
.tool-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tool-head .btn { margin-left: auto; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.filter-bar select, .filter-bar input {
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; font-size: 14px;
  background: #fff; color: var(--text); outline: none; transition: 0.15s;
}
.filter-bar input { flex: 1; min-width: 150px; }
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--primary); }
.hint-block { font-size: 12.5px; color: var(--text-3); line-height: 1.7; margin: 0 0 10px; }
.hint-block b { color: var(--text-2); }
.sum-bar { background: #fff8f7; border: 1px solid #fadcd6; color: var(--text-2); border-radius: 10px; padding: 9px 13px; font-size: 13.5px; line-height: 1.75; margin-bottom: 12px; }
.sum-bar b { color: var(--text); font-weight: 700; }
.money { color: #c02626; font-weight: 700; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600; }
.sub { color: var(--text-3); font-size: 12px; }

/* 内容管理：排序单元格 */
.sort-cell { display: flex; align-items: center; gap: 4px; }
.sort-input { width: 64px; padding: 5px 6px; border: 1px solid var(--border); border-radius: 7px; text-align: center; font-size: 13px; }
.cell-title { max-width: 280px; }
.cell-ops { white-space: normal; }
.cell-ops .btn { margin: 2px 4px 2px 0; }
.cell-time { font-size: 12px; white-space: nowrap; }
.cell-note { max-width: 150px; font-size: 12px; color: var(--text-2); }
.cell-uid { max-width: 180px; word-break: break-all; font-size: 12px; color: var(--text-3); }
.badge-expired { background: #f3f4f6; color: #9ca3af; }
.badge-soon { background: #f5f3ff; color: #6d28d9; }

/* 数据概览：趋势图 / 榜单 / 到期清单 */
.chart-box { width: 100%; height: 230px; }
.chart-box canvas { width: 100%; display: block; }
.chart-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--text-3); margin-top: 8px; }
.chart-legend span { display: inline-flex; align-items: center; }
.chart-legend i { display: inline-block; width: 13px; height: 9px; border-radius: 2px; margin-right: 6px; }
.lg-bar { background: rgba(240, 160, 75, 0.9); }
.lg-line { background: #e0453a; height: 3px; }
.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rank-item:last-child { border-bottom: none; }
.rk-no { flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px; background: #fdeeec; color: var(--primary); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.rk-main { flex: 1; min-width: 0; }
.rk-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.rk-val { flex-shrink: 0; font-size: 13.5px; font-weight: 700; color: var(--primary); }
.rank-empty { font-size: 13px; color: var(--text-3); padding: 14px 0; }

/* toast */
#toast { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast-item { background: rgba(30, 33, 40, 0.92); color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 14px; animation: toastIn 0.25s; max-width: 86vw; }
.toast-item.err { background: rgba(190, 40, 30, 0.95); }
.toast-item.ok { background: rgba(22, 163, 74, 0.95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* loading skeleton */
.skel { background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%); background-size: 200% 100%; animation: skel 1.2s infinite; border-radius: 10px; height: 180px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .dp-layout { grid-template-columns: 1fr; }
  .dp-side { position: static; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .bottom-nav { display: flex; }
  body { padding-bottom: 76px; }
  .header-user .user-chip { display: none; }
  .hero h1 { font-size: 20px; }
  .hero-stats { font-size: 12.5px; gap: 8px; }
  .back-top { right: 14px; bottom: 96px; width: 40px; height: 40px; }
  .search-clear { width: 34px; border-radius: 10px; }
  /* 详情页移动端：底部固定操作条 */
  .dp-wrap { padding-bottom: 150px; }
  .dp-title { font-size: 20px; }
  .dp-cover img { max-height: 260px; }
  .dp-thumbs { grid-template-columns: repeat(3, 1fr); }
  .dp-thumbs img { height: 80px; }
  .dp-side-actions { display: none; }
  .dp-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 60px; z-index: 58; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); }
  .dp-bar .btn { flex: 1; }
  .pkg-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .field-row { flex-direction: column; gap: 0; }
  .modal { border-radius: 16px; }
  .detail-images { grid-template-columns: repeat(2, 1fr); }
  /* 移动端与桌面端功能一致的细节适配 */
  .detail-meta { font-size: 12.5px; gap: 6px 14px; }
  .contact-box { flex-wrap: wrap; }
  .contact-box .tel-btn { margin-left: 0; width: 100%; }
  .card-actions .tel-btn { padding: 8px 12px; font-size: 13.5px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .post-card .cover { height: 170px; }
}

/* ===== 后台移动端：表格转卡片，便于用手机处理收款与内容 ===== */
@media (max-width: 720px) {
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs button { flex-shrink: 0; padding: 8px 14px; font-size: 14px; }
  .panel { padding: 16px; }
  .filter-bar select { flex: 1; min-width: 128px; }
  .filter-bar input { min-width: 100%; }
  .table-wrap { overflow-x: visible; }
  table.data { display: block; width: 100%; font-size: 14.5px; }
  table.data tbody { display: block; }
  table.data thead { display: none; }
  table.data tr { display: block; width: 100%; box-sizing: border-box; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; margin-bottom: 10px; }
  table.data td { display: flex; align-items: flex-start; gap: 10px; border: 0; padding: 5px 0; max-width: none; min-width: 0; white-space: normal; }
  table.data td[data-label]::before { content: attr(data-label); flex: 0 0 68px; color: var(--text-3); font-size: 12.5px; line-height: 1.6; }
  table.data td.cell-ops { flex-wrap: wrap; }
  table.data td.cell-ops::before { flex: 0 0 100%; }
  table.data td.cell-ops .btn { flex: 1 1 auto; min-width: 84px; justify-content: center; }
  .mono { word-break: break-all; }
  .sort-cell { flex-wrap: wrap; }
  .chart-box { height: 200px; }
  .stat-row { gap: 10px; }
  .stat-card { padding: 13px 14px; }
  .stat-card .num { font-size: 21px; }
  .rk-title { white-space: normal; }
}

/* ---------- 后台：公众号采集 ---------- */
.tool-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.mp-src { font-size: 12.5px; color: var(--text-3); line-height: 1.8; }
.mp-src b { color: var(--text-2); }
.mp-thumbs { display: flex; gap: 8px; flex-wrap: wrap; max-height: 260px; overflow-y: auto; padding: 2px; }
.mp-thumb {
  width: 84px; height: 84px; border-radius: 9px; overflow: hidden; position: relative;
  border: 2px solid transparent; cursor: pointer; background: var(--bg-2, #f2f3f5);
}
.mp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-thumb.on { border-color: var(--primary); }
.mp-thumb .tick {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
  display: none;
}
.mp-thumb.on .tick { display: block; }
.mp-status { font-size: 13px; color: var(--text-2); margin: 12px 0; }
