:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --ink: #17201b;
  --muted: #66736d;
  --panel: #ffffff;
  --line: #d9e0dc;
  --accent: #18794e;
  --accent-2: #285d8f;
  --warn: #a15c13;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

.topbar,
.panel-head,
.opportunity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 26px 0 14px;
}

.metrics article,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(26, 38, 32, 0.06);
}

.metrics article {
  padding: 18px;
}

.metrics span,
.panel-head p,
.opportunity span {
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.panel {
  padding: 18px;
}

.chart-panel canvas {
  width: 100%;
  height: 320px;
  margin-top: 18px;
}

.opportunities {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.opportunity {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.opportunity strong,
.opportunity span {
  display: block;
}

.opportunity b {
  color: var(--accent);
  font-size: 18px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.profit {
  color: var(--accent);
  font-weight: 800;
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

button.secondary {
  background: #edf1ef;
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .topbar,
  .panel-head {
    align-items: flex-start;
  }

  .metrics,
  .grid {
    grid-template-columns: 1fr;
  }
}
