:root {
  --bg: #edf1f5;
  --sidebar: #101923;
  --sidebar-soft: #182532;
  --panel: #ffffff;
  --panel-soft: #f7f9fb;
  --text: #16202a;
  --muted: #667085;
  --line: #d6dde6;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #e7f4f2;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --warn: #b54708;
  --danger: #b42318;
  --code: #0f172a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

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

button {
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 8px 13px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button.line {
  background: transparent;
  color: var(--accent-strong);
  border-color: #9ccdc7;
}

button.line:hover {
  background: var(--accent-soft);
}

button.full {
  width: 100%;
}

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

textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.6;
}

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

label span {
  display: block;
  margin-bottom: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.check-list {
  width: 100%;
  min-height: 190px;
  border: 1px solid #c9d2dd;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.check-tools {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #e4e9f0;
  background: #f8fafc;
}

.check-tools button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.check-items {
  max-height: 230px;
  overflow: auto;
  padding: 6px 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 3px 2px;
  color: var(--text);
}

.check-row input {
  width: auto;
  min-height: auto;
  padding: 0;
  margin: 0;
}

.check-row span {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.check-empty {
  padding: 12px;
  color: var(--muted);
}

.shell {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--sidebar);
  color: #fff;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #d9f4ee;
  color: #07574f;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.brand p,
.topbar p,
.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.brand p {
  color: #91a1b3;
}

.login-box,
.session-box {
  display: grid;
  gap: 12px;
  background: var(--sidebar-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-title {
  font-weight: 800;
  color: #e6edf5;
}

.login-box label span {
  color: #cbd5e1;
}

.session-box .eyebrow {
  color: #91a1b3;
  font-size: 12px;
}

.session-box strong {
  color: #fff;
  word-break: break-word;
}

.sidebar button.line {
  color: #d7fff7;
  border-color: rgba(215, 255, 247, 0.35);
}

.nav {
  display: grid;
  gap: 14px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-title {
  padding: 0 10px 2px;
  color: #7f91a6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.nav button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #cdd6e1;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

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

.nav button::after {
  content: attr(data-code);
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.page-kicker {
  color: var(--accent-strong);
  font-weight: 800;
  margin-bottom: 4px;
}

.topbar h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.status-strip {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(130px, auto);
  gap: 10px;
}

.status-strip div {
  min-height: 54px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
}

.status-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.status-strip strong {
  display: block;
  max-width: 360px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.overview-card {
  display: grid;
  gap: 4px;
  min-height: 96px;
  align-content: start;
  padding: 14px;
  text-align: left;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
}

.overview-card:hover {
  background: #fbfdfd;
  border-color: #9ccdc7;
  transform: translateY(-1px);
}

.overview-card span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.overview-card strong {
  font-size: 18px;
}

.overview-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(460px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  align-items: start;
}

.workspace,
.result-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.07);
}

.result-tools {
  display: flex;
  gap: 8px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  white-space: nowrap;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--warn);
  border: 1px solid #fed7aa;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.badge.ready {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: #9ccdc7;
}

.form {
  display: grid;
  gap: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

pre {
  min-height: 500px;
  max-height: calc(100vh - 230px);
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: var(--code);
  color: #dbeafe;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding-bottom: 14px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-group {
    min-width: 230px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px;
  }

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

  .content-grid,
  .status-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 13px;
  }

  .main {
    padding: 12px;
  }

  .sidebar {
    padding: 14px 12px;
    gap: 12px;
  }

  .brand {
    padding-bottom: 10px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .topbar,
  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .status-strip div {
    min-height: 48px;
  }

  .overview {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .overview-card {
    min-height: 78px;
    padding: 12px;
  }

  .overview-card strong {
    font-size: 16px;
  }

  .grid.three {
    grid-template-columns: 1fr;
  }

  .workspace,
  .result-panel {
    padding: 13px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions button {
    width: 100%;
  }

  pre {
    min-height: 280px;
    max-height: 420px;
    font-size: 12px;
  }
}
