* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f2f4f7;
    color: #1f2733;
    font-size: 14px;
}

/* 顶栏 */
.topbar {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px; height: 54px;
    background: #0f5132; color: #fff;
}
.brand { font-weight: 600; letter-spacing: .5px; }
.nav a { color: #d9f2e4; text-decoration: none; margin-left: 14px; font-size: 13.5px; }
.nav a:hover { color: #fff; }
.nav a.out { color: #ffd7c2; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 18px; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.card { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.card span { display: block; color: #667085; font-size: 12.5px; }
.card b { display: block; font-size: 26px; line-height: 1.3; margin: 4px 0 2px; color: #0f5132; }
.card i { font-style: normal; color: #98a2b3; font-size: 12px; }

h2 { font-size: 16px; margin: 24px 0 10px; display: flex; align-items: center; gap: 8px; }
.count { color: #98a2b3; font-weight: 400; font-size: 12.5px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
th { background: #fafbfc; color: #667085; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td a { color: #0b6b3a; text-decoration: none; }
td a:hover { text-decoration: underline; }
td.ops { white-space: nowrap; }
td.ops form { display: inline; }
td.ops a, td.ops button { margin-right: 8px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

.tag { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 12px; }
.tag.ok { background: #e8f8ee; color: #0b6b3a; }
.tag.off { background: #f2f3f5; color: #86909c; }
.tag.top { background: #fff3e6; color: #d25f00; }

/* 表单 */
.filter { display: flex; gap: 8px; align-items: center; background: #fff; padding: 12px; border-radius: 10px; margin-bottom: 14px; }
.filter input[type=text] { width: 240px; }
input[type=text], input[type=password], input[type=number], select, textarea {
    border: 1px solid #dcdfe6; border-radius: 8px; padding: 8px 10px; font-size: 14px; outline: none;
    background: #fff; color: inherit; font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: #0b6b3a; box-shadow: 0 0 0 3px rgba(11,107,58,.08); }
button {
    background: #0b6b3a; color: #fff; border: 0; border-radius: 8px; padding: 9px 18px;
    font-size: 14px; cursor: pointer; font-family: inherit;
}
button:hover { background: #095a31; }
button.link { background: none; color: #0b6b3a; padding: 0; font-size: 13px; }
button.link:hover { text-decoration: underline; }
button.mini { padding: 6px 12px; font-size: 13px; }

.form2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; background: #fff; padding: 16px; border-radius: 10px; }
.form2 label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #475467; }
.form2 label.full { grid-column: 1 / -1; }
.form2 .actions { display: flex; justify-content: flex-end; }
.meta { background: #fff; padding: 14px 16px; border-radius: 10px; margin-top: 14px; line-height: 1.9; color: #475467; }
.meta b { color: #1f2733; }
.row-actions { display: flex; gap: 10px; margin-top: 12px; }
.row-actions form { display: inline; }

/* 分页 */
.pager { display: flex; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.pager a { min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px; background: #fff; color: #475467; text-decoration: none; font-size: 13px; }
.pager a.on { background: #0b6b3a; color: #fff; }
.pager .dots { padding: 6px 4px; color: #98a2b3; }

/* 提示 */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; }
.flash.ok { background: #e8f8ee; color: #0b6b3a; }
.flash.err { background: #fdecec; color: #b42318; }
.notice { background: #fff; border-radius: 10px; padding: 14px 16px; margin-top: 18px; color: #475467; line-height: 1.9; font-size: 13px; }
.notice ol { margin: 6px 0 0 18px; }

/* 登录页 */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #0f5132, #0b3d27); }
.login-card { width: 380px; max-width: calc(100% - 32px); background: #fff; border-radius: 14px; padding: 26px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-card h1 { font-size: 19px; margin: 0 0 6px; }
.login-card .sub { color: #667085; font-size: 13px; margin: 0 0 16px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #475467; }
.login-card button { margin-top: 6px; padding: 11px; }
.login-card .tip { color: #98a2b3; font-size: 12px; line-height: 1.7; margin-top: 14px; }
.btnlink { display: inline-block; background: #0b6b3a; color: #fff; text-decoration: none; padding: 10px 18px; border-radius: 8px; }

@media (max-width: 720px) {
    .form2 { grid-template-columns: 1fr; }
    .nav a { margin-left: 8px; font-size: 12.5px; }
    .topbar { padding: 0 10px; }
    .brand { font-size: 13px; }
    td.ops { white-space: normal; }
}

/* 公众号二维码预览 */
.qr-preview { margin: 4px 0 12px; }
.qr-preview img {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: contain;
    border: 1px solid #e5e8ec;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}
.qr-preview .tip { font-size: 12px; color: #98a2b3; margin: 8px 0 0; }

/* 审核状态徽章 */
.sbadge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; }
.sbadge.warn  { background: #fff4e5; color: #b54708; }
.sbadge.ok    { background: #e8f8ee; color: #0b6b3a; }
.sbadge.bad   { background: #fdecec; color: #b42318; }
.sbadge.muted { background: #f2f3f5; color: #86909c; }

/* 实心按钮：绿/红底 + 白字。:not(.link) 是为了不和下面的链接式按钮抢背景色，
   否则 .link + .ok 会变成「绿底 + 绿字」，字就彻底看不见了 */
button.ok:not(.link) { background: #0b6b3a; color: #fff; }
button.ok:not(.link):hover { background: #095a31; }
button.danger:not(.link) { background: #b42318; color: #fff; }
button.danger:not(.link):hover { background: #94190f; }

/* 链接式按钮：永远透明底，只用彩色文字，杜绝被背景吃掉 */
button.link { background: transparent !important; border: 0; padding: 0; font-size: 13px; }
button.link.ok { color: #0b6b3a !important; text-decoration: underline; }
button.link.danger { color: #b42318 !important; text-decoration: underline; }
button.link:hover { opacity: .75; }

/* 审核操作区 */
.audit-box { background: #fff; border-radius: 10px; padding: 14px 16px; margin-top: 14px; border: 1px solid #ffe6c7; }
.audit-box h3 { font-size: 14px; margin: 0 0 6px; color: #b54708; }
.audit-box .hint { color: #98a2b3; font-size: 12.5px; margin: 0 0 10px; line-height: 1.7; }
.audit-box .row-actions { flex-wrap: wrap; align-items: center; }
.audit-box form.audit-reject { display: flex; gap: 8px; align-items: center; }
.audit-box input[type=text] { width: 260px; }
.form2 .tip { font-size: 12px; color: #98a2b3; }
