/* ============ 平台运营管理中心 样式 ============ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1e6fbf;
  --primary-dark: #155a9e;
  --accent: #f57c00;
  --bg: #f0f3f7;
  --sidebar-bg: #0f2b4a;
  --card: #fff;
  --border: #e5e9f0;
  --text: #222;
  --text-sub: #666;
  --text-light: #999;
  --green: #2e9e5b;
  --red: #e53e3e;
  --radius: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ============ 顶部栏 ============ */
.admin-topbar {
  height: 60px; background: var(--sidebar-bg); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 100;
}
.admin-brand { display: flex; align-items: center; gap: 12px; }
.admin-logo { width: 36px; height: 36px; border-radius: 8px; }
.admin-brand-name { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.admin-badge {
  font-size: 12px; background: var(--accent); color: #fff;
  padding: 2px 10px; border-radius: 12px; font-weight: 600;
}
.admin-topbar-right { display: flex; align-items: center; gap: 20px; }
.admin-operator { font-size: 14px; color: #cdd9e6; }
.admin-back {
  font-size: 13px; color: #fff; border: 1px solid rgba(255,255,255,.4);
  padding: 6px 16px; border-radius: 6px; transition: all .2s;
}
.admin-back:hover { background: rgba(255,255,255,.12); }

/* ============ 布局 ============ */
.admin-layout { display: flex; min-height: calc(100vh - 60px); }

/* 侧边栏 */
.admin-sidebar {
  width: 220px; background: var(--sidebar-bg); flex-shrink: 0;
  display: flex; flex-direction: column;
}
.admin-nav { padding: 20px 0; flex: 1; }
.admin-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; font-size: 15px; color: #b8c8d8;
  transition: all .2s; border-left: 3px solid transparent;
}
.admin-nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.admin-nav-item.active {
  color: #fff; background: rgba(30,111,191,.35);
  border-left-color: var(--accent); font-weight: 600;
}
.nav-icon { font-size: 18px; width: 22px; text-align: center; }
.admin-sidebar-foot {
  padding: 20px 24px; border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px; color: #6f879b; line-height: 1.8;
}

/* 主内容区 */
.admin-main { flex: 1; padding: 28px; overflow-x: auto; }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-title { font-size: 22px; font-weight: 800; color: #0f2b4a; }
.panel-stats { display: flex; gap: 20px; }
.stat { font-size: 13px; color: var(--text-sub); background: #fff; padding: 8px 16px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.stat b { color: var(--primary); font-size: 16px; margin-right: 4px; }
.stat .stat-green { color: var(--green); }

/* 表格 */
.table-wrap {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.06); overflow: hidden;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table thead th {
  background: #f7f9fc; text-align: left; padding: 14px 20px;
  font-size: 13px; color: var(--text-sub); font-weight: 700;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table tbody td {
  padding: 14px 20px; font-size: 14px; color: var(--text);
  border-bottom: 1px solid #f0f2f6; white-space: nowrap;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #fafcff; }

.cell-name { font-weight: 600; color: #0f2b4a; }
.merchant-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; color: #fff;
  font-size: 16px; margin-right: 10px; vertical-align: middle;
}
.cell-mono { font-family: "SF Mono", Consolas, monospace; font-size: 13px; color: var(--text-sub); }
.cell-amount { color: #e53e3e; font-weight: 700; }

/* 状态标签 */
.status-tag {
  display: inline-block; font-size: 12px; padding: 3px 12px; border-radius: 4px; font-weight: 600;
}
.tag-uploaded { background: #eaf3fc; color: var(--primary); }
.tag-paid { background: #fff7f0; color: var(--accent); }
.tag-verified { background: #eaf7ee; color: var(--green); }
.tag-refunded { background: #f5f5f5; color: var(--text-light); }
.tag-vip { background: #fff3e0; color: #e67e00; }
.tag-normal { background: #f5f5f5; color: var(--text-sub); }
.tag-pending { background: #fff7f0; color: #e67e00; }
.tag-published { background: #eaf7ee; color: var(--green); }
.tag-blocked { background: #fdecec; color: var(--red); }

/* 操作按钮 */
.btn-pass, .btn-reject {
  padding: 6px 18px; font-size: 13px; border-radius: 6px;
  cursor: pointer; border: 1px solid transparent; transition: all .2s;
  margin-right: 8px;
}
.btn-pass { background: var(--green); color: #fff; }
.btn-pass:hover { background: #26834d; }
.btn-reject { background: #fff; color: var(--red); border-color: var(--red); }
.btn-reject:hover { background: #fff1f1; }

/* 查看内容 / 屏蔽该文章 */
.btn-view, .btn-block {
  padding: 6px 16px; font-size: 13px; border-radius: 6px;
  cursor: pointer; border: 1px solid transparent; transition: all .2s;
  margin-right: 8px;
}
.btn-view { background: #eaf3fc; color: var(--primary); }
.btn-view:hover { background: #d6e8fb; }
.btn-block { background: #fff; color: var(--red); border-color: var(--red); }
.btn-block:hover { background: #fff1f1; }
.btn-block:disabled { background: #f5f5f5; color: var(--text-light); border-color: #e0e0e0; cursor: not-allowed; }

.panel-tip {
  margin-top: 16px; font-size: 13px; color: var(--text-light); line-height: 1.8;
  background: #fff; padding: 14px 20px; border-radius: 8px;
  border-left: 3px solid var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

/* Toast 提示 */
.admin-toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(15,43,74,.92); color: #fff; padding: 12px 24px;
  border-radius: 8px; font-size: 14px; z-index: 9999;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.admin-toast.show { opacity: 1; }

/* 内容预览弹窗 */
#contentModal { display: none; position: fixed; inset: 0; z-index: 1000; }
.content-modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.content-modal-dialog {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 14px; padding: 32px; width: 520px; max-width: 92vw;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.content-modal-close { position: absolute; top: 14px; right: 18px; font-size: 26px; color: var(--text-light); cursor: pointer; line-height: 1; }
.content-modal-close:hover { color: var(--text); }
.content-modal-title { font-size: 20px; font-weight: 700; color: #0f2b4a; margin-bottom: 16px; }
.content-modal-meta { font-size: 13px; color: var(--text-sub); line-height: 1.8; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.content-modal-meta strong { font-size: 15px; color: #0f2b4a; display: block; margin-bottom: 4px; }
.content-modal-body { padding: 18px 0; font-size: 14px; color: #444; line-height: 1.9; }
.content-modal-body p { margin-bottom: 10px; }
.content-modal-foot { padding-top: 12px; border-top: 1px solid var(--border); }
.content-modal-tip { font-size: 12px; color: var(--text-light); }

/* 响应式 */
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
  .admin-nav { display: flex; }
  .admin-nav-item { white-space: nowrap; }
  .admin-sidebar-foot { display: none; }
  .admin-topbar { flex-wrap: wrap; height: auto; padding: 12px 16px; }
}
