:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #697386;
    --line: #e5e9f0;
    --accent: #2563eb;
    --good: #0f9d58;
    --bad: #d93025;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.55 "Segoe UI", "Microsoft YaHei", sans-serif;
}
.topbar { background: #111827; color: #fff; }
.topbar-inner {
    max-width: 1200px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: #dbe3f0; text-decoration: none; }
.nav a:hover { color: #fff; }
.muted { color: var(--muted); }
.container { max-width: 1200px; margin: 28px auto; padding: 0 24px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.panel + .panel { margin-top: 18px; }
h1 { margin: 0 0 6px; font-size: 22px; }
.subtitle { margin: 0 0 20px; color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search { display: flex; gap: 8px; }
.search input { width: 240px; }
input, textarea, select {
    border: 1px solid #cfd6e2; border-radius: 7px; padding: 9px 10px;
    font: inherit; color: inherit; background: #fff;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--accent); }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--accent); border-radius: 7px; padding: 9px 14px;
    color: #fff; background: var(--accent); cursor: pointer; text-decoration: none;
    font: inherit; white-space: nowrap;
}
.btn:hover { filter: brightness(.95); }
.btn-small { padding: 5px 9px; font-size: 12px; }
.btn-ghost { background: transparent; color: #dbe3f0; border-color: #4b5563; }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-secondary { background: #fff; color: var(--text); border-color: #cfd6e2; }
.inline-form { display: inline; margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; }
.badge.active { color: #086b3d; background: #d9f7e8; }
.badge.banned { color: #9f1d16; background: #fde2df; }
.badge.unbound { color: #6b5e00; background: #fff4cc; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.notice { border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; }
.notice.success { background: #d9f7e8; color: #086b3d; }
.notice.error { background: #fde2df; color: #9f1d16; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea { width: 100%; }
.help { color: var(--muted); font-size: 12px; margin-top: 5px; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 10px 35px rgba(17,24,39,.08); }
.login-card h1 { text-align: center; }
.login-card .field { margin-bottom: 16px; }
.login-card .btn { width: 100%; }
.code { font-family: Consolas, monospace; font-size: 12px; color: #344054; word-break: break-all; }
.empty { color: var(--muted); text-align: center; padding: 28px; }
@media (max-width: 760px) {
    .form-grid { grid-template-columns: 1fr; }
    .search input { width: 150px; }
    .container { padding: 0 12px; }
}
