:root {
  --bg: #111827;
  --panel: #1f2937;
  --panel-2: #0f172a;
  --border: #374151;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --pos: #22c55e;
  --neg: #ef4444;
  --info: #38bdf8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  width: min(1380px, calc(100vw - 32px));
  margin: 20px auto 40px;
}

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

h1, h2 {
  margin: 0 0 8px;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 18px;
}

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

.tiny {
  font-size: 12px;
  margin-top: 4px;
}

.status-box,
.notice,
.card,
.table-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.status-box {
  padding: 14px 16px;
  min-width: 280px;
  line-height: 1.7;
}

.notice {
  padding: 14px 16px;
  margin-bottom: 16px;
}

.notice-info {
  border-left: 4px solid var(--info);
}

.notice-error {
  border-left: 4px solid var(--neg);
}

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

.card {
  padding: 16px;
}

.card-value {
  font-size: 28px;
  font-weight: bold;
}

.card-meta {
  line-height: 1.7;
}

.subline {
  display: block;
  font-size: 14px;
  margin-top: 6px;
}

.table-panel {
  overflow: hidden;
}

.table-head {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

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

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

thead {
  background: var(--panel-2);
}

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

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

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

@media (max-width: 1080px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-head {
    flex-direction: column;
  }

  .status-box {
    min-width: 100%;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100vw - 16px);
    margin: 8px auto 20px;
  }

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

  th,
  td {
    padding: 10px;
  }
}
