:root {
  --bg: #0f1419;
  --card: #1a2332;
  --card2: #243044;
  --text: #e8eef7;
  --muted: #8b9bb4;
  --accent: #3b82f6;
  --accent2: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  --border: #2d3a4f;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(1200px 600px at 10% -10%, #1e3a5f 0%, transparent 50%),
              radial-gradient(900px 500px at 100% 0%, #163226 0%, transparent 45%),
              var(--bg);
  color: var(--text); line-height: 1.55;
}
a { color: #7dd3fc; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 920px; margin: 0 auto; padding: 20px 16px 48px; }
.wrap-wide { max-width: 1100px; }
header.appbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav a, .btn, button, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--card2); color: var(--text);
  padding: 10px 14px; border-radius: 10px; cursor: pointer; font-size: .95rem;
}
.btn-primary, button.primary, input[type=submit].primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8); border-color: #1e40af;
}
.btn-ok { background: linear-gradient(135deg, #16a34a, #15803d); border-color: #166534; }
.btn-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); border-color: #991b1b; }
.btn-ghost { background: transparent; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px; box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card h1, .card h2 { margin: 0 0 12px; font-size: 1.2rem; }
.card h2 { font-size: 1.05rem; color: #cbd5e1; }
.muted { color: var(--muted); font-size: .9rem; }
.grid { display: grid; gap: 12px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #0d121a; color: var(--text);
  font-size: 1rem;
}
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 12px; }
.flash {
  padding: 12px 14px; border-radius: 10px; margin-bottom: 14px;
  border: 1px solid var(--border); background: #132033;
}
.flash.ok { border-color: #166534; background: #10261a; color: #bbf7d0; }
.flash.err { border-color: #991b1b; background: #2a1212; color: #fecaca; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; border: 1px solid var(--border); background: var(--card2);
}
.badge.pending { color: #fde68a; border-color: #92400e; background: #2a1f0a; }
.badge.approved { color: #bbf7d0; border-color: #166534; background: #10261a; }
.badge.rejected { color: #fecaca; border-color: #991b1b; background: #2a1212; }
.badge.matched { color: #bbf7d0; border-color: #166534; }
.badge.mismatch { color: #fecaca; border-color: #991b1b; }
.antiphish {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.6rem; letter-spacing: .18em; font-weight: 700;
  padding: 14px; text-align: center; border-radius: 12px;
  background: #0b1f14; border: 1px dashed #22c55e; color: #86efac;
  margin: 10px 0;
}
.addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all; padding: 12px; border-radius: 10px;
  background: #0d121a; border: 1px solid var(--border); font-size: .95rem;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pill-row a {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card2); color: var(--text); font-size: .85rem;
}
.pill-row a.active { background: #1d4ed8; border-color: #2563eb; }
.notice {
  background: #1a1508; border: 1px solid #854d0e; color: #fde68a;
  padding: 12px; border-radius: 10px; font-size: .9rem; margin-bottom: 14px;
}
footer.foot { margin-top: 28px; color: var(--muted); font-size: .8rem; text-align: center; }
.copy-btn { margin-top: 8px; }
.checkline { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
