:root {
  --c-primary: #0f4c81;
  --c-primary-dark: #0b3a63;
  --c-primary-light: #e8f1f8;
  --c-ink: #0f172a;
  --c-ink-2: #334155;
  --c-muted: #64748b;
  --c-line: #e2e8f0;
  --c-bg: #f5f7fa;
  --c-white: #fff;
  --c-green: #0f9d58;
  --c-green-bg: #e7f6ee;
  --c-amber: #b45309;
  --c-amber-bg: #fdf3e3;
  --c-red: #c62828;
  --c-red-bg: #fdecec;
  --c-gray-bg: #eef2f6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
table { border-collapse: collapse; width: 100%; }

/* ============ 布局 ============ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: #0b2540;
  color: #cbd7e4;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand .logo-mark {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .2px;
}
.brand .logo-mark .dot {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #2f80ed, #56ccf2);
  display: grid; place-items: center; font-size: 13px; color: #fff;
}
.brand .sub { font-size: 11px; color: #7f96ad; margin-top: 6px; letter-spacing: .5px; }
.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-group { font-size: 11px; color: #6b83a0; padding: 14px 10px 6px; letter-spacing: 1px; }
.nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 8px; color: #cbd7e4;
  font-size: 13.5px; margin-bottom: 2px; text-decoration: none;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a.active { background: #1b4b78; color: #fff; font-weight: 600; }
.nav a .ico { width: 16px; text-align: center; opacity: .85; font-size: 13px; }
.sidebar-foot {
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px; color: #8fa7bd;
}
.sidebar-foot .u { color: #fff; font-weight: 600; font-size: 13px; }
.sidebar-foot a { color: #8fa7bd; text-decoration: underline; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 16px; }
.topbar .crumbs { font-size: 12.5px; color: var(--c-muted); }
.content { padding: 22px 24px 48px; flex: 1; }

/* ============ 卡片 ============ */
.card {
  background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px;
}
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h3 { font-size: 14.5px; }
.card-head .hint { font-size: 12px; color: var(--c-muted); }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

/* ============ 统计卡 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .label { font-size: 12.5px; color: var(--c-muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .foot { font-size: 12px; color: var(--c-muted); margin-top: 4px; }
.stat.valid .value { color: var(--c-green); }
.stat.suspended .value { color: var(--c-amber); }
.stat.revoked .value { color: var(--c-red); }
.stat.primary .value { color: var(--c-primary); }
.stat::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 70px; height: 70px; border-radius: 50%; background: var(--c-primary-light); opacity: .5;
}

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
table.data { font-size: 13px; }
table.data thead th {
  background: #f8fafc; color: var(--c-ink-2); font-weight: 600;
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--c-line);
  white-space: nowrap; font-size: 12.5px;
}
table.data tbody td {
  padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle;
}
table.data tbody tr:hover { background: #fafcfe; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
table.data .sub { font-size: 12px; color: var(--c-muted); }
.empty { padding: 48px 20px; text-align: center; color: var(--c-muted); font-size: 13.5px; }
.empty .big { font-size: 32px; margin-bottom: 8px; opacity: .35; }

/* ============ 状态徽标 ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600;
  white-space: nowrap; line-height: 1.7;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-valid { color: var(--c-green); background: var(--c-green-bg); }
.status-suspended { color: var(--c-amber); background: var(--c-amber-bg); }
.status-revoked { color: var(--c-red); background: var(--c-red-bg); }
.status-muted { color: #52606d; background: var(--c-gray-bg); }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 4px;
  background: var(--c-primary-light); color: var(--c-primary-dark);
  font-size: 11.5px; font-weight: 600;
}

/* ============ 按钮与表单 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px; border-radius: 8px; border: 1px solid var(--c-line);
  background: #fff; color: var(--c-ink-2); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: all .15s; text-decoration: none;
}
.btn:hover { border-color: #c7d2dd; background: #f8fafc; text-decoration: none; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.btn-danger { background: #fff; border-color: #f0c2c2; color: var(--c-red); }
.btn-danger:hover { background: var(--c-red-bg); color: var(--c-red); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-link { background: none; border: none; color: var(--c-primary); padding: 0; cursor: pointer; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 6px; }
.field label .req { color: var(--c-red); margin-left: 2px; }
.field .help { font-size: 11.5px; color: var(--c-muted); margin-top: 5px; }
input[type="text"], input[type="password"], input[type="date"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid #d5dee7; border-radius: 7px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--c-ink);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(15,76,129,.1); }
input[readonly] { background: #f1f5f9; color: var(--c-muted); cursor: not-allowed; }
textarea { resize: vertical; min-height: 84px; line-height: 1.65; }
.radio-row { display: flex; gap: 18px; align-items: center; padding-top: 5px; font-size: 13.5px; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; cursor: pointer; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 220px; }

/* ============ 提示 ============ */
.alert {
  padding: 11px 15px; border-radius: 8px; font-size: 13px; margin-bottom: 16px;
  display: flex; gap: 9px; align-items: flex-start;
  border: 1px solid transparent;
}
.alert .i { font-weight: 700; }
.alert-success { background: var(--c-green-bg); border-color: #bfe6cf; color: #0a6b3d; }
.alert-error { background: var(--c-red-bg); border-color: #f3c4c4; color: #a01f1f; }
.alert-warn { background: var(--c-amber-bg); border-color: #f2ddb8; color: #8a4a06; }
.alert-info { background: var(--c-primary-light); border-color: #c9dcee; color: var(--c-primary-dark); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* ============ 详情信息表 ============ */
dl.info { display: grid; grid-template-columns: 132px 1fr; margin: 0; font-size: 13.5px; }
dl.info dt {
  padding: 11px 0; color: var(--c-muted); font-weight: 400;
  border-bottom: 1px dashed #eef2f6;
}
dl.info dd {
  padding: 11px 0; margin: 0; border-bottom: 1px dashed #eef2f6;
  color: var(--c-ink); word-break: break-word;
}
dl.info dt:last-of-type, dl.info dd:last-of-type { border-bottom: none; }

/* ============ 登录页 ============ */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
  background: #fff;
}
.login-aside {
  background: linear-gradient(150deg, #0b2540 0%, #0f4c81 55%, #1668a8 100%);
  color: #fff; padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-aside::after {
  content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.09); right: -180px; bottom: -160px;
}
.login-aside::before {
  content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.07); right: -80px; bottom: -60px;
}
.login-aside .lg-brand { font-size: 19px; font-weight: 700; letter-spacing: .3px; }
.login-aside h1 { font-size: 30px; line-height: 1.35; margin: 26px 0 14px; font-weight: 700; }
.login-aside p.lead { color: #b9cde0; font-size: 14px; max-width: 420px; line-height: 1.85; }
.login-aside .points { margin-top: 28px; display: grid; gap: 13px; }
.login-aside .points div { display: flex; gap: 10px; font-size: 13.5px; color: #d3e2ef; align-items: flex-start; }
.login-aside .points .k { color: #67c1f5; font-weight: 700; }
.login-aside .foot { font-size: 12px; color: #8ba9c3; line-height: 1.8; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form { width: 100%; max-width: 366px; }
.login-form h2 { font-size: 22px; margin-bottom: 6px; }
.login-form .sub { color: var(--c-muted); font-size: 13px; margin-bottom: 26px; }
.login-form .field { margin-bottom: 15px; }
.login-form .btn { width: 100%; padding: 10px; font-size: 14px; margin-top: 6px; }
.demo-box {
  margin-top: 24px; padding: 13px 15px; border-radius: 9px;
  background: #f6f8fb; border: 1px solid var(--c-line); font-size: 12.5px; color: var(--c-ink-2);
}
.demo-box .t { font-weight: 700; margin-bottom: 7px; color: var(--c-ink-2); font-size: 12px; letter-spacing: .5px; }
.demo-box table { font-size: 12px; }
.demo-box td { padding: 2px 0; }
.demo-box td:first-child { color: var(--c-muted); width: 96px; }
.demo-box code { background: #e9eef4; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

/* ============ 公众端 ============ */
.pub-topbar { background: #08192c; border-bottom: 1px solid rgba(255,255,255,.07); }
.pub-topbar-inner {
  max-width: 1040px; margin: 0 auto; padding: 9px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pub-topbar-inner .muted { color: #7e97b0; }
.pub-admin-entry {
  display: inline-flex; align-items: center; gap: 6px;
  color: #cfe2f3; font-size: 12.5px; text-decoration: none;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 4px 12px;
  transition: background .15s, color .15s, border-color .15s;
}
.pub-admin-entry .ico { font-size: 12px; opacity: .85; }
.pub-admin-entry:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.34); }
.pub-hero {
  background: linear-gradient(160deg, #0b2540 0%, #0f4c81 60%, #1668a8 100%);
  color: #fff; padding: 46px 24px 68px; position: relative; overflow: hidden;
}
.pub-hero::after {
  content: ''; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08); right: -140px; top: -180px;
}
.pub-inner { max-width: 1040px; margin: 0 auto; position: relative; }
.pub-brand { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: #d6e6f3; }
.pub-brand .dot { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  background: linear-gradient(135deg,#2f80ed,#56ccf2); font-size: 13px; }
.pub-hero h1 { font-size: 27px; margin: 22px 0 8px; letter-spacing: -.3px; }
.pub-hero p { color: #b9cde0; font-size: 13.5px; margin: 0; }
.pub-stats { display: flex; gap: 34px; margin-top: 22px; }
.pub-stats .n { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.pub-stats .l { font-size: 11.5px; color: #9fbcd6; margin-top: 1px; }

.search-card {
  max-width: 1040px; margin: -42px auto 0; background: #fff; border-radius: 14px;
  box-shadow: 0 12px 36px rgba(11, 37, 64, .13); padding: 22px; position: relative; z-index: 2;
}
.pub-body { max-width: 1040px; margin: 0 auto; padding: 24px; }

.result-item {
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid #f1f5f9; transition: background .15s;
}
.result-item:hover { background: #fafcfe; }
.result-item:last-child { border-bottom: none; }
.result-item .co { font-size: 14.5px; font-weight: 600; margin-bottom: 5px; }
.result-item .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--c-muted); align-items: center; }
.result-item .meta .mono { font-family: ui-monospace, Menlo, monospace; color: var(--c-ink-2); }
.result-item .right { text-align: right; flex-shrink: 0; }

/* 公众查询：必填标记 / 验证码 / 蜜罐 */
.field label .opt { color: var(--c-muted); font-weight: 400; margin-left: 2px; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha-img {
  height: 40px; width: 116px; border: 1px solid var(--c-line); border-radius: 6px;
  background: #f8fafc; cursor: pointer; flex-shrink: 0;
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* H5 详情 */
.h5-wrap { max-width: 560px; margin: 0 auto; padding: 0 0 40px; background: #fff; min-height: 100vh; }
.h5-top { background: linear-gradient(150deg, #0b2540, #0f4c81 70%); color: #fff; padding: 18px 20px 26px; }
.h5-top .brandline { font-size: 12px; color: #a9c4da; display: flex; align-items: center; gap: 7px; }
.h5-title { font-size: 17px; font-weight: 700; margin-top: 12px; }
.h5-status {
  margin: -16px 16px 0; border-radius: 12px; padding: 16px 18px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 6px 20px rgba(15,23,42,.1);
  position: relative; z-index: 2; border: 1px solid transparent;
}
.h5-status .big { font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.h5-status .desc { font-size: 12.5px; opacity: .9; margin-top: 2px; }
.h5-status .icon {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.s-valid { background: var(--c-green-bg); color: var(--c-green); border-color: #bfe6cf; }
.s-valid .icon { background: var(--c-green); color: #fff; }
.s-suspended { background: var(--c-amber-bg); color: var(--c-amber); border-color: #f2ddb8; }
.s-suspended .icon { background: var(--c-amber); color: #fff; }
.s-revoked { background: var(--c-red-bg); color: var(--c-red); border-color: #f3c4c4; }
.s-revoked .icon { background: var(--c-red); color: #fff; }
.s-expired { background: var(--c-gray-bg); color: #52606d; border-color: #dbe3eb; }
.s-expired .icon { background: #52606d; color: #fff; }

.h5-section { padding: 20px 20px 0; }
.h5-section h4 {
  font-size: 12px; color: var(--c-muted); letter-spacing: 1px; font-weight: 600;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.h5-section h4::after { content: ''; flex: 1; height: 1px; background: #eef2f6; }
.h5-field { display: grid; grid-template-columns: 88px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eef2f6; font-size: 13.5px; }
.h5-field:last-child { border-bottom: none; }
.h5-field dt { color: var(--c-muted); font-size: 13px; }
.h5-field dd { margin: 0; color: var(--c-ink); word-break: break-word; font-weight: 500; }
.h5-field dd.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

.risk-banner {
  margin: 16px 16px 0; background: var(--c-red-bg); border: 1px solid #f3c4c4;
  color: #a01f1f; border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.7;
}
.risk-banner b { display: block; margin-bottom: 3px; }

.site-chip { background: #f8fafc; border: 1px solid var(--c-line); border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; font-size: 13px; }
.site-chip .nm { font-weight: 600; color: var(--c-ink-2); font-size: 12.5px; margin-bottom: 2px; }

.disclaimer {
  margin: 22px 16px 0; padding: 13px 15px; background: #f8fafc; border-radius: 9px;
  font-size: 11.5px; color: var(--c-muted); line-height: 1.85; border: 1px solid var(--c-line);
}
.disclaimer b { color: var(--c-ink-2); }

.pub-foot { text-align: center; color: #94a3b8; font-size: 11.5px; padding: 26px 16px 10px; line-height: 1.9; }
.pub-foot a { color: #7c93ab; text-decoration: none; }
.pub-foot a:hover { color: var(--c-primary); text-decoration: underline; }

/* 二维码区块 */
.qr-box { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr-box img { border: 1px solid var(--c-line); border-radius: 8px; background: #fff; padding: 6px; }
.qr-meta { font-size: 12.5px; color: var(--c-muted); }
.qr-meta .u { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--c-ink-2); word-break: break-all; }

/* 时间线 */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--c-line); }
.tl-item { position: relative; padding-bottom: 16px; font-size: 13px; }
.tl-item::before {
  content: ''; position: absolute; left: -17px; top: 6px; width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid var(--c-primary);
}
.tl-item .tm { color: var(--c-muted); font-size: 11.5px; }
.tl-item .tx { color: var(--c-ink-2); margin-top: 2px; }

/* 分页 */
.pager { display: flex; gap: 6px; justify-content: center; padding: 16px; align-items: center; font-size: 13px; }
.pager a, .pager span {
  padding: 5px 11px; border-radius: 6px; border: 1px solid var(--c-line); color: var(--c-ink-2);
  background: #fff; text-decoration: none;
}
.pager .cur { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.pager .info { border: none; background: none; color: var(--c-muted); }

/* 模态 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 460px;
  box-shadow: 0 20px 50px rgba(15,23,42,.25); overflow: hidden;
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--c-line); font-weight: 600; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; background: #f8fafc; display: flex; justify-content: flex-end; gap: 8px; }

/* 工具类 */
.t-right { text-align: right; }
.t-center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--c-muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap8 { gap: 8px; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .nav { display: flex; overflow-x: auto; padding: 8px; gap: 4px; }
  .nav-group { display: none; }
  .nav a { white-space: nowrap; margin: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  dl.info { grid-template-columns: 100px 1fr; }
}
