@font-face {
  font-family: Inter;
  src: url("/static/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #14161c;
  --bg-2: #1a1d24;
  --sidebar: #171a21;
  --card: #22262f;
  --card-2: #2a2f3a;
  --line: rgba(255, 255, 255, 0.06);
  --text: #e8edf4;
  --muted: #8b95a8;
  --green: #3ecf8e;
  --amber: #ffb020;
  --orange: #ff8a3d;
  --red: #ff5d73;
  --blue: #4da3ff;
  --cyan: #5ad0ff;
  --gold: #e7b008;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  --mono: Inter, "Segoe UI", sans-serif;
  --sans: Inter, "Segoe UI", "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -0.01em;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { margin: 0 0 8px; font-weight: 650; letter-spacing: -0.03em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
.lead { margin: 0 0 14px; color: var(--muted); max-width: 70ch; }
.muted { color: var(--muted); }
.mono, code { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 196px;
  flex: none;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 2px 4px 18px;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand img { width: 168px; max-width: 100%; height: auto; display: block; }
.brand span { display: block; color: var(--muted); font-size: 11px; padding-left: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  color: #b7c0d0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav a.is-active {
  background: rgba(77, 163, 255, .12);
  color: var(--blue);
}
.logout { margin-top: auto; }
.logout button, .btn, button.btn {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  padding: 7px 11px;
  cursor: pointer;
}
.btn:hover, .logout button:hover { border-color: rgba(255,255,255,.18); }
.btn-primary { background: #1d5fad; border-color: #4da3ff; color: white; }
.btn-danger { background: #6d2433; border-color: #c44b62; color: white; }
.btn-ghost { background: transparent; }
.workspace { flex: 1; min-width: 0; }
.topbar {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #12141a;
  position: sticky;
  top: 0;
  z-index: 5;
}
.public-link {
  align-self: center;
  color: var(--cyan);
  font-size: 12px;
  font-family: var(--mono);
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.burger { display: none; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; }
.metrics { display: flex; gap: 0; width: 100%; justify-content: flex-end; }
.metric {
  background: transparent;
  border: none;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 16px;
  min-width: 88px;
  text-align: center;
}
.metric span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.metric b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.metric small { color: var(--muted); font-size: 11px; font-weight: 500; }
.metric-main { border-color: var(--line); }
.metric-bad b { color: var(--red); }
.page { padding: 12px 14px 40px; }
.page-split {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 260px;
  gap: 14px;
  align-items: start;
}
.page-split-main { min-width: 0; }
/* Без боковой колонки подсказок — основная часть на всю ширину. */
.page-split > .page-split-main:only-child { grid-column: 1 / -1; }
.page-aside {
  position: sticky;
  top: 64px;
  background: #171b22;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 14px;
  max-height: calc(100vh - 80px);
  overflow: auto;
}
.reconnect-box { margin: 10px 0 0; }
.reconnect-box p { margin: 6px 0; }
.reconnect-cmd {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0b1220;
  border: 1px solid var(--line);
  color: #d7e8ff;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre-wrap;
}
.page-aside h2 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text);
}
.faq-item {
  border-top: 1px solid var(--line);
  padding: 8px 0 2px;
}
.faq-item:first-of-type { border-top: none; padding-top: 0; }
.faq-item summary {
  cursor: pointer;
  color: #c5d0e0;
  font-weight: 650;
  font-size: 13px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "▸";
  display: inline-block;
  width: 1em;
  color: var(--muted);
  transition: transform .15s ease;
}
.faq-item[open] summary::before { transform: rotate(90deg); }
.faq-item p {
  margin: 6px 0 8px 1em;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.faq-item code {
  font-size: 11px;
  color: #9ecbff;
  background: #10151d;
  border-radius: 4px;
  padding: 1px 5px;
}
.banner {
  margin: 10px 14px 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(77, 163, 255, .12);
  border: 1px solid rgba(77, 163, 255, .28);
  font-size: 13px;
}
.banner-warn { background: rgba(255, 176, 32, .12); border-color: rgba(255, 176, 32, .4); }
.banner-bad { background: rgba(255, 93, 115, .12); border-color: rgba(255, 93, 115, .45); }
pre.banner-cmd {
  margin: 8px 14px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0b1220;
  border: 1px solid var(--line);
  color: #d7e8ff;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre-wrap;
}
.hive-shell .banner { margin: 10px 0 0; }
.hive-shell pre.banner-cmd { margin: 8px 0 0; }

.page-head, .toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.page-head { margin-bottom: 4px; }
.toolbar { margin-bottom: 10px; }
.toolbar input, .toolbar select, .stack-form input, .stack-form select, .stack-form textarea, .oc-form input, .inline-form input {
  font: inherit;
  color: var(--text);
  background: #12141a;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
}
.chips, .view-switch { display: flex; gap: 4px; flex-wrap: wrap; }
.chip, .view-switch a {
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 10px;
  background: transparent;
  font-weight: 600;
  font-size: 12px;
}
.chip.is-on, .view-switch a.is-on { color: var(--blue); background: rgba(77, 163, 255, .12); }

.hex-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.hex {
  min-width: 120px;
  height: auto;
  clip-path: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}
.hex b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hex span { color: var(--muted); font-size: 11px; max-width: none; text-transform: uppercase; letter-spacing: .04em; }
.hex-bad { background: rgba(255, 93, 115, .12); border-color: rgba(255, 93, 115, .35); }

.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; margin-bottom: 12px; }
.wallets-page { grid-template-columns: 1fr 1fr; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  box-shadow: none;
}
.card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 10px; }
.hive-term-head {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hive-term-head h2 { margin: 0; flex: none; }
.hive-term-head .hive-term-input {
  flex: 1 1 280px;
  margin: 0;
  min-width: 220px;
}
.empty { color: var(--muted); }

.rig-list { display: flex; flex-direction: column; gap: 6px; }
.rig-card {
  background: #1e222a;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.rig-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green);
}
.rig-card.tone-warn::before { background: var(--amber); }
.rig-card.tone-bad::before { background: var(--red); }
.rig-card.is-offline { opacity: .78; }
.rig-card.is-lost { opacity: 1; }
.rig-card.is-hot { border-color: rgba(255, 138, 61, .35); }
.rig-row {
  display: grid;
  grid-template-columns: 28px 120px 140px 96px minmax(140px, 1fr) minmax(140px, 170px);
  gap: 8px 10px;
  align-items: center;
  padding: 8px 10px 8px 12px;
}
.rig-id, .miner-box, .rig-total, .gpu-row { color: inherit; }
.rig-id { display: flex; gap: 8px; align-items: flex-start; }
.rig-id strong, .miner-box b, .rig-total b { display: block; color: var(--text); }
.rig-id strong { font-size: 14px; font-weight: 700; }
.rig-id small, .miner-box span, .rig-total span { display: block; color: var(--muted); font-size: 11px; }
.rave-on { color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.rave-lost { color: var(--amber); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.rave-off { color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.rave-up { color: var(--cyan); font-size: 11px; font-variant-numeric: tabular-nums; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-top: 5px; flex: none;
  background: var(--muted);
}
.status-dot.is-on { background: var(--green); box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); }
.status-dot.is-lost { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 176, 32, .18); }
.status-dot.is-off { background: var(--red); }
.gpu-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-end;
  overflow: visible;
  padding-bottom: 0;
}
.gpu-cell {
  min-width: 44px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.gpu-top { display: none; }
.hex-idx { display: none; }
.gpu-util {
  font-size: 10px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.2;
}
.gpu-hs {
  font-size: 12px;
  font-weight: 600;
  color: #9ecbff;
  line-height: 1.25;
  font-family: var(--sans);
}
.gpu-temp {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.gpu-sub { display: none; }
.gpu-model {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 10px;
  margin-top: -2px;
}
.t-cool .gpu-temp, .t-cool { color: var(--green); }
.t-ok .gpu-temp, td.t-ok { color: #b6e38a; }
.t-warm .gpu-temp, td.t-warm { color: var(--amber); }
.t-hot .gpu-temp, td.t-hot { color: var(--red); }
.gpu-cell.is-dead .gpu-hs { color: var(--red); }
.rig-total { text-align: left; }
.rig-total b { font-size: 26px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; }
.rig-total small { color: var(--muted); font-size: 11px; font-weight: 600; }
.rig-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.rig-flags { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 12px 8px 14px; }
.flag {
  font-style: normal;
  font-size: 11px;
  border-radius: 4px;
  padding: 1px 6px;
  background: #2c3544;
  color: var(--muted);
}
.flag-hot, .flag-zero { background: rgba(255, 93, 115, .16); color: #ffb3c0; }
.flag-offline, .flag-stale, .flag-reject, .flag-miner, .flag-noflight, .flag-la { background: rgba(255, 193, 77, .14); color: var(--amber); }
.flag-ok { background: rgba(62, 224, 162, .14); color: var(--green); }
.flag-igpu {
  background: rgba(255, 138, 61, .18);
  color: #ff9a4d;
  border: 1px solid rgba(255, 138, 61, .45);
}
.flag-board {
  background: rgba(77, 163, 255, .14);
  color: #8ec5ff;
  border: 1px solid rgba(77, 163, 255, .35);
}
.gpu-idline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}
.gpu-idline .gpu-mem { color: var(--text); font-weight: 650; }
.gpu-idline .gpu-dot {
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  color: var(--text);
  margin: 0 1px;
}
.health-notes ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.health-notes li { margin: 4px 0; }
tr.is-idle td.muted { color: #8b97a8; }
.num.is-fan-zero { color: #ff9a4d; }
tr.is-igpu td:first-child { color: #ff9a4d; }
.gpu-cell.is-igpu { outline: 1px solid rgba(255, 138, 61, .55); }
.hive-gpu-tile.is-igpu .hive-gpu-tile-util { color: #ff9a4d; }
.hive-gpu-tile.is-igpu { outline: 1px solid rgba(255, 138, 61, .55); padding: 2px 4px; }
.bulk-bar {
  position: sticky;
  top: 74px;
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  background: #1a2430;
  border: 1px solid rgba(62, 224, 162, .35);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 10px;
}
.check-inline { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }

.table-scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid th { color: var(--muted); font-size: 12px; font-weight: 600; }
tr.is-offline { opacity: .65; }
tr.is-lost { opacity: 1; }
.telemetry-note { margin: 0 0 8px; font-size: 12px; }
tr.row-dead td:nth-child(9), tr.row-dead { background: rgba(255, 93, 115, .06); }

.worker-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.hero-actions, .row-actions, .inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.hero-nums { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.hero-nums b { font-family: var(--mono); font-size: 28px; display: block; }
.hero-nums span { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.tabs a { color: var(--text); padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.tabs a.is-on { color: var(--green); border-color: var(--green); }
.back { margin-top: 0; }
.log {
  background: #10141b;
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  max-height: 320px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.cmd-list, .journal, .issue-list, .token-list, .flight-apply { list-style: none; padding: 0; margin: 0; }
.cmd-list li, .journal li, .issue-list li, .token-list li, .flight-apply li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.journal { display: flex; flex-direction: column; }
.journal li { display: grid; grid-template-columns: 110px 90px 1fr; gap: 8px; }
.journal time, .journal b { font-size: 13px; }
.lvl-warn span { color: var(--amber); }
.lvl-crit span { color: #ffb3c0; }
.issue-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.kv { display: grid; gap: 10px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.kv-mini { display: grid; gap: 6px; margin: 0 0 10px; }
.kv-mini div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.kv-mini dt { color: var(--muted); }
.kv-mini dd { margin: 0; }
.flight-card details { margin-bottom: 8px; }
.flight-server { margin: 0 0 12px; }
.flight-apply li, .token-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.flight-apply li.is-current { outline: 1px solid rgba(62, 224, 162, .4); border-radius: 10px; padding: 8px; }
.flight-apply span, .token-list code { display: block; color: var(--muted); font-size: 13px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); font-size: 12px; }
.steps { margin: 0 0 14px 18px; color: var(--muted); line-height: 1.45; }
.steps li { margin-bottom: 6px; }
.steps b { color: var(--text); }

/* Карточка воркера ближе к HiveOS */
.hive-shell {
  background: #1a1f28;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.hive-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.hive-top-left, .hive-top-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.hive-top-right { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.hive-miner {
  display: grid;
  grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: #12171f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 88px;
}
.hive-miner-meta { min-width: 0; }
.hive-miner-name {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 6px;
}
.hive-miner-name b { color: #9fd0ff; }
.hive-uptime {
  color: var(--green);
  font-family: var(--mono);
  font-size: 12px;
}
.hive-uptime.is-off { color: var(--red); }
.hive-miner-coin { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.hive-coin, .hive-algo {
  color: #f0d27a;
  font-weight: 650;
  letter-spacing: .04em;
}
.hive-pool { text-transform: lowercase; }
.hive-hash {
  text-align: right;
  padding: 0 4px;
}
.hive-hash b {
  display: block;
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
}
.hive-hash span { color: var(--muted); font-size: 12px; }
.hive-gpu-tiles {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  align-items: stretch;
  overflow-x: auto;
  width: 100%;
  min-height: 72px;
  padding: 2px 4px;
}
.hive-gpu-tile {
  flex: 0 0 auto;
  width: 74px;
  min-height: 72px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  padding: 10px 8px 9px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.hive-gpu-tile-temp {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.2;
}
.hive-gpu-tile-temp.t-ok,
.hive-gpu-tile-temp.t-cool { color: #9fb0c7; }
.hive-gpu-tile-temp.t-warm { color: var(--amber); }
.hive-gpu-tile-temp.t-hot { color: var(--red); }
.hive-gpu-tile-fan {
  display: block;
  margin: 4px auto;
  width: fit-content;
  min-width: 46px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  background: var(--blue);
  color: #0c1420;
}
.hive-gpu-tile-fan.t-ok { background: var(--blue); color: #0c1420; }
.hive-gpu-tile-fan.t-warm { background: var(--amber); color: #1a1204; }
.hive-gpu-tile-fan.t-hot { background: var(--red); color: #fff; }
.hive-gpu-tile-fan.t-na { background: #2a3342; color: var(--muted); }
.hive-gpu-tile-hs {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.2;
}
.hive-gpu-tile.is-dead {
  border-color: rgba(255, 93, 115, .55);
}
.hive-gpu-tile.is-offline .hive-gpu-tile-hs,
.hive-gpu-tile.is-offline .hive-gpu-tile-temp {
  color: var(--muted);
}
.hive-meta-line {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.hive-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 8px;
  position: relative;
  z-index: 3;
}
.chart-wrap {
  max-height: 140px;
  overflow: hidden;
}
.chart-wrap svg {
  max-height: 110px;
}
.hive-actions-main {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.hive-actions form,
.hive-term-actions form {
  margin: 0;
  display: inline-flex;
  align-items: center;
}
.hive-actions .btn,
.hive-term-actions .btn {
  min-height: 36px;
  padding: 8px 14px;
  white-space: nowrap;
}
.power-menus { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.power-drop { position: relative; }
.power-drop > summary {
  list-style: none;
  cursor: pointer;
}
.power-drop > summary::-webkit-details-marker { display: none; }
.power-drop-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8;
  min-width: 240px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #171a21;
  box-shadow: var(--shadow);
}
.power-drop-list form { display: block; width: 100%; }
.power-drop-item {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.power-drop-item:hover { background: rgba(255,255,255,.06); }
.power-drop-item.is-danger { color: #ff8a9a; }
.reboot-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  margin: 0;
  padding: 4px 8px 4px 10px;
  border: 1px dashed rgba(255, 93, 115, .45);
  border-radius: 12px;
  background: rgba(109, 36, 51, .18);
}
.reboot-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  margin: 0;
  cursor: pointer;
}
.reboot-check input { margin: 0; }
.hive-term { background: #0d1117; border-color: #243041; }
.hive-term .card-head h2 { font-family: var(--mono); letter-spacing: .02em; }
.hive-term-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.hive-term-body {
  border: 1px solid #243041;
  border-radius: 10px;
  background: #080b10;
  padding: 10px;
  min-height: 280px;
  max-height: min(62vh, 640px);
  overflow-x: hidden;
  overflow-y: auto;
}
.hive-term-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.hive-term-meta .ok { color: var(--green); }
.hive-term-meta .lost { color: var(--amber); }
.hive-term-meta .bad { color: #ff8fa3; }
.hive-term-actions .check-inline {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.hive-term-log {
  margin: 0;
  max-height: min(56vh, 520px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: #d7e8ff;
  scroll-behavior: auto;
}
.reconnect-steps {
  margin: 8px 0 12px 1.2em;
  padding: 0;
  color: var(--text);
  line-height: 1.45;
}
.reconnect-steps li { margin: 4px 0; }
.hive-term-history { margin-top: 12px; display: grid; gap: 8px; }
.hive-term-cmd {
  border-top: 1px solid #243041;
  padding-top: 8px;
}
.hive-term-cmd-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 4px;
}
.hive-term-mark {
  flex: none;
  width: 1.1em;
  font-weight: 700;
  line-height: 1;
}
.hive-term-mark.ok { color: var(--green); }
.hive-term-mark.bad { color: var(--red); }
.hive-term-mark.wait { color: var(--amber); }
.hive-term-cmd pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 12px;
  color: #b7c7da;
  overflow: visible;
}
.hive-term-cmd.is-bad pre { color: #ffb3c0; }
.hive-term-cmd.is-wait pre { color: #c9b38a; }
.hive-term-input {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.hive-term-input .prompt {
  font-family: var(--mono);
  color: var(--green);
  font-weight: 700;
}
.hive-term-input input[type="text"] {
  width: 100%;
  font: inherit;
  font-family: var(--mono);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #243041;
  background: #080b10;
  color: var(--text);
}
@media (max-width: 700px) {
  .hive-term-input { grid-template-columns: auto 1fr; }
  .hive-term-input button { grid-column: 1 / -1; }
}
.hive-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hive-tabs-links { display: flex; flex-wrap: wrap; align-items: center; }
.hive-tabs a { border-radius: 0; background: transparent; border: none; border-bottom: 2px solid transparent; }
.hive-tabs a.is-on { border-radius: 0; background: transparent; border-bottom-color: var(--blue); color: var(--blue); }
.gpu-view-switch { display: flex; gap: 4px; margin-left: auto; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.icon-btn.is-on { color: var(--blue); border-color: rgba(77, 163, 255, .35); background: rgba(77, 163, 255, .12); }
.gpu-view-cards { display: none; }
body.gpu-view-cards .gpu-view-cards { display: grid; }
body.gpu-view-cards .gpu-view-rows { display: none; }
.gpu-edit { width: 36px; text-align: right; }
.gpu-edit-cell {
  white-space: nowrap;
}
.gpu-edit-cell .icon-btn {
  margin-left: 6px;
  vertical-align: middle;
}
.hive-gpu-card header .icon-btn { margin-left: auto; }
.gpu-oc-dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  padding: 16px 18px;
  width: min(560px, 96vw);
  max-height: 92vh;
  overflow: auto;
}
.gpu-oc-dialog::backdrop { background: rgba(0,0,0,.55); }
.gpu-oc-dialog form { display: grid; gap: 10px; }
.gpu-oc-hint { margin: 0; font-size: 12px; }
.gpu-oc-dialog label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.gpu-oc-dialog input[type="number"],
.gpu-oc-dialog input[type="text"] { padding: 8px 10px; border-radius: 8px; border: 1px solid #243041; background: #121821; color: var(--text); }
.gpu-oc-fan {
  border: 1px solid #243041;
  border-radius: 8px;
  padding: 10px;
}
.gpu-oc-fan legend { color: var(--text); font-size: 13px; padding: 0 6px; }
.gpu-oc-flags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.gpu-oc-flags label {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-template-columns: none;
}
.gpu-oc-actions { display: flex; gap: 8px; justify-content: flex-end; }
.hive-panel { margin-bottom: 12px; }
.hive-gpu-table .hash-cell { color: #d7e8ff; font-weight: 650; }
.hive-gpu-table .gpu-status-col {
  width: 52px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  text-transform: lowercase;
}
.gpu-status-cell {
  text-align: center;
  vertical-align: middle;
  width: 52px;
}
.link-lost-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  line-height: 0;
}
.link-lost-icon .link-lost-wave { color: var(--amber); }
.link-lost-icon .link-lost-x { color: var(--text); }
.link-lost-icon:hover { color: #ffc14d; }
.link-dead-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 93, 115, .16);
  color: var(--red);
  font-weight: 800;
  font-size: 12px;
}
.hive-gpu-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.hive-gpu-card {
  background: #121821;
  border: 1px solid #243041;
  border-left-width: 4px;
  border-radius: 10px;
  padding: 10px 12px 8px;
}
.hive-gpu-card.t-cool, .hive-gpu-card.t-ok { border-left-color: #3ee0a2; }
.hive-gpu-card.t-warm { border-left-color: #ffc14d; }
.hive-gpu-card.t-hot, .hive-gpu-card.is-dead { border-left-color: #ff5d73; }
.hive-gpu-card.is-igpu { border-left-color: #ff9a4d; }
.hive-gpu-card header {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.hive-gpu-card-hash {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 8px 0 6px;
}
.hive-gpu-card-hash small {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.hive-gpu-card dl {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 0 0 6px;
}
.hive-gpu-card dt {
  font-size: 10px;
  color: var(--muted);
}
.hive-gpu-card dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13px;
}
.hive-gpu-card.is-igpu dd, .hive-gpu-card.is-igpu .hive-gpu-card-hash { color: #8b97a8; }
@media (max-width: 700px) {
  .hive-gpu-card dl { grid-template-columns: repeat(3, 1fr); }
}
.hive-footer {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 4px 0;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
@media (max-width: 1100px) {
  .hive-miner { grid-template-columns: 1fr; min-height: 0; }
  .hive-gpu-tiles { justify-content: flex-start; width: 100%; }
  .hive-hash { border: none; text-align: left; padding: 0; }
}
.stack-form, .oc-form { display: flex; flex-direction: column; gap: 10px; }
.stack-form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.wallet-form input, .wallet-form select { width: 100%; }
.wallet-form > .btn {
  align-self: flex-start;
  width: auto;
  margin-top: 2px;
}
.wallet-del { margin-top: 8px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-area { fill: rgba(77, 163, 255, .16); }
.chart-line { fill: none; stroke: var(--blue); stroke-width: 2.5; }
.chart-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-family: var(--mono); }
.modal {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  padding: 16px;
  width: min(420px, calc(100% - 24px));
}
.modal::backdrop { background: rgba(0,0,0,.55); }
.modal select { width: 100%; margin: 8px 0 12px; }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #12141a;
  font-family: var(--sans);
}
.login-card {
  position: relative;
  width: min(420px, calc(100% - 28px));
  background: rgba(22, 28, 36, .94);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}
.login-card img { width: min(240px, 100%); height: auto; display: block; margin: 0 auto 2px; }
.login-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.login-card label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.login-card input { font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: #10141b; color: var(--text); }

@media (max-width: 1280px) {
  .page-split { grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; }
}
@media (max-width: 1100px) {
  .page-split { grid-template-columns: 1fr; }
  .page-aside { position: static; }
  .rig-row { grid-template-columns: 28px 1fr; }
  .miner-box, .gpu-row, .rig-total, .rig-meta { grid-column: 2; }
  .rig-total, .rig-meta { text-align: left; align-items: flex-start; }
  .split, .stat-grid, .journal li { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .burger { display: inline-flex; }
  .sidebar {
    position: fixed;
    z-index: 20;
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .nav-toggle:checked ~ .shell .sidebar { transform: none; }
  .metric b, .hero-nums b, .rig-total b { font-size: 20px; }
  .page { padding: 14px 12px 36px; }
}
