:root {
  color-scheme: dark;
  --bg: #111614;
  --panel: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f4f7f5;
  --muted: #aab7b0;
  --accent: #18c37e;
  --gold: #f0b64a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background:
    linear-gradient(135deg, rgba(24, 195, 126, 0.2), transparent 34%),
    linear-gradient(315deg, rgba(240, 182, 74, 0.16), transparent 38%),
    var(--bg);
  color: var(--text);
}

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

.narrow {
  width: min(760px, calc(100% - 32px));
}

.topbar,
.stats,
.toolbar,
.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 36px;
  line-height: 1.1;
}

p,
.card span {
  color: var(--muted);
}

.button,
button,
.card a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #06120d;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
  overflow: hidden;
}

.stats div {
  padding: 18px;
}

.stats strong {
  display: block;
  font-size: 28px;
}

.toolbar {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-bottom: 18px;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.card {
  min-height: 185px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.075);
}

.card h2 {
  font-size: 20px;
}

.card span {
  margin-top: auto;
}

.code {
  color: var(--gold);
  font-weight: 700;
}

.empty {
  padding: 20px;
}

@media (max-width: 640px) {
  .topbar,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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