:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #ffffff;
  --page: #f4f7fb;
  --good: #15803d;
  --bad: #b42318;
  --neutral: #8a5a00;
  --accent: #1769aa;
  --accent-2: #0f766e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

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

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 430px);
  gap: 24px;
  align-items: end;
  padding: 18px 0 22px;
}

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

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

.subtitle {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.search {
  display: grid;
  grid-template-columns: 1fr 92px 112px;
  gap: 10px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 38px rgb(22 35 56 / 10%);
}

input,
button {
  height: 46px;
  border-radius: 6px;
  font: inherit;
}

input {
  min-width: 0;
  border: 1px solid transparent;
  padding: 0 12px;
  color: var(--ink);
  background: #f7f9fc;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  background: #fff;
}

button {
  border: 0;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.secondary-button {
  color: var(--accent);
  background: #e8f1fb;
  border: 1px solid #bfd6ee;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.status {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  background: #eaf0f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.watch-panel {
  margin-top: 16px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.watch-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.watch-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.watch-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.watch-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.watch-card strong {
  font-size: 17px;
}

.watch-card small,
.watch-card span {
  color: var(--muted);
  font-size: 12px;
}

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

.watch-actions button {
  width: 34px;
  height: 30px;
  border-radius: 6px;
  font-size: 13px;
}

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

.metric,
.chart-wrap,
.signals article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  min-height: 112px;
  padding: 16px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 28px;
  line-height: 1;
}

.chart-wrap {
  height: 520px;
  padding: 16px;
}

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

.signals article {
  padding: 14px;
  min-height: 108px;
}

.signals h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.signals p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.good h3 {
  color: var(--good);
}

.bad h3 {
  color: var(--bad);
}

.neutral h3 {
  color: var(--neutral);
}

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

  .metric-panel,
  .signals,
  .watchlist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-wrap {
    height: 430px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .search,
  .metric-panel,
  .signals,
  .watchlist {
    grid-template-columns: 1fr;
  }

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

  .chart-wrap {
    height: 360px;
    padding: 10px;
  }
}
