:root {
  color-scheme: dark;
  --bg: #101314;
  --panel: #181d1f;
  --panel-2: #202629;
  --text: #f2f5f3;
  --muted: #9da9a5;
  --line: #2d3538;
  --green: #50d890;
  --red: #ff6b6b;
  --yellow: #ffd166;
  --blue: #66a6ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 14px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 17px;
}

.icon-button,
button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
}

.icon-button {
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.stats article {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stats span,
label span,
.meta {
  color: var(--muted);
  font-size: 12px;
}

.stats strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
}

.panel {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.notice {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--yellow);
  border-radius: 8px;
  background: rgba(255, 209, 102, 0.08);
  color: var(--yellow);
  font-size: 13px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 10px;
}

.tab {
  min-height: 40px;
  color: var(--muted);
}

.tab.active {
  border-color: var(--green);
  color: var(--text);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.panel-title span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.form,
.upload {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
}

select,
input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  min-height: 44px;
  padding: 0 12px;
  font: inherit;
}

button[type="submit"] {
  min-height: 46px;
  background: var(--green);
  border-color: transparent;
  color: #07110b;
}

.list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.badge.green {
  color: var(--green);
}

.badge.red {
  color: var(--red);
}

.badge.yellow {
  color: var(--yellow);
}

.empty {
  color: var(--muted);
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

a {
  color: var(--blue);
  overflow-wrap: anywhere;
  text-decoration: none;
}

@media (max-width: 560px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .item-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
