:root {
  --bg: #0f1220; --panel: #171a2b; --panel2: #1e2236; --line: #2b3049;
  --fg: #e7e9f3; --muted: #9aa0bb; --acc: #4c8dff; --ok: #35c07a; --warn: #e0a83c; --err: #e0575b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--err); min-height: 20px; font-size: 13px; }
button { background: var(--panel2); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
button:hover { border-color: var(--acc); }
button.primary { background: var(--acc); border-color: var(--acc); color: #fff; width: 100%; padding: 9px; font-size: 14px; }
button.danger { color: var(--err); }
button.mini { padding: 3px 7px; font-size: 12px; }
input, select, textarea { background: #10132a; color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 13px; width: 100%; }
label { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); }
label input, label select { margin-top: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; background: var(--panel2); position: sticky; top: 0; }
tr:hover td { background: #1b1f33; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); }
.tag.ok { color: var(--ok); border-color: #23543c; }
.tag.warn { color: var(--warn); border-color: #5a4720; }
.tag.err { color: var(--err); border-color: #5a2629; }
.tag.info { color: var(--acc); border-color: #26406e; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 340px; background: var(--panel); padding: 26px; border-radius: 12px; border: 1px solid var(--line); }
.login-card h1 { font-size: 18px; margin: 0 0 4px; }

header { display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { font-weight: 600; }
nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
nav button.active { background: var(--acc); border-color: var(--acc); color: #fff; }
main { padding: 16px 18px 60px; }
h2 { font-size: 15px; margin: 18px 0 8px; }
h2:first-child { margin-top: 4px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 6px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.card .k { color: var(--muted); font-size: 12px; }
.card .v { font-size: 20px; margin-top: 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 0; overflow: auto; max-height: 62vh; margin-bottom: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--acc); padding: 10px 16px; border-radius: 8px; z-index: 50; max-width: 80vw; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 60; }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; width: 520px; max-width: 92vw; max-height: 88vh; overflow: auto; }
pre { background: #10132a; border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow: auto; max-height: 300px; font-size: 12px; }
.plain-key { background: #10132a; border: 1px dashed var(--acc); border-radius: 8px; padding: 10px; margin: 10px 0; word-break: break-all; }

/* SSO 登录 */
.sep { display:flex; align-items:center; gap:10px; color:var(--mut,#94a3b8); font-size:12px; margin:14px 0 12px; }
.sep::before, .sep::after { content:''; flex:1; height:1px; background:#e2e8f0; }
.sso-btn { width:100%; padding:10px 12px; border:1px solid var(--acc,#2563eb); background:#fff; color:var(--acc,#2563eb);
  border-radius:8px; font-size:14px; cursor:pointer; }
.sso-btn:hover { background:#f0f6ff; }
.small { font-size:12px; }
.badge-sso { display:inline-block; background:#e0f2fe; color:#0369a1; border-radius:99px; padding:1px 8px; font-size:11px; margin-left:6px; }
