:root {
  color-scheme: dark;
  --bg: #10140f;
  --panel: #181e16;
  --line: #2c3828;
  --text: #e7efe2;
  --muted: #8b9a86;
  --accent: #d7ff4a;
  --accent-ink: #172000;
  --danger: #ff6b5a;
  --ok: #9be7a4;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
button, input { font: inherit; color: inherit; }
a { color: inherit; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px;
}
.mark { font-weight: 700; letter-spacing: 0.14em; font-size: 13px; color: var(--accent); }
h1 { font-size: 28px; line-height: 1.2; margin: 10px 0 8px; }
.sub { color: var(--muted); margin: 0 0 22px; line-height: 1.5; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input {
  width: 100%;
  background: #0d110c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px;
  outline: none;
}
input:focus { border-color: var(--accent); }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
button {
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  cursor: pointer;
}
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: 0.55; cursor: default; }
.msg { min-height: 22px; margin-top: 12px; color: var(--ok); font-size: 14px; }
.msg.bad { color: var(--danger); }
.fine { color: var(--muted); font-size: 12px; line-height: 1.5; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
.side {
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side button, .tab {
  text-align: left;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
}
.side button.on, .tab.on { background: #242c20; color: var(--text); }
.main { padding: 22px 22px 96px; max-width: 980px; }
.top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
}
.pill.on { color: var(--ok); border-color: #2f5a36; }
.panel { display: none; }
.panel.on { display: block; }
.grid { display: grid; gap: 12px; }
.box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.addr {
  word-break: break-all;
  font-family: Consolas, monospace;
  background: #0d110c;
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
}
.bottom {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(16, 20, 15, 0.96);
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.bottom button { padding: 10px 4px; font-size: 13px; }

@media (max-width: 1023px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .bottom { display: grid; }
  .main { padding: 16px 14px 108px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .grid.two { grid-template-columns: 1.2fr 0.8fr; }
}
