:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #10151d;
  --panel-strong: #151d28;
  --text: #f7fbff;
  --muted: #9caaba;
  --line: #243142;
  --accent: #1687ff;
  --accent-soft: #62d4ff;
  --accent-deep: #0a54c2;
  --accent-violet: #3d2d72;
  --good: #62d4ff;
  --warn: #ffd166;
  --danger: #ff5f7a;
  --shadow: rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #07090d 0%, #0b1017 48%, #07090d 100%);
  color: var(--text);
  font-family: "Segoe UI Variable", "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.brand-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #090d13;
}

.brand-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  opacity: 0.5;
}

.brand-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.9), rgba(10, 16, 30, 0.54), rgba(7, 9, 13, 0.58)),
    linear-gradient(180deg, rgba(7, 9, 13, 0.08), rgba(7, 9, 13, 0.92));
}

.brand-hero::before {
  content: "";
  position: absolute;
  right: 11%;
  top: 49%;
  z-index: 1;
  width: 120px;
  height: 58px;
  border-radius: 50%;
  background: rgba(9, 13, 19, 0.24);
  backdrop-filter: blur(3px);
}

.topbar,
.hero-copy,
main,
footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar,
.hero-copy {
  position: relative;
  z-index: 2;
}

.topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.top-actions {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.back-button {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 5;
  min-height: 32px;
  padding: 6px 10px;
  border-color: rgba(118, 228, 255, 0.28);
  background: rgba(16, 21, 29, 0.72);
  color: var(--accent-soft);
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.inline-back-button {
  min-height: 32px;
  padding: 6px 10px;
  border-color: rgba(118, 228, 255, 0.28);
  background: rgba(16, 21, 29, 0.72);
  color: var(--accent-soft);
  font-size: 13px;
}

.page-action-row {
  margin-bottom: 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.status {
  min-width: auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(118, 228, 255, 0.38);
  border-radius: 8px;
  background: rgba(16, 21, 29, 0.84);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.status i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.65);
}

.social-link,
.footer-link {
  border-color: rgba(118, 228, 255, 0.28);
  background: rgba(16, 21, 29, 0.72);
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.status.ok {
  color: var(--accent-soft);
}

.status.ok i {
  background: #47e38f;
  box-shadow: 0 0 12px rgba(71, 227, 143, 0.85);
}

.status.bad {
  color: var(--accent-soft);
}

.status.bad i {
  background: #ff4d6d;
  box-shadow: 0 0 12px rgba(255, 77, 109, 0.85);
}

.hero-copy {
  padding: 42px 0 34px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 12px;
  font-size: 42px;
  line-height: 1.08;
  font-family: "Segoe UI Variable Display", "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 780;
  letter-spacing: 0.01em;
  text-transform: none;
  color: transparent;
  background: linear-gradient(135deg, #f7fbff 0%, var(--accent-soft) 42%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 14px 34px rgba(22, 135, 255, 0.18);
}

h2 {
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 16px;
}

.endpoint {
  width: min(500px, 100%);
  padding: 11px 12px;
  border: 1px solid rgba(118, 228, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.22);
  background: rgba(16, 21, 29, 0.78);
}

.endpoint-copy {
  min-height: auto;
  display: block;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-weight: 400;
}

.endpoint-copy:hover {
  border-color: rgba(72, 199, 255, 0.82);
  box-shadow: 0 0 44px rgba(22, 135, 255, 0.22);
}

.endpoint span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.endpoint strong {
  display: block;
  color: var(--accent-soft);
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.endpoint em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

button,
a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(13, 20, 36, 0.3);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

button {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #061016;
  font-weight: 700;
  box-shadow: 0 12px 34px rgba(29, 183, 255, 0.16);
}

main {
  padding-top: 18px;
}

.dashboard-layout {
  display: grid;
  gap: 4px;
}

.lead-layout {
  align-items: stretch;
}

.stat-group {
  margin-bottom: 20px;
}

.metric-section {
  padding: 16px;
  border: 1px solid rgba(36, 49, 66, 0.9);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.56);
}

.metric-section .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.metric-section .section-heading h2 {
  margin-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.stats-columns {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 20px;
  margin-bottom: 24px;
  align-items: start;
}

.stats-group {
  padding: 16px;
  border: 1px solid rgba(36, 49, 66, 0.9);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.56);
}

.stats-group .section-heading {
  margin-bottom: 14px;
}

.stats-group .grid:not(.network-grid) {
  grid-template-columns: repeat(3, 1fr);
}

.network-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
}

.compact-grid {
  margin-bottom: 0;
}

article,
.panel {
  border: 1px solid rgba(36, 49, 66, 0.92);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(21, 29, 40, 0.92), rgba(16, 21, 29, 0.96));
  box-shadow: 0 18px 48px var(--shadow);
}

article {
  min-height: 96px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-violet));
  opacity: 0.85;
}

article span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

article strong {
  display: block;
  margin-top: 7px;
  font-size: 23px;
  font-weight: 780;
}

article strong.promo-fee {
  color: #47e38f;
  font-size: 16px;
  text-shadow: 0 0 14px rgba(71, 227, 143, 0.32);
}

.health-grid article strong.good,
.service-pill strong.good {
  color: var(--good);
}

.health-grid article strong.warn {
  color: var(--warn);
}

.health-grid article strong.bad,
.service-pill strong.bad {
  color: var(--danger);
}

.panel {
  padding: 18px;
  margin-bottom: 20px;
}

.compact-panel {
  padding: 12px 14px;
}

.compact-panel .section-heading {
  margin-bottom: 6px;
}

.compact-panel .stat-row,
.compact-panel .table-head,
.compact-panel .table-row {
  padding: 6px 0;
}

.compact-panel h2 {
  font-size: 18px;
}

.section-heading {
  margin-bottom: 12px;
}

.panel p:not(.eyebrow) {
  color: var(--muted);
}

pre {
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(118, 228, 255, 0.22);
  background: #090d13;
  color: var(--accent-soft);
  overflow-x: auto;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.priority-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.list-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.stat-row strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 740;
  white-space: nowrap;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 100px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.table-head {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.table-row strong {
  color: var(--text);
  font-size: 15px;
  text-align: right;
}

.rank-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row b {
  display: inline-block;
  width: 36px;
  color: var(--accent-soft);
}

.chart {
  color: #47e38f;
}

.chart svg {
  width: 100%;
  min-height: 170px;
  display: block;
  border: 1px solid rgba(36, 49, 66, 0.92);
  border-radius: 8px;
  background: linear-gradient(180deg, #0b1119, #080b10);
}

#blocks,
#last-block,
#miners-list,
#workers-list,
#ports-list,
#payments,
#miner-workers-list,
#miner-payments-list {
  width: 100%;
}

.chart-gridline {
  stroke: rgba(169, 183, 210, 0.16);
  stroke-width: 1;
}

.chart-label,
.chart-xlabel {
  fill: var(--muted);
  font-size: 11px;
}

.chart-xlabel {
  text-anchor: middle;
}

.chart-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.notice {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(118, 228, 255, 0.28);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.72);
  color: var(--muted);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.service-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(36, 49, 66, 0.92);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.55);
}

.service-pill span,
.health-updated {
  color: var(--muted);
}

.service-pill strong {
  color: var(--text);
}

.health-updated {
  margin-top: 14px;
  font-size: 14px;
}

.compact-hero {
  min-height: 300px;
}

.search-panel {
  margin-top: 0;
}

.miner-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(98, 212, 255, 0.28);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.8);
}

.miner-search input {
  min-height: 42px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}

.miner-search button {
  min-height: 42px;
  border: 0;
  border-left: 1px solid rgba(98, 212, 255, 0.22);
  border-radius: 0;
  box-shadow: none;
}

.search-note,
.sub-row {
  color: var(--muted);
  font-size: 13px;
}

.sub-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: 0;
}

.stat-row:last-child {
  border-bottom: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0 36px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .brand-hero {
    min-height: 220px;
    background: #070b12;
  }

  .topbar,
  .split,
  .stats-columns,
  footer {
    display: block;
  }

  .priority-layout {
    display: block;
  }

  .top-actions {
    position: fixed;
    top: 10px;
    right: 10px;
    left: auto;
    max-width: calc(100vw - 20px);
    gap: 6px;
  }

  .topbar,
  .hero-copy,
  main,
  footer {
    width: calc(100% - 20px);
  }

  .hero-copy {
    padding: 72px 0 20px;
  }

  .brand-banner {
    display: none;
  }

  .brand-hero::after {
    background:
      linear-gradient(180deg, rgba(7, 9, 13, 0.34), rgba(7, 9, 13, 0.9));
  }

  .lead {
    font-size: 15px;
    margin-bottom: 14px;
  }

  .endpoint {
    width: 100%;
    padding: 10px 11px;
  }

  .endpoint strong {
    font-size: 13px;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .stats-columns {
    gap: 14px;
    margin-bottom: 16px;
  }

  .stats-group {
    padding: 12px;
  }

  .stats-group .grid:not(.network-grid) {
    grid-template-columns: 1fr 1fr;
  }

  .network-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 14px;
    margin-bottom: 14px;
  }

  .compact-panel {
    padding: 10px 12px;
  }

  .split {
    gap: 0;
  }

  .chart svg {
    min-height: 152px;
  }

  .chart-meta {
    margin-top: 8px;
    font-size: 12px;
  }

  .table-head,
  .table-row {
    grid-template-columns: minmax(0, 1fr) 68px 92px;
    gap: 8px;
    font-size: 13px;
  }

  .table-row strong {
    font-size: 14px;
  }

  article {
    min-height: 86px;
    padding: 12px;
  }

  article strong {
    margin-top: 6px;
    font-size: 20px;
  }

  article strong.promo-fee {
    font-size: 14px;
  }

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  h1 {
    font-size: 30px;
    line-height: 1.1;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
  }

  .miner-search {
    grid-template-columns: 1fr;
  }

  .miner-search button {
    border-left: 0;
    border-top: 1px solid rgba(98, 212, 255, 0.22);
  }

  button,
  a {
    min-height: 38px;
    padding: 9px 12px;
    font-size: 14px;
  }

  .page-action-row {
    margin-bottom: 8px;
  }

  footer {
    padding: 16px 0 26px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .brand-hero {
    min-height: 210px;
  }

  .brand-banner {
    display: none;
  }

  .hero-copy {
    padding-top: 68px;
  }

  h1 {
    font-size: 26px;
  }

  .eyebrow {
    font-size: 11px;
  }

  .lead {
    font-size: 14px;
  }

  .top-actions {
    top: 8px;
    right: 8px;
  }

  .status,
  .social-link,
  .footer-link,
  .inline-back-button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .stats-group .grid:not(.network-grid) {
    grid-template-columns: 1fr;
  }

  .table-head,
  .table-row {
    grid-template-columns: minmax(0, 1fr) 62px 86px;
    font-size: 12px;
  }

  .chart-label,
  .chart-xlabel {
    font-size: 10px;
  }

  .miner-search input,
  .miner-search button {
    min-height: 40px;
    font-size: 14px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile hotfix 2026-05-11: prevent layout break/overlap on small screens */
@media (max-width: 760px) {
  .top-actions {
    position: static;
    max-width: 100%;
    justify-content: flex-start;
    margin-bottom: 10px;
  }

  .topbar {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 10px;
  }

  .brand-hero {
    min-height: auto;
  }

  .stats-group,
  .panel,
  .chart,
  .endpoint {
    overflow: hidden;
  }

  .chart svg {
    width: 100%;
    height: auto;
  }

  .stat-row,
  .list-item,
  .table-row {
    overflow-wrap: anywhere;
  }

  footer {
    display: grid;
    gap: 10px;
    justify-items: start;
  }
}

@media (max-width: 480px) {
  .endpoint strong {
    font-size: 12px;
    word-break: break-all;
  }

  .status,
  .social-link,
  .footer-link {
    max-width: 100%;
  }
}
