:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #12161b;
  --panel-2: #171d23;
  --line: #2b343e;
  --text: #e8eef4;
  --muted: #9ba8b5;
  --accent: #48c0a8;
  --warn: #d9a441;
}

* {
  box-sizing: border-box;
}

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

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

.topbar,
.toolbar,
.panel,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  font-size: 18px;
}

.lead,
.summary,
.section-title span,
label,
small {
  color: var(--muted);
}

.lead {
  margin-top: 8px;
  max-width: 720px;
  line-height: 1.5;
}

.summary {
  min-width: 210px;
  text-align: right;
  font-size: 14px;
}

.toolbar {
  display: grid;
  grid-template-columns: 220px 180px minmax(240px, 1fr);
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1116;
  color: var(--text);
  padding: 0 11px;
  font: inherit;
}

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

.metric {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 13px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(520px, 1.25fr);
  gap: 14px;
  align-items: start;
}

.panel {
  padding: 16px;
}

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

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

.upgrade-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1116;
}

.upgrade-card header,
.upgrade-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.upgrade-card strong {
  display: block;
}

.badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(72, 192, 168, 0.14);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-grid;
  gap: 2px;
  min-width: 132px;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid #344350;
  border-radius: 7px;
  background: var(--panel-2);
}

.chip b,
td strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip small {
  font-size: 11px;
}

.table-wrap {
  max-height: calc(100vh - 250px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #0d1116;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #182029;
  color: #cbd8e4;
}

td:nth-child(2),
th:nth-child(2) {
  text-align: right;
}

td small {
  display: block;
  margin-top: 3px;
}

.empty {
  color: var(--muted);
  padding: 12px;
}

@media (max-width: 980px) {
  .topbar,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .summary {
    text-align: left;
  }

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

  .table-wrap {
    max-height: none;
  }
}
