/* NetX Nodes / Staking — aligned with Faucet dark theme */

body.nd-page {
  --nd-bg: #0a0a0f;
  --nd-panel: #12121a;
  --nd-panel-2: #16161e;
  --nd-row: #0e0e14;
  --nd-border: rgba(255, 255, 255, 0.08);
  --nd-text: #f4f4f5;
  --nd-text-muted: #a1a1aa;
  --nd-text-dim: #71717a;
  --nd-accent: #7c3aed;
  --nd-accent-bright: #a78bfa;
  --nd-accent-hover: #8b5cf6;
  --nd-accent-text: #ffffff;
  --nd-gradient: linear-gradient(90deg, #7c3aed 0%, #6366f1 45%, #3b82f6 100%);
  --nd-gradient-hover: linear-gradient(90deg, #8b5cf6 0%, #818cf8 45%, #60a5fa 100%);
  --nd-green: #34d399;
  --nd-radius: 1rem;
  --nd-ease: cubic-bezier(0.16, 1, 0.3, 1);

  color: var(--nd-text);
  background: var(--nd-bg);
  min-height: 100vh;
}

body.nd-page::before,
body.nd-page::after {
  display: none;
}

body.nd-page .page-wrap {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124, 58, 237, 0.14), transparent 55%),
    var(--nd-bg);
}

body.nd-page .site-header {
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nd-border);
  overflow: visible;
}

body.nd-page .brand { color: var(--nd-text); }
body.nd-page .nav-link { color: rgba(244, 244, 245, 0.72); }
body.nd-page .nav-link:hover,
body.nd-page .nav-link.is-active {
  color: var(--nd-text);
  background: rgba(255, 255, 255, 0.06);
}
body.nd-page .nav-link.is-active {
  color: var(--nd-accent-bright);
  background: rgba(124, 58, 237, 0.14);
}
body.nd-page .nav-dropdown.is-open .nav-dropdown-trigger {
  color: var(--nd-accent-bright);
  background: rgba(124, 58, 237, 0.1);
}
body.nd-page .nav-dropdown-panel {
  background: #12121a;
  border-color: var(--nd-border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}
body.nd-page .dropdown-item:hover { background: rgba(255, 255, 255, 0.06); }
body.nd-page .dropdown-title { color: var(--nd-text); }
body.nd-page .dropdown-desc { color: var(--nd-text-muted); }
body.nd-page .nav-toggle { color: var(--nd-text); }
body.nd-page .nav-toggle:hover { background: rgba(255, 255, 255, 0.06); }

@media (max-width: 900px) {
  body.nd-page .site-nav {
    background: rgba(10, 10, 15, 0.97);
    border-bottom-color: var(--nd-border);
  }
}

body.nd-page main { flex: 1; }

/* Hero */
.nd-hero {
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(2.5rem, 5vw, 3.75rem);
}

.nd-hero__grid {
  display: grid;
  grid-template-columns: minmax(min-content, 1.35fr) minmax(260px, 0.75fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.nd-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
  color: var(--nd-green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nd-hero__badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--nd-green);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.nd-hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #fff;
}

.nd-hero__title span {
  color: var(--nd-accent-bright);
}

.nd-hero__lead {
  margin: 0;
  max-width: none;
  color: var(--nd-text-muted);
  font-size: 1rem;
  line-height: 1.65;
  white-space: nowrap;
}

.nd-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nd-stat {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--nd-radius);
  border: 1px solid var(--nd-border);
  background: var(--nd-panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.nd-stat__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.14);
  color: var(--nd-accent-bright);
  flex-shrink: 0;
}

.nd-stat__label {
  margin: 0 0 0.15rem;
  color: var(--nd-text-muted);
  font-size: 0.8125rem;
}

.nd-stat__value {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Table section */
.nd-section {
  padding: 0.5rem 0 clamp(3rem, 6vw, 4.5rem);
}

.nd-table-card {
  border-radius: var(--nd-radius);
  border: 1px solid var(--nd-border);
  background: var(--nd-panel);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.nd-table-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem 0.85rem;
  border-bottom: 1px solid var(--nd-border);
}

.nd-table-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.nd-table-card__meta {
  margin: 0;
  color: var(--nd-text-muted);
  font-size: 0.875rem;
}

.nd-table-wrap {
  overflow-x: auto;
}

.nd-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.nd-table th,
.nd-table td {
  padding: 1rem 1.15rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--nd-border);
}

.nd-table th {
  color: var(--nd-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.nd-table tbody tr {
  background: var(--nd-row);
  transition: background 0.2s var(--nd-ease);
}

.nd-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.nd-table tbody tr:last-child td {
  border-bottom: none;
}

.nd-validator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nd-avatar {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #6366f1 50%, #3b82f6);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.nd-validator__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.nd-validator__name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 650;
  color: #fff;
}

.nd-addr {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
}

.nd-addr__link {
  color: var(--nd-text-dim);
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.15s var(--nd-ease);
}

.nd-addr__link:hover {
  color: var(--nd-accent-bright);
  text-decoration: underline;
}

.nd-addr__copy {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--nd-text-dim);
  cursor: pointer;
  transition: color 0.15s var(--nd-ease), background 0.15s var(--nd-ease);
}

.nd-addr__copy:hover {
  color: var(--nd-accent-bright);
  background: rgba(124, 58, 237, 0.14);
}

.nd-card__addr {
  margin: 0 0 0.85rem;
}

.nd-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.14);
  color: var(--nd-accent-bright);
  font-size: 0.6875rem;
  font-weight: 700;
}

.nd-cell-strong { font-weight: 600; color: #fff; }
.nd-cell-muted { color: var(--nd-text-muted); font-size: 0.875rem; }
.nd-cell-apy { color: var(--nd-green); font-weight: 650; }

.nd-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--nd-text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.nd-status__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--nd-text-dim);
}

.nd-status--active { color: var(--nd-green); }
.nd-status--active .nd-status__dot {
  background: var(--nd-green);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.nd-status--jailed { color: #f87171; }
.nd-status--jailed .nd-status__dot { background: #f87171; }

.nd-status--inactive { color: #fbbf24; }
.nd-status--inactive .nd-status__dot {
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
}

.nd-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  border-radius: 0.75rem;
  transition: background 0.2s var(--nd-ease), opacity 0.2s var(--nd-ease), transform 0.15s var(--nd-ease);
}

.nd-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nd-btn--delegate {
  padding: 0.45rem 0.95rem;
  background: var(--nd-gradient);
  color: var(--nd-accent-text);
}

.nd-btn--delegate:hover:not(:disabled) {
  background: var(--nd-gradient-hover);
}

.nd-btn--primary {
  padding: 0.85rem 1.1rem;
  background: var(--nd-gradient);
  color: var(--nd-accent-text);
}

.nd-btn--primary:hover:not(:disabled) {
  background: var(--nd-gradient-hover);
}

.nd-btn--block {
  width: 100%;
}

/* Mobile cards — hidden on desktop */
.nd-cards {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nd-card {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--nd-border);
}

.nd-card:last-child {
  border-bottom: none;
}

.nd-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.nd-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  margin: 0;
}

.nd-card__meta > div:first-child {
  grid-column: 1 / -1;
}

.nd-card__meta dt {
  margin: 0 0 0.15rem;
  color: var(--nd-text-dim);
  font-size: 0.75rem;
}

.nd-card__meta dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Modal — light panel like BSC reference */
.nd-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.nd-modal__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.nd-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(92vh, 640px);
  overflow: auto;
  padding: 1.25rem 1.35rem 1.4rem;
  border-radius: 16px;
  background: #fff;
  color: #1e2329;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  animation: nd-modal-in 0.22s var(--nd-ease);
}

@keyframes nd-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.nd-modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1rem;
}

.nd-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.nd-modal__close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #848e9c;
  cursor: pointer;
}

.nd-modal__close:hover {
  background: #f5f5f5;
  color: #1e2329;
}

.nd-modal__notice {
  margin-bottom: 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #f5f5f5;
  color: #474d57;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.nd-modal__notice ul {
  margin: 0;
  padding-left: 1.1rem;
}

.nd-modal__notice li + li {
  margin-top: 0.4rem;
}

.nd-modal__field {
  margin-bottom: 1.1rem;
}

.nd-modal__label {
  display: block;
  margin-bottom: 0.45rem;
  color: #848e9c;
  font-size: 0.875rem;
  font-weight: 600;
}

.nd-modal__validator {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9375rem;
}

.nd-modal__validator-meta {
  color: #848e9c;
  font-weight: 500;
}

.nd-modal__input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #eaecef;
  border-radius: 10px;
  background: #fff;
  color: #1e2329;
  font-size: 1.125rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s var(--nd-ease), box-shadow 0.2s var(--nd-ease);
}

.nd-modal__input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.nd-modal__balance {
  margin: 0.55rem 0 0;
  color: #848e9c;
  font-size: 0.8125rem;
}

.nd-modal__balance strong {
  color: #1e2329;
}

.nd-modal__addr {
  color: #b7bdc6;
}

.nd-modal__success {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

.nd-modal__success i {
  font-size: 2rem;
  color: var(--nd-green);
  margin-bottom: 0.75rem;
}

.nd-modal__success p {
  margin: 0 0 1.1rem;
  color: #474d57;
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Apply banner */
.nd-apply {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 13.5rem;
  margin-top: 1.5rem;
  padding: clamp(2.25rem, 4.5vw, 3.25rem) clamp(1.25rem, 3vw, 2rem);
  text-align: center;
  border-radius: var(--nd-radius);
  border: 1px solid rgba(124, 58, 237, 0.28);
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(124, 58, 237, 0.22), transparent 60%),
    linear-gradient(165deg, rgba(18, 18, 26, 0.98), rgba(22, 22, 34, 0.96));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.nd-apply__copy {
  max-width: 36rem;
}

.nd-apply__title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 750;
  color: #fff;
}

.nd-apply__lead {
  margin: 0;
  color: var(--nd-text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.nd-btn--apply {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1.35rem;
  border-radius: 0.75rem;
  background: var(--nd-gradient);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--nd-ease), transform 0.15s var(--nd-ease);
}

.nd-btn--apply:hover {
  background: var(--nd-gradient-hover);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .nd-hero__grid {
    grid-template-columns: 1fr;
  }

  .nd-hero__lead {
    white-space: normal;
  }

  .nd-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nd-stat {
    flex: 1 1 220px;
  }
}

@media (max-width: 720px) {
  .nd-table-wrap {
    display: none;
  }

  .nd-cards {
    display: block;
  }

  .nd-table-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .nd-stats {
    flex-direction: column;
  }

  .nd-btn--apply {
    width: 100%;
    max-width: 20rem;
  }
}
