:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #687386;
  --line: #dfe5ef;
  --accent: #1d6fd8;
  --accent-dark: #1556a8;
}

* {
  box-sizing: border-box;
}

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

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

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

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

a {
  color: var(--accent);
}

.buttonLink {
  min-height: 40px;
  border-radius: 6px;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.buttonLink:hover {
  background: var(--accent-dark);
}

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

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

.metric {
  min-height: 112px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

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

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.15;
}

.metric small {
  margin-top: 8px;
  font-size: 13px;
}

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

#statusText,
#receiptsStatusText {
  color: var(--muted);
  font-size: 14px;
}

dl {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px 16px;
  margin: 14px 0 0;
}

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

dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: "Courier New", monospace;
  font-size: 14px;
}

.tableWrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.receiptsTable {
  min-width: 1120px;
}

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

th {
  background: #f1f4f9;
  color: #3f4a5e;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

pre {
  max-width: 460px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.ok {
  background: #e7f6ee;
  color: #137a45;
}

.badge.warn {
  background: #fff3df;
  color: #9a5a00;
}

.badge.neutral {
  background: #eef2f8;
  color: #4f5e73;
}

.money {
  font-weight: 700;
  white-space: nowrap;
}

.mono {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

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

.article .panel {
  max-width: 920px;
}

.article ul,
.article ol {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--text);
  line-height: 1.55;
}

.article li + li {
  margin-top: 6px;
}

.article code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef2f8;
  font-family: "Courier New", monospace;
}

.empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .topbar,
  .sectionHeader {
    flex-direction: column;
  }

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

  dl {
    grid-template-columns: 1fr;
  }
}
