:root {
  --bg: #07070d;
  --bg-card: #0e0e18;
  --bg-card-hover: #12121f;
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(139, 92, 246, 0.35);
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.25);
  --cyan: #22d3ee;
  --green: #34d399;
  --gold: #fbbf24;
  --red: #f87171;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.stars-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page-content {
  position: relative;
  z-index: 1;
}

body.modal-open .page-content {
  visibility: hidden;
  pointer-events: none;
}

body.modal-open .stars-canvas {
  z-index: 500;
}

body.modal-open .bg-glow {
  z-index: 499;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 600px;
  height: 600px;
  background: rgba(139, 92, 246, 0.12);
  top: -200px;
  right: -100px;
}

.bg-glow--2 {
  width: 500px;
  height: 500px;
  background: rgba(34, 211, 238, 0.06);
  bottom: -150px;
  left: -100px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo--sm { font-size: 1rem; }

.logo__icon { font-size: 1.3em; }

.logo__img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo__img--sm {
  height: 24px;
}

.logo__accent { color: var(--accent-light); }

.nav {
  display: flex;
  gap: 24px;
}

.nav__link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__link:hover { color: var(--text); }

.header__actions { display: flex; gap: 8px; align-items: center; }

.header__actions--right {
  margin-left: auto;
  flex-shrink: 0;
}

.header-user {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-error {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--red);
  font-size: 0.88rem;
}

.form-success {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--green);
  font-size: 0.88rem;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.captcha-question {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent-light);
  white-space: nowrap;
  min-width: 80px;
}

.captcha-refresh {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}

.captcha-refresh:hover { color: var(--text); }

.settings-info {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.settings-row span:first-child { color: var(--text-muted); }
.settings-row strong, .settings-row code { text-align: right; }

/* Toggle switch */
.fo-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.fo-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.fo-toggle__track {
  position: absolute; inset: 0; border-radius: 22px;
  background: var(--border); cursor: pointer;
  transition: background 0.2s;
}
.fo-toggle input:checked + .fo-toggle__track { background: var(--accent); }
.fo-toggle__track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
}
.fo-toggle input:checked + .fo-toggle__track::after { transform: translateX(18px); }

.settings-row__value {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.edit-btn {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--accent-light);
  transition: background 0.2s;
}

.edit-btn:hover { background: rgba(139, 92, 246, 0.25); }
.edit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.settings-cooldown {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.settings-edit-panel {
  margin-top: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.verify-demo {
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px dashed var(--border-accent);
  border-radius: 8px;
  font-size: 0.9rem;
}

.verify-demo code {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--accent-light);
  letter-spacing: 0.15em;
}

.admin-dashboard .admin-card { margin-bottom: 28px; }

.admin-stat--clickable {
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  width: 100%;
  transition: border-color 0.2s, transform 0.2s;
}

.admin-stat--clickable:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.admin-popup { max-width: 720px; max-height: 85vh; overflow-y: auto; }

.modal.admin-user-modal,
.admin-popup.admin-user-modal {
  max-width: min(1240px, calc(100vw - 32px)) !important;
  width: min(1240px, calc(100vw - 32px)) !important;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.55) rgba(255, 255, 255, 0.04);
}

.modal.admin-user-modal::-webkit-scrollbar,
.admin-popup.admin-user-modal::-webkit-scrollbar {
  width: 8px;
}

.modal.admin-user-modal::-webkit-scrollbar-track,
.admin-popup.admin-user-modal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.modal.admin-user-modal::-webkit-scrollbar-thumb,
.admin-popup.admin-user-modal::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.65), rgba(34, 211, 238, 0.45));
  border-radius: 8px;
  border: 2px solid rgba(14, 14, 24, 0.9);
}

.modal.admin-user-modal::-webkit-scrollbar-thumb:hover,
.admin-popup.admin-user-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.85);
}

.admin-user-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .admin-user-row { grid-template-columns: 1fr; }
}

.admin-user-section {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.admin-user-section--full { width: 100%; }

.admin-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.admin-detail-row .input { flex: 1 1 180px; min-width: 0; }

.admin-subscription-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.admin-subscription-stack .input {
  flex: 1 1 160px;
  min-width: 140px;
}

.admin-subscription-stack .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-moderation-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-moderation-btns .btn { flex: 0 1 auto; }

.mnemonic-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mnemonic-word {
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-family: var(--mono);
  color: var(--text-muted);
}

.mnemonic-word--bad {
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

.mnemonic-word--warn {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(251, 191, 36, 0.12);
  color: var(--gold);
}

.key-value-input {
  resize: none;
  min-height: 88px;
  max-height: 88px;
}

.fo-toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}

.fo-toast {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #e8e8f0;
  background: rgba(14, 14, 24, 0.96);
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: auto;
}

.fo-toast--visible {
  opacity: 1;
  transform: translateX(0);
}

.fo-toast--warn { border-color: rgba(251, 191, 36, 0.55); }
.fo-toast--error { border-color: rgba(248, 113, 113, 0.55); }
.fo-toast--info { border-color: rgba(34, 211, 238, 0.45); }

.key-item--stopped {
  opacity: 0.72;
  border-color: rgba(248, 113, 113, 0.35);
}

.key-item__status {
  font-size: 0.7rem;
  margin-left: 8px;
}

.admin-row--match {
  background: rgba(139, 92, 246, 0.12);
  box-shadow: inset 3px 0 0 rgba(167, 139, 250, 0.85);
}

.admin-open-btn {
  border-color: rgba(167, 139, 250, 0.65) !important;
  color: #c4b5fd !important;
}

.admin-subscription-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.admin-subscription-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .admin-subscription-grid {
    grid-template-columns: 1fr;
  }
}

body.admin-role-additional #adminManagementCard,
body.admin-role-additional .admin-main-only {
  display: none !important;
  visibility: hidden !important;
}

.network-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.network-chip {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #8888a0);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}

.network-chip--active {
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
}

.network-chip--verified::after {
  content: ' ✓';
  opacity: 0.75;
  font-size: 0.7em;
}

.network-chip--suggested {
  border-style: dashed;
  border-color: rgba(251, 191, 36, 0.45);
}

.network-chips--suggested .network-chip--active {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(251, 191, 36, 0.1);
  color: var(--gold);
}

.network-chips--muted .network-chip {
  opacity: 0.85;
}

.network-chip--static {
  cursor: default;
  pointer-events: none;
}

.remember-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 14px;
}

.remember-row .checkbox-row {
  margin: 0;
  flex: 1 1 140px;
}

.link-btn--warn {
  color: var(--gold);
}

.public-scanner,
.explorer-block {
  margin-top: 28px;
  width: 100%;
  max-width: 100%;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(14, 14, 24, 0.55);
  text-align: left;
}

.explorer-block__title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.explorer-block__desc {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.password-field {
  position: relative;
  display: flex;
  align-items: stretch;
}

.password-field__input {
  flex: 1;
  padding-right: 44px;
}

.password-field__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.password-field__toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.key-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
}

.btn--compact {
  width: auto;
  flex: 0 1 auto;
  max-width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

.keys-search {
  margin-bottom: 14px;
}

.plan__emoji {
  margin-right: 4px;
}

.plans[hidden] {
  display: none !important;
}

.public-scanner__input {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 56px;
  max-height: 140px;
  resize: vertical;
  display: block;
  box-sizing: border-box;
}

.public-scanner__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.scan-progress {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--cyan);
}

/* ─── Animated scan progress ───────────────────────────── */
.scan-progress--scanning {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.scan-progress__row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.scan-progress__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.6);
  animation: scanDotPulse 1.1s ease-in-out infinite;
}

@keyframes scanDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px rgba(34, 211, 238, 0.6); }
  50%       { opacity: 0.35; transform: scale(0.65); box-shadow: 0 0 2px rgba(34, 211, 238, 0.2); }
}

.scan-progress__text {
  flex: 1;
  font-size: 0.82rem;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan-progress__counter {
  font-size: 0.76rem;
  font-family: var(--mono);
  color: rgba(34, 211, 238, 0.55);
  flex-shrink: 0;
}

.scan-progress__bar {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.scan-progress__seg {
  height: 3px;
  width: 10px;
  border-radius: 2px;
  background: rgba(34, 211, 238, 0.1);
  transition: background 0.2s ease;
}

.scan-progress__seg--done {
  background: rgba(34, 211, 238, 0.55);
}

.scan-progress__seg--active {
  background: var(--cyan);
  animation: segBlink 0.65s ease-in-out infinite;
}

@keyframes segBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.scan-progress__icon {
  font-style: normal;
  font-size: 0.82rem;
  margin-right: 5px;
}

.scan-progress__icon--ok  { color: var(--green); }
.scan-progress__icon--err { color: var(--red); }

/* ─── Chain card entrance animation ────────────────────── */
@keyframes chainCardEnter {
  from { opacity: 0; transform: translateY(-8px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.chain-card--enter {
  animation: chainCardEnter 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── Withdrawal section ────────────────────────────────── */
.chain-card__withdraw {
  border-top: 1px solid var(--border);
}

.chain-card__withdraw-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.chain-card__withdraw-toggle:hover {
  background: rgba(139, 92, 246, 0.08);
}

.chain-card__withdraw-toggle--open {
  color: var(--cyan);
}

.chain-card__withdraw-icon { font-style: normal; }

.chain-card__withdraw-saved {
  font-family: var(--mono);
  font-size: 0.75rem;
  opacity: 0.7;
}

.chain-card__withdraw-body {
  padding: 0 14px 12px;
  border-top: 1px solid var(--border);
}

.chain-card__withdraw-prefill {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 8px 0 6px;
  word-break: break-all;
}

.chain-card__withdraw-prefill code {
  color: var(--cyan);
  font-family: var(--mono);
}

.chain-card__withdraw-form { margin-top: 8px; }

.chain-card__withdraw-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.chain-card__withdraw-input {
  flex: 1;
  font-size: 0.78rem;
  padding: 6px 10px;
  min-width: 0;
}

.chain-card__withdraw-hint {
  margin-top: 5px;
  font-size: 0.75rem;
  min-height: 1.2em;
}

.chain-card__withdraw-ok  { color: var(--green); }
.chain-card__withdraw-err { color: var(--red); }

/* ─── Multisig / double-signature warning ───────────────── */
.chain-card__multisig-warn {
  margin: 0 14px 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--red);
  font-size: 0.8rem;
  line-height: 1.5;
}

.chain-card__multisig-warn small {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  color: rgba(248, 113, 113, 0.75);
  font-family: var(--mono);
  word-break: break-all;
}

/* ─── Withdrawal protection cache ───────────────────────── */
.chain-card__protect-warn {
  margin: 0 14px 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--gold);
  font-size: 0.8rem;
  line-height: 1.5;
}

.chain-card__protect-retry {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.08);
  color: var(--gold);
  font-size: 0.76rem;
  cursor: pointer;
}

.chain-card__protect-retry:hover { background: rgba(251, 191, 36, 0.16); }

/* ─── Address activity analysis badge ──────────────────────── */
.chain-card__analysis {
  font-size: 0.76rem;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid transparent;
}

.chain-card__analysis--loading {
  color: var(--text-muted);
  border-color: var(--border);
}

.chain-card__analysis--ok {
  background: rgba(52, 211, 153, 0.07);
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--green);
}

.chain-card__analysis--ok span { color: var(--text-muted); }

.chain-card__analysis--warn {
  background: rgba(251, 191, 36, 0.07);
  border-color: rgba(251, 191, 36, 0.3);
  color: var(--gold);
}

.chain-card__analysis--warn span { color: var(--text-muted); }

.chain-card__analysis--neutral {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text-muted);
}

.chain-card__analysis--danger {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--red);
}

.chain-card__analysis--danger span { color: rgba(248, 113, 113, 0.8); }

.chain-results {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chain-results__empty {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 8px 0;
}

.chain-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.chain-card--active {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: inset 3px 0 0 rgba(34, 211, 238, 0.75);
}

/* Positive balance — orange accent (complement of cyan, clearly distinct) */
.chain-card--balance {
  border-color: rgba(249, 115, 22, 0.55) !important;
  box-shadow: inset 3px 0 0 #f97316, 0 0 10px rgba(249, 115, 22, 0.1) !important;
}

.chain-card--idle {
  opacity: 0.88;
}

.chain-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.chain-card__network {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chain-card__icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.chain-card__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.chain-card__ticker {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.chain-card__tx-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  background: rgba(34, 211, 238, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(34, 211, 238, 0.2);
  letter-spacing: 0.02em;
}

.chain-card__tx-badge--active {
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.35);
}

.chain-card__balance {
  text-align: right;
  flex-shrink: 0;
}

.chain-card__balance-main {
  display: block;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--green);
}

.chain-card__balance-sub {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.chain-card__body {
  padding: 10px 14px 12px;
}

.chain-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.72rem;
}

.chain-card__idx {
  color: var(--text-muted);
  font-family: var(--mono);
}

.chain-card__badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-light);
}

.chain-card__status {
  color: var(--cyan);
}

.chain-card--idle .chain-card__status {
  color: var(--text-muted);
}

.chain-card__txs {
  color: var(--text-muted);
}

.chain-card__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.chain-card__addr,
.chain-card__key {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.45;
  word-break: break-all;
  color: var(--text);
}

.chain-card__addr--link {
  cursor: pointer;
  text-decoration: underline dotted rgba(34, 211, 238, 0.4);
  transition: color 0.15s;
}
.chain-card__addr--link:hover { color: var(--cyan); }

.chain-card__key { cursor: pointer; }
.chain-card__key:hover { color: var(--accent-light); }

.chain-card__key-label {
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chain-card__copy {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.chain-card__copy:hover {
  color: var(--accent-light);
  background: rgba(139, 92, 246, 0.2);
}

.balance-hits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.balance-hit {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.06);
}

.balance-hit__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.balance-hit__network {
  font-weight: 600;
  color: var(--green);
}

.balance-hit__amount {
  font-family: var(--mono);
  font-size: 0.9rem;
}

.balance-hit__addr code,
.balance-hit__key code {
  display: block;
  font-size: 0.75rem;
  word-break: break-all;
  margin-top: 4px;
}

.key-destinations {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.key-dest-row label {
  font-size: 0.82rem;
  color: var(--text-muted, #8888a0);
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #8888a0);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-chip:hover {
  border-color: rgba(139, 92, 246, 0.6);
  color: var(--text, #e8e8f0);
}

.filter-chip--active {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.65);
  color: #c4b5fd;
}

.admin-search--full { width: 100%; margin-bottom: 16px; }

.admin-table-wrap--compact { max-height: 50vh; overflow-y: auto; }

.admin-table--compact { font-size: 0.82rem; }

.intruders-list--compact { max-height: 55vh; overflow-y: auto; }

.settings-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.settings-section h3 {
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.user-logs-admin {
  max-height: 240px;
  overflow-y: auto;
  margin-top: 12px;
}

.user-log-item {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 6px;
  color: var(--text-muted);
}

.user-log-item time {
  color: var(--cyan);
  margin-right: 8px;
}

.nav__link--active { color: var(--accent-light); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-accent);
}

.btn--outline:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn--ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--block { width: 100%; }

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero__badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--border-accent);
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--mono);
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero__accent { color: var(--accent-light); }

.hero__subtitle {
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 8px;
}

.hero__desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 32px;
}

.hero__stats {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat { text-align: center; }

.stat__value {
  display: block;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section--dark {
  background: rgba(14, 14, 24, 0.5);
  max-width: 100%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--dark .section__title,
.section--dark .features {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.section__title--left { text-align: left; }

.section__desc {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Plans */
/* ══════════════════════════════════════════════════
   PLANS / PRICING
   ══════════════════════════════════════════════════ */

.plans {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 1100px) { .plans { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .plans { grid-template-columns: 1fr; } }

/* ── Base card ───────────────────────────────────── */
.plan {
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s, opacity 0.25s;
}

/* Entrance animation — added by IntersectionObserver when card enters viewport */
.plan--visible {
  animation: planCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes planCardIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.plan[data-plan="starter"]:hover {
  border-color: var(--green);
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.2), 0 12px 32px rgba(0, 0, 0, 0.35);
}

.plan[data-plan="basic"]:hover {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.2), 0 12px 32px rgba(0, 0, 0, 0.35);
}

.plan[data-plan="pro"]:hover {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 22px rgba(96, 165, 250, 0.2), 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* ── Featured (Pro+) ─────────────────────────────── */
.plan--featured {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.06) 0%, var(--bg-card) 60%);
}

.plan--featured:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow), 0 12px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(-6px);
}

/* ── Enterprise ──────────────────────────────────── */
.plan--enterprise {
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.04) 0%, var(--bg-card) 60%);
}

.plan--enterprise:hover {
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.12), 0 12px 32px rgba(0, 0, 0, 0.35);
  transform: translateY(-4px);
}

/* ── Header ──────────────────────────────────────── */
.plan__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  margin-top: 6px;
}

.plan__emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.plan__name {
  font-size: 1rem;
  font-weight: 700;
}

/* ── Price ───────────────────────────────────────── */
.plan__price { margin-bottom: 14px; }

.plan__amount {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--mono);
}

.plan--featured .plan__amount { color: var(--accent-light); }
.plan--enterprise .plan__amount { color: var(--gold); }

.plan__period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 2px;
}

/* ── Key count (main differentiator) ─────────────── */
.plan__keys-highlight {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.plan--featured .plan__keys-highlight {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.25);
}

.plan--enterprise .plan__keys-highlight {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.2);
}

.plan__keys-num {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--mono);
  line-height: 1;
  color: var(--text);
}

.plan--featured .plan__keys-num  { color: var(--accent-light); }
.plan--enterprise .plan__keys-num { color: var(--gold); }

.plan__keys-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Divider ─────────────────────────────────────── */
.plan__divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 14px;
}

/* ── Features ────────────────────────────────────── */
.plan__features {
  list-style: none;
  flex: 1;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.plan__features li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 5px 0 5px 20px;
  position: relative;
  line-height: 1.4;
}

.plan__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  top: 6px;
}

.plan--featured .plan__features li::before { color: var(--accent-light); }
.plan--enterprise .plan__features li::before { color: var(--gold); }

/* ── Action button ───────────────────────────────── */
.plan__btn {
  margin-top: auto;
  font-size: 0.88rem;
}

/* ── Active plan ─────────────────────────────────── */
.plan--active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 28px var(--accent-glow);
}

.plan__active-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.35);
}

/* ── Footer note ─────────────────────────────────── */
.plans__note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 18px;
  opacity: 0.7;
}

/* ── Upgrade modal ───────────────────────────────────────── */
.upgrade-plan-card {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  text-align: center;
}

.upgrade-plan-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.upgrade-plan-price {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.upgrade-plan-summary {
  margin-top: 10px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.upgrade-crypto-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

@media (max-width: 480px) { .upgrade-crypto-grid { grid-template-columns: repeat(3, 1fr); } }

.upgrade-crypto-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upgrade-crypto-btn span {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
}

.upgrade-crypto-btn:hover { border-color: var(--accent); background: rgba(139,92,246,0.08); }

.upgrade-crypto-btn--active {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-light);
}

.upgrade-detail-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.upgrade-amount {
  font-size: 1.1rem;
  font-family: var(--mono);
  color: var(--cyan);
}

.upgrade-adjustment {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.upgrade-address-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

.upgrade-address-code {
  flex: 1;
  font-size: 0.78rem;
  word-break: break-all;
  font-family: var(--mono);
  color: var(--text);
}

.upgrade-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 24px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s;
}

.feature:hover { border-color: var(--border-accent); }

.feature__icon { font-size: 2rem; margin-bottom: 12px; }

.feature__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 3, 8, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay[hidden] {
  display: none !important;
  pointer-events: none;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1001;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 48px var(--accent-glow);
  animation: modalIn 0.35s ease;
}

.modal--wide { max-width: 520px; }

.modal--welcome .welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  z-index: 10;
  transition: all 0.2s;
}

.modal__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-accent);
}

.modal__icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 12px;
}

.modal__title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal__desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.modal__note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

.modal__switch {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
}

.link-btn:hover { color: var(--accent); }

.passphrase-info {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.passphrase-info p { margin-bottom: 8px; }
.passphrase-info strong { color: var(--text); }

.passphrase-info ul {
  margin-top: 10px;
  padding-left: 18px;
}

.passphrase-info li { margin-bottom: 4px; }

/* Subscription status in plans */
.sub-status {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
  box-shadow: 0 0 24px var(--accent-glow);
}

.sub-status--clickable {
  cursor: pointer;
  font-family: var(--font);
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

.sub-status--clickable:hover {
  border-color: var(--accent-light);
  transform: translateY(-1px);
}

.sub-status__toggle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.sub-status .monitor-badge {
  flex-shrink: 0;
}

.sub-status__icon { font-size: 2rem; }

.sub-status__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-status__info strong { font-size: 1.05rem; }
.sub-status__info span { font-size: 0.9rem; color: var(--text-muted); }

.sub-status__keys {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent-light);
  white-space: nowrap;
}

.plan--active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 32px var(--accent-glow);
}

.plan__active-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.plans {
  transition: opacity 0.28s ease, transform 0.28s ease, max-height 0.32s ease, margin-top 0.28s ease;
  transform-origin: top center;
  opacity: 1;
  transform: translateY(0);
  max-height: 2200px;
}

.plans--collapsed {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
}

/* Forms */
.auth-form, .key-form { display: flex; flex-direction: column; gap: 14px; }

.form-row { display: flex; flex-direction: column; gap: 6px; }

.label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input {
  padding: 12px 14px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.input--mono { font-family: var(--mono); font-size: 0.85rem; }

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input--select,
select.input {
  appearance: none;
  background-color: rgba(0, 0, 0, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a78bfa' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.input--select option,
select.input option {
  background: #0e0e18;
  color: var(--text);
}

/* Cabinet */
.cabinet { padding-top: 40px; }

.cabinet__title { margin-bottom: 24px; }

.cabinet__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.cabinet__user { color: var(--text-muted); font-size: 0.9rem; }

.card__header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.monitor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
}

.monitor-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.monitor-badge--active {
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
}

.monitor-badge--active .monitor-badge__dot {
  background: var(--green);
  animation: pulse 2s infinite;
}

.monitor-badge--inactive {
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
}

.monitor-badge--inactive .monitor-badge__dot {
  background: var(--red);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.passphrase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 8px;
  font-size: 0.9rem;
}

.cabinet .card {
  margin-bottom: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card__header .card__title { margin-bottom: 0; }

.card__counter {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent-light);
}

.card__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.keys-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }

.key-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.key-item__info { flex: 1; min-width: 0; }

.key-item__title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.key-item__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-light);
}

.key-item__coin {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.key-item__wallet {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.key-item__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.key-item__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}

.key-item__remove:hover { color: var(--red); }

.log {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log--styled {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(0, 0, 0, 0.3);
}

.log--styled::-webkit-scrollbar {
  width: 8px;
}

.log--styled::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.log--styled::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), #6d28d9);
  border-radius: 4px;
}

.log--styled::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

.log__item {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(0,0,0,0.2);
  color: var(--text-muted);
}

.log__item--info { border-left: 3px solid var(--cyan); }
.log__item--success { border-left: 3px solid var(--green); color: var(--green); }
.log__item--warn { border-left: 3px solid var(--gold); }

.security-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.security-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.security-list code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cyan);
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.tag--on { background: rgba(52, 211, 153, 0.15); color: var(--green); }
.tag--soon { background: rgba(251, 191, 36, 0.15); color: var(--gold); }

.sub-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.passphrase-status {
  font-size: 0.8rem;
  margin-top: 8px;
  color: var(--green);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  margin-top: 40px;
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer__links a:hover { color: var(--text); }

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Admin */
.admin-body .admin-main { position: relative; z-index: 1; }

.admin-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-stat {
  flex: 1;
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.admin-stat__val {
  display: block;
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-light);
}

.admin-stat__lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-search {
  max-width: 240px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

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

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table code,
.mono-sm {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--cyan);
}

.btn--sm { padding: 6px 12px; font-size: 0.8rem; }

.tag--blocked {
  background: rgba(248, 113, 113, 0.15);
  color: var(--red);
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.admin-detail-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.bound-addresses {
  list-style: none;
  margin-top: 8px;
}

.bound-addresses li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  cursor: pointer;
}

.text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* Blocked screen */
.blocked-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.blocked-screen__card {
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

.blocked-screen__icon { font-size: 3rem; margin-bottom: 16px; }

.blocked-screen__card h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--red);
}

.blocked-screen__card p {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blocked-screen__card ul {
  list-style: none;
  margin-top: 16px;
}

.blocked-screen__card li { margin-bottom: 8px; }

.blocked-screen__card code {
  font-family: var(--mono);
  color: var(--cyan);
}

/* Intruders */
.intruders-list { display: flex; flex-direction: column; gap: 12px; }

.intruder-item {
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.intruder-item__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.intruder-last {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.intruder-actions {
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.intruder-actions li { padding: 4px 0; border-top: 1px solid var(--border); }

.intruder-time {
  font-family: var(--mono);
  color: var(--cyan);
  margin-right: 8px;
}

/* Docs */
.docs { max-width: 800px; }

.docs-block { margin-bottom: 20px; }

.docs-block h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.docs-block p { color: var(--text-muted); line-height: 1.6; }

.docs-list {
  padding-left: 20px;
  color: var(--text-muted);
}

.docs-list li { margin-bottom: 8px; }

/* Responsive */
@media (max-width: 900px) {
  .nav { display: none; }
  .sub-status { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .hero { padding-top: 48px; }
  .plans { grid-template-columns: 1fr; }
  .modal { padding: 28px 20px; }
}
