/* 原创黑白极简网络仪表盘：点阵背景、紧凑卡片和状态徽章，适配独立插件窗口。 */
:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --ink: #101010;
  --muted: #606064;
  --line: #deded8;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --panel-soft: #efefeb;
  --ok: #0b7a3b;
  --warn: #946100;
  --bad: #b42318;
  --info: #245aa5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(#d0d0ca 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(180deg, #fbfbf8 0%, var(--bg) 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

button.primary,
button:hover {
  background: var(--ink);
  color: #ffffff;
}

button:disabled {
  cursor: progress;
  opacity: 0.58;
}

input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 11px;
  background: #ffffff;
  color: var(--ink);
}

textarea {
  width: 100%;
  min-height: 84px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  resize: vertical;
  background: #ffffff;
  color: var(--ink);
  font: 12px/1.5 "Cascadia Mono", Consolas, monospace;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

a {
  color: inherit;
}

.shell {
  width: min(1220px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.hero {
  min-height: 172px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.brandMark {
  width: 58px;
  height: 58px;
  position: relative;
  align-self: start;
  display: grid;
  place-items: center;
}

.brandMark::before,
.brandMark::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  opacity: 0.16;
}

.brandMark::after {
  inset: 11px;
  opacity: 0.36;
}

.brandMark span {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
}

.heroText {
  min-width: 0;
}

.eyebrow,
.label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.02;
  word-break: break-all;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 16px;
}

.summary,
.muted {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.heroActions,
.formRow {
  display: flex;
  gap: 10px;
}

.bridgeActions {
  margin-top: 12px;
  flex-wrap: wrap;
}

.heroActions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quickStats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.statusItem {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.statusItem span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.statusItem strong {
  display: block;
  font-size: 22px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.toolNav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0 12px;
  backdrop-filter: blur(12px);
}

.toolNav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}

.toolNav a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.grid,
.toolGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.toolGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.card,
.toolPanel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.card {
  min-height: 248px;
  padding: 18px;
}

.toolCard {
  min-height: 260px;
}

.toolPanel {
  padding: 18px;
  margin-bottom: 12px;
}

.span2 {
  grid-column: span 2;
}

.cardHeader,
.sectionHeader {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.badge.ok {
  color: var(--ok);
  border-color: rgba(11, 122, 59, 0.35);
  background: rgba(11, 122, 59, 0.08);
}

.badge.warn,
.badge.pending {
  color: var(--warn);
  border-color: rgba(148, 97, 0, 0.35);
  background: rgba(148, 97, 0, 0.08);
}

.badge.bad {
  color: var(--bad);
  border-color: rgba(180, 35, 24, 0.35);
  background: rgba(180, 35, 24, 0.08);
}

.badge.info {
  color: var(--info);
  border-color: rgba(36, 90, 165, 0.35);
  background: rgba(36, 90, 165, 0.08);
}

.facts {
  display: grid;
  grid-template-columns: 134px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.facts.compact {
  grid-template-columns: 96px minmax(0, 1fr);
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.metricList,
.checkList {
  display: grid;
  gap: 10px;
}

.metric,
.checkItem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.metric:last-child,
.checkItem:last-child {
  border-bottom: 0;
}

.metric strong,
.checkItem strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.okText {
  color: var(--ok);
}

.warnText {
  color: var(--warn);
}

.badText {
  color: var(--bad);
}

.monoBlock {
  min-height: 148px;
  padding: 12px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: #222222;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.monoBlock.small {
  min-height: 156px;
  max-height: 260px;
  margin-top: 12px;
}

.speedValue {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 850;
  font-size: 52px;
}

.speedValue small {
  color: var(--muted);
  font-size: 18px;
}

.interfaceList {
  display: grid;
  gap: 12px;
}

.interfaceItem {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.interfaceItem strong,
.interfaceItem span {
  display: block;
}

.interfaceItem span {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.copyState {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .hero,
  .quickStats,
  .grid,
  .toolGrid {
    grid-template-columns: 1fr;
  }

  .span2 {
    grid-column: auto;
  }

  .heroActions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100vw - 22px, 1220px);
    padding-top: 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .brandMark {
    width: 44px;
    height: 44px;
  }

  .formRow {
    flex-direction: column;
  }

  .facts,
  .facts.compact,
  .metric,
  .checkItem {
    grid-template-columns: 1fr;
  }

  .metric strong,
  .checkItem strong {
    text-align: left;
  }
}
