:root {
  --ink: #11171c;
  --muted: #67727b;
  --line: #dce5de;
  --paper: #f6f8f5;
  --panel: #ffffff;
  --green: #00a676;
  --yellow: #ffd633;
  --blue: #2868ff;
  --bad: #e05347;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Verdana, Geneva, sans-serif;
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f171c;
  color: #f6fff9;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--green);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand small,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a {
  color: #c7d3ce;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
}

.sidebar a.active,
.sidebar a:hover {
  background: #1d292f;
  color: #fff;
}

main {
  padding: 28px;
  display: grid;
  gap: 20px;
}

header,
.panel,
.metrics article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 22px;
}

button,
input,
select {
  font: inherit;
}

.token-form {
  display: flex;
  gap: 8px;
}

input,
select {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: #fff;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--ink);
  color: white;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.1);
}

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

.metrics article {
  padding: 18px;
}

.metrics span {
  color: var(--muted);
  display: block;
}

.metrics strong {
  font-size: 34px;
}

.panel {
  padding: 20px;
}

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

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

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

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

th {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf2ef;
  font-size: 12px;
}

.badge.ok {
  background: #ddf8ed;
  color: #007d59;
}

.badge.warn {
  background: #fff3bd;
}

.badge.bad {
  background: #ffe3df;
  color: var(--bad);
}

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

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions button {
  min-height: 34px;
  padding: 0 10px;
}

.approve {
  background: var(--green);
}

.block {
  background: var(--bad);
}

.flow {
  display: grid;
  grid-template-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
  align-items: center;
  gap: 8px;
}

.flow div {
  background: #f2f6f3;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.flow span {
  height: 2px;
  background: var(--green);
}

.doc-list {
  columns: 2;
  margin: 0;
  padding-left: 18px;
}

.doc-list li {
  margin: 0 0 10px;
}

.doc-list a {
  color: var(--blue);
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  header,
  .token-form,
  .flow {
    display: grid;
    grid-template-columns: 1fr;
  }

  .metrics,
  .doc-list {
    columns: initial;
    grid-template-columns: 1fr;
  }

  .flow span {
    display: none;
  }
}
