:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --surface: #171a1f;
  --surface-2: #20242b;
  --line: #303640;
  --text: #e8e1d6;
  --muted: #a69a8b;
  --red: #c3403a;
  --gold: #d7a84f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  background: #111419;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  min-height: 56px;
  padding: 0 20px;
}

.brand {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex: 1;
  gap: 12px;
  overflow-x: auto;
}

.nav a,
.gm-link,
.periods a,
.tabs button,
.link-button {
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover,
.gm-link:hover,
.periods a.active,
.tabs button.active {
  color: var(--text);
}

.gm-topbar {
  border-bottom-color: #5f2d2b;
}

.shell {
  margin: 0 auto;
  max-width: 1280px;
  padding: 22px;
}

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

h1 {
  font-size: 24px;
  margin: 0;
}

.periods,
.tabs {
  display: flex;
  gap: 6px;
}

.periods a,
.tabs button,
button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px;
}

.periods a.active,
.tabs button.active {
  border-color: var(--gold);
}

.stack {
  display: grid;
  gap: 16px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

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

.panel {
  overflow: hidden;
}

.panel.wide {
  overflow-x: auto;
}

.metric {
  padding: 14px;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  text-transform: uppercase;
}

.metric strong {
  color: var(--gold);
  display: block;
  font-size: 22px;
  margin-top: 6px;
}

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

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

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

td a {
  color: var(--gold);
  text-decoration: none;
}

.kill {
  color: var(--red);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.empty-state,
.error {
  padding: 16px;
}

.error {
  color: #ff8a80;
}

.login-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 80px auto;
  max-width: 360px;
  padding: 20px;
}

.login-panel form {
  display: grid;
  gap: 10px;
}

input {
  background: #0c0e12;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 10px;
}

.link-button {
  background: transparent;
}

@media (max-width: 720px) {
  .topbar,
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .shell {
    padding: 14px;
  }

  table {
    min-width: 680px;
  }
}

