:root {
  color-scheme: dark;
  --bg: #020408;
  --panel: #0b0f14;
  --panel-2: #10161d;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .15);
  --ink: #f3f7fb;
  --muted: #8d99a8;
  --soft: #c5cfda;
  --blue: #2f8eff;
  --blue-2: #6ab7ff;
  --green: #22c178;
  --purple: #8153ff;
  --red: #ef5b67;
  --shadow: 0 18px 60px rgba(0, 0, 0, .36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(47, 142, 255, .06), transparent 34%, rgba(129, 83, 255, .08)),
    linear-gradient(180deg, #03060a 0%, #020408 46%, #050709 100%);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 72%);
}

a,
button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 34px));
  margin: 0 auto;
  padding-bottom: 40px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  background: rgba(2, 4, 8, .82);
}

.nav-brand,
.nav-links,
.nav-domain {
  display: flex;
  align-items: center;
}

.nav-brand {
  min-width: 0;
  gap: 10px;
  font-weight: 750;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.nav-links {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.nav-links a,
.nav-domain {
  min-height: 30px;
  padding: 7px 10px;
  color: var(--soft);
  font-size: 13px;
  border-radius: 6px;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, .08);
}

.nav-domain {
  justify-self: end;
  color: var(--muted);
  border: 1px solid var(--line);
}

.hero {
  min-height: calc(100vh - 142px);
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, .78fr);
  align-items: center;
  gap: 54px;
  padding: 60px 0 44px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-title span,
.panel-head span,
.mini-table-head span,
#apiStatus,
#poolStatus {
  color: var(--muted);
  font-size: 13px;
}

.eyebrow,
#apiStatus,
#poolStatus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-dot,
#apiStatus i,
#poolStatus i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 91, 103, .11);
}

#apiStatus.ok i,
#poolStatus.ok i,
.live-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(34, 193, 120, .12);
}

h1 {
  max-width: 760px;
  margin-top: 18px;
  font-size: 78px;
  line-height: .95;
  font-weight: 850;
}

.hero-text {
  max-width: 610px;
  margin-top: 22px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.62;
}

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

.primary-action,
.secondary-action,
.browse-link,
.panel-head a,
.panel-head button,
.section-title a,
.copy-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--line-strong);
}

.primary-action {
  color: #fff;
  background: var(--blue);
  border-color: rgba(47, 142, 255, .72);
  box-shadow: 0 14px 40px rgba(47, 142, 255, .24);
}

.secondary-action,
.browse-link,
.panel-head a,
.panel-head button,
.section-title a,
.copy-button {
  color: var(--soft);
  background: rgba(255, 255, 255, .045);
}

.primary-action:hover {
  background: #237fe9;
}

.secondary-action:hover,
.browse-link:hover,
.panel-head a:hover,
.panel-head button:hover,
.section-title a:hover,
.copy-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, .08);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 12px;
  margin-top: 42px;
}

.hero-metrics article,
.live-card,
.connect-card,
.wallet-status-card,
.pool-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 15, 20, .86);
  box-shadow: var(--shadow);
}

.hero-metrics article {
  min-height: 82px;
  padding: 15px;
}

.hero-metrics strong,
.live-grid strong,
.pool-card-stats strong {
  display: block;
  color: #fff;
  font-size: 23px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.hero-metrics span,
.live-grid span,
.pool-card-stats span,
.connect-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.live-card {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(21, 29, 38, .94), rgba(8, 11, 15, .94));
}

.card-title,
.section-title,
.panel-head,
.mini-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-title h2,
.section-title h2,
.panel-head h2 {
  font-size: 18px;
  line-height: 1.2;
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.live-grid div {
  min-height: 86px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
}

.mini-table-head {
  margin-top: 18px;
  padding: 0 2px 8px;
}

.top-pool-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(110px, auto);
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
}

.top-pool-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.top-pool-row > div:last-child {
  text-align: right;
}

.coin-badge {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #0a7553, #2f8eff);
  border: 1px solid rgba(255, 255, 255, .18);
}

.coin-badge.large {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
}

.browse-link {
  width: 100%;
  margin-top: 12px;
}

.section-block {
  padding: 26px 0;
}

.section-title {
  margin-bottom: 14px;
}

.connect-card {
  display: grid;
  grid-template-columns: .7fr .7fr 1.6fr;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.connect-card div {
  min-width: 0;
  min-height: 74px;
  padding: 15px;
  background: rgba(11, 15, 20, .96);
}

.connect-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.wallet-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wallet-status-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.wallet-status-card strong,
.wallet-status-card small {
  display: block;
}

.wallet-status-card strong {
  font-size: 17px;
}

.wallet-status-card .status-chip {
  margin-top: 8px;
}

.wallet-status-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.connection-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.connection-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 90px 92px minmax(132px, auto) 74px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 15, 20, .78);
}

.connection-row strong,
.connection-row code {
  overflow-wrap: anywhere;
}

.connection-row code {
  color: var(--blue-2);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.muted-row {
  grid-template-columns: 1fr;
  color: var(--muted);
}

.copy-button {
  min-height: 32px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(47, 142, 255, .14);
  border-color: rgba(47, 142, 255, .38);
}

.pool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pool-tabs button {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--soft);
  background: rgba(255, 255, 255, .045);
}

.pool-tabs button.active,
.pool-tabs button:hover {
  color: #fff;
  border-color: rgba(47, 142, 255, .72);
  background: rgba(47, 142, 255, .18);
}

.pool-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.pool-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(500px, .72fr);
  align-items: center;
  gap: 22px;
  min-height: 124px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.pool-card.active,
.pool-card:hover {
  border-color: rgba(47, 142, 255, .5);
  background: rgba(13, 21, 31, .94);
}

.pool-card-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.pool-card h3 {
  font-size: 25px;
}

.pool-card p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.4;
}

.pool-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pool-card-meta span,
.status-chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, .035);
  font-size: 12px;
  font-weight: 700;
}

.status-chip.live {
  color: #05180f;
  border-color: rgba(34, 193, 120, .4);
  background: var(--green);
}

.status-chip.waiting {
  color: #261b03;
  border-color: rgba(255, 196, 87, .5);
  background: #ffc457;
}

.status-chip.syncing {
  color: #071421;
  border-color: rgba(106, 183, 255, .55);
  background: var(--blue-2);
}

.status-chip.pending {
  color: var(--soft);
  background: rgba(255, 255, 255, .055);
}

.status-chip.offline {
  color: #fff;
  border-color: rgba(239, 91, 103, .5);
  background: rgba(239, 91, 103, .62);
}

.pool-card-stats {
  display: grid;
  grid-template-columns: minmax(78px, .75fr) minmax(66px, .58fr) minmax(74px, .62fr) minmax(128px, 1.15fr) minmax(112px, .95fr);
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
}

.pool-card-stats div {
  min-width: 0;
  min-height: 56px;
  padding: 10px 12px;
  border-left: 1px solid var(--line);
}

.pool-card-stats div:first-child {
  border-left: 0;
}

.pool-card-stats span {
  margin-top: 0;
}

.pool-card-stats strong {
  margin-top: 4px;
  max-width: 100%;
  font-size: clamp(13px, .82vw, 16px);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.dashboard-grid,
.table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.span-2 {
  grid-column: span 2;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-head {
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.chart-mode-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
}

.chart-mode-toggle button {
  min-width: 72px;
  height: 30px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.chart-mode-toggle button:hover,
.chart-mode-toggle button.active {
  color: var(--ink);
  background: rgba(47, 142, 255, .18);
}

.chart-mode-toggle button.active {
  box-shadow: inset 0 0 0 1px rgba(47, 142, 255, .72);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.chart-wrap {
  height: 310px;
  padding: 16px;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #07090d;
}

.admin-body {
  min-height: 100vh;
}

.admin-shell {
  position: relative;
  width: min(1160px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.admin-header,
.panel-heading,
.admin-actions {
  display: flex;
  align-items: center;
}

.admin-header {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-header h1 {
  margin-top: 8px;
  font-size: 44px;
  line-height: 1;
}

.admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.admin-actions button,
.admin-actions a {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--soft);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.admin-actions button {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, .055);
}

.admin-panel button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
  font-weight: 800;
}

.admin-actions button:hover,
.admin-actions a:hover,
.admin-panel button:hover {
  border-color: rgba(47, 142, 255, .66);
  background: rgba(47, 142, 255, .16);
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-overview-item {
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 15, 20, .72);
}

.admin-overview-item span,
.admin-overview-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-overview-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-overview-item strong {
  min-width: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.admin-overview-item small {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.35;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 16px;
}

.admin-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 15, 20, .86);
  box-shadow: var(--shadow);
}

.panel-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.panel-actions-row {
  margin-top: 14px;
}

.panel-heading h2 {
  font-size: 22px;
}

.panel-heading p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.span-full {
  grid-column: 1 / -1;
}

.admin-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-panel input,
.admin-panel select,
.admin-panel textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, .045);
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

.admin-panel textarea {
  resize: vertical;
  min-height: 132px;
}

.admin-panel input:focus,
.admin-panel select:focus,
.admin-panel textarea:focus {
  border-color: rgba(47, 142, 255, .78);
  box-shadow: 0 0 0 3px rgba(47, 142, 255, .12);
}

.switch-row {
  display: inline-flex !important;
  grid-auto-flow: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-transform: none !important;
  font-size: 14px !important;
  color: var(--soft) !important;
}

.switch-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}

.inline-switch {
  align-self: end;
  min-height: 42px;
}

.compact-switch {
  min-height: 0;
}

.admin-output {
  min-height: 220px;
  margin: 14px 0 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--soft);
  background: #05070b;
  white-space: pre-wrap;
}

.admin-subform {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.admin-subform.no-top {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.admin-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table td {
  color: var(--soft);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table pre {
  margin: 0;
  color: inherit;
  white-space: pre-wrap;
}

.amount-stack {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.18;
}

.amount-stack strong {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.amount-stack small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

td .amount-stack {
  display: flex;
}

.compact-table {
  min-width: 620px;
}

.admin-user-list,
.policy-card-list,
.audit-feed {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.user-admin-card,
.policy-card,
.audit-event {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.user-card-head,
.policy-card-head,
.audit-event-main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.user-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 142, 255, .45);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 193, 120, .72), rgba(47, 142, 255, .88));
  font-weight: 900;
}

.user-identity,
.policy-card-head > div,
.audit-event-main > div {
  min-width: 0;
}

.user-title-row,
.policy-chip-row,
.audit-chip-row,
.user-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.user-title-row h3,
.policy-card h3 {
  min-width: 0;
  color: var(--ink);
  font-size: 21px;
  overflow-wrap: anywhere;
}

.user-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.user-subline span,
.policy-coin-strip span,
.coin-pill span,
.address-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-card-sections {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr .9fr;
  gap: 16px;
  padding: 0 16px 16px;
}

.user-card-sections section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.section-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.coin-chip-list,
.address-chip-list,
.policy-coin-strip {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coin-pill,
.address-chip,
.policy-coin-strip span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, .035);
  font-size: 12px;
  font-weight: 750;
}

.coin-pill {
  flex-direction: column;
  align-items: flex-start;
  border-radius: 8px;
}

.coin-pill strong,
.address-chip strong {
  color: var(--ink);
}

.coin-pill small {
  color: var(--muted);
  font-size: 11px;
}

.address-chip {
  max-width: 100%;
  text-align: left;
}

.soft-note {
  color: var(--muted);
  font-size: 13px;
}

.user-more,
.policy-more,
.audit-more {
  border-top: 1px solid var(--line);
}

.user-more summary,
.policy-more summary,
.audit-more summary {
  cursor: pointer;
  padding: 12px 16px;
  color: var(--soft);
  font-weight: 800;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.admin-detail-grid > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-detail-grid code {
  min-width: 0;
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--soft);
  background: rgba(0, 0, 0, .2);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
}

.policy-card-head {
  align-items: center;
}

.policy-card-head h3 {
  margin-bottom: 8px;
}

.policy-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 14px;
}

.policy-metrics div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .03);
}

.policy-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.policy-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.policy-coin-strip {
  padding: 0 16px 16px;
}

.audit-event-main strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.audit-event-main span {
  display: inline-flex;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.audit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 14px;
}

.audit-summary span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--soft);
  background: rgba(255, 255, 255, .03);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.audit-summary b {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  text-transform: uppercase;
}

.audit-more pre {
  max-height: 260px;
  margin: 0 16px 16px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--soft);
  background: #05070b;
  white-space: pre-wrap;
}

.inline-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-action-stack button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-panel button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: .48;
}

.admin-empty {
  margin-top: 14px;
  color: var(--muted);
}

.wallet-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.wallet-admin-card {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, .045);
  text-align: left;
}

.wallet-admin-card:hover {
  border-color: rgba(47, 142, 255, .66);
  background: rgba(47, 142, 255, .12);
}

.wallet-admin-card strong {
  font-size: 18px;
}

.wallet-admin-card span,
.wallet-admin-card small {
  color: var(--muted);
}

.account-shell {
  width: min(1240px, calc(100% - 34px));
}

.account-logout {
  border-color: var(--line);
  background: rgba(255, 255, 255, .035);
}

.account-login {
  width: min(520px, 100%);
  margin: 70px auto 0;
}

.account-login .panel-head h1 {
  margin-top: 0;
  font-size: 34px;
  line-height: 1;
}

.account-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.account-form.compact {
  padding: 16px;
}

.account-form button {
  width: fit-content;
}

.account-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-divider::before,
.account-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.account-hero {
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 44px 0 26px;
}

.account-hero h1 {
  margin-top: 12px;
  font-size: 54px;
}

.account-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-meta span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, .045);
  font-size: 13px;
  font-weight: 800;
}

.account-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.account-stat-grid article {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 15, 20, .86);
  box-shadow: var(--shadow);
}

.account-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.account-stat-grid strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.compact-list {
  padding-top: 0;
}

.account-list-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
}

.account-list-row strong,
.account-list-row code,
.account-list-row span {
  display: block;
}

.account-list-row strong {
  color: var(--ink);
}

.account-list-row code {
  margin-top: 6px;
  color: var(--blue-2);
  font-family: Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.account-list-row span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.account-list-row button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(47, 142, 255, .38);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(47, 142, 255, .14);
  font-weight: 800;
}

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

.details {
  padding: 6px 16px 16px;
}

.details div {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.details div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--muted);
}

dd {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #001f13;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.miner-lookup {
  margin-top: 14px;
}

.lookup-row {
  padding: 16px;
}

.miner-settings-grid {
  display: grid;
  grid-template-columns: .85fr 1.35fr .75fr .75fr;
  gap: 12px;
}

.miner-pay-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.miner-pay-grid article {
  min-width: 0;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
}

.miner-pay-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.miner-pay-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(13px, 1.2vw, 18px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

label {
  min-width: 0;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, .045);
  font: inherit;
}

select {
  appearance: none;
}

input:focus,
select:focus {
  border-color: rgba(47, 142, 255, .72);
  box-shadow: 0 0 0 3px rgba(47, 142, 255, .16);
}

.result-box {
  min-height: 132px;
  max-height: 280px;
  margin: 0 16px 16px;
  overflow: auto;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--soft);
  background: #07090d;
  font-size: 13px;
  white-space: pre-wrap;
}

.admin-output.small-output {
  min-height: 118px;
  max-height: 220px;
}

.error-note {
  color: #ff9da6;
}

.footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: var(--soft);
}

.footer-links a:hover {
  color: var(--ink);
}

.legal-shell {
  width: min(1040px, calc(100% - 34px));
}

.legal-hero {
  padding: 58px 0 26px;
}

.legal-hero h1 {
  max-width: 820px;
  font-size: 62px;
}

.legal-hero p:last-child {
  margin-top: 12px;
  color: var(--muted);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(230px, .34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.legal-summary,
.legal-document {
  padding: 22px;
}

.legal-summary {
  position: sticky;
  top: 78px;
}

.legal-summary h2,
.legal-document h2 {
  font-size: 20px;
}

.legal-summary p,
.legal-document p {
  margin-top: 12px;
  color: var(--soft);
  line-height: 1.65;
}

.legal-document h2:not(:first-child) {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

@media (max-width: 920px) {
  .page-shell {
    width: min(100% - 24px, 720px);
  }

  .nav {
    position: static;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .nav-links {
    overflow-x: auto;
    justify-content: start;
  }

  .nav-domain {
    justify-self: start;
  }

  .hero,
  .pool-card,
  .pool-list,
  .legal-layout,
  .wallet-status-grid,
  .dashboard-grid,
  .table-grid,
  .admin-grid,
  .account-grid,
  .account-stat-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 22px;
    padding: 36px 0 20px;
  }

  h1 {
    font-size: 56px;
  }

  .span-2 {
    grid-column: auto;
  }

  .hero-metrics,
  .pool-card-stats,
  .connect-card,
  .connection-row,
  .miner-settings-grid,
  .miner-pay-grid {
    grid-template-columns: 1fr 1fr;
  }

  .connect-card div {
    min-height: 70px;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-hero {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
  }

  .account-meta {
    justify-content: flex-start;
  }

  .legal-summary {
    position: static;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .user-card-sections,
  .policy-metrics,
  .audit-summary,
  .admin-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .nav-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  h1 {
    font-size: 44px;
  }

  .account-hero h1 {
    font-size: 40px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-metrics,
  .live-grid,
  .pool-card-stats,
  .connect-card,
    .wallet-status-grid,
    .connection-row,
    .miner-settings-grid,
    .miner-pay-grid,
	    .account-stat-grid,
	    .account-grid,
	    .admin-overview,
	    .form-grid,
      .user-card-sections,
      .policy-metrics,
      .audit-summary,
      .admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .user-card-head,
  .policy-card-head,
  .audit-event-main {
    flex-direction: column;
  }

  .user-card-actions {
    width: 100%;
  }

  .user-card-actions button {
    flex: 1 1 140px;
  }

  .account-list-row {
    grid-template-columns: 1fr;
  }

  .admin-header h1 {
    font-size: 36px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-actions {
    justify-content: flex-start;
  }

  .top-pool-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .top-pool-row > div:last-child {
    grid-column: 1 / -1;
    text-align: left;
  }

  .details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
