:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #17202a;
  --muted: #64748b;
  --line: #d8dee8;
  --line-soft: #e8edf3;
  --accent: #b23b2b;
  --accent-2: #0f766e;
  --accent-soft: #f9e7e3;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(100% - 28px, 1480px);
  margin: 0 auto;
  padding: 18px 0;
}

.login-card,
.side,
.content,
.card,
.hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  margin: 10vh auto;
  padding: 24px;
}

.app {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.side {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: calc(100vh - 36px);
  padding: 16px;
  position: sticky;
  top: 14px;
}

.content {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  margin-bottom: 8px;
  line-height: 1.2;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 15px;
}

.hint,
.status,
.meta {
  color: var(--muted);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

pre.issue-message {
  max-height: 180px;
  overflow: auto;
  margin: 8px 0 0;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px;
  color: var(--ink);
  background: var(--panel-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 14px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  filter: brightness(0.96);
}

.ghost,
.nav-btn {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.nav-btn {
  display: block;
  width: 100%;
  min-height: 34px;
  margin-bottom: 6px;
  padding: 7px 10px;
  text-align: left;
  font-weight: 800;
}

.nav-btn.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

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

.side-card h3 {
  margin-bottom: 2px;
  font-size: 14px;
}

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

.stat,
.item {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.stat {
  padding: 14px;
}

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

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1;
}

.card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.card.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(120px, 160px);
  gap: 10px;
  align-items: center;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.list {
  display: grid;
  gap: 8px;
}

.item {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
}

.item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.item-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  flex: 0 0 auto;
  width: fit-content;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent-2);
  background: rgba(15, 118, 110, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 20px;
}

.node-env {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.node-env span {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.node-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.node-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.node-checks span {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.node-checks .ok {
  color: var(--accent-2);
}

.node-checks .warn {
  color: #946200;
  background: #fff9e6;
}

.node-checks .bad {
  color: #9a2813;
  background: #fff4ef;
}

.node-package-output {
  min-height: 220px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
}

.tag {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid rgba(178, 59, 43, 0.18);
  border-radius: 999px;
  padding: 3px 8px;
  color: #8f2d21;
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.danger {
  color: #9a2813;
}

.status {
  min-height: 18px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .app,
  .stats,
  .form-grid,
  .toolbar,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .side {
    min-height: auto;
    position: static;
  }

  .hero,
  .card.row,
  .item-head {
    align-items: stretch;
    flex-direction: column;
  }
}
