:root {
  --bg: #0e1015; --card: #171a22; --card2: #1d212d; --border: #272c3a;
  --text: #e8ebf2; --muted: #8b93a7; --accent: #7c5cff; --green: #34d399;
  --red: #f87171; --amber: #fbbf24;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; background: var(--card2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; outline: none; }
input:focus { border-color: var(--accent); }

.layout { display: flex; min-height: 100vh; }
.side { width: 190px; background: #13151d; border-right: 1px solid var(--border); padding: 18px 10px; position: sticky; top: 0; height: 100vh; }
.side .logo { font-size: 20px; font-weight: 800; padding: 0 8px 18px; background: linear-gradient(90deg,#9d86ff,#7c5cff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.side button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; color: var(--muted); margin-bottom: 3px; }
.side button:hover { background: var(--card); color: var(--text); }
.side button.active { background: rgba(124,92,255,.15); color: #c7c0ff; }
.main { flex: 1; padding: 24px; overflow: auto; }
.h { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.stat .k { color: var(--muted); font-size: 12px; }
.stat .v { font-size: 26px; font-weight: 700; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; }
.badge.ok { color: var(--green); background: rgba(52,211,153,.12); }
.badge.bad { color: var(--red); background: rgba(248,113,113,.12); }
.badge.warn { color: var(--amber); background: rgba(251,191,36,.12); }
.badge.gray { color: var(--muted); background: #23283a; }
.badge.free { color: var(--muted); background: #23283a; }
.badge.vip { color: #a5b4fc; background: rgba(124,92,255,.18); }
.badge.svip { color: var(--amber); background: rgba(251,191,36,.16); }
.badge.lifetime { color: var(--green); background: rgba(52,211,153,.15); }

.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.62); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; width: 100%; max-width: 420px; }
.modal h3 { margin: 0 0 12px; font-size: 16px; }
.modal input, .modal select { color: var(--text); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

.btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: #3a2028; color: #ffb4b4; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.spread { justify-content: space-between; }
.mt { margin-top: 14px; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 26px; width: 340px; }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card input { width: 100%; margin-top: 14px; }
.login-card .btn { width: 100%; margin-top: 16px; }
textarea.code { width: 100%; min-height: 220px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.7; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: #242a3a; border: 1px solid var(--border); padding: 10px 18px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s; z-index: 99; }
.toast.show { opacity: 1; }

/* 开关（广告 / 验证码） */
.sw-title{font-weight:800;font-size:15px}
.switch{position:relative;display:inline-block;width:52px;height:30px;flex:0 0 auto;margin-left:14px}
.switch input{opacity:0;width:0;height:0}
.switch .slider{position:absolute;inset:0;cursor:pointer;background:#333a4d;border-radius:999px;transition:.25s}
.switch .slider::before{content:"";position:absolute;width:22px;height:22px;left:4px;top:4px;border-radius:50%;background:#8b93a7;transition:.25s}
.switch input:checked + .slider{background:linear-gradient(90deg,#7c5cff,#9d86ff)}
.switch input:checked + .slider::before{transform:translateX(22px);background:#fff}
