/* 神运碰碰平台后台。和商户台同一套结构语言（深色侧栏 + 浅色工作区），用墨绿区分「平台方」身份；
   唯一醒目的元素是审核详情底部的「审核决定」栏。 */
:root {
  color-scheme: light;
  --canvas: #eef1ef;
  --surface: #ffffff;
  --ink: #14201c;
  --ink2: #34423d;
  --muted: #667570;
  --line: #d6ddd9;
  --line2: #e6ebe8;
  --rail: #10231e;
  --rail2: #1b332c;
  --act: #0f7a5f;
  --act-hover: #0b664f;
  --act-soft: #e1f2ec;
  --warn: #9a6200;
  --warn-soft: #fff3d4;
  --bad: #c0392b;
  --bad-soft: #fbe8e5;
  --info: #2f55c7;
  --info-soft: #e7edfc;
  --r: 10px;
  --font: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.6 var(--font); color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
.num { font-variant-numeric: tabular-nums; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
a { color: var(--act); }
a.btn { text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
.hidden { display: none !important; }

/* 布局 */
.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; background: var(--rail); color: #bcccc6; overflow-y: auto; }
.rail .brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.rail .brand img { width: 34px; height: 34px; flex: none; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.rail .brand b { display: block; color: #fff; font-size: 16px; letter-spacing: .02em; }
.rail .brand span { font-size: 12px; color: #84a097; }
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.rail nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.rail nav a:hover { background: var(--rail2); color: #fff; }
.rail nav a.on { background: #fff; color: var(--ink); font-weight: 600; }
.rail nav .ic { width: 18px; height: 18px; flex: none; }
.rail nav .badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #f3c74f; color: #3b2a00; font-size: 12px; font-weight: 600; text-align: center; }
.rail nav .sep { height: 1px; margin: 10px 8px; background: var(--rail2); }
.rail .me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--rail2); font-size: 13px; }
.rail .me b { color: #fff; font-weight: 500; }
.rail .me .role { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: var(--rail2); font-size: 11px; }
.rail .me .links { margin-top: 6px; display: flex; gap: 12px; }
.rail .me button { padding: 0; border: 0; background: none; color: #84a097; cursor: pointer; }
.rail .me button:hover { color: #fff; }
main { min-width: 0; padding: 28px 36px 80px; }
.page { max-width: 1240px; margin: 0 auto; }
.head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head h1 { margin: 0; font-size: 24px; font-weight: 650; }
.head p { margin: 2px 0 0; color: var(--muted); }
.grow, .spacer { flex: 1; }

/* 控件 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; white-space: nowrap; color: var(--ink); }
.btn:hover { border-color: #aab7b2; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--act); border-color: var(--act); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--act-hover); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.solid-danger { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink2); }
.btn.ghost:hover { background: #dfe6e2; }
.btn.ghost.danger { color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.big { height: 44px; padding: 0 22px; font-size: 15px; }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
textarea.input { height: auto; min-height: 72px; padding: 8px 11px; line-height: 1.55; resize: vertical; }
.input:focus { border-color: var(--act); outline: none; box-shadow: 0 0 0 3px var(--act-soft); }
label.f { display: block; margin-bottom: 14px; }
label.f > span, .f > .lab { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; }
label.f > small, .f > small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: #dde4e0; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; color: var(--ink2); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20, 32, 28, .12); }
.seg button .n { margin-left: 4px; color: var(--muted); font-weight: 400; }
.choice { display: grid; gap: 8px; }
.choice label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line2); border-radius: 10px; cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--act); background: var(--act-soft); }
.choice input { margin-top: 4px; accent-color: var(--act); }
.choice b { display: block; }
.choice small { color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r); }
.panel.pad { padding: 18px 20px; }
.sec { margin-top: 24px; }
.sec > h2, .panel > h2 { margin: 0 0 10px; font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; margin-bottom: 6px; color: var(--ink); font-size: 16px; }
.empty .btn { margin-top: 14px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #e9eeeb; color: var(--ink2); white-space: nowrap; }
.pill.ok { background: var(--act-soft); color: var(--act); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; margin-bottom: 14px; }
.notice.ok { background: var(--act-soft); color: var(--act); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.info { background: var(--info-soft); color: var(--info); }

/* 表格 */
table.t { width: 100%; border-collapse: collapse; }
table.t th { padding: 10px 14px; text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line2); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #f6f8f7; }
table.t.compact td { padding: 7px 10px; font-size: 13px; }
table.t.grid td, table.t.grid th { border: 1px solid var(--line2); }

/* 工作台 */
.todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.todo a { display: block; padding: 18px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line2); text-decoration: none; color: var(--ink); }
.todo a:hover { border-color: var(--act); }
.todo a .n { font-size: 34px; font-weight: 700; line-height: 1.1; }
.todo a.hot { border-color: #e6c35a; background: #fffbea; }
.todo a .l { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line2); border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; }
.stats div { padding: 14px 16px; background: var(--surface); }
.stats b { display: block; font-size: 22px; font-weight: 650; }
.stats span { font-size: 12px; color: var(--muted); }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.feed { margin: 0; padding: 0; list-style: none; }
.feed li { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed time { flex: none; width: 92px; color: var(--muted); }

/* 审核：两栏 */
.review { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.queue { position: sticky; top: 20px; max-height: calc(100vh - 140px); overflow: auto; }
.queue .q { display: block; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line2); background: transparent; text-align: left; cursor: pointer; }
.queue .q:hover { background: #f6f8f7; }
.queue .q.on { background: var(--act-soft); box-shadow: inset 3px 0 0 var(--act); }
.queue .q b { display: block; font-weight: 600; }
.queue .q .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; font-size: 12px; color: var(--muted); }
.kind { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.kind.server { background: #ece6fb; color: #5a3cb3; }
.kind.pc { background: var(--info-soft); color: var(--info); }
.kind.mobile { background: #e4f4f7; color: #146b7c; }
.detail { min-height: 400px; }
.dh { padding: 18px 22px 14px; border-bottom: 1px solid var(--line2); }
.dh h2 { margin: 0; font-size: 19px; }
.dh .meta { margin-top: 4px; color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line2); overflow-x: auto; }
.tabs button { padding: 11px 12px; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; color: var(--muted); white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--act); font-weight: 600; }
.tabs button .n { margin-left: 4px; font-size: 12px; }
.tabbody { padding: 18px 22px 24px; }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.check.ok { background: var(--act-soft); color: var(--act); }
.check.bad { background: var(--bad-soft); color: var(--bad); }
.check b { font-size: 15px; }
.finding { padding: 10px 0; border-bottom: 1px dashed var(--line2); }
.finding:last-child { border-bottom: 0; }
.finding .hint { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sev { display: inline-block; width: 44px; text-align: center; border-radius: 5px; font-size: 11px; font-weight: 600; }
.sev.error { background: var(--bad-soft); color: var(--bad); }
.sev.warn { background: var(--warn-soft); color: var(--warn); }
.sev.info { background: #e9eeeb; color: var(--muted); }
.vm td.always { background: #e9f6f0; color: var(--act); }
.vm td.never { color: #aab4b0; }
.vm td.cond { background: #fff7df; color: var(--warn); }
.guide { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--act); background: #f4f8f6; color: var(--ink2); font-size: 13px; }
pre.code { margin: 0; padding: 12px 14px; max-height: 520px; overflow: auto; border-radius: 8px; background: #0f1a17; color: #d7e4df; font: 12.5px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.shots figure { margin: 0; }
.shots img { width: 100%; border: 1px solid var(--line2); border-radius: 8px; background: #0b0d14; }
.shots figcaption { font-size: 12px; color: var(--muted); }
.files { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; }
.files .list { max-height: 520px; overflow: auto; border: 1px solid var(--line2); border-radius: 8px; }
.files .list button { display: block; width: 100%; padding: 6px 10px; border: 0; background: none; text-align: left; font: 12.5px var(--mono); cursor: pointer; word-break: break-all; }
.files .list button.on { background: var(--act-soft); color: var(--act); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs figure { margin: 0; width: 92px; text-align: center; }
.thumbs img { width: 92px; height: 92px; object-fit: contain; border-radius: 8px; background: #12131c; }
.thumbs figcaption { font-size: 11px; color: var(--muted); }

/* 审核决定栏：唯一醒目的元素 */
.decide { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line2); border-radius: 0 0 var(--r) var(--r); background: linear-gradient(180deg, #fbfdfc, #f1f6f3); box-shadow: 0 -10px 24px rgba(20, 32, 28, .06); }
.decide .input { flex: 1; }
.decide .stamp { padding: 0 22px; }
.decided { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line2); color: var(--muted); }

/* 图片审核 */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mcard { overflow: hidden; }
.mcard .im { display: grid; place-items: center; aspect-ratio: 1; background: #12131c; }
.mcard .im img { width: 100%; height: 100%; object-fit: contain; }
.mcard .cap { padding: 10px 12px 12px; }

/* 卡片网格（游戏） */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.gcard { padding: 16px 18px; cursor: pointer; }
.gcard:hover { border-color: #aab7b2; }
.gcard h3 { margin: 0; font-size: 16px; }
.comps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.comps div { padding: 8px 10px; border-radius: 8px; background: #f4f7f5; font-size: 12px; }
.comps b { display: block; font-size: 13px; }

/* 危险操作行（设置区底部） */
.danger-zone { display: flex; align-items: center; gap: 16px; padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--line2); }
.danger-zone > div { flex: 1; }
.danger-zone b { display: block; font-size: 13px; }
.danger-zone small { color: var(--muted); font-size: 12px; }

/* 抽屉、弹层 */
.mask { position: fixed; inset: 0; z-index: 40; background: rgba(20, 32, 28, .35); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(720px, 100vw); overflow: auto; background: var(--canvas); box-shadow: -12px 0 40px rgba(20, 32, 28, .18); animation: slide .18s ease-out; }
.drawer .top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 24px; background: var(--surface); border-bottom: 1px solid var(--line2); }
.drawer .top h2 { margin: 0; font-size: 18px; }
.drawer .body { padding: 20px 24px 40px; }
@keyframes slide { from { transform: translateX(32px); } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
dl.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; min-width: 0; word-break: break-all; }
.modal-mask { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(20, 32, 28, .42); }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 22px 24px; border-radius: 14px; background: var(--surface); box-shadow: 0 24px 60px rgba(20, 32, 28, .3); }
.modal.wide { width: min(760px, 100%); }
.modal h2 { margin: 0 0 6px; font-size: 18px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.handoff { margin: 12px 0; padding: 14px 16px; border-radius: 10px; background: #0f1a17; color: #e8f1ed; font: 13px/1.7 var(--mono); white-space: pre-wrap; word-break: break-all; }
.handoff .k { color: #8fb3a6; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(20, 32, 28, .3); }
.toast.bad { background: var(--bad); }

/* 登录 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% 0%, #1d3a32 0%, var(--rail) 55%); }
.login form { width: min(380px, 100%); padding: 28px 28px 24px; border-radius: 16px; background: var(--surface); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.login .login-mark { display: block; width: 52px; height: 52px; margin-bottom: 14px; }
.login h1 { margin: 0; font-size: 20px; }
.login p { margin: 4px 0 22px; color: var(--muted); }
.login .err { min-height: 20px; margin: 2px 0 10px; color: var(--bad); font-size: 13px; }

@media (max-width: 1100px) {
  .review { grid-template-columns: 1fr; }
  .queue { position: static; max-height: 320px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 10px; }
  .rail nav { flex-direction: row; flex-wrap: wrap; }
  .rail nav .sep, .rail .me { display: none; }
  main { padding: 20px 14px 60px; }
  .todo { grid-template-columns: 1fr; }
  .files { grid-template-columns: 1fr; }
}

/* ADR-0026：审核详情 */
.appeal { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: #fff8e6; border: 1px solid #f1dfae; font-size: 13px; }
.files .list button.added { color: var(--act); }
.files .list button.removed { color: var(--bad); text-decoration: line-through; }
.files .list button.modified { color: #9a6a00; }
.files .list details button { padding-left: 14px; }
.fv { min-width: 0; overflow: auto; }
pre.code.diff span { display: block; white-space: pre; }
pre.code.diff span i { display: inline-block; width: 42px; margin-right: 10px; color: #9aa7a2; font-style: normal; text-align: right; user-select: none; }
pre.code.diff span { min-height: 1.5em; }
pre.code.diff span.add { background: rgba(46, 160, 67, .28); }
pre.code.diff span.del { background: rgba(248, 81, 73, .26); }
pre.code.diff span.skip { color: #8b9a95; padding: 2px 0 2px 52px; background: rgba(255, 255, 255, .05); }

/* ADR-0030：委托与提现设置两列排布 */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

/* 与 apps/common/base.css 里的讨论区样式相同（后台不加载 base.css） */
/* 委托讨论区（kit.js forumHtml） */
.forum { display: flex; flex-direction: column; gap: 10px; }
.forum .fnew, .forum .fre { display: flex; flex-direction: column; gap: 8px; }
.forum .fre { margin-top: 8px; }
.forum .fre[hidden] { display: none; }
.forum .fp { padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line2); }
.forum .fh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.forum .fx { margin-top: 4px; white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.forum .frs { margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--line2); display: flex; flex-direction: column; gap: 8px; }
.forum .fr .fx { margin-top: 2px; }
.forum .fa { margin-top: 6px; }
.forum button.link { border: 0; background: none; padding: 0; color: var(--act); cursor: pointer; font: inherit; font-size: 13px; }
.forum button.link:hover { text-decoration: underline; }
