:root {
  --ink: #101820;
  --panel: #16221f;
  --panel-soft: #1f2d2a;
  --line: rgba(247, 241, 210, 0.14);
  --text: #f7f1d2;
  --muted: #aeb9a8;
  --accent: #f4c95d;
  --good: #4ade80;
  --warn: #f59e0b;
  --bad: #ef4444;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #0b1715;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(17, 34, 28, 0.96), rgba(11, 23, 21, 1)),
    #0b1715;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1320px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 600px);
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

h2 {
  font-size: 18px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) auto;
  gap: 8px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

input {
  min-height: 38px;
  color: var(--text);
  background: #0e1917;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}

button {
  min-height: 38px;
  color: #101820;
  background: var(--accent);
  border: 1px solid rgba(255, 246, 191, 0.6);
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 950;
  cursor: pointer;
}

button.small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.status {
  min-height: 38px;
  margin-bottom: 12px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(16, 24, 32, 0.72);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.status.error {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.45);
}

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

.metrics article,
.panel {
  background: linear-gradient(180deg, rgba(31, 45, 42, 0.98), rgba(17, 26, 24, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.metrics article {
  min-height: 98px;
  padding: 14px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 10px;
  color: #fff4bb;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

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

.panel-wide {
  grid-column: 1 / -1;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(247, 241, 210, 0.08);
  text-align: left;
  white-space: nowrap;
}

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

td strong {
  color: var(--accent);
}

.wallet {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtle {
  color: var(--muted);
  font-size: 11px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.pending {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.42);
}

.status-pill.complete {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.42);
}

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

@media (max-width: 1050px) {
  .topbar,
  .grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 9px;
  }
}
