:root {
  --bg: #edf0f6;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-2: #f5f7fb;
  --border: #ccd5e3;
  --border-soft: #dfe5ef;
  --text: #162032;
  --muted: #63728b;
  --accent: #3b6fe0;
  --accent-soft: rgba(59,111,224,0.14);
  --good: #0f9d6e;
  --warn: #c8870b;
  --bad: #e24357;
  --radius: 12px;
}

* { box-sizing: border-box; }

[v-cloak] { display: none; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, Menlo, Consolas, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body::before, body::after {
  content: ''; position: fixed; pointer-events: none; z-index: 0;
  border-radius: 50%; filter: blur(90px); opacity: 0.55;
}
body::before {
  width: 460px; height: 460px; left: -150px; top: -170px;
  background: radial-gradient(circle, rgba(59,111,224,0.24), transparent 70%);
  animation: dg-orb-a 21.56s ease-in-out infinite alternate;
}
body::after {
  width: 430px; height: 430px; right: -150px; bottom: -170px;
  background: radial-gradient(circle, rgba(122,79,216,0.2), transparent 70%);
  animation: dg-orb-b 18.69s ease-in-out infinite alternate;
}

button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.layout { display: flex; height: 100vh; min-height: 600px; overflow: hidden; position: relative; z-index: 1; }
.main { position: relative; }
.topbar { position: relative; overflow: hidden; }

/* 侧边栏 */
.sidebar {
  width: 238px;
  flex: 0 0 238px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  box-shadow: 3px 0 18px rgba(30, 45, 75, 0.06);
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 28px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #3b6fe0, #7a4fd8);
  color: #fff; box-shadow: 0 6px 18px rgba(59,111,224,0.17);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.2px; }
.brand-sub { color: var(--muted); font-size: 11px; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); text-align: left;
  transition: background 0.16s, color 0.16s;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; }
.nav-item:hover { background: rgba(59,111,224,0.07); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: #2f5fc4; font-weight: 600; }
.nav-count { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
.sidebar-foot {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #f6f8fc;
}
.sidebar-foot .foot-info { flex: 1; min-width: 0; }
.sidebar-foot .icon-btn { flex: 0 0 30px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(15,157,110,0.12); }
.foot-title { font-size: 12px; font-weight: 600; }
.foot-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 主区域 */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 78px; flex: 0 0 78px; padding: 0 30px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(30, 45, 75, 0.04);
}
.topbar h1 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.25; }
.topbar-sub { margin: 11px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.check-progress {
  flex: 0 1 320px; min-width: 180px; margin-left: auto; margin-right: 18px;
}
.cp-line { display: flex; align-items: center; gap: 9px; font-size: 12px; margin-bottom: 6px; }
.cp-label { font-weight: 600; color: #2f5fc4; }
.cp-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.cp-blocked { color: var(--bad); font-weight: 600; }
.cp-bar { height: 5px; border-radius: 5px; background: #e8eef8; overflow: hidden; }
.cp-bar-fill {
  height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent), #8a55e0);
  transition: width 0.35s ease; box-shadow: 0 0 8px rgba(59,111,224,0.35);
}
.cp-current { margin-top: 5px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-logout { display: none; }
.updated { font-size: 11px; color: var(--muted); margin-right: 6px; }
.content { flex: 1; overflow-y: auto; padding: 26px 30px 40px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  position: relative; overflow: hidden; isolation: isolate;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn > svg { position: relative; z-index: 1; width: 15px; height: 15px; }
.ripple {
  position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  background: rgba(59,111,224,0.18); transform: scale(0); opacity: 0.85;
  animation: dg-ripple 0.29s ease-out forwards;
}
.top-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 5;
  background: linear-gradient(90deg, transparent, var(--accent), #8a55e0, var(--accent), transparent);
  background-size: 200% 100%; animation: dg-gradient 2.3s linear infinite;
  box-shadow: 0 0 8px rgba(59,111,224,0.28);
}
.btn:hover:not(:disabled) { border-color: #a9b8d0; background: #eaf0fa; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(59,111,224,0.15); }
.btn.primary:hover:not(:disabled) { background: #5b8cf0; border-color: #5b8cf0; }
.btn.ghost { background: transparent; }
.btn.small { height: 30px; padding: 0 11px; font-size: 12px; }
.btn.danger-btn { background: var(--bad); border-color: var(--bad); color: #fff; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent;
  background: transparent; color: var(--muted); display: inline-grid; place-items: center;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--bad); background: rgba(226,67,87,0.1); }
.close-btn { border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; padding: 0 4px; }
.close-btn:hover { color: var(--text); }

/* 概览 */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(30,45,75,0.05), 0 8px 22px rgba(30,45,75,0.06);
}
.stat-clickable { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding-bottom: 26px; }
.stat-clickable:hover { border-color: var(--accent); }
.stat-go {
  position: absolute; right: 18px; bottom: 14px;
  font-size: 11px; font-weight: 600; color: var(--accent);
  opacity: 0; transform: translateX(-3px);
  transition: opacity 0.2s, transform 0.2s;
}
.stat-clickable:hover .stat-go { opacity: 1; transform: translateX(0); }

/* 快捷筛选提示条 */
.filter-banner {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding: 11px 16px;
  background: #eef3ff; border: 1.5px solid var(--accent); border-radius: 10px;
  font-size: 13px; color: #2a55b8;
}
.filter-banner-icon { font-size: 15px; }
.filter-banner strong { color: #1e4398; }
.filter-clear {
  margin-left: auto; padding: 5px 11px; border: 1px solid var(--accent);
  border-radius: 6px; background: #fff; color: var(--accent);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.filter-clear:hover { background: var(--accent); color: #fff; }
.stat-card::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 2px;
  background: var(--accent); opacity: 0.6;
}
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 30px; font-weight: 700; margin: 8px 0 6px; line-height: 1; }
.stat-value.good { color: var(--good); }
.stat-value.warn { color: var(--warn); }
.stat-value.bad { color: var(--bad); }
.stat-foot { color: var(--muted); font-size: 11px; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(30,45,75,0.04), 0 6px 18px rgba(30,45,75,0.05); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border-soft);
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.panel-head p { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.alert-list { display: flex; flex-direction: column; }
.alert-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 20px; border: 0; border-bottom: 1px solid var(--border-soft);
  background: transparent; color: var(--text); text-align: left;
}
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover { background: rgba(59,111,224,0.05); }
.level-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.alert-domain { font-weight: 600; min-width: 190px; }
.alert-issues { color: var(--muted); font-size: 12px; flex: 1; }
.arrow { color: var(--muted); }
.level-dot.level-danger { background: var(--bad); }
.level-dot.level-warn { background: var(--warn); }
.level-dot.level-ok { background: var(--good); }

/* 表格 */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.toolbar-spacer { flex: 1; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--muted); }
.search-box input { width: 230px; padding-left: 34px; }
input, textarea, .select {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; height: 34px; padding: 0 11px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; padding: 10px 11px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: #8d99aa; }
.select { min-width: 118px; cursor: pointer; }
option { background: var(--panel-2); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 1340px; }
.table th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--muted);
  padding: 11px 14px; background: #f6f8fc;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid #e8ecf3; vertical-align: middle; font-size: 12.5px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(59,111,224,0.04); }
.table th.right, .table td.right { text-align: right; }
.domain-link, .domain-cell { border: 0; background: transparent; color: #2f5fc4; font-weight: 600; padding: 0; }
.domain-link.domain-blocked { color: var(--bad); }
.domain-link:hover { text-decoration: underline; }
.domain-cell-wrap { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copy-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; opacity: 1; transition: background 0.15s, color 0.15s; }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn:hover { background: rgba(59,111,224,0.1); color: #2f5fc4; }
.switch-btn { display: inline-flex; align-items: center; padding: 4px; border: 0; background: transparent; cursor: pointer; vertical-align: middle; }
.switch-btn-track { display: inline-flex; align-items: center; width: 30px; height: 17px; padding: 2px; border-radius: 10px; background: var(--accent); transition: background 0.2s; }
.switch-btn-dot { width: 13px; height: 13px; border-radius: 50%; background: #fff; transform: translateX(13px); transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch-btn.off .switch-btn-track { background: #aab4c4; }
.switch-btn.off .switch-btn-dot { transform: translateX(0); }
.deleted-table { min-width: 720px; }
.cell-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.scheme-line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.scheme-tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .3px; line-height: 17px; white-space: nowrap; }
.scheme-https { color: #0f9d6e; background: rgba(15,157,110,0.10); border: 1px solid rgba(15,157,110,0.28); }
.scheme-http { color: #7d8aa0; background: rgba(125,138,160,0.10); border: 1px solid rgba(125,138,160,0.30); }
.cert-type { display: inline-block; padding: 3px 7px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-size: 11px; white-space: nowrap; }
.check-count { display: inline-block; padding: 2px 8px; border-radius: 5px; background: var(--accent-soft); color: #2a55b8; font-size: 11px; font-weight: 600; white-space: nowrap; }
.note-cell { width: 150px; }
.note-input { width: 100%; height: 30px; padding: 0 8px; font-size: 12px; background: transparent; border-color: transparent; }
.note-input:hover { border-color: var(--border); }
.note-input:focus { background: var(--panel); }
.org-cell { max-width: 190px; }
.org-cell > div:first-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-source { display: block; margin-top: 4px; font-size: 11px; font-style: normal; font-weight: 400; color: var(--muted); }
.issues-cell { max-width: 280px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.level-ok { color: var(--good); background: rgba(15,157,110,0.12); }
.badge.level-warn { color: var(--warn); background: rgba(200,135,11,0.12); }
.badge.level-danger { color: var(--bad); background: rgba(226,67,87,0.13); }
.badge.level-unchecked { color: var(--muted); background: rgba(59,111,224,0.1); }
.text-good { color: var(--good); }
.text-bad { color: var(--bad); }
.text-warn { color: var(--warn); }
.muted { color: var(--muted); }
.break { word-break: break-all; }
.days-ok { color: var(--muted); }
.days-warn { color: var(--warn); }
.days-danger { color: var(--bad); font-weight: 600; }

.empty-state { padding: 54px 20px; text-align: center; }
.empty-state.small { padding: 28px 16px; }
.empty-icon { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); font-size: 20px; border: 1px solid var(--border); }
.empty-title { font-weight: 600; color: var(--text); }
.empty-sub { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* 设置 */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-grid .full-width { grid-column: 1 / -1; }
.platform-note { margin: 0 20px 18px; font-size: 11.5px; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { display: none; }
.switch-track { width: 36px; height: 20px; border-radius: 10px; background: var(--border); position: relative; transition: background 0.2s; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #ffffff; transition: transform 0.2s, background 0.2s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: #fff; }
.switch-label { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 500; }
.field small { font-size: 11px; color: var(--muted); }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
.test-row { display: flex; gap: 8px; }
.test-input { width: 160px; }
.test-result { display: flex; gap: 12px; flex-wrap: wrap; padding: 12px 20px; font-size: 12px; border-top: 1px solid var(--border-soft); }
.test-result.result-bad { color: var(--bad); background: rgba(226,67,87,0.05); }
.test-result.result-good { color: var(--good); background: rgba(15,157,110,0.05); }
.switch-inline { display: inline-flex; align-items: center; gap: 7px; height: 36px; }
.sms-log { margin: 0 20px 18px; border: 1px solid var(--border-soft); border-radius: 9px; overflow: hidden; }
.sms-log-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; background: var(--panel-2); }
.sms-log-head h3 { margin: 0; font-size: 12px; color: #2f5fc4; }
.sms-log-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--border-soft); font-size: 11.5px; }
.sms-log-status { font-weight: 700; }
.sms-log-domain { font-weight: 600; color: var(--text); }
.sms-log-time { margin-left: auto; }
.sms-log-msg { flex-basis: 100%; font-size: 10.5px; }
.hint-box { margin: 0 20px 20px; padding: 15px; border-radius: 9px; background: #f6f8fc; border: 1px solid var(--border); }
.hint-box h3 { margin: 0 0 9px; font-size: 12px; color: #2f5fc4; }
.hint-box ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 11.5px; line-height: 1.9; }

/* 抽屉 */
.drawer-mask, .modal-mask { position: fixed; inset: 0; background: rgba(22,30,45,0.42); z-index: 40; backdrop-filter: blur(2px); }
.drawer { position: absolute; right: 0; top: 0; bottom: 0; width: min(600px, 100vw); background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; box-shadow: -18px 0 50px rgba(30,45,75,0.22); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border-soft); }
.drawer-title { font-size: 18px; font-weight: 700; word-break: break-all; }
.drawer-sub { font-size: 11px; color: var(--muted); margin-top: 5px; }
.drawer-tabs { display: flex; gap: 20px; padding: 0 24px; border-bottom: 1px solid var(--border-soft); }
.drawer-tabs button { border: 0; background: transparent; color: var(--muted); padding: 13px 0; font-size: 13px; border-bottom: 2px solid transparent; }
.drawer-tabs button.active { color: #2f5fc4; border-bottom-color: var(--accent); font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 40px; }
.detail-hero { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-radius: 9px; margin-bottom: 20px; border: 1px solid var(--border-soft); }
.detail-hero.hero-ok { background: rgba(15,157,110,0.05); }
.detail-hero.hero-warn { background: rgba(200,135,11,0.05); }
.detail-hero.hero-danger { background: rgba(226,67,87,0.05); }
.issue-chip { font-size: 11px; color: var(--muted); background: rgba(59,111,224,0.07); padding: 4px 8px; border-radius: 5px; }
.detail-section { margin-bottom: 22px; }
.detail-section h3 { margin: 0 0 12px; font-size: 13px; font-weight: 650; color: #2f5fc4; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.kv-grid > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kv-grid .wide { grid-column: 1 / -1; }
.kv-grid span { font-size: 11px; color: var(--muted); }
.kv-grid strong { font-size: 12.5px; font-weight: 550; }
.chain { margin-top: 16px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(30,45,75,0.04); }
.chain-title { padding: 9px 12px; font-size: 11px; color: var(--muted); background: rgba(59,111,224,0.04); border-bottom: 1px solid var(--border-soft); }
.chain-step { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--border-soft); font-size: 11.5px; }
.chain-step:last-child { border-bottom: 0; }
.chain-index { width: 18px; height: 18px; border-radius: 5px; background: var(--panel-2); display: grid; place-items: center; color: var(--muted); font-size: 10px; flex: 0 0 18px; }
.chain-status { color: var(--accent); font-weight: 600; }
.chain-url { color: var(--muted); }
.history-card { border: 1px solid var(--border); border-radius: 9px; padding: 13px 15px; margin-bottom: 10px; background: #fbfcfe; }
.history-card-head { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.history-card-body { margin-top: 9px; font-size: 12px; color: var(--text); }
.history-card-issues { margin-top: 6px; font-size: 11px; color: var(--muted); }

/* 弹窗 */
.modal-mask { display: grid; place-items: center; z-index: 50; }
.modal { width: min(540px, calc(100vw - 40px)); background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 70px rgba(30,45,75,0.24); }
.small-modal { width: min(420px, calc(100vw - 40px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 22px; }
.modal-body p { margin: 0; color: var(--muted); line-height: 1.8; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border-soft); }
.hint-text { font-size: 11.5px; color: var(--muted); margin: 9px 0 0; }
.upload-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px; margin-bottom: 18px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); cursor: pointer; font-size: 12px; background: rgba(59,111,224,0.03); }
.upload-box:hover { border-color: var(--accent); color: #2f5fc4; }
.upload-box input { display: none; }
.upload-box svg { width: 22px; height: 22px; }
.toast {
  position: fixed; right: 26px; bottom: 26px; z-index: 80;
  display: flex; align-items: center; gap: 11px;
  min-width: 210px; max-width: calc(100vw - 52px);
  padding: 12px 18px 12px 12px; border-radius: 11px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  box-shadow: 0 14px 34px rgba(30,45,75,0.2);
}
.toast-icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 26px; width: 26px; height: 26px;
  border-radius: 50%; color: #fff;
}
.toast-icon svg { width: 15px; height: 15px; }
.toast-text { line-height: 1.4; }
.toast-success { background: #e9f8f1; border: 1.5px solid var(--good); color: #0b7a56; }
.toast-success .toast-icon { background: var(--good); }
.toast-error { background: #fdecef; border: 1.5px solid var(--bad); color: #b52e42; }
.toast-error .toast-icon { background: var(--bad); }
.toast-info { background: #eef3ff; border: 1.5px solid var(--accent); color: #2a55b8; }
.toast-info .toast-icon { background: var(--accent); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c6d0de; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #a9b7c9; }

@media (max-width: 1200px) {
  .settings-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { width: 64px; flex-basis: 64px; padding: 18px 8px; }
  .brand > div:last-child, .nav-item span, .nav-count, .sidebar-foot > div:last-child { display: none; }
  .brand { padding: 0 0 26px; justify-content: center; }
  .nav-item { justify-content: center; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* ============ 动效 · 轻量版 ============ */
@keyframes dg-orb-a {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(22px, 15px) scale(1.02); }
}
@keyframes dg-orb-b {
  0% { transform: translate(0, 0) scale(1.02); }
  100% { transform: translate(-22px, -15px) scale(0.99); }
}
@keyframes dg-fade-up {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes dg-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dg-sidebar-in {
  0% { opacity: 0; transform: translateX(-14px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes dg-top-in {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes dg-card-in {
  0% { opacity: 0; transform: translateY(7px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dg-row-in {
  0% { opacity: 0; transform: translateX(-6px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes dg-drawer-in {
  0% { transform: translateX(100%); }
  100% { transform: translateX(0); }
}
@keyframes dg-modal-in {
  0% { opacity: 0; transform: translateY(8px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dg-toast-in {
  0% { opacity: 0; transform: translate(14px, 3px); }
  100% { opacity: 1; transform: translate(0); }
}
@keyframes dg-spring {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes dg-spin { to { transform: rotate(360deg); } }
@keyframes dg-breathe {
  0%, 100% { box-shadow: 0 0 0 1px rgba(15,157,110,0.1), 0 0 4px rgba(15,157,110,0.1); transform: scale(1); }
  50% { box-shadow: 0 0 0 3px rgba(15,157,110,0), 0 0 7px rgba(15,157,110,0.16); transform: scale(1.01); }
}
@keyframes dg-busy-glow {
  0%, 100% { box-shadow: 0 2px 8px rgba(59,111,224,0.12), 0 0 0 0 rgba(59,111,224,0.12); }
  50% { box-shadow: 0 3px 12px rgba(59,111,224,0.2), 0 0 0 2px rgba(59,111,224,0); }
}
@keyframes dg-danger-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226,67,87,0.12); }
  50% { box-shadow: 0 0 0 2px rgba(226,67,87,0), 0 0 5px rgba(226,67,87,0.12); }
}
@keyframes dg-gradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes dg-ripple {
  0% { transform: scale(0); opacity: 0.3; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes dg-ring {
  0% { transform: scale(0.96); opacity: 0.35; }
  100% { transform: scale(1.14); opacity: 0; }
}
@keyframes dg-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}
@keyframes dg-number-pop {
  0% { opacity: 0; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes dg-arrow {
  0%, 100% { transform: translateX(0); opacity: 0.65; }
  50% { transform: translateX(1px); opacity: 0.85; }
}
@keyframes dg-shake {
  10%, 90% { transform: translateX(-1px); }
  30%, 50%, 70% { transform: translateX(1px); }
  40%, 60% { transform: translateX(-1px); }
}
@keyframes dg-blur-in {
  from { backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); }
  to { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
}

/* 首次入场 */
.sidebar { animation: dg-sidebar-in 0.39s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.topbar { animation: dg-top-in 0.36s 0.06s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.topbar h1 { position: relative; }
.topbar h1::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 42px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #8a55e0, var(--accent));
  background-size: 200% 100%; animation: dg-gradient 3.45s linear infinite;
}
.content > .stat-grid,
.content > .panel,
.content > .settings-grid { animation: dg-fade-up 0.36s 0.1s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.stat-grid, .drawer-mask { perspective: 1000px; }

.content > .stat-grid .stat-card,
.settings-grid > .panel { animation: dg-card-in 0.36s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.content > .stat-grid .stat-card:nth-child(1) { animation-delay: 0.16s; }
.content > .stat-grid .stat-card:nth-child(2) { animation-delay: 0.21s; }
.content > .stat-grid .stat-card:nth-child(3) { animation-delay: 0.27s; }
.content > .stat-grid .stat-card:nth-child(4) { animation-delay: 0.33s; }
.content > .stat-grid .stat-card:nth-child(5) { animation-delay: 0.39s; }
.content > .stat-grid .stat-card:nth-child(6) { animation-delay: 0.45s; }
.settings-grid > .panel:nth-child(1) { animation-delay: 0.16s; }
.settings-grid > .panel:nth-child(2) { animation-delay: 0.22s; }
.settings-grid > .panel:nth-child(3) { animation-delay: 0.29s; }
.settings-grid > .panel:nth-child(4) { animation-delay: 0.35s; }
.stat-value { animation: dg-number-pop 0.29s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.content > .stat-grid .stat-card:nth-child(1) .stat-value { animation-delay: 0.29s; }
.content > .stat-grid .stat-card:nth-child(2) .stat-value { animation-delay: 0.34s; }
.content > .stat-grid .stat-card:nth-child(3) .stat-value { animation-delay: 0.4s; }
.content > .stat-grid .stat-card:nth-child(4) .stat-value { animation-delay: 0.46s; }
.content > .stat-grid .stat-card:nth-child(5) .stat-value { animation-delay: 0.52s; }
.content > .stat-grid .stat-card:nth-child(6) .stat-value { animation-delay: 0.58s; }
.stat-foot { animation: dg-fade-in 0.31s 0.47s both; }

.brand-mark { position: relative; animation: dg-float 5.18s ease-in-out infinite; }
.brand-mark::after {
  content: ''; position: absolute; inset: -5px; border-radius: 14px;
  border: 1px solid rgba(59,111,224,0.34); animation: dg-ring 4.02s ease-out infinite;
}
.brand-mark svg { animation: dg-float 6.32s ease-in-out infinite reverse; }
.nav-item { position: relative; transition: background 0.22s, color 0.22s, transform 0.22s, padding-left 0.22s; }
.nav-item::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 0;
  transform: translateY(-50%); border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #3b6fe0, #8a55e0); transition: height 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.nav-item.active::before { height: 22px; box-shadow: 0 0 8px rgba(59,111,224,0.3); }
.nav-item svg { transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1); }
.nav-item:hover svg { transform: rotate(-4deg) scale(1.08); }
.nav-item.active svg { animation: dg-float 4.31s ease-in-out infinite; }
.nav-item:hover { transform: translateX(2px); }
.nav-count { animation: dg-spring 0.26s cubic-bezier(0.2, 0.9, 0.2, 1) both; }

/* 列表逐行滑入 */
.table tbody tr,
.alert-row,
.history-card { animation: dg-row-in 0.31s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.table tbody tr:nth-child(1), .alert-row:nth-child(1), .history-card:nth-child(1) { animation-delay: 0.14s; }
.table tbody tr:nth-child(2), .alert-row:nth-child(2), .history-card:nth-child(2) { animation-delay: 0.18s; }
.table tbody tr:nth-child(3), .alert-row:nth-child(3), .history-card:nth-child(3) { animation-delay: 0.22s; }
.table tbody tr:nth-child(4), .alert-row:nth-child(4), .history-card:nth-child(4) { animation-delay: 0.26s; }
.table tbody tr:nth-child(5), .alert-row:nth-child(5), .history-card:nth-child(5) { animation-delay: 0.3s; }
.table tbody tr:nth-child(6), .alert-row:nth-child(6), .history-card:nth-child(6) { animation-delay: 0.34s; }
.table tbody tr:nth-child(7), .alert-row:nth-child(7) { animation-delay: 0.38s; }
.table tbody tr:nth-child(8), .alert-row:nth-child(8) { animation-delay: 0.42s; }
.table tbody tr:nth-child(9), .alert-row:nth-child(9) { animation-delay: 0.45s; }
.table tbody tr:nth-child(n+10) { animation-delay: 0.49s; }
.table tbody tr { transition: background 0.2s, transform 0.2s; }
.table tbody tr:hover { background: rgba(59,111,224,0.05); transform: translateX(2px); }
.table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.badge, .issue-chip { animation: dg-spring 0.23s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.badge.level-danger, .badge.level-warn { animation: dg-spring 0.23s cubic-bezier(0.2, 0.9, 0.2, 1) both, dg-danger-glow 3.45s 0.86s ease-in-out infinite; }
.badge.level-warn { animation-name: dg-spring, dg-breathe; }
.level-dot { position: relative; }
.level-dot::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid currentColor; opacity: 0; animation: dg-ring 3.16s ease-out infinite;
}
.level-dot.level-danger { color: var(--bad); animation: dg-breathe 2.88s ease-in-out infinite; }
.level-dot.level-warn { color: var(--warn); }
.level-dot.level-ok { color: var(--good); }
.empty-icon { animation: dg-float 4.31s ease-in-out infinite, dg-ring 4.31s ease-out infinite; }

/* 详情区块 */
.detail-section { animation: dg-row-in 0.29s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.detail-section:nth-child(2) { animation-delay: 0.07s; }
.detail-section:nth-child(3) { animation-delay: 0.12s; }
.detail-section:nth-child(4) { animation-delay: 0.17s; }
.detail-section:nth-child(5) { animation-delay: 0.22s; }
.detail-hero { animation: dg-spring 0.26s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.chain-step { animation: dg-row-in 0.23s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.chain-step:nth-child(2) { animation-delay: 0.05s; }
.chain-step:nth-child(3) { animation-delay: 0.1s; }
.chain-step:nth-child(4) { animation-delay: 0.16s; }
.chain-step:nth-child(5) { animation-delay: 0.21s; }

/* 遮罩、抽屉、弹窗、提示 */
.drawer-mask, .modal-mask { animation: dg-fade-in 0.16s ease both, dg-blur-in 0.21s ease both; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.drawer { animation: dg-drawer-in 0.35s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.drawer-head { animation: dg-fade-up 0.26s 0.1s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.drawer-tabs { animation: dg-fade-in 0.26s 0.13s both; }
.modal { animation: dg-modal-in 0.31s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.modal-head, .modal-foot { animation: dg-fade-in 0.23s 0.1s both; }
.toast { animation: dg-toast-in 0.31s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.toast::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  border: 1px solid rgba(59,111,224,0.18); animation: dg-ring 0.94s ease-out 1;
}

/* 交互微动效 */
.stat-card { transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1), border-color 0.25s, box-shadow 0.3s; }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), #8a55e0, var(--accent), transparent);
  background-size: 200% 100%; animation: dg-gradient 4.6s linear infinite;
  opacity: 0.75; pointer-events: none;
}
.stat-card::after { transform: scaleY(0.35); transform-origin: center; transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1), width 0.3s; }
.stat-card:hover { transform: translateY(-1px); border-color: #9fb2d2; }
.stat-card:nth-child(1):hover, .stat-card:nth-child(6):hover { box-shadow: 0 10px 24px rgba(59,111,224,0.16); }
.stat-card:nth-child(2):hover { box-shadow: 0 10px 24px rgba(15,157,110,0.14); }
.stat-card:nth-child(3):hover, .stat-card:nth-child(4):hover { box-shadow: 0 10px 24px rgba(226,67,87,0.14); }
.stat-card:nth-child(5):hover { box-shadow: 0 10px 24px rgba(200,135,11,0.14); }
.stat-card:hover::after { transform: scaleY(1); }
.stat-value { transition: transform 0.2s; }
.stat-card:hover .stat-value { transform: scale(1.01); }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(30,45,75,0.1); }
.btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.btn.primary {
  background: linear-gradient(100deg, #3b6fe0, #6a58e0, #3b6fe0);
  background-size: 200% 100%; animation: dg-gradient 4.31s linear infinite;
}
.btn.primary:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(59,111,224,0.24); }
.icon-btn { transition: background 0.2s, color 0.2s, transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1); }
.icon-btn:hover:not(:disabled) { transform: translateY(-1px) scale(1.02) rotate(-1deg); box-shadow: 0 6px 14px rgba(30,45,75,0.1); }
.domain-link { transition: color 0.2s, transform 0.2s; display: inline-block; }
.domain-link:hover { color: #1f4fa8; transform: translateX(1px); text-shadow: 0 0 8px rgba(59,111,224,0.22); }
.alert-row { transition: background 0.22s, transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1); }
.alert-row:hover { background: linear-gradient(90deg, rgba(59,111,224,0.12), transparent); transform: translateX(1px); }
.alert-row .arrow { animation: dg-arrow 2.59s ease-in-out infinite; }
.alert-row:hover .arrow { animation-play-state: paused; transform: translateX(3px); opacity: 1; }
.switch-track::after { transition: transform 0.36s cubic-bezier(0.2, 1.4, 0.4, 1), background 0.25s; }
.switch input:checked + .switch-track { box-shadow: 0 0 10px rgba(59,111,224,0.2); }
input:focus, textarea:focus, .select:focus { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 10px rgba(59,111,224,0.12); }
.pulse-dot { animation: dg-breathe 3.16s ease-in-out infinite; }
.btn.spinning svg { animation: dg-spin 1.08s linear infinite; }
.btn.busy-pulse { animation: dg-gradient 4.31s linear infinite, dg-busy-glow 2.16s ease-in-out infinite; }
.drawer-tabs button { transition: color 0.2s, border-color 0.2s, transform 0.2s; }
.drawer-tabs button:hover { transform: translateY(0); }
.drawer-tabs button.active { animation: dg-fade-up 0.21s cubic-bezier(0.2, 0.85, 0.2, 1) both; }

/* 登录页增强 */
.login-page { position: relative; overflow: hidden; }
.login-page::before {
  content: ''; position: absolute; inset: -50%; pointer-events: none;
  background-image: linear-gradient(rgba(59,111,224,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(59,111,224,0.06) 1px, transparent 1px);
  background-size: 46px 46px; transform: perspective(600px) rotateX(55deg);
  animation: dg-grid-drift 25.87s linear infinite;
}
@keyframes dg-grid-drift { from { background-position: 0 0; } to { background-position: 0 460px; } }
.login-page::after {
  content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(122,79,216,0.15), transparent 70%);
  filter: blur(50px); animation: dg-orb-a 17.25s ease-in-out infinite alternate;
}
.login-card { position: relative; z-index: 1; animation: dg-modal-in 0.44s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.login-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(59,111,224,0.24), transparent 70%);
  background-size: 200% 100%; animation: dg-gradient 5.75s linear infinite;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; -webkit-mask-composite: xor; padding: 1px;
}
.login-card h1 { animation: dg-fade-up 0.31s 0.14s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.login-card .sub { animation: dg-fade-up 0.31s 0.18s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.login-field { animation: dg-row-in 0.31s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.login-field:nth-of-type(1) { animation-delay: 0.29s; }
.login-field:nth-of-type(2) { animation-delay: 0.35s; }
.login-btn { animation: dg-fade-up 0.31s 0.34s cubic-bezier(0.2, 0.85, 0.2, 1) both; }
.login-error.show { animation: dg-shake 0.23s ease-in-out both, dg-fade-in 0.1s both; }
.login-logo { position: relative; animation: dg-spring 0.42s 0.1s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.login-logo svg { animation: dg-float 4.89s ease-in-out infinite; }
.login-logo::before, .login-logo::after {
  content: ''; position: absolute; inset: -7px; border-radius: 17px;
  border: 1px solid rgba(59,111,224,0.31); animation: dg-ring 3.74s ease-out infinite;
}
.login-logo::after { animation-delay: 0.85s; }

/* ============ 手机端适配 ============ */
@media (max-width: 700px) {
  body { -webkit-text-size-adjust: 100%; }
  .layout { display: block; height: 100dvh; min-height: 0; }
  .main { height: 100%; padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }

  /* 侧栏变为底部导航 */
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding: 0 6px env(safe-area-inset-bottom, 0px);
    flex-direction: row; align-items: stretch;
    border-right: 0; border-top: 1px solid var(--border);
    box-shadow: 0 -3px 14px rgba(30,45,75,0.08);
    z-index: 30;
  }
  .brand, .sidebar-foot { display: none; }
  .nav { flex: 1; flex-direction: row; height: 100%; gap: 0; }
  .nav-item {
    flex: 1; width: auto; min-width: 0;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 6px 2px; border-radius: 8px;
    font-size: 10px; text-align: center;
  }
  .nav-item span, .nav-count { display: inline; }
  .nav-count { margin-left: 3px; font-size: 9px; }
  .nav-item svg { width: 19px; height: 19px; flex-basis: 19px; }
  .nav-item::before { display: none; }
  .nav-item:hover { transform: none; padding-left: 2px; }
  .nav-item:hover svg { transform: none; }
  .nav-item.active { background: var(--accent-soft); }

  /* 顶栏 */
  .topbar { height: 56px; flex-basis: 56px; padding: 0 12px; box-shadow: 0 1px 0 var(--border-soft); }
  .topbar h1 { font-size: 16px; min-width: 0; white-space: nowrap; }
  .topbar-sub, .updated { display: none; }
  .topbar > div:first-of-type { min-width: 0; }
  /* 手机端进度：压缩为顶栏底部一条细条 */
  .check-progress {
    position: absolute; left: 0; right: 0; bottom: 0; top: auto;
    flex: none; min-width: 0; width: 100%; margin: 0;
  }
  .check-progress .cp-line, .check-progress .cp-current { display: none; }
  .check-progress .cp-bar { height: 3px; border-radius: 0; background: rgba(59,111,224,0.12); }
  .topbar-actions { gap: 6px; flex-shrink: 0; }
  .topbar-actions .btn { height: 32px; padding: 0 10px; font-size: 12px; }
  .topbar-actions .btn.ghost { width: 32px; padding: 0; font-size: 0; }
  .mobile-logout { display: inline-flex; }
  .topbar-actions .btn:hover:not(:disabled),
  .topbar-actions .btn:active:not(:disabled) { transform: none; }
  .content { padding: 12px 12px 24px; }

  /* 统计卡片 */
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
  .stat-card { padding: 13px 14px 22px; }
  .stat-card:hover { transform: none; }
  .stat-go { right: 12px; bottom: 9px; font-size: 10px; opacity: 1; transform: none; }
  .filter-banner { flex-wrap: wrap; font-size: 12px; padding: 10px 12px; gap: 6px; }
  .filter-clear { margin-left: 0; }
  .stat-value { font-size: 24px; margin: 6px 0 4px; }
  .stat-label { font-size: 11px; }
  .stat-foot { font-size: 10px; }

  /* 面板与告警 */
  .panel-head { padding: 13px 14px; }
  .panel-head h2 { font-size: 14px; }
  .panel-head p { font-size: 11px; }
  .empty-state { padding: 36px 16px; }
  .empty-state.small { padding: 22px 12px; }
  .alert-row { padding: 11px 14px; flex-wrap: wrap; gap: 6px 8px; }
  .alert-domain { min-width: 0; flex: 1; font-size: 13px; }
  .alert-issues { flex: 1 1 100%; padding-left: 16px; font-size: 11px; }
  .alert-row:hover { transform: none; padding-left: 14px; background: rgba(59,111,224,0.05); }

  /* 工具栏 */
  .toolbar { padding: 10px 12px; gap: 8px; }
  .search-box { flex: 1 1 100%; }
  .search-box input { width: 100%; }
  .toolbar .select { flex: 1; min-width: 0; }
  .toolbar-spacer { display: none; }
  .toolbar .btn { flex: 1; padding: 0 8px; font-size: 12px; }
  .toolbar .btn svg { display: none; }

  /* 表格转卡片 */
  .table-wrap { overflow: visible; padding: 10px 12px 4px; }
  .table { min-width: 0; }
  .table thead { display: none; }
  .table tbody { display: flex; flex-direction: column; gap: 10px; }
  .table tbody tr {
    display: block; width: 100%; border: 1px solid var(--border);
    border-radius: 10px; background: #ffffff; overflow: hidden;
    box-shadow: 0 2px 8px rgba(30,45,75,0.05);
  }
  .table tbody td {
    display: block; padding: 7px 12px; border-bottom: 1px solid #eef1f6;
    font-size: 12px; min-height: 0;
  }
  .table tbody td:last-child { border-bottom: 0; }
  .table tbody td::before {
    content: ''; display: block; color: var(--muted); font-size: 10px; font-weight: 500;
  }
  .table tbody td > * { min-width: 0; }
  .table tbody td.right { text-align: left; }
  .table tbody td.org-cell,
  .table tbody td.issues-cell { max-width: none; white-space: normal; word-break: break-all; }
  .table tbody tr:hover { transform: none; background: #ffffff; }
  .table tbody tr:hover td:first-child { box-shadow: none; }
  .table tbody td:last-child { display: flex; align-items: center; justify-content: space-between; }
  .table tbody td:last-child::before { content: '操作'; }

  /* 域名卡片：紧凑网格 */
  .domains-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      'name note status'
      'org org org'
      'access expiry cert'
      'type block count'
      'time time actions';
    align-items: center; padding: 6px 0;
  }
  .domains-table tbody td { border-bottom: 0; padding: 5px 10px; }
  .domains-table tbody td:nth-child(1)  { grid-area: name; }
  .domains-table tbody td:nth-child(2)  { grid-area: status; text-align: right; }
  .domains-table tbody td:nth-child(3)  { grid-area: access; }
  .domains-table tbody td:nth-child(4)  { grid-area: expiry; }
  .domains-table tbody td:nth-child(5)  { grid-area: cert; }
  .domains-table tbody td:nth-child(6)  { grid-area: type; }
  .domains-table tbody td:nth-child(7)  { grid-area: org; }
  .domains-table tbody td:nth-child(8)  { grid-area: block; }
  .domains-table tbody td:nth-child(9)  { grid-area: count; }
  .domains-table tbody td:nth-child(10) { grid-area: time; }
  .domains-table tbody td:nth-child(11) { grid-area: note; }
  .domains-table tbody td:nth-child(12) { grid-area: actions; }

  /* 只给三列信息行显示字段名 */
  .domains-table tbody td::before { display: none; }
  .domains-table tbody td:nth-child(3)::before { content: '访问'; display: block; }
  .domains-table tbody td:nth-child(4)::before { content: '域名到期'; display: block; }
  .domains-table tbody td:nth-child(5)::before { content: '证书到期'; display: block; }
  .domains-table tbody td:nth-child(6)::before { content: '证书'; display: block; }
  .domains-table tbody td:nth-child(8)::before { content: '拦截'; display: block; }
  .domains-table tbody td:nth-child(9)::before { content: '检测次数'; display: block; }
  .domains-table tbody td:nth-child(10)::before { content: '检测于 '; display: inline; }
  .domains-table tbody td:nth-child(7)::before { content: '归属 '; display: inline; }

  /* 头部域名与状态 */
  .domains-table tbody td:nth-child(1) .domain-link { font-size: 14px; }
  .domains-table tbody td:nth-child(1) .cell-sub { margin-top: 2px; font-size: 10px; }
  .domains-table .badge { height: 20px; padding: 0 6px; font-size: 10px; }

  /* 归属行压成小字 */
  .domains-table tbody td:nth-child(7) {
    padding-top: 0; padding-bottom: 7px; border-bottom: 1px solid #eef1f6;
    font-size: 11px; color: var(--muted);
  }
  .domains-table tbody td:nth-child(7) .cell-sub { display: inline; font-size: 10px; }
  .domains-table tbody td.org-cell { max-width: none; white-space: normal; word-break: break-all; }

  /* 三列信息行 */
  .domains-table tbody td:nth-child(3),
  .domains-table tbody td:nth-child(4),
  .domains-table tbody td:nth-child(5),
  .domains-table tbody td:nth-child(6),
  .domains-table tbody td:nth-child(8),
  .domains-table tbody td:nth-child(9) { padding-top: 6px; padding-bottom: 6px; font-size: 12px; }
  .domains-table tbody td .cell-sub { font-size: 10px; margin-top: 1px; }
  .domains-table .cert-type { font-size: 10px; padding: 2px 5px; }

  /* 三列信息行补充检测次数 */
  .domains-table tbody td:nth-child(9) { padding-top: 6px; padding-bottom: 6px; font-size: 12px; }

  /* 底栏：检测时间 + 操作 */
  .domains-table tbody td:nth-child(10),
  .domains-table tbody td:nth-child(12) {
    border-top: 1px solid #eef1f6; padding-top: 7px; padding-bottom: 4px;
    align-self: stretch;
  }
  .domains-table tbody td:nth-child(10) { font-size: 11px; color: var(--muted); display: flex; align-items: center; }
  .domains-table tbody td:nth-child(10)::before { color: var(--muted); }
  .domains-table tbody td:nth-child(12) { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
  .domains-table tbody td:nth-child(12)::before { display: none; }

  /* 备注框移到首行（域名与状态之间） */
  .domains-table tbody td:nth-child(11) { display: flex; align-items: center; padding-top: 2px; padding-bottom: 2px; width: auto; }
  .domains-table tbody td.note-cell { width: auto; }
  .domains-table tbody td.note-cell .note-input { width: 100%; height: 28px; background: var(--bg); border-radius: 6px; font-size: 12px; }
  .domains-table .icon-btn { width: 28px; height: 28px; }
  .domains-table .icon-btn svg { width: 15px; height: 15px; }
  .domains-table .switch-btn { padding: 2px; }
  .domains-table .switch-btn-track { width: 26px; height: 15px; }
  .domains-table .switch-btn-dot { width: 11px; height: 11px; transform: translateX(11px); }
  .domains-table .switch-btn.off .switch-btn-dot { transform: translateX(0); }
  .domains-table .copy-btn { width: 22px; height: 22px; }
  .domains-table .copy-btn svg { width: 13px; height: 13px; }
  .deleted-table { min-width: 0; }
  .deleted-table thead { display: none; }
  .deleted-table tbody td:nth-child(1)::before { content: '域名'; }
  .deleted-table tbody td:nth-child(2)::before { content: '删除于'; }
  .deleted-table tbody td:nth-child(3)::before { content: '最近检测'; }
  .deleted-table tbody td:nth-child(4)::before { content: '备注'; }
  .deleted-table tbody td:nth-child(5)::before { content: '操作'; }
  .deleted-table .btn.small { padding: 0 10px; font-size: 12px; }
  /* 检测记录：3 行紧凑网格 */
  .history-table tbody tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      'name name status time'
      'http block dexp cexp'
      'issues issues issues issues';
    align-items: center; padding: 6px 0;
  }
  .history-table tbody td { border-bottom: 0; padding: 5px 8px; }
  .history-table tbody td:nth-child(1) { grid-area: name; }
  .history-table tbody td:nth-child(2) { grid-area: time; text-align: right; font-size: 10px; }
  .history-table tbody td:nth-child(3) { grid-area: status; text-align: right; }
  .history-table tbody td:nth-child(4) { grid-area: http; }
  .history-table tbody td:nth-child(5) { grid-area: block; }
  .history-table tbody td:nth-child(6) { grid-area: dexp; }
  .history-table tbody td:nth-child(7) { grid-area: cexp; }
  .history-table tbody td:nth-child(8) { grid-area: issues; }
  .history-table tbody td::before { display: none; }
  .history-table tbody td:nth-child(4)::before { content: 'HTTP'; display: block; }
  .history-table tbody td:nth-child(5)::before { content: '拦截'; display: block; }
  .history-table tbody td:nth-child(6)::before { content: '域名'; display: block; }
  .history-table tbody td:nth-child(7)::before { content: '证书'; display: block; }
  .history-table tbody td:nth-child(8)::before { content: '风险提示 '; display: inline; }
  .history-table tbody td:nth-child(1) { font-size: 14px; font-weight: 600; }
  .history-table .badge { height: 19px; padding: 0 6px; font-size: 10px; }
  .history-table tbody td:nth-child(4),
  .history-table tbody td:nth-child(5),
  .history-table tbody td:nth-child(6),
  .history-table tbody td:nth-child(7) { padding-top: 6px; padding-bottom: 6px; font-size: 12px; }
  .history-table tbody td:nth-child(8) {
    border-top: 1px solid #eef1f6; padding-top: 7px; padding-bottom: 4px;
    font-size: 11px; color: var(--muted); align-self: stretch;
  }
  .history-table tbody td:nth-child(8)::before { color: var(--muted); }
  .icon-btn { width: 34px; height: 34px; }
  .icon-btn svg { width: 18px; height: 18px; }
  .domain-link { font-size: 13px; }

  /* 设置表单 */
  .settings-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 12px; }
  .settings-grid .full-width { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .field.full { grid-column: auto; }
  .panel-foot { padding: 12px 14px; }
  .panel-foot .btn { flex: 1; }
  .test-row { flex-direction: column; width: 100%; }
  .test-input { width: 100%; }
  .hint-box, .platform-note { margin-left: 14px; margin-right: 14px; }
  input, textarea, .select { font-size: 16px; }
  .switch-label { font-size: 11px; }

  /* 详情抽屉 */
  .drawer { width: 100vw; border-left: 0; }
  .drawer-head { padding: 14px 16px; }
  .drawer-title { font-size: 16px; }
  .drawer-tabs { padding: 0 16px; gap: 18px; }
  .drawer-tabs button { padding: 11px 0; font-size: 12px; }
  .drawer-body { padding: 14px 16px 30px; }
  .kv-grid { grid-template-columns: 1fr; gap: 10px; }
  .kv-grid .wide { grid-column: auto; }
  .kv-grid strong { font-size: 12px; }
  .detail-hero { padding: 10px 12px; gap: 6px; }
  .chain-step { flex-wrap: wrap; }
  .chain-url { flex-basis: 100%; padding-left: 27px; }
  .detail-section { margin-bottom: 18px; }

  /* 弹窗与提示 */
  .modal { width: calc(100vw - 24px); max-height: calc(100dvh - 40px); overflow-y: auto; border-radius: 12px; }
  .modal-head, .modal-body, .modal-foot { padding: 14px 16px; }
  .modal-foot .btn { flex: 1; }
  .toast {
    left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    max-width: none; justify-content: center;
    padding: 13px 18px; font-size: 15px;
    box-shadow: 0 10px 30px rgba(30,45,75,0.22);
  }
}

@media (max-width: 380px) {
  .stat-value { font-size: 21px; }
  .nav-item { font-size: 8.5px; padding: 5px 1px; }
  .nav-item svg { width: 17px; height: 17px; flex-basis: 17px; }
  .topbar-actions .btn.primary { font-size: 11px; padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    backdrop-filter: none !important;
  }
}
