/* ============================================
   多城市分类信息系统 - 公共样式（白色极简风）
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1a1a1a;
  --primary-hover: #333;
  --accent: #2f6f4f;
  --accent-hover: #38845e;
  --accent-light: #f0f6f2;
  --text: #1f2329;
  --text-secondary: #646a73;
  --text-muted: #8f959e;
  --border: #e5e6eb;
  --bg: #ffffff;
  --bg-page: #f7f8fa;
  --danger: #d94848;
  --success: #2f9e5c;
  --radius: 6px;
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ---------- 通用 ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-block; padding: 9px 22px; border-radius: var(--radius);
  border: 1px solid transparent; font-size: 15px; cursor: pointer;
  transition: all .2s ease; line-height: 1.5; text-align: center; background: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border-color: var(--border); color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { color: var(--danger); border-color: #f3d4d4; background: #fff; }
.btn-danger:hover { background: #fdf3f3; }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

/* ---------- 顶部导航 ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.site-header .header-inner { display: flex; align-items: center; height: 64px; gap: 28px; }
.site-logo { font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: .5px; }
.site-nav { display: flex; gap: 24px; flex: 1; }
.site-nav a { color: var(--text-secondary); font-size: 15px; padding: 4px 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.header-city {
  display: inline-flex; align-items: center; gap: 4px; color: var(--accent);
  font-weight: 500; font-size: 15px; cursor: pointer;
}
.header-city:hover { opacity: .8; }
.header-user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--text-secondary); }
.header-user a:hover { color: var(--accent); }

/* ---------- 通用页头横幅 ---------- */
.page-banner { background: #fff; border-bottom: 1px solid var(--border); padding: 28px 0 26px; }
.page-banner h1 { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.page-banner .sub { color: var(--text-muted); font-size: 14px; }

/* ---------- 分类导航 ---------- */
.category-nav { background: #fff; border-bottom: 1px solid var(--border); }
.category-nav .cat-list { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0; }
.category-nav .cat-list a {
  padding: 7px 16px; border-radius: 999px; font-size: 14px; color: var(--text-secondary);
  border: 1px solid var(--border); white-space: nowrap; background: #fff; transition: all .15s;
}
.category-nav .cat-list a:hover { color: var(--accent); border-color: var(--accent); }
.category-nav .cat-list a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 信息列表 ---------- */
.post-list { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.post-item { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border); transition: background .15s; }
.post-item:last-child { border-bottom: none; }
.post-item:hover { background: #fafbfa; }
.post-item .post-main { flex: 1; min-width: 0; }
.post-item .post-title {
  font-size: 16px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;
}
.post-item .post-title:hover { color: var(--accent); }
.post-item .post-meta { margin-top: 6px; font-size: 13px; color: var(--text-muted); display: flex; gap: 16px; flex-wrap: wrap; }
.post-cat-badge {
  display: inline-block; padding: 1px 10px; border-radius: 3px; font-size: 12px;
  background: var(--accent-light); color: var(--accent); border: 1px solid #dcebe2;
}
.post-time { color: var(--text-muted); }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; color: #c9cdd4; }
.empty-state p { font-size: 14px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 26px 0 10px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-block; min-width: 36px; height: 36px; line-height: 34px; text-align: center;
  padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-secondary); font-size: 14px; background: #fff;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .disabled { color: #c9cdd4; cursor: not-allowed; background: #fafafa; }

/* ---------- 表单 ---------- */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 520px; margin: 30px auto; }
.form-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.form-group input[type=text], .form-group input[type=password], .form-group textarea, .form-group select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; color: var(--text); outline: none; transition: border-color .2s; background: #fff;
  font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); }
.form-group textarea { min-height: 160px; resize: vertical; }

/* ---------- wangEditor 富文本容器 ----------
   .w-e-text-container 默认 height:100%，必须给父容器 #editor-container
   明确高度，否则编辑区会塌陷为 0 高度而看不到内容
---------------------------------------------------------------- */
.toolbar-container { border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.editor-container { border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); height: 360px; overflow: hidden; }
.editor-container .w-e-text-container { background: #fff; }
.form-tip { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.form-error { color: var(--danger); font-size: 13px; margin-bottom: 14px; }
.form-links { margin-top: 16px; font-size: 14px; color: var(--text-muted); text-align: center; }
.form-links a { color: var(--accent); }

/* ---------- 详情页 ---------- */
.detail-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 34px; }
.detail-title { font-size: 22px; font-weight: 600; line-height: 1.5; margin-bottom: 14px; word-break: break-all; }
.detail-meta { display: flex; gap: 18px; font-size: 13px; color: var(--text-muted); padding-bottom: 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.detail-content { padding: 22px 0; font-size: 15px; line-height: 1.8; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.detail-contact { background: var(--accent-light); border: 1px solid #dcebe2; border-radius: var(--radius); padding: 16px 20px; font-size: 15px; }
.detail-contact .label { color: var(--text-muted); margin-right: 10px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); background: #fff; padding: 26px 0; margin-top: 50px; }
.site-footer p { text-align: center; color: var(--text-muted); font-size: 13px; }

/* ---------- 提示条 ---------- */
.alert { padding: 12px 18px; border-radius: var(--radius); font-size: 14px; margin-bottom: 20px; }
.alert-success { background: #f0f9f1; color: var(--success); border: 1px solid #d3ead9; }
.alert-error { background: #fdf3f3; color: var(--danger); border: 1px solid #f3d4d4; }

/* ---------- 面包屑 ---------- */
.breadcrumb { font-size: 13px; color: var(--text-muted); padding: 18px 0; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- 城市选择页 ---------- */
.city-locate {
  display: flex; align-items: center; gap: 14px;
  background: var(--accent-light); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px; margin: 16px 0 20px;
}
.city-locate::before {
  content: "📍"; font-size: 18px; line-height: 1; flex-shrink: 0;
}
.city-locate .locate-label {
  font-size: 13px; color: var(--text-muted); flex-shrink: 0; font-weight: 500;
}
.city-locate .locate-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.city-locate .locate-name { font-size: 16px; font-weight: 600; color: var(--text); }
.city-locate .locate-province { font-size: 13px; color: var(--text-secondary); }
.city-locate .locate-btn {
  display: inline-block; padding: 5px 16px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 500;
  border: 1px solid var(--accent); transition: background .15s;
}
.city-locate .locate-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.city-locate .locate-tag {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.city-locate .locate-tag-current { background: #e6f4ea; color: var(--accent); border: 1px solid var(--accent); }
.city-locate .locate-empty { font-size: 14px; color: var(--text-muted); }
.city-group { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.city-group .group-title { padding: 14px 22px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--border); background: #fafbfc; }
.city-group .city-links { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 22px; }
.city-group .city-links a {
  padding: 6px 16px; border-radius: 999px; border: 1px solid var(--border); font-size: 14px; color: var(--text-secondary); background: #fff;
}
.city-group .city-links a:hover { border-color: var(--accent); color: var(--accent); }
.hot-cities { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.hot-cities a {
  padding: 8px 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; color: var(--text); font-weight: 500;
}
.hot-cities a:hover { border-color: var(--accent); color: var(--accent); }
.city-letter-nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 16px 0; position: sticky; top: 0; background: var(--bg-page); z-index: 5; }
.city-letter-nav a {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; color: var(--text-secondary); background: #fff;
}
.city-letter-nav a:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   安装向导
   ============================================ */
.install-body { background: var(--bg-page); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.install-container { width: 100%; max-width: 760px; }
.install-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 40px 48px; }
.install-header { text-align: center; margin-bottom: 30px; }
.install-header h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.install-header p { color: var(--text-muted); font-size: 14px; }
.install-steps { display: flex; justify-content: space-between; margin-bottom: 36px; }
.install-steps .step { flex: 1; text-align: center; font-size: 13px; color: var(--text-muted); position: relative; padding-top: 30px; }
.install-steps .step::before {
  content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 1px; background: var(--border); z-index: 0;
}
.install-steps .step:first-child::before { display: none; }
.install-steps .step .step-num {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; line-height: 26px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border); color: var(--text-muted); font-size: 13px; z-index: 1;
}
.install-steps .step.active { color: var(--accent); font-weight: 500; }
.install-steps .step.active .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }

.env-check { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.env-row { display: flex; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--border); font-size: 14px; background: #fff; }
.env-row:last-child { border-bottom: none; }
.env-row .env-name { flex: 1; color: var(--text); }
.env-row .env-require { width: 130px; color: var(--text-muted); font-size: 13px; }
.env-row .env-current { width: 100px; color: var(--text-secondary); font-size: 13px; }
.env-row .env-status { width: 70px; text-align: right; font-size: 13px; }
.env-row.ok .env-status { color: var(--success); }
.env-row.fail .env-status { color: var(--danger); }
.env-row.fail { background: #fdf8f8; }

.install-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; }
.install-tip { font-size: 13px; color: var(--text-muted); margin-top: 20px; line-height: 1.7; }
.install-tip.fail { color: var(--danger); }

.db-form .form-section-title { font-size: 15px; font-weight: 600; margin: 22px 0 16px; padding-left: 10px; border-left: 3px solid var(--accent); }
.db-form .form-row { display: flex; align-items: center; margin-bottom: 14px; }
.db-form .form-row label { width: 120px; font-size: 14px; color: var(--text-secondary); text-align: right; padding-right: 16px; flex-shrink: 0; }
.db-form .form-row input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; }
.db-form .form-row input:focus { border-color: var(--accent); }
.db-form .form-tip { width: 100%; font-size: 12px; color: var(--text-muted); margin: -8px 0 12px 136px; }

.install-progress { text-align: center; padding: 30px 0 10px; }
.progress-bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; max-width: 420px; margin: 0 auto 16px; }
.progress-inner { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .3s; }
#progressText { font-size: 14px; color: var(--text-secondary); }

.install-complete { text-align: center; padding: 20px 0; }
.complete-icon {
  width: 64px; height: 64px; line-height: 64px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--accent-light); color: var(--accent); font-size: 32px; border: 1px solid #dcebe2;
}
.install-complete h2 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.install-complete p { color: var(--text-muted); font-size: 14px; margin-bottom: 10px; }
.install-complete .install-actions { justify-content: center; }
.install-footer { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 22px; }

/* ============================================
   后台管理
   ============================================ */
.admin-body { background: var(--bg-page); min-height: 100vh; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 10;
}
.admin-sidebar .sidebar-logo { height: 64px; display: flex; align-items: center; padding: 0 24px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 700; color: var(--accent); }
.admin-sidebar .sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.admin-sidebar .nav-group-title { padding: 14px 24px 8px; font-size: 12px; color: var(--text-muted); }
.admin-sidebar .nav-item { display: flex; align-items: center; padding: 11px 24px; color: var(--text-secondary); font-size: 14px; border-left: 3px solid transparent; }
.admin-sidebar .nav-item:hover { color: var(--accent); background: #fafbfa; }
.admin-sidebar .nav-item.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-light); font-weight: 500; }
.admin-sidebar .sidebar-footer { padding: 16px 24px; border-top: 1px solid var(--border); }
.admin-sidebar .sidebar-footer a { font-size: 13px; color: var(--text-muted); }
.admin-sidebar .sidebar-footer a:hover { color: var(--accent); }

.admin-main { flex: 1; margin-left: 220px; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  height: 64px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  position: sticky; top: 0; z-index: 9;
}
.admin-topbar .topbar-title { font-size: 17px; font-weight: 600; }
.admin-topbar .topbar-user { font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 16px; }
.admin-topbar .topbar-user a:hover { color: var(--accent); }
.admin-content { padding: 28px; flex: 1; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text); }

/* 后台表格 */
.admin-table-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.admin-table-toolbar .toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-table-toolbar select, .admin-table-toolbar input {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; background: #fff;
}
.admin-table-toolbar input:focus, .admin-table-toolbar select:focus { border-color: var(--accent); }
.table-wrap { overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin-table th, table.admin-table td { padding: 13px 20px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.admin-table th { background: #fafbfc; color: var(--text-secondary); font-weight: 500; font-size: 13px; }
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table tr:hover td { background: #fafbfa; }
table.admin-table td .cell-actions { display: flex; gap: 8px; }
table.admin-table td .cell-actions a { font-size: 13px; color: var(--accent); }
table.admin-table td .cell-actions a.danger { color: var(--danger); }
.status-tag { display: inline-block; padding: 2px 10px; border-radius: 3px; font-size: 12px; }
.status-tag.on { background: #f0f9f1; color: var(--success); border: 1px solid #d3ead9; }
.status-tag.off { background: #f7f8fa; color: var(--text-muted); border: 1px solid var(--border); }
.table-empty { text-align: center; color: var(--text-muted); padding: 50px 20px; font-size: 14px; }

/* 后台登录页 */
.admin-login-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 40px 44px; width: 100%; max-width: 400px; }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-page); padding: 20px; }
.admin-login-card h2 { font-size: 20px; font-weight: 600; text-align: center; margin-bottom: 6px; }
.admin-login-card .sub { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }

/* 个人中心 */
.user-panel { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.user-panel .panel-side { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.user-panel .panel-side .panel-head { padding: 22px 20px; border-bottom: 1px solid var(--border); }
.user-panel .panel-side .panel-head .uname { font-size: 16px; font-weight: 600; }
.user-panel .panel-side .panel-head .utel { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.user-panel .panel-side .panel-menu { padding: 10px 0; }
.user-panel .panel-side .panel-menu a { display: block; padding: 10px 20px; font-size: 14px; color: var(--text-secondary); border-left: 3px solid transparent; }
.user-panel .panel-side .panel-menu a:hover { color: var(--accent); }
.user-panel .panel-side .panel-menu a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-light); }
.user-panel .panel-main { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; min-width: 0; }
.user-panel .panel-main h3 { font-size: 17px; font-weight: 600; margin-bottom: 18px; }

/* 响应式 */
@media (max-width: 768px) {
  .site-header .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; }
  .install-card { padding: 28px 22px; }
  .db-form .form-row { flex-direction: column; align-items: stretch; }
  .db-form .form-row label { width: 100%; text-align: left; padding: 0 0 6px; }
  .db-form .form-tip { margin-left: 0; }
  .install-steps .step { font-size: 12px; }
  .user-panel { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .post-item { padding: 15px 16px; }
  .detail-card { padding: 22px 18px; }
  .form-card { padding: 24px 18px; margin: 20px 10px; }
  .admin-content { padding: 16px; }
  .env-row { flex-wrap: wrap; gap: 6px; }
  .env-row .env-require { width: auto; }
}

/* ============================================
   P0 安全升级：审核状态徽章 / 验证码 / 内联操作表单
   ============================================ */
.badge { display:inline-block; padding:2px 10px; border-radius:10px; font-size:12px; line-height:18px; font-weight:500; }
.badge-pending   { background:#fdf6e3; color:#b07d1a; }
.badge-approved  { background:#eef7f0; color:#2f9e5c; }
.badge-rejected  { background:#fbeeee; color:#d94848; }
.badge-offline   { background:#f0f1f3; color:#646a73; }

.captcha-row { display:flex; gap:10px; align-items:center; }
.captcha-row input { flex:1; min-width:0; }
.captcha-img { width:130px; height:42px; border-radius:var(--radius); border:1px solid var(--border); cursor:pointer; flex-shrink:0; display:block; }

.reject-reason { margin-top:8px; padding:10px 12px; background:#fbeeee; color:#d94848; border-radius:var(--radius); font-size:13px; line-height:1.6; }

.inline-form { display:inline-block; margin:0; }
.inline-form button, .inline-form .link-btn {
  background:none; border:none; padding:0; cursor:pointer;
  font-size:13px; color:var(--accent); text-decoration:none;
}
.inline-form .link-btn.danger, .inline-form button.danger { color:var(--danger); }
.inline-form button:hover, .inline-form .link-btn:hover { text-decoration:underline; }

.filter-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.filter-tab { padding:6px 14px; border-radius:16px; font-size:13px; border:1px solid var(--border); color:var(--text-secondary); text-decoration:none; background:#fff; transition:all .15s; }
.filter-tab:hover { border-color:var(--accent); color:var(--accent); }
.filter-tab.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.filter-tab .count { margin-left:4px; opacity:.75; }

.reason-form { display:flex; gap:8px; margin-top:8px; flex-wrap:wrap; }
.reason-form input { flex:1; min-width:200px; padding:8px 10px; border:1px solid var(--border); border-radius:var(--radius); font-size:13px; }

/* ============================================
   P1 运营功能：搜索/标签/缩略图/图片展示
   ============================================ */
.search-bar { display:flex; gap:10px; margin-bottom:14px; }
.search-bar input[type=text] { flex:1; min-width:0; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius); font-size:14px; }
.search-bar input[type=text]:focus { border-color:var(--accent); outline:none; }
.search-tip { font-size:13px; color:var(--text-muted); margin:0 0 12px; }

.tag { display:inline-block; padding:1px 8px; border-radius:9px; font-size:11px; line-height:16px; vertical-align:2px; margin-right:6px; font-weight:500; }
.tag-top { background:#fdf6e3; color:#b07d1a; }
.tag-rec { background:#eef2fb; color:#4a6fd4; }

.post-thumb { display:block; width:72px; height:54px; border-radius:6px; overflow:hidden; flex-shrink:0; }
.post-thumb img { width:100%; height:100%; object-fit:cover; display:block; }

.row-thumb { width:48px; height:36px; object-fit:cover; border-radius:4px; display:block; }

.detail-images { display:flex; gap:12px; flex-wrap:wrap; margin:18px 0; }
.detail-images a { display:block; width:160px; height:120px; border-radius:8px; overflow:hidden; border:1px solid var(--border); }
.detail-images img { width:100%; height:100%; object-fit:cover; display:block; transition:opacity .15s; }
.detail-images img:hover { opacity:.88; }

.audit-notice { margin-top:14px; padding:10px 12px; background:#fdf6e3; color:#b07d1a; border-radius:var(--radius); font-size:13px; }

.admin-thumb { width:56px; height:42px; object-fit:cover; border-radius:4px; display:block; }

.admin-thumbs { display:flex; gap:6px; flex-wrap:wrap; }
.admin-thumbs img { width:72px; height:54px; object-fit:cover; border-radius:4px; display:block; border:1px solid var(--border); }

.settings-section { background:#fff; border:1px solid var(--border); border-radius:12px; padding:24px 28px; margin-bottom:20px; }
.settings-section h3 { margin:0 0 16px; font-size:16px; font-weight:600; }
.settings-section textarea { width:100%; min-height:140px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius); font-size:13px; font-family:inherit; resize:vertical; }
.switch-row { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.switch-row label { margin:0; font-weight:500; }

/* ============================================
   P2 运营功能：付费置顶徽章 / 举报 / 竞价 / 批量操作
   ============================================ */
.tag-paid { background:#fff1f0; color:#cf1322; }

.detail-actions { display:flex; gap:12px; margin-top:20px; flex-wrap:wrap; }
.detail-actions .btn { min-width:120px; }

.bid-card { background:#fff; border:1px solid var(--border); border-radius:12px; padding:28px 30px; }
.bid-info { display:flex; gap:24px; flex-wrap:wrap; margin:16px 0 22px; }
.bid-stat { background:var(--bg-soft); border-radius:8px; padding:14px 18px; min-width:140px; flex:1; }
.bid-stat .num { font-size:24px; font-weight:700; color:var(--accent); }
.bid-stat .lbl { font-size:12px; color:var(--text-muted); margin-top:2px; }
.bid-queue-notice { background:#fff7e6; border:1px solid #ffd591; color:#ad6800; border-radius:8px; padding:14px 16px; margin:16px 0; font-size:13px; line-height:1.6; }

.pay-card { background:#fff; border:1px solid var(--border); border-radius:12px; padding:28px 30px; max-width:560px; }
.pay-summary { margin:18px 0; }
.pay-summary .row { display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px dashed var(--border); font-size:14px; }
.pay-summary .row.total { font-weight:700; font-size:16px; color:var(--accent); border-bottom:none; padding-top:14px; }

.batch-bar { display:flex; gap:12px; align-items:center; padding:10px 0; }
.batch-bar select { width:auto; }
.report-reason { max-width:360px; word-break:break-all; }

.status-pill { display:inline-block; padding:2px 10px; border-radius:10px; font-size:12px; font-weight:500; }
.pill-pending { background:#fff7e6; color:#ad6800; }
.pill-approved { background:#f0f9eb; color:#52c41a; }
.pill-rejected { background:#fff1f0; color:#cf1322; }
.pill-ignored { background:#f5f5f5; color:#8c8c8c; }
.pill-paid { background:#f0f9eb; color:#389e0d; }
.pill-queued { background:#fff7e6; color:#ad6800; }
.pill-expired { background:#f5f5f5; color:#8c8c8c; }

/* ============ P3 新增样式 ============ */
.contact-img { display:inline-block; vertical-align:middle; border:1px solid var(--border); border-radius:6px; background:#fff; }
.reason-options { display:flex; flex-wrap:wrap; gap:12px; }
.reason-item { display:flex; align-items:center; gap:6px; background:var(--bg-soft); border:1px solid var(--border); border-radius:8px; padding:8px 14px; cursor:pointer; font-size:14px; }
.reason-item input { accent-color:var(--accent); }
.bid-post-info { background:var(--bg-soft); border-radius:8px; padding:14px 16px; margin-bottom:16px; }
.bid-post-info > div { display:flex; justify-content:space-between; padding:4px 0; font-size:14px; }
.bid-post-info .muted { color:var(--text-muted); }
.qr-box { display:flex; justify-content:center; padding:16px; }
.qr-box img { width:220px; height:220px; border:1px solid var(--border); border-radius:8px; }

.report-stats { display:flex; gap:16px; margin-bottom:16px; flex-wrap:wrap; }
.report-stat-card { flex:1; min-width:280px; background:#fff; border:1px solid var(--border); border-radius:12px; padding:18px 20px; }
.report-stat-card h4 { font-size:14px; margin-bottom:14px; color:var(--text); }
.trend-chart { display:flex; align-items:flex-end; gap:4px; height:120px; }
.trend-bar { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; position:relative; }
.trend-bar-fill { width:70%; background:var(--accent); border-radius:3px 3px 0 0; min-height:2px; transition:height .3s; }
.trend-count { font-size:10px; color:var(--text-muted); margin-top:2px; }
.top-report-list { display:flex; flex-direction:column; gap:8px; }
.top-report-item { display:flex; align-items:center; gap:10px; font-size:13px; }
.top-report-item .rank { width:20px; height:20px; border-radius:50%; background:var(--bg-soft); color:var(--text-muted); display:flex; align-items:center; justify-content:center; font-size:11px; flex-shrink:0; }
.top-report-item .title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.top-report-item .cnt { color:var(--danger); font-weight:600; flex-shrink:0; }

/* ============ P4 新增样式 ============ */
.pay-methods { display:flex; flex-wrap:wrap; gap:12px; }
.pay-method-item { display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:10px; padding:12px 18px; cursor:pointer; font-size:14px; background:var(--bg-soft); transition:border-color .15s; }
.pay-method-item:hover { border-color:var(--accent); }
.pay-method-item input { accent-color:var(--accent); }

.pay-channel-block { border:1px solid var(--border); border-radius:12px; margin-bottom:16px; overflow:hidden; }
.pay-channel-head { padding:14px 18px; background:var(--bg-soft); border-bottom:1px solid var(--border); }
.pay-channel-body { padding:16px 18px; }
.switch-row { display:flex; align-items:center; gap:10px; cursor:pointer; font-weight:600; font-size:14px; }
.switch-row input { width:18px; height:18px; accent-color:var(--accent); }

.pill-refunded { background:#e6f4ff; color:#0958d9; }

.summary-section { display:flex; gap:16px; margin:16px 0; flex-wrap:wrap; }
.summary-card { flex:1; min-width:280px; background:linear-gradient(135deg,#fff,#fafafa); border:1px solid var(--border); border-radius:12px; padding:20px 22px; }
.summary-title { font-size:13px; color:var(--text-muted); margin-bottom:8px; }
.summary-value { font-size:28px; font-weight:700; color:var(--accent); }
.summary-sub { font-size:12px; color:var(--text-muted); margin-top:8px; }

/* ============ P5 新增样式：退款弹窗 + 收入趋势图 ============ */
.modal-overlay { position:fixed; inset:0; z-index:60; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; }
.modal-box { background:#fff; border-radius:12px; padding:24px 28px; width:100%; max-width:440px; box-shadow:0 12px 40px rgba(0,0,0,.18); }
.modal-title { font-size:16px; font-weight:700; margin-bottom:14px; }
.modal-info { background:var(--bg-soft); border-radius:8px; padding:12px 14px; margin-bottom:16px; font-size:13px; line-height:1.7; }
.modal-info > div { display:flex; justify-content:space-between; gap:12px; }
.modal-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:8px; }
.refund-trigger { background:none; border:none; cursor:pointer; font-size:13px; padding:0; }

.chart-wrap { padding:16px 12px; }
.revenue-chart { width:100%; height:220px; display:block; }

/* ============ P6 新增样式：筛选表单 + 环比对比 ============ */
.refund-filter-form { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.refund-filter-form input, .refund-filter-form select { height:34px; }
.mom-box { display:flex; gap:16px; align-items:center; font-size:13px; }
.mom-item { color:var(--text-muted); }
.mom-item b { color:var(--text); font-size:14px; }
.mom-badge { padding:3px 10px; border-radius:12px; font-weight:600; font-size:12px; }
.mom-up { background:#f0f9eb; color:#389e0d; }
.mom-down { background:#fff1f0; color:#cf1322; }

/* ============ P7 新增样式：趋势点可点击 + 退款统计图 ============ */
.trend-dot { cursor:pointer; transition:r .15s; }
.trend-dot:hover { r:6; }
.refund-chart { width:100%; height:240px; display:block; }

/* ============ P8 新增样式：统计柱可点击 ============ */
.stat-bar { cursor:pointer; transition:opacity .15s; }
.stat-bar:hover { opacity:.75; }

/* ============ P11 新增样式：可点击图例 + 导出确认弹窗 ============ */
.chart-legend { display:flex; flex-wrap:wrap; gap:8px; padding:8px 4px 4px; }
.legend-btn { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border:1px solid var(--border); border-radius:14px; background:#fff; cursor:pointer; font-size:12px; color:var(--text); transition:.15s; }
.legend-btn:hover { background:var(--bg-soft); }
.legend-btn.off { opacity:.4; text-decoration:line-through; }
.legend-swatch { display:inline-block; width:10px; height:10px; border-radius:2px; }

/* ============ P13 新增样式：图例控制区 + 导出预览柱状图 ============ */
.legend-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:8px; }
.legend-items { display:flex; flex-wrap:wrap; gap:8px; }
.btn-xs { padding:2px 8px; font-size:11px; height:24px; }
.dist-chart { margin-top:6px; }
.dist-row { display:flex; align-items:center; gap:8px; margin:4px 0; }
.dist-label { width:64px; font-size:12px; color:var(--text); text-align:right; flex-shrink:0; }
.dist-track { flex:1; min-width:0; height:14px; background:var(--bg-soft); border-radius:7px; overflow:hidden; }
.dist-fill { height:100%; background:linear-gradient(90deg, hsl(24,80%,55%), hsl(210,70%,55%)); border-radius:7px; }
.dist-val { width:80px; font-size:12px; color:var(--text-muted); flex-shrink:0; }

/* ============ P15 新增样式：图例金额 + 导出预览饼图 ============ */
.legend-amt { margin-left:6px; font-size:11px; color:var(--text-muted); font-weight:400; }
.dist-pie-wrap { display:flex; align-items:center; gap:16px; margin:8px 0 12px; flex-wrap:wrap; }
.dist-pie { width:96px; height:96px; flex-shrink:0; }
.dist-pie path { stroke:#fff; stroke-width:1; }
.dist-pie-legend { display:flex; flex-direction:column; gap:4px; min-width:0; }
.dist-pie-item { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text); }
.dist-pie-item .legend-swatch { width:10px; height:10px; border-radius:2px; flex-shrink:0; }

/* ============ P16 新增样式：维度切换按钮 ============ */
.dist-metric-btn { margin:4px 0 8px; }

/* ============ P17 新增样式：柱条数值、饼图中心、恢复顺序 ============ */
.dist-track { overflow:visible; }
.dist-fill { position:relative; }
.dist-bar-val { position:absolute; right:0; top:50%; transform:translate(100%,-50%); margin-left:6px; font-size:11px; font-weight:600; color:var(--text); white-space:nowrap; }
.dist-pie-box { position:relative; width:96px; height:96px; flex-shrink:0; }
.dist-pie-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; pointer-events:none; }
.dist-pie-total { font-size:10px; font-weight:700; color:var(--text); line-height:1.1; }
.dist-pie-total-label { font-size:9px; color:var(--text-muted); }

/* ============ P18 新增样式：饼图悬浮高亮、图例迷你条形 ============ */
.dist-pie path { transition: transform .18s ease; transform-box: fill-box; transform-origin: center; }
.dist-pie path:hover { transform: scale(1.08); }
.legend-mini { display:inline-block; width:48px; height:8px; margin-left:8px; background:var(--bg-soft); border-radius:4px; overflow:hidden; vertical-align:middle; }
.legend-mini-bar { display:block; height:100%; border-radius:4px; }

/* ============ P19 新增样式：饼图悬浮卡片、图例条形加载动画 ============ */
.pie-tip { position:fixed; z-index:10000; display:none; min-width:120px; padding:8px 12px; background:#fff; border:1px solid var(--border); border-radius:8px; box-shadow:0 6px 20px rgba(0,0,0,.12); pointer-events:none; }
.pie-tip-label { font-size:12px; font-weight:600; color:var(--text); }
.pie-tip-amt { font-size:15px; font-weight:700; color:hsl(24,80%,50%); margin-top:2px; }
.pie-tip-pct { font-size:11px; color:var(--text-muted); margin-top:2px; }
.legend-mini-bar { animation: legendBarGrow .6s cubic-bezier(.22,.61,.36,1) both; }
@keyframes legendBarGrow { from { width: 0 !important; } }

/* ============ P20 新增样式：图例迷你条形悬浮高亮 ============ */
.legend-mini-bar { transition: transform .15s ease; transform-origin: left center; }
.legend-mini:hover .legend-mini-bar { transform: scaleY(1.6); }

/* ============ P24 新增样式：日志详情弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-content { background: #fff; border-radius: 8px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-header .close { background: none; border: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--text-muted); }
.modal-body { padding: 20px; }
.code-block { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; line-height: 1.5; }
