:root {
  --bg: #0b0f0d;
  --card: #121815;
  --green: #22c55e;
  --green-dim: #16a34a;
  --text: #e8f0ea;
  --muted: #8fa598;
  --border: #1e2a22;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 76px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; position: sticky; top: 0; background: var(--bg); z-index: 10;
  border-bottom: 1px solid var(--border);
}
.logo { font-weight: 800; font-size: 17px; }
.balance-chip {
  background: var(--card); border: 1px solid var(--green-dim);
  padding: 6px 12px; border-radius: 20px; font-weight: 700; color: var(--green);
}
.screen { display: none; padding: 12px 14px; }
.screen.active { display: block; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 10px; font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.streak-card { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.streak-card small { font-weight: 400; }
.claim-box { text-align: center; }
.btn-claim {
  width: 100%; padding: 18px; font-size: 19px; font-weight: 800;
  border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--green), var(--green-dim)); color: #04120a;
}
.btn-claim:disabled { background: #223026; color: var(--muted); cursor: default; }
.cooldown { margin-top: 10px; font-size: 22px; font-weight: 800; color: var(--green); }
.hidden { display: none; }
.daily-progress { margin-top: 12px; }
.progress-bar { background: #1c2620; border-radius: 8px; height: 10px; overflow: hidden; }
#progress-fill { height: 100%; width: 0%; background: var(--green); transition: width .4s; }
.btn-primary {
  width: 100%; padding: 13px; margin-top: 10px; border: none; border-radius: 10px;
  background: var(--green); color: #04120a; font-weight: 700; font-size: 15px; cursor: pointer;
}
.btn-small {
  padding: 9px 14px; border: none; border-radius: 8px;
  background: var(--green); color: #04120a; font-weight: 700; cursor: pointer;
}
input[type="text"], input[type="number"] {
  width: 100%; padding: 11px; margin: 6px 0 10px; border-radius: 10px;
  border: 1px solid var(--border); background: #0e1411; color: var(--text); font-size: 15px;
}
label { font-size: 13px; color: var(--muted); }
.msg { min-height: 18px; font-size: 13px; }
.msg.ok { color: var(--green); } .msg.err { color: #f87171; }
.ref-link-row { display: flex; gap: 8px; }
.ref-link-row input { margin: 0; }
.stats { display: flex; gap: 12px; text-align: center; }
.stats div { flex: 1; }
.stats b { display: block; font-size: 20px; color: var(--green); }
.filter-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.filter-tabs button {
  flex: 1; padding: 8px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); cursor: pointer;
}
.filter-tabs button.active { background: var(--green); color: #04120a; font-weight: 700; border: none; }
.hist-item {
  display: flex; justify-content: space-between; padding: 9px 2px;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.hist-item small { color: var(--muted); display: block; }
.amt-pos { color: var(--green); font-weight: 700; }
.amt-neg { color: #fbbf24; font-weight: 700; }
.status-pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #223026; color: var(--muted); }
.status-pill.sent { background: #123f24; color: var(--green); }
.status-pill.failed, .status-pill.rejected { background: #3f1212; color: #f87171; }
.mission { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.mission .m-head { display: flex; justify-content: space-between; align-items: center; }
.mission small { color: var(--muted); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.switch-row input { width: 22px; height: 22px; accent-color: var(--green); }
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex;
  background: #0e1411; border-top: 1px solid var(--border); padding: 6px 0 10px;
}
.tabbar button {
  flex: 1; background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar button small { font-size: 10px; }
.tabbar button.active { color: var(--green); }
