:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d9dee7;
  --teal: #0f766e;
  --teal-2: #e4f5f0;
  --blue: #2563eb;
  --blue-2: #e8f0ff;
  --amber: #b45309;
  --amber-2: #fff2d5;
  --red: #b42318;
  --red-2: #ffe7e4;
  --green: #157f3b;
  --green-2: #e7f7ec;
  --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.side {
  background: #10201d;
  color: #effaf6;
  padding: 22px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #a7f3d0;
  color: #06342e;
  font-weight: 800;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
}

.brand-sub {
  margin-top: 3px;
  color: #b7d8ce;
  font-size: 12px;
}

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

.nav button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d9eee8;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.nav button.active {
  background: #a7f3d0;
  color: #082b26;
  font-weight: 800;
}

.nav-icon {
  width: 24px;
  text-align: center;
  font-size: 18px;
}

.main {
  padding: 20px 24px 32px;
}

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

h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control,
.primary {
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
}

.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  cursor: pointer;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(128px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}

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

.metric-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 900;
}

.metric-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 14px;
}

.full-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}

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

.panel h2 {
  margin: 0;
  font-size: 17px;
}

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

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.card-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.card-title {
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 5px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.tag.red { color: var(--red); background: var(--red-2); }
.tag.amber { color: var(--amber); background: var(--amber-2); }
.tag.blue { color: var(--blue); background: var(--blue-2); }
.tag.green { color: var(--green); background: var(--green-2); }
.tag.teal { color: var(--teal); background: var(--teal-2); }

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

.step {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow);
}

.step-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-2);
  color: var(--teal);
  font-weight: 900;
  margin-bottom: 10px;
}

.step-title {
  font-weight: 800;
  margin-bottom: 8px;
}

.step-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

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

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
}

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

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

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

  .side {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }

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

  .grid,
  .full-grid,
  .workflow,
  .form-panel {
    grid-template-columns: 1fr;
  }
}
