:root {
  --bg: #f4f6fb;
  --bg-accent: #eef1fb;
  --panel: #ffffff;
  --panel2: #f7f8fc;
  --border: #e6e8f0;
  --border-strong: #d7dbe8;
  --text: #2a2f45;
  --muted: #8a90a6;
  --accent: #6d5efc;
  --accent2: #7c6cff;
  --accent-soft: #efecff;
  --green: #12a670;
  --green-soft: #e3f7ee;
  --red: #e5484d;
  --red-soft: #fdecec;
  --yellow: #c98a00;
  --yellow-soft: #fdf3dc;
  --shadow: 0 1px 2px rgba(38, 42, 66, .04), 0 8px 24px rgba(38, 42, 66, .06);
  --shadow-sm: 0 1px 2px rgba(38, 42, 66, .06);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(900px 500px at 100% -5%, #e9ecfb 0%, rgba(233, 236, 251, 0) 60%),
    radial-gradient(800px 500px at -5% 0%, #eafaf3 0%, rgba(234, 250, 243, 0) 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1120px; margin: 0 auto; padding: 32px 22px 72px; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px; gap: 12px; flex-wrap: wrap;
}
.header h1 {
  font-size: 24px; margin: 0; font-weight: 750; letter-spacing: -.3px;
  display: flex; align-items: center; gap: 12px;
}
.badge {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 4px 12px; border-radius: 999px;
}

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 16px; font-size: 17px; font-weight: 700; letter-spacing: -.2px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }

label.field { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }

input, select, textarea, button {
  font: inherit; color: var(--text);
  background: #fff; border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #b4b9c9; }
input:hover, select:hover, textarea:hover { border-color: #c4c9db; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}
select { cursor: pointer; }
textarea {
  width: 100%; min-height: 130px; resize: vertical;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 13px; line-height: 1.7;
}

button {
  cursor: pointer; font-weight: 600;
  background: var(--accent); border: 1.5px solid var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(109, 94, 252, .25);
}
button:hover { background: var(--accent2); border-color: var(--accent2); }
button:active { transform: translateY(1px); }
button.ghost {
  background: #fff; color: var(--text); border-color: var(--border-strong);
  box-shadow: var(--shadow-sm); font-weight: 500;
}
button.ghost:hover { background: var(--panel2); border-color: #c4c9db; }
button.danger {
  background: #fff; color: var(--red); border-color: #f0c2c3;
  box-shadow: var(--shadow-sm); font-weight: 500;
}
button.danger:hover { background: var(--red-soft); border-color: var(--red); }
button.small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card {
  background: linear-gradient(180deg, #fff, var(--panel2));
  border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .n { font-size: 32px; font-weight: 800; color: var(--accent); letter-spacing: -1px; }
.card .name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.card .sub { font-size: 12.5px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: none; }
thead tr { border-bottom: 2px solid var(--border); }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--bg-accent); }
tbody tr:last-child td { border-bottom: none; }

.tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: var(--panel2); color: var(--muted);
}
.tag.normal { color: var(--green); background: var(--green-soft); }
.tag.invalid { color: var(--red); background: var(--red-soft); }
.tag.unchecked { color: var(--yellow); background: var(--yellow-soft); }
.tag.claimed { color: var(--muted); background: var(--panel2); }

.tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tabs button {
  background: #fff; border: 1.5px solid var(--border); color: var(--muted);
  font-weight: 600; box-shadow: var(--shadow-sm);
}
.tabs button:hover { color: var(--text); border-color: var(--border-strong); }
.tabs button.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 2px 8px rgba(109, 94, 252, .3);
}

.msg { padding: 12px 15px; border-radius: var(--radius-sm); margin: 14px 0; font-size: 14px; display: none; white-space: pre-wrap; }
.msg.show { display: block; }
.msg.ok { background: var(--green-soft); color: var(--green); border: 1px solid #bfe9d5; }
.msg.err { background: var(--red-soft); color: var(--red); border: 1px solid #f4c9ca; }

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.hide { display: none !important; }
.scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.scroll table { min-width: 100%; }

.code-pill {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  background: var(--accent-soft); color: var(--accent);
  padding: 3px 9px; border-radius: 7px; letter-spacing: .5px; font-weight: 600; font-size: 12.5px;
}
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-thumb { background: #d3d7e6; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #c0c5d8; background-clip: padding-box; }
