:root {
  --brand: #f97316;
  --brand-strong: #c2410c;
  --brand-soft: #fff7ed;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --page: #f6f7f9;
  --blue: #2563eb;
  --green: #059669;
  --red: #dc2626;
  --shadow: 0 14px 36px rgba(31, 41, 55, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--page);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  padding: 16px;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: 100%;
  max-width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 108px;
  padding: 22px 28px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, #fb923c 0%, #f97316 42%, #ea580c 100%);
}

.hero::before {
  position: absolute;
  right: 32px;
  bottom: -96px;
  z-index: -1;
  width: 248px;
  height: 248px;
  background: url("../assets/logo.svg") center / contain no-repeat;
  opacity: 0.16;
  content: "";
}

.hero::after {
  position: absolute;
  right: 230px;
  bottom: -38px;
  z-index: -1;
  width: 112px;
  height: 112px;
  background: url("../assets/logo.svg") center / contain no-repeat;
  opacity: 0.08;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.workspace {
  padding: 22px;
  background: #ffffff;
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.25fr) minmax(130px, 0.55fr) minmax(250px, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.field {
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

select,
input {
  min-width: 0;
  width: 100%;
  height: 44px;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  outline: none;
  background: #ffffff;
  color: #101828;
  font-size: 14px;
  font-weight: 650;
  padding: 0 12px;
  text-overflow: ellipsis;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input::placeholder {
  color: #98a2b3;
  font-weight: 500;
}

select:focus,
input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.16);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.term-btn {
  height: 44px;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.term-btn:hover {
  border-color: #ffb46b;
  background: var(--brand-soft);
}

.term-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

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

.metric {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.metric-primary {
  border-color: #fed7aa;
  background: #fff7ed;
}

.metric-blue {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.metric-green {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.metric-red {
  border-color: #fed7aa;
  background: #fff7ed;
}

.metric-label {
  margin-bottom: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.metric-value {
  color: #101828;
  font-size: 23px;
  line-height: 1.15;
  font-weight: 850;
  word-break: break-word;
}

.metric-primary .metric-value {
  color: var(--brand-strong);
}

.metric-blue .metric-value {
  color: var(--blue);
}

.metric-green .metric-value {
  color: var(--green);
}

.metric-red .metric-value {
  color: var(--red);
}

.info-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fffaf5;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 750;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #ffffff;
  color: #9a3412;
}

.table-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.table-head h2 {
  font-size: 15px;
  font-weight: 850;
}

.table-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef1f5;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  background: #ffffff;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}

td {
  color: #1d2939;
  font-weight: 650;
}

tbody tr:hover td {
  background: #fffaf5;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  max-width: 1200px;
  margin: 14px auto 0;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

@media (max-width: 980px) {
  .control-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  body {
    padding: 10px;
  }

  .shell {
    max-width: calc(100vw - 20px);
  }

  .hero {
    min-height: 104px;
    padding: 18px 16px;
  }

  .hero::before {
    right: -36px;
    bottom: -74px;
    width: 200px;
    height: 200px;
  }

  .hero::after {
    right: 126px;
    bottom: -34px;
    width: 86px;
    height: 86px;
  }

  .hero h1 {
    font-size: 19px;
  }

  .workspace {
    padding: 14px;
  }

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

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

  .metric-value {
    font-size: 21px;
  }

  .site-footer {
    margin-top: 12px;
  }
}
