:root {
  --bg: #f3f5f8;
  --card: #fff;
  --line: #e6e9ee;
  --line-strong: #d5dae2;
  --text: #1c2430;
  --muted: #667085;
  --primary: #1d4ed8;
  --primary-soft: #eff4ff;
  --danger: #c2413a;
  --nav: #12161c;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 4px; padding: 0 16px; height: 52px; background: var(--nav); color: #c5ced8; overflow-x: auto; }
nav a { color: #c5ced8; }
nav .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; margin-right: 10px; padding: 0; }
nav .brand img { height: 30px; width: auto; display: block; border-radius: 6px; }
nav .brand span { font-size: 13px; letter-spacing: .02em; }
nav .brand:hover { text-decoration: none; }
.navlinks { display: flex; align-items: center; gap: 2px; }
.navlinks a { padding: 6px 10px; border-radius: 7px; }
.navlinks a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.06); }
.navlinks a.on { color: #fff; background: rgba(255,255,255,.12); }
nav .spacer { flex: 1; }
nav .me { font-size: 12px; color: #9aa6b2; padding: 0 6px; white-space: nowrap; }
nav .me:hover { color: #fff; text-decoration: none; }
nav .navsearch input { width: 200px; background: #0c1016; border: 1px solid #2a313b; color: #fff; border-radius: 8px; padding: 6px 10px; }
nav .navsearch input::placeholder { color: #6d7886; }
nav button.link { color: #9aa6b2; }
main { max-width: 1240px; margin: 0 auto; padding: 20px 20px 48px; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 14px; }
.pagehead h1 { margin: 0; }
h2 { font-size: 14px; font-weight: 650; margin: 0 0 12px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 2px 0 16px; flex-wrap: wrap; }
.pagehead .sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.pagehead-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.work { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.dock { position: sticky; top: 68px; margin-bottom: 0; }
@media (max-width: 960px) {
  .cols, .work { grid-template-columns: 1fr; }
  .dock { position: static; order: -1; }
  main { padding: 16px 12px 40px; }
  .filters input[type="search"], .filters input:not([type]) { min-width: 0; width: 100%; max-width: none; }
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: Consolas, "SF Mono", Menlo, monospace; }
.num { font-variant-numeric: tabular-nums; font-weight: 650; }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: #e8f6ee; color: #0f7a3a; }
.flash.bad { background: #fdeceb; color: #b42318; }
.flash.out { opacity: 0; transition: opacity .4s; }
.tablewrap { overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.tablewrap table.list { border: 0; border-radius: 0; box-shadow: none; }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { background: #f7f8fa; font-weight: 600; font-size: 12px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: #f7f9fc; }
table.list tr.editing td { background: var(--primary-soft); }
table.list td.chk, table.list th.chk { width: 36px; }
table.list td.addr { min-width: 240px; color: #344054; }
table.kv th { text-align: left; color: var(--muted); font-weight: 400; padding: 4px 16px 4px 0; white-space: nowrap; vertical-align: top; }
table.kv td { padding: 4px 0; }
.who { display: flex; flex-direction: column; gap: 1px; }
.who b { font-weight: 600; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; line-height: 18px; background: #eef0f3; color: #3f4854; white-space: nowrap; }
.badge.blue { background: #dbeafe; color: #1e40af; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.teal { background: #ccfbf1; color: #115e59; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.orange { background: #ffedd5; color: #9a3412; }
.badge.gray { background: #eef0f3; color: #3f4854; }
.badge.dark { background: #374151; color: #fff; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.clip { cursor: copy; border-bottom: 1px dashed #c5ccd6; }
.mono.clip { white-space: nowrap; }
.clip.copied { color: #0f7a3a; border-bottom-color: transparent; }
.bar { background: #e8ebf0; border-radius: 99px; height: 6px; overflow: hidden; min-width: 96px; }
.bar i { display: block; height: 100%; background: #16a34a; border-radius: 99px; }
.bar.big { height: 8px; margin-bottom: 12px; }
.warn { color: #b42318; font-weight: 650; }
.stat.green b { color: #166534; }
.stat.red b { color: #b42318; }
.stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; min-width: 84px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); }
.stat b { font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.on { border-color: var(--primary); background: var(--primary-soft); }
.stat.zero:not(.on) { opacity: .42; }
.stat:hover { text-decoration: none; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters input[type="search"], .filters input:not([type]) { flex: 1; min-width: 220px; max-width: 420px; }
input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 3px solid #dbe6ff; border-color: var(--primary); }
textarea { width: 100%; resize: vertical; }
button, .btn { font: inherit; padding: 7px 12px; border-radius: 8px; border: 1px solid #d0d5dd; background: #fff; color: var(--text); cursor: pointer; display: inline-block; line-height: 1.3; }
button:hover, .btn:hover { background: #f4f6f8; text-decoration: none; }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover, .btn.primary:hover { background: #1e40af; }
button.danger { color: var(--danger); border-color: #f0c2be; background: #fff; }
button.danger:hover { background: #fdeceb; }
button.link { border: 0; background: none; color: var(--primary); padding: 0 4px; }
button.small, .btn.small { padding: 4px 8px; font-size: 12px; }
.wide { width: 100%; }
form.form label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
form.form label input, form.form label select, form.form label textarea { display: block; width: 100%; margin-top: 4px; font-size: 14px; color: var(--text); }
form.narrow { max-width: 420px; }
form.inline, .inline { display: inline; }
label.inline { display: inline-flex; gap: 6px; align-items: center; margin-right: 8px; }
.row { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; flex-wrap: wrap; }
.row textarea { flex: 1; min-width: 200px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.batch { position: sticky; bottom: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; box-shadow: 0 10px 30px rgba(16, 24, 40, .12); }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
body.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: radial-gradient(900px 400px at 50% -10%, #e7eefc, var(--bg)); }
.loginbox { width: 380px; padding: 28px 26px 22px; }
.loginbox .logo { display: block; width: 196px; height: auto; margin: 0 auto 16px; border-radius: 16px; }
.loginbox h1 { text-align: center; font-size: 20px; }
.loginbox .sub { text-align: center; margin: 6px 0 18px; }
.loginbox label { display: block; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.loginbox input { display: block; width: 100%; margin-top: 4px; }
.loginbox button { margin-top: 4px; padding: 9px 12px; }
