/* 运营后台 */
:root {
  --bg: #070c0a;
  --bg2: #0c1512;
  --panel: #111d18;
  --panel2: #16241e;
  --line: rgba(214, 178, 90, .14);
  --line2: rgba(214, 178, 90, .3);
  --gold: #d6b25a;
  --gold2: #f3dc9c;
  --text: #e9f0eb;
  --sub: #b6c4bc;
  --muted: #7d8d85;
  --red: #d8433a;
  --green: #35b57e;
  --blue: #4a90e2;
  --r: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(900px 480px at 8% -10%, rgba(214, 178, 90, .1), transparent 60%), var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 13px; overflow: hidden;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 4px; }

/* 登录 */
.alogin { position: fixed; inset: 0; display: grid; place-items: center; padding: 18px; }
.alogin-box { width: min(380px, 94vw); background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.alogin-logo { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(150deg, #f3dc9c, #a8842f); color: #1a1206; display: grid; place-items: center; font-weight: 800; font-size: 20px; margin-bottom: 10px; }
.alogin h2 { margin: 0; font-size: 19px; }
.alogin p { margin: 4px 0 12px; }
.alogin label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 5px; }

/* 布局 */
.alayout { display: flex; height: 100dvh; }
.aside {
  width: 216px; flex: 0 0 auto; background: var(--bg2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 12px 10px; overflow-y: auto;
}
.aside-brand { display: flex; align-items: center; gap: 9px; padding: 4px 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.aside-brand .lg { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(150deg, #f3dc9c, #a8842f); color: #1a1206; display: grid; place-items: center; font-weight: 800; }
.aside-brand b { display: block; font-size: 13px; }
.aside-brand small { color: var(--muted); font-size: 9px; letter-spacing: 1px; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav .ng { color: var(--muted); font-size: 10px; letter-spacing: 1.2px; padding: 10px 8px 4px; }
#nav .ni {
  display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 9px;
  color: var(--sub); font-size: 13px; text-align: left; width: 100%;
}
#nav .ni i { font-style: normal; width: 16px; text-align: center; opacity: .85; }
#nav .ni:hover { background: rgba(214, 178, 90, .07); color: var(--gold2); }
#nav .ni.on { background: linear-gradient(90deg, rgba(214, 178, 90, .2), rgba(214, 178, 90, .03)); color: var(--gold2); font-weight: 700; box-shadow: inset 2px 0 0 var(--gold); }
#nav .ni .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 10px; padding: 0 5px; border-radius: 8px; }
.aside-foot { margin-top: auto; display: flex; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }

.amain { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ahead {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: rgba(10, 18, 15, .9); backdrop-filter: blur(8px);
}
.ahead #crumb { font-weight: 700; font-size: 14px; }
.spacer { flex: 1; }
.ahead-bal { color: var(--muted); font-size: 12px; display: flex; gap: 14px; }
.ahead-bal b { color: var(--gold2); }
.abody { flex: 1; overflow: auto; padding: 14px 16px 30px; }

/* 组件 */
.abtn { padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 13px; background: var(--panel2); border: 1px solid var(--line); color: var(--sub); }
.abtn:hover { border-color: var(--line2); color: var(--gold2); }
.abtn.primary { background: linear-gradient(160deg, #f3dc9c, #c69b3c 60%, #a8842f); color: #241a06; border: 0; }
.abtn.ghost { background: transparent; }
.abtn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.abtn.danger { color: #ff9a92; border-color: rgba(216, 67, 58, .4); }
.abtn.wide { width: 100%; }
.abtn:disabled { opacity: .45; }
input, select, textarea {
  width: 100%; padding: 8px 10px; border-radius: 8px; background: var(--bg2);
  border: 1px solid var(--line); color: var(--text); outline: none; font-size: 13px;
}
input:focus, select:focus, textarea:focus { border-color: var(--line2); }
textarea { resize: vertical; min-height: 64px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 9px 0 5px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.card h3 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.card h3 .spacer { flex: 1; }
.muted { color: var(--muted); font-size: 12px; }
.gold { color: var(--gold2); }
.row { display: flex; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 12px; }
@media (max-width: 900px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: linear-gradient(160deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.stat .lb { color: var(--muted); font-size: 11px; }
.stat .vl { font-size: 21px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .vl.gold { color: var(--gold2); }
.stat .sub2 { color: var(--muted); font-size: 11px; margin-top: 3px; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; white-space: nowrap; background: rgba(255, 255, 255, .02); position: sticky; top: 0; z-index: 2; }
tbody tr:hover { background: rgba(214, 178, 90, .05); }
.tbl-wrap { overflow: auto; max-height: calc(100dvh - 230px); border-radius: 10px; border: 1px solid var(--line); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; border: 1px solid var(--line2); color: var(--gold2); }
.pill.green { color: var(--green); border-color: rgba(53, 181, 126, .4); }
.pill.red { color: #ff9a92; border-color: rgba(216, 67, 58, .45); }
.pill.gray { color: var(--muted); border-color: var(--line); }
.sw { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sw i { width: 34px; height: 19px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); position: relative; display: inline-block; }
.sw i::after { content: ''; position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--muted); top: 2px; left: 2px; transition: .16s; }
.sw.on i { background: rgba(53, 181, 126, .25); border-color: rgba(53, 181, 126, .5); }
.sw.on i::after { left: 17px; background: var(--green); }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs .tb2 { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.tabs .tb2.on { background: rgba(214, 178, 90, .16); border-color: var(--line2); color: var(--gold2); font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 30px 8px; }
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 10px);
  background: rgba(12, 20, 17, .97); border: 1px solid var(--line2); color: var(--gold2);
  padding: 9px 16px; border-radius: 22px; font-size: 13px; opacity: 0; transition: .2s; pointer-events: none; z-index: 100;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.banner-item, .act-item, .game-item, .room-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: var(--bg2);
}
.subhead { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 13px; font-weight: 700; }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
@media (max-width: 760px) {
  .aside { position: fixed; z-index: 40; height: 100%; width: 200px; transform: translateX(-100%); transition: .2s; }
  .aside.show { transform: none; }
}
