:root {
  --bg: #0b0d10;
  --panel: #151a1f;
  --panel-2: #1b2128;
  --line: #2a323b;
  --text: #e8eee9;
  --muted: #9aa59e;
  --faint: #667068;
  --lime: #d6ff4a;
  --mint: #5ee0b5;
  --amber: #f0b45a;
  --red: #ff6b5a;
  --sans: "Manrope", "Liberation Sans", "Nimbus Sans", sans-serif;
  --mono: "IBM Plex Mono", "Liberation Mono", "DejaVu Sans Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(214, 255, 74, 0.08), transparent 55%),
    var(--bg);
  overflow: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, p { margin: 0; }

.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100vh;
}
.gate[hidden],
.app[hidden] { display: none; }

.gate {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(340px, 1.14fr);
  min-height: 100vh;
}
.gate-brand {
  display: flex;
  flex-direction: column;
  padding: 32px 40px 28px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(214, 255, 74, 0.09), transparent 62%),
    rgba(8, 10, 12, 0.92);
}
.gate-copy { margin-top: auto; margin-bottom: auto; max-width: 420px; }
.gate-copy h1 {
  margin: 8px 0 12px;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.045em;
}
.gate-copy p:last-child { max-width: 360px; color: var(--muted); line-height: 1.55; }
.gate-brand .side-foot { margin-top: 0; padding: 0; }
.gate-panel {
  display: grid;
  place-items: center;
  padding: 32px 28px;
}
.login { width: min(420px, 100%); }
.login h1 {
  margin: 6px 0 22px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.login label {
  display: block;
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.login input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0e1210;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
}
.login input::placeholder { color: var(--faint); letter-spacing: 0; }
.login input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(214, 255, 74, 0.14);
}
.login label.is-bad input { border-color: var(--red); }
.login label.is-bad input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 107, 90, 0.16);
}
.login button[type="submit"] {
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--lime);
  color: #142000;
  font-weight: 700;
}
.login button[type="submit"]:hover { filter: brightness(1.06); }
.login button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; filter: none; }
.status-message {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}
.status-message.visible { display: block; }
.status-message.error {
  background: rgba(255, 107, 90, 0.1);
  border: 1px solid rgba(255, 107, 90, 0.35);
  color: #ffb0a6;
}
.status-message.success {
  background: rgba(94, 224, 181, 0.1);
  border: 1px solid rgba(94, 224, 181, 0.35);
  color: var(--mint);
}
.status-message.processing {
  background: rgba(214, 255, 74, 0.08);
  border: 1px solid rgba(214, 255, 74, 0.28);
  color: var(--lime);
}
.license-link {
  display: block;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.license-link:hover { background: #1a2210; }
.license-expiry {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}
.operator {
  max-width: 180px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.signout {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 12px;
}
.signout:hover { color: var(--text); background: #171c16; }

.session-panel { display: none; }

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: rgba(8, 10, 12, 0.72);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
  padding: 0 6px;
}

.brand strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.brand span { display: block; margin-top: 2px; color: var(--faint); font-size: 12px; }

.nav { display: flex; flex-direction: column; gap: 4px; }

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-align: left;
}

.nav button:hover { background: #171c16; color: var(--text); }
.nav button.is-active { background: #1a2210; color: var(--lime); }

.side-foot {
  margin-top: auto;
  padding: 0 8px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
}

.side-uptime {
  margin-top: auto;
  padding: 0 8px 14px;
}
.side-uptime span {
  display: block;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.side-uptime time {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.side-uptime.is-on time { color: var(--lime); }
.side-brand {
  margin-top: 0;
  padding: 14px 8px 0;
  border-top: 1px solid var(--line);
}

.side-brand p {
  margin-bottom: 6px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-brand a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text);
  text-decoration: none;
}

.side-brand a:hover strong { color: var(--lime); }

.side-brand strong {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.side-brand span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.side-brand a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
  border-radius: 4px;
}

.shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 20px 28px 6px;
}

.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }

.nav-toggle,
.nav-shade,
.nav-close { display: none; }

.nav-toggle .icon-close { display: none; }

.eyebrow {
  margin-bottom: 4px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 4px;
}

.clock {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 13px;
}

.content {
  flex: 1;
  overflow: auto;
  padding: 14px 28px 36px;
}

.content::-webkit-scrollbar { width: 10px; }
.content::-webkit-scrollbar-thumb { background: #2c3430; border-radius: 99px; }

.fleet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.fleet-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.fleet-actions { display: flex; gap: 8px; }
.fleet-actions button {
  min-width: 88px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
}
.fleet-actions button[data-fleet="running"]:not(:disabled) { background: var(--lime); color: #142000; }
.fleet-actions button[data-fleet="stopped"]:not(:disabled) {
  background: #ff6b5a;
  color: #2a0906;
}
.fleet-actions button:disabled {
  background: #2a323b;
  color: #8b968f;
  cursor: not-allowed;
}
.sheet-actions .danger {
  background: #ff6b5a;
  color: #2a0906;
}
.sheet-actions .danger:hover { filter: brightness(1.06); }
.boot-shade {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(11, 13, 16, 0.45);
  color: #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.boot-label {
  display: flex;
  align-items: baseline;
  margin: 0;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.boot-dots {
  display: inline-block;
  width: 1.15em;
  text-align: left;
}
.boot-dots::after {
  content: "";
  animation: boot-dots 1.2s steps(1, end) infinite;
}
@keyframes boot-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}
body.boot-lock { overflow: hidden; }
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.wallet-kpis { grid-template-columns: 1fr 1fr; }

.kpi, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.kpi { padding: 14px 16px 15px; }
.kpi span, .panel-head span, .facts dt, .chart-scale, .muted {
  color: var(--faint);
}
.kpi span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.kpi strong {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.kpi em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.section-label {
  margin: 20px 0 10px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chains {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.chain {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 68px;
  padding: 8px 4px 7px;
  border-radius: 12px;
  color: var(--muted);
}

.coin-mark {
  position: relative;
  width: 40px;
  height: 40px;
}
.chain img {
  width: 40px;
  height: 40px;
  display: block;
}
.chain .lock {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  padding: 2px;
  border-radius: 50%;
  color: var(--red);
  background: var(--bg);
  box-shadow: 0 0 0 2px var(--bg);
}

.chain span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.chain.is-off img,
.filters button.is-off img {
  filter: grayscale(1);
  opacity: 0.38;
}
.chain.is-off span { color: var(--faint); }

.cli {
  margin-top: 22px;
  background: #070908;
  border: 1px solid #243028;
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--mono);
}
.cli-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #101410;
  border-bottom: 1px solid #243028;
  color: var(--faint);
  font-size: 12px;
}
.cli-dots { display: flex; gap: 6px; }
.cli-dots i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #2c3830;
}
.cli-dots i:first-child { background: #ff6b5a; }
.cli-dots i:nth-child(2) { background: #f0b45a; }
.cli-dots i:nth-child(3) { background: #5ee0b5; }
.cli-screen {
  padding: 14px 16px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
}
.cli-cmd, .cli-note { margin: 0; }
.cli-cmd { color: var(--text); }
.cli-note { margin: 2px 0 12px; color: #5d675f; }
.prompt { color: var(--lime); margin-right: 8px; }
.cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 6px;
  background: var(--lime);
  vertical-align: -2px;
  animation: cli-blink 1.1s steps(1) infinite;
}
@keyframes cli-blink { 50% { opacity: 0; } }
.cli-table {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  justify-content: space-between;
  column-gap: 3ch;
  align-items: baseline;
}
.cli-row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: baseline;
}
.cli-row.head {
  margin-bottom: 4px;
  color: #667068;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.cli-row .sym { color: var(--text); }
.cli-row .algo { color: var(--muted); }
.cli-row .val { color: var(--lime); }
.st.online, .st.running { color: var(--mint); }
.st.offline { color: var(--red); }

.id-line, .panel-head, .pay, .wallet-focus {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.state i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
}
.state.online { color: var(--mint); }
.state.hot, .state.paused { color: var(--amber); }
.state.offline { color: var(--red); }

.detail {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) 1.3fr;
  gap: 12px;
}

.panel { padding: 16px 18px 18px; }
.panel-head { align-items: baseline; margin-bottom: 12px; }
.panel-head h2, .id-copy h2 { font-size: 18px; font-weight: 600; }
.panel-head span, .note { color: var(--faint); font-size: 12px; }

.id-line { justify-content: flex-start; margin-bottom: 12px; }
.badge {
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.rate {
  margin: 4px 0 16px;
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin: 0;
}
.facts .wide { grid-column: 1 / -1; }
.facts dt {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.facts dd { margin: 4px 0 0; font-family: var(--mono); font-size: 13px; }
.pool-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.facts .wide dd { word-break: break-all; }

.copy {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11px;
}
.copy:hover { background: #1a2210; }

.chart {
  display: block;
  width: 100%;
  height: 168px;
}
.chart-scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}
.chart-scale b {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 500;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.filters button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
}
.filters img { width: 16px; height: 16px; display: block; }
.filters button.is-on { background: var(--lime); border-color: var(--lime); color: #142000; }
.filters button:disabled {
  color: var(--faint);
  cursor: not-allowed;
}
.filters button:disabled img {
  filter: grayscale(1);
  opacity: 0.38;
}

.rigs { padding-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 0 12px 10px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}
td {
  padding: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  white-space: nowrap;
}
th.num, td.num { text-align: right; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
tr.is-idle .rig-cell b,
tr.is-idle .chain-cell { color: var(--muted); }
tr.is-locked,
tr.is-locked .rig-cell b,
tr.is-locked .chain-cell,
tr.is-locked .temp,
tr.is-locked .num { color: var(--faint); }
tr.is-locked img,
.bal-card.is-locked img,
.wallet-field.is-locked img {
  filter: grayscale(1);
  opacity: 0.4;
}
tr.is-locked:hover { background: transparent; }
tr.is-locked .pill,
.bal-card.is-locked .pill,
.wallet-field.is-locked .pill,
.pill.locked {
  color: var(--faint);
  background: transparent;
  border-color: var(--line);
}
tr.is-locked .bar b,
.bal-card.is-locked .bar b { background: var(--faint); }
.bal-card.is-locked,
.bal-card.is-locked .mono,
.wallet-field.is-locked { color: var(--faint); }
.wallet-field.is-locked input:disabled {
  color: var(--faint);
  background: #101418;
  cursor: not-allowed;
}
.num, .mono { font-family: var(--mono); }
.rig-cell, .chain-cell, .temp-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chain-cell img { width: 18px; height: 18px; }
.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--mint);
}
.state-dot.hot { background: var(--amber); }
.state-dot.paused { background: var(--amber); }
.state-dot.offline { background: var(--red); }
.state-dot.locked { background: var(--faint); }
.temp.hot { color: var(--amber); }
.meter {
  width: 46px;
  height: 4px;
  border-radius: 99px;
  background: #2a3138;
  overflow: hidden;
}
.meter b { display: block; height: 100%; background: var(--mint); }
.meter.hot b { background: var(--amber); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill.online, .pill.running, .pill.completed, .pill.sent { color: var(--mint); }
.pill.hot, .pill.paused, .pill.processing, .pill.unfinished, .pill.queued { color: var(--amber); }
.pill.offline, .pill.failed { color: var(--red); }
.pill.sim { color: var(--lime); background: #161d0e; border-color: #314014; }
.pill.ready { color: #142000; background: var(--lime); border-color: var(--lime); }
.pill.filling { color: var(--muted); }

.wallet-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  min-width: 0;
}
.wallet-panels .panel { min-width: 0; max-width: 100%; }
.wallet-panels .table-wrap { overflow: hidden; }
.wallet-panels .fit-table { table-layout: fixed; width: 100%; }
.wallet-panels th,
.wallet-panels td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.wallet-panels .c-chain { width: 14%; }
.wallet-panels .c-wallet { width: 18%; }
.wallet-panels .c-min { width: 16%; }
.wallet-panels .c-amt { width: 10%; }
.wallet-panels .c-state { width: 12%; }
.wallet-panels .c-act { width: 20%; }
.wallet-panels td:last-child { padding-left: 6px; padding-right: 6px; }
.wallet-panels .withdraw-btn { width: 100%; padding: 6px 0; text-align: center; }
.wallet-panels .c-when { width: 30%; }
.wallet-panels .progress-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.wallet-panels .addr { max-width: none; }
.wallet-panels .addr-full { display: block; max-width: 100%; }
.wallet-cards { display: none; }
.wallet-form { margin: 0; }
.wallet-field {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 78px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.wallet-field:first-child { border-top: 0; padding-top: 0; }
.wallet-input { min-width: 0; }
.wallet-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1210;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
}
.wallet-field input::placeholder { color: var(--faint); }
.wallet-field input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(214, 255, 74, 0.14);
}
.wallet-field.is-bad input { border-color: var(--red); }
.wallet-field.is-bad input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 107, 90, 0.16);
}
.field-error {
  display: block;
  margin-top: 6px;
  color: var(--red);
  font-size: 12px;
}
.save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.save-bar { flex: 0 0 auto; }
.save-row button {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--lime);
  color: #142000;
  font-weight: 700;
}
.save-row button:hover:not(:disabled) { filter: brightness(1.06); }
.save-row button:disabled {
  background: #2a323b;
  color: #8b968f;
  cursor: not-allowed;
}
.addr-full {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.unset { color: var(--faint); }
.withdraw-btn {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
}
.withdraw-btn:hover:not(:disabled) { background: #1a2210; }
.withdraw-btn:disabled { color: var(--faint); cursor: not-allowed; }
tr.pay-line,
tr.bal-line,
.bal-card[data-balance] { cursor: pointer; }
tr.bal-line:hover,
.bal-card[data-balance]:hover { background: rgba(255, 255, 255, 0.03); }
tr.bal-line:focus-visible,
.bal-card[data-balance]:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sheet-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.balance-sheet { width: min(440px, 100%); padding: 22px; }
.balance-sheet.is-locked .sheet-coin img {
  filter: grayscale(1);
  opacity: 0.72;
}
.balance-sheet.is-locked .bar b { background: var(--faint); }
.balance-callout {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #3d3422;
  border-radius: 12px;
  background: #1c1810;
  color: var(--amber);
  font-size: 13px;
  line-height: 1.55;
}
.balance-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.balance-progress .bar { flex: 1; }
.balance-progress span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
.sheet-coin {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sheet-coin img { width: 28px; height: 28px; }
.shade {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
}
.sheet {
  width: min(420px, 100%);
  padding: 18px;
  background: #151a1f;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.sheet h2 { font-size: 18px; font-weight: 600; }
.sheet .note { margin-top: 6px; }
.sheet dl { display: grid; gap: 12px; margin: 16px 0 0; }
.sheet dt {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sheet dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
}
.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.sheet-actions button {
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
}
.sheet-actions .primary { background: var(--lime); color: #142000; }
.sheet-actions .primary:hover { filter: brightness(1.06); }
.chain-cell small {
  display: block;
  color: var(--faint);
  font-size: 11px;
  font-weight: 500;
}
.addr { color: var(--muted); font-size: 12px; }
.progress-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}
.progress-cell small { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.bar {
  flex: 1;
  height: 4px;
  background: #2a3138;
  border-radius: 99px;
  overflow: hidden;
}
.bar b { display: block; height: 100%; background: var(--lime); }

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

.noscript { padding: 24px; }

button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

::selection { background: var(--lime); color: #142000; }

@media (max-width: 1100px) {
  .kpis, .detail, .wallet-grid { grid-template-columns: 1fr 1fr; }
  .wallet-grid, .wallet-panels { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { overflow: auto; }
  .gate { grid-template-columns: 1fr; }
  .gate-brand { display: none; }
  .gate-panel { padding: 28px 16px 40px; }
  .app { grid-template-columns: 1fr; height: auto; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: transparent;
    flex: none;
  }
  .app.is-nav-open .nav-toggle .icon-open { display: none; }
  .app.is-nav-open .nav-toggle .icon-close { display: block; }
  .nav-shade {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    pointer-events: none;
  }
  .app.is-nav-open .nav-shade { opacity: 1; pointer-events: auto; }
  .sidebar {
    position: fixed;
    z-index: 30;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, 86vw);
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: #0e1216;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .app.is-nav-open .sidebar { transform: translateX(0); }
  .app.is-nav-open .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
  }
  body.nav-lock { overflow: hidden; }
  .shell { height: auto; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 14px;
    background: rgba(11, 13, 16, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  .topbar-title { flex: 1; gap: 10px; }
  .topbar .eyebrow { display: none; }
  .topbar h1 {
    overflow: hidden;
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-meta {
    flex: none;
    margin-left: 0;
    padding-bottom: 0;
    gap: 8px;
  }
  .topbar .operator,
  .topbar .license-expiry,
  .topbar .signout,
  .topbar .topbar-clock { display: none; }
  .topbar-meta { gap: 0; }
  .session-panel {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .session-site {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .session-site .eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .session-site .clock {
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
  }
  .session-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .session-meta .operator {
    max-width: 100%;
    flex: 1 1 140px;
    color: var(--text);
    font-size: 13px;
  }
  .session-meta .license-expiry {
    color: var(--muted);
    font-size: 12px;
  }
  .dashboard { display: flex; flex-direction: column; }
  .dashboard > * { order: 3; }
  .dashboard > .kpis { order: 1; }
  .dashboard > .fleet-bar { order: 2; margin-top: 14px; }
  .dashboard > .session-panel { order: 4; }
  .fleet-actions { flex: 1; justify-content: flex-end; }
  .fleet-actions button { min-width: 76px; padding: 10px 14px; }
  .content { overflow-x: hidden; }
  .wallet-panels, .panel, .kpi { min-width: 0; max-width: 100%; }
  .wallet-panels .table-wrap { display: none; }
  .wallet-cards { display: grid; }
  .bal-card {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
  }
  .bal-card:first-child { border-top: 0; padding-top: 0; }
  .bal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .bal-card .chain-cell img { width: 28px; height: 28px; }
  .bal-act {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
  }
  .bal-card .progress-cell { min-width: 0; width: 100%; }
  .bal-usd { color: var(--muted); font-size: 12px; }
  .bal-card .withdraw-btn { width: auto; padding: 7px 12px; }
  .bal-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin: 0;
  }
  .bal-facts div { min-width: 0; }
  .bal-facts .wide { grid-column: 1 / -1; }
  .bal-facts dt {
    color: var(--faint);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .bal-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; }
  .bal-card .addr-full { max-width: 100%; white-space: normal; }
  .pay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    font-size: 13px;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
  }
  .pay-row:hover { background: rgba(255, 255, 255, 0.03); }
  .pay-row:first-child { border-top: 0; padding-top: 0; }
  .pay-row img { width: 18px; height: 18px; }
  .pay-row .mono { font-size: 13px; }
  .kpis, .detail, .wallet-focus, .bal-head, .bal { grid-template-columns: 1fr 1fr; }
  .dashboard .kpi { padding: 10px 12px 10px; }
  .dashboard .kpi strong { margin-top: 4px; font-size: 22px; }
  .dashboard .kpi em { margin-top: 3px; }
  .panel { padding: 14px; }
  .panel-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .wallet-field {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "coin status" "input input";
    gap: 8px 10px;
    align-items: center;
    padding: 14px 0;
  }
  .wallet-field .chain-cell { grid-area: coin; }
  .wallet-field .chain-cell img { width: 28px; height: 28px; }
  .wallet-field .wallet-input { grid-area: input; }
  .wallet-field > .pill { grid-area: status; justify-self: end; width: auto; }
  .wallet-field input { padding: 12px; font-size: 16px; }
  .save-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .wallet-form { padding-bottom: 84px; }
  .save-bar {
    position: fixed;
    z-index: 15;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(11, 13, 16, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  .save-bar button { width: 100%; padding: 12px 16px; }
  .bal-head { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .rate, .hero strong { font-size: 32px; }
}
