:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --ink: #17202a;
  --muted: #5d6876;
  --line: #d9dee6;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --warn: #9a3412;
}

* {
  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;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 720;
}

h2 {
  font-size: 18px;
}

.topbar p,
.section-head p,
.metric span,
dt {
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fafbfc;
  font-size: 13px;
}

button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

button.secondary {
  background: #303846;
}

main {
  width: min(1180px, calc(100vw - 32px));
  margin: 24px auto 48px;
}

.dashboard-band,
.side-panel,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-band {
  padding: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.compact {
  align-items: end;
}

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

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

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

.metric strong {
  margin-top: 10px;
  font-size: 28px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  margin-top: 22px;
}

.table-wrap {
  overflow: auto;
}

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

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

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

td {
  font-size: 14px;
}

.side-panel {
  padding: 18px;
}

dl,
dd {
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

dl div:last-child {
  border-bottom: 0;
}

dd {
  font-weight: 700;
  text-align: right;
}

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

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