:root {
  --ink: #111827;
  --muted: #5b6472;
  --line: #d9e1ec;
  --paper: #ffffff;
  --page: #f5f7fb;
  --blue: #1f6ed4;
  --green: #168948;
  --orange: #df5d18;
  --purple: #7226b7;
  --red: #dc132d;
}

* {
  box-sizing: border-box;
}

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

.dashboard {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.05;
  font-weight: 900;
}

.language-toggle {
  flex: 0 0 auto;
  min-width: 104px;
  height: 42px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.language-toggle:hover {
  background: #edf5ff;
}

.subtitle {
  margin: 10px 0 0;
  color: #303846;
  font-size: 20px;
  font-weight: 800;
}

.warning {
  margin: 8px 0 0;
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
}

.sync-status {
  margin: 10px 0 0;
  color: #3d4654;
  font-size: 15px;
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.metric,
.workflow,
.panel,
.cleanup {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.metric {
  min-height: 156px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 18px;
}

.metric p,
.metric span {
  margin: 0;
  font-weight: 800;
}

.metric p {
  font-size: 17px;
}

.metric strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 46px;
  line-height: 0.95;
  font-weight: 900;
}

.metric span {
  display: block;
  color: #2d3441;
  font-size: 16px;
  line-height: 1.35;
}

.metric-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
}

.people-icon {
  position: relative;
}

.people-icon span {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
  top: 7px;
}

.people-icon span:first-child {
  left: 8px;
}

.people-icon span:last-child {
  right: 8px;
}

.people-icon::before,
.people-icon::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 14px;
  border-radius: 12px 12px 4px 4px;
  background: currentColor;
  bottom: 6px;
}

.people-icon::before {
  left: 4px;
}

.people-icon::after {
  right: 4px;
}

.metric-blue {
  border-color: #2876db;
  color: var(--blue);
}

.metric-green {
  border-color: #2d9b5d;
  color: var(--green);
}

.metric-orange {
  border-color: #e4743e;
  color: var(--orange);
}

.metric-purple {
  border-color: #8d4bc1;
  color: var(--purple);
}

.metric-red {
  border-color: #e13d51;
  color: var(--red);
}

.workflow {
  margin-top: 22px;
  padding: 18px 28px 22px;
}

.workflow h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.step {
  height: 56px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  color: #1b4f9a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 22px;
  font-weight: 900;
  background: #fbfdff;
}

.step b {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--blue);
}

.steps i {
  color: var(--blue);
  font-size: 38px;
  font-style: normal;
  font-weight: 900;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.panel {
  min-height: 410px;
  padding: 20px 18px 18px;
}

.panel header {
  border-bottom: 1px solid currentColor;
  padding-bottom: 14px;
  margin-bottom: 10px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: currentColor;
  font-size: 28px;
  font-weight: 900;
}

.panel h2,
.panel p {
  margin: 0;
}

.panel h2 {
  font-size: 28px;
  line-height: 1.1;
}

.panel p {
  margin-top: 5px;
  color: #4d5666;
  font-size: 16px;
  font-weight: 800;
}

.panel-green {
  border-color: #4ca36e;
  color: var(--green);
}

.panel-orange {
  border-color: #ee7f4c;
  color: var(--orange);
}

.panel-purple {
  border-color: #9a65c8;
  color: var(--purple);
}

.panel-red {
  border-color: #eb5163;
  color: var(--red);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  table-layout: fixed;
}

th,
td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 16px;
}

th {
  color: #111827;
  font-weight: 900;
}

td {
  font-weight: 800;
}

td:first-child,
th:first-child {
  width: 36%;
}

td:nth-child(2),
th:nth-child(2) {
  width: 34%;
}

td:last-child,
th:last-child {
  width: 30%;
}

.customer-code {
  display: block;
  margin-top: 2px;
  color: #566173;
  font-size: 14px;
  font-weight: 800;
}

.action {
  color: currentColor;
  font-weight: 900;
}

.cleanup {
  margin-top: 22px;
  padding: 20px 28px;
  border-color: #ec7849;
  color: var(--orange);
}

.cleanup h2 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.15;
}

.cleanup-row {
  display: grid;
  grid-template-columns: 42px 32px minmax(230px, 1fr) minmax(180px, auto) minmax(260px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #efc6b4;
  color: var(--ink);
}

.cleanup-row:first-of-type {
  border-top: 0;
}

.cleanup-icon {
  color: var(--orange);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid currentColor;
  border-radius: 7px;
  font-size: 18px;
  font-weight: 900;
}

.cleanup-row b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  color: #fff;
}

.cleanup-row strong {
  font-size: 19px;
}

.cleanup-row em {
  color: var(--orange);
  font-style: normal;
  font-size: 18px;
  font-weight: 900;
}

.cleanup-row p {
  margin: 0;
  color: #3d4654;
  font-size: 16px;
  font-weight: 800;
}

.rule {
  margin-top: 18px;
  color: #155fc0;
  font-size: 20px;
  font-weight: 900;
}

.rule p {
  margin: 8px 0 0 40px;
  color: #303846;
  font-size: 18px;
}

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

  .metric {
    min-height: 120px;
  }

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

  .steps i {
    display: none;
  }

  .cleanup-row {
    grid-template-columns: 34px 28px 1fr;
  }

  .cleanup-row em,
  .cleanup-row p {
    grid-column: 3;
  }
}

@media (max-width: 620px) {
  .dashboard {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .page-header h1 {
    font-size: 32px;
  }

  .header-top {
    align-items: center;
  }

  .language-toggle {
    min-width: 88px;
    height: 38px;
    font-size: 14px;
  }

  .subtitle,
  .warning {
    font-size: 16px;
  }

  .metric strong {
    font-size: 40px;
  }

  .workflow,
  .cleanup,
  .panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .workflow h2,
  .panel h2,
  .cleanup h2 {
    font-size: 24px;
  }

  .panel {
    min-height: 0;
  }

  th,
  td {
    padding: 7px 4px;
    font-size: 13px;
  }

  .customer-code {
    font-size: 12px;
  }

  .rule,
  .rule p {
    font-size: 16px;
    margin-left: 0;
  }
}
