:root {
  color-scheme: dark;
  --bg: #08090d;
  --panel: #151820;
  --panel-2: #202735;
  --text: #f5f7fb;
  --muted: #8d94a3;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #b7f13d;
  --accent-2: #2f8cff;
  --danger: #ef4444;
  --warning: #f7c948;
  --good: #21c987;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom));
  max-width: 620px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  font-size: 24px;
  margin: 24px 0 12px;
}

h3 {
  font-size: 17px;
}

.view {
  display: grid;
  gap: 14px;
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.hero {
  background:
    radial-gradient(circle at 20% 0%, rgba(183, 241, 61, 0.18), transparent 38%),
    linear-gradient(135deg, #152312, #0d321d 52%, #102918);
  border-color: rgba(183, 241, 61, 0.25);
}

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

.value {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
}

.small-value {
  font-size: 20px;
  font-weight: 750;
}

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

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

.stack {
  display: grid;
  gap: 10px;
}

.pill,
.primary,
.ghost,
.danger {
  border: 0;
  border-radius: 12px;
  color: var(--text);
  padding: 11px 14px;
  cursor: pointer;
}

.pill,
.ghost {
  background: var(--panel-2);
}

.primary {
  background: var(--accent-2);
  font-weight: 700;
}

.danger {
  background: var(--danger);
  font-weight: 700;
}

.accent {
  color: var(--accent);
}

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

.form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.form input,
.form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f1218;
  color: var(--text);
  padding: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 10px;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tabs button {
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  width: min(590px, calc(100% - 24px));
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(16, 20, 29, 0.94);
  padding: 8px;
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 54px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 23px;
}

.bottom-nav button span {
  font-size: 11px;
}

.bottom-nav button.active {
  background: #253144;
  color: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 20;
  max-width: min(520px, calc(100% - 32px));
  transform: translateX(-50%) translateY(20px);
  border-radius: 14px;
  background: #222a38;
  color: var(--text);
  padding: 12px 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.loader {
  color: var(--muted);
  padding: 32px 0;
  text-align: center;
}

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

  h1 {
    font-size: 30px;
  }
}
