:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #1f2329;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #1668dc;
  --brand-dark: #0f52b3;
  --ok: #0f9d58;
  --warn: #d97706;
  --err: #d93026;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.center {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 28px 24px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.card.wide { max-width: 880px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #4f9cf9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

h1 {
  font-size: 20px;
  margin: 0;
  letter-spacing: 0.3px;
}

.sub {
  color: var(--muted);
  font-size: 12.5px;
  margin: 6px 0 20px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 6px;
}

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 104, 220, 0.12);
}

button {
  width: 100%;
  margin-top: 20px;
  padding: 11px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}

button:hover { background: var(--brand-dark); }
button:disabled { background: #9db8e5; cursor: not-allowed; }

.msg {
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}

.msg.show { display: block; }
.msg.err { background: #fdecea; color: var(--err); }
.msg.ok { background: #e8f6ee; color: var(--ok); }
.msg.info { background: #eef4ff; color: var(--brand-dark); }

.hint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar .who { color: var(--muted); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fbfcfd;
}

.tile .k { color: var(--muted); font-size: 12px; }
.tile .v { font-size: 18px; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.ok { background: #e8f6ee; color: var(--ok); }
.badge.warn { background: #fff4e5; color: var(--warn); }
.badge.err { background: #fdecea; color: var(--err); }

pre {
  background: #0f172a;
  color: #d7e3f4;
  padding: 14px;
  border-radius: 10px;
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.55;
}

.linkbtn {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--line);
  width: auto;
  margin: 0;
  padding: 7px 14px;
  font-size: 13px;
}

.linkbtn:hover { background: #f2f6fc; }
