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

body {
  margin: 0;
  padding: 0;
  background: #0a0a16;
  font-family: "Signika Negative", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Form controls don't inherit font-family by default — make them match. */
button,
input,
select,
textarea {
  font-family: inherit;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  font-family: "Signika Negative", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #e0e0e0;
}

.app-header {
  text-align: center;
  margin-bottom: 2rem;
}

.app-header h1 {
  font-size: 2rem;
  margin: 0;
  background: linear-gradient(90deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: #888;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.app-main {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Connect Wallet */
.connect-options {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

.connect-options h2 {
  margin: 0 0 1.5rem;
  font-size: 1.25rem;
}

.connector-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-connect {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-connect:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: #667eea;
}

.btn-connect:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-disconnect {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  width: 100%;
}

.btn-disconnect:hover {
  opacity: 0.9;
}

.connector-icon {
  border-radius: 6px;
}

/* Account Info */
.account-info {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
}

.account-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.label {
  display: block;
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.address {
  font-family: "SF Mono", SFMono-Regular, Consolas, monospace;
  font-size: 1.1rem;
  color: #667eea;
}

.balance {
  font-size: 1.1rem;
  font-weight: 600;
}

.chain-selector {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.chain-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-chain {
  background: rgba(255, 255, 255, 0.06);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-chain:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-chain.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border-color: transparent;
}

/* Token Balances */
.token-balances {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
}

.token-balances h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.token-grid {
  display: flex;
  flex-direction: column;
}

.token-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.token-row:last-child {
  border-bottom: none;
}

.token-header {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.token-symbol {
  font-weight: 600;
  color: #c4b5fd;
}

.token-balance {
  font-family: "SF Mono", SFMono-Regular, Consolas, monospace;
}

.muted {
  color: #666;
}

.error {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

/* Footer */
.app-footer {
  margin-top: auto;
  padding-top: 3rem;
  color: #555;
  font-size: 0.85rem;
}

/* Admin Layout */
.admin-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #888;
  font-size: 1.1rem;
}

/* Login Page */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1a1a2e;
}

.admin-login-card {
  background: #16213e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
}

.admin-login-card h2 {
  margin: 0 0 1.5rem;
  color: #e0e0e0;
  font-size: 1.4rem;
  text-align: center;
}

.admin-note {
  color: #888;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: -0.75rem 0 1.5rem;
  text-align: center;
}

.admin-switch {
  margin: 1.25rem 0 0;
  text-align: center;
}

.admin-switch button,
.admin-switch a {
  background: none;
  border: none;
  color: #667eea;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.admin-switch button:hover,
.admin-switch a:hover {
  text-decoration: underline;
}

/* Dashboard */
.admin-dashboard {
  min-height: 100vh;
  background: #1a1a2e;
  color: #e0e0e0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #16213e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-header h1 {
  margin: 0;
  font-size: 1.3rem;
  color: #667eea;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-email {
  color: #888;
  font-size: 0.85rem;
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 0;
  background: #16213e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 2rem;
}

.admin-tab {
  background: none;
  border: none;
  color: #888;
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.admin-tab:hover {
  color: #ccc;
}

.admin-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

/* Control-panel layout (navbar + breadcrumb + home menu) */
.admin-app {
  min-height: 100vh;
  background: #1a1a2e;
  color: #e0e0e0;
}

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 2rem;
  height: 60px;
  background: #16213e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #667eea;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  text-decoration: none;
}
.admin-nav-logo {
  display: inline-flex;
}
.admin-nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ccc;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.admin-icon-btn:hover {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.admin-bread {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  font-size: 0.85rem;
  color: #888;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.admin-bread a {
  color: #667eea;
  text-decoration: none;
}
.admin-bread a:hover {
  text-decoration: underline;
}
.admin-bread-sep {
  color: #555;
}
.admin-bread-current {
  color: #ccc;
}

.admin-home-title {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
}
.admin-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.admin-menu-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem;
  background: #16213e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-decoration: none;
  color: #e0e0e0;
  transition: border-color 0.15s, transform 0.1s, background 0.15s;
}
.admin-menu-card:hover {
  border-color: #667eea;
  background: #1b294d;
  transform: translateY(-2px);
}
.admin-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
}
.admin-menu-name {
  font-weight: 600;
  letter-spacing: 0.04em;
}
.admin-menu-desc {
  font-size: 0.82rem;
  color: #888;
  line-height: 1.4;
}

/* Content */
.admin-content {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-panel h2 {
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-panel-head h2 {
  margin: 0;
}
.admin-panel-head .admin-btn {
  text-decoration: none;
  white-space: nowrap;
}

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

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

.admin-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  color: #888;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.admin-mono {
  font-family: "SF Mono", SFMono-Regular, Consolas, monospace;
  font-size: 0.85rem;
  color: #667eea;
}

.admin-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.admin-badge.active {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.admin-badge.suspended {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

/* Form */
.admin-form {
  max-width: 500px;
}

.admin-form-wide {
  max-width: 780px;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: #16213e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.admin-subhead {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: #ccc;
}

.admin-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.admin-row-actions {
  display: flex;
  gap: 0.4rem;
  white-space: nowrap;
}

.admin-badge.pending {
  background: rgba(245, 196, 81, 0.15);
  color: #f5c451;
}

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

.admin-field {
  margin-bottom: 1rem;
}

.admin-field label {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 0.95rem;
  font-family: inherit;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  outline: none;
  border-color: #667eea;
}

/* Password field with show/hide (peek) toggle */
.admin-password {
  position: relative;
}
.admin-password input {
  width: 100%;
  padding-right: 2.6rem;
}
.admin-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 6px;
  color: #888;
  cursor: pointer;
  transition: color 0.15s;
}
.admin-password-toggle:hover {
  color: #667eea;
}

.admin-field textarea {
  resize: vertical;
}

/* Buttons */
.admin-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.admin-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.admin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

.admin-btn-danger {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.admin-btn-danger:hover {
  background: rgba(231, 76, 60, 0.25);
}

/* Messages */
.admin-error {
  color: #e74c3c;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.admin-success {
  color: #2ecc71;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.admin-muted {
  color: #666;
}

/* Clickable rows */
.admin-table-clickable {
  cursor: pointer;
}

.admin-table-clickable:hover td {
  background: rgba(102, 126, 234, 0.06);
}

/* Balance detail */
.admin-balance-cell {
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.02);
}

.admin-balance-detail {
  padding: 1rem 1.5rem;
}

.admin-balance-total-bar {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.75rem;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 8px;
  color: #e0e0e0;
}

.admin-balance-total-bar strong {
  color: #667eea;
}

.admin-balance-chain {
  margin-bottom: 0.75rem;
}

.admin-balance-chain-header {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #aaa;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.3rem;
}

.admin-balance-row {
  display: flex;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.85rem;
  gap: 0.5rem;
}

.admin-balance-symbol {
  width: 70px;
  font-weight: 500;
  color: #ccc;
}

.admin-balance-row .admin-mono {
  flex: 1;
  text-align: right;
}

.admin-balance-usd {
  width: 100px;
  text-align: right;
  color: #2ecc71;
  font-size: 0.8rem;
}

/* Blockchain Explorer — standalone page styles (xpl- prefixed).
   Dark, glassy theme matching the "Verify & Track" reference design. */

:root {
  --xpl-bg: #0a0a16;
  --xpl-panel: rgba(255, 255, 255, 0.025);
  --xpl-panel-2: rgba(255, 255, 255, 0.04);
  --xpl-border: rgba(255, 255, 255, 0.08);
  --xpl-border-2: rgba(255, 255, 255, 0.12);
  --xpl-text: #e9e9f2;
  --xpl-muted: #9a9ab3;
  --xpl-faint: #8585a0;
  --xpl-blue: #5b8cff;
  --xpl-purple: #9d7bff;
  --xpl-green: #34d399;
  --xpl-yellow: #f5c451;
  --xpl-red: #f87171;
}

.xpl {
  position: relative;
  min-height: 100vh;
  font-family: "Signika Negative", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--xpl-bg);
  color: var(--xpl-text);
  padding: 0 1rem 4rem;
  overflow-x: hidden;
}

/* Ambient glow background */
.xpl-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(91, 140, 255, 0.18), transparent 70%),
    radial-gradient(40% 40% at 80% 10%, rgba(157, 123, 255, 0.14), transparent 70%),
    radial-gradient(40% 40% at 15% 20%, rgba(52, 211, 153, 0.08), transparent 70%);
}

.xpl > * {
  position: relative;
  z-index: 1;
}

/* Keyboard accessibility: a clear focus ring on every interactive element
   (default outlines are removed on inputs/selects further down). */
.xpl a:focus-visible,
.xpl button:focus-visible,
.xpl input:focus-visible,
.xpl select:focus-visible {
  outline: 2px solid var(--xpl-blue);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ------------------------------- Header -------------------------------- */
.xpl-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -1rem;
  padding: 0 1rem;
  background: rgba(10, 10, 22, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--xpl-border);
}
.xpl-topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.xpl-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--xpl-text);
  flex-shrink: 0;
}
.xpl-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #5b8cff, #8b5cf6);
}
.xpl-brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.xpl-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow-x: auto;
}
.xpl-nav-link {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--xpl-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.xpl-nav-link:hover {
  color: var(--xpl-text);
  background: var(--xpl-panel-2);
}
.xpl-nav-cta {
  flex-shrink: 0;
  text-decoration: none;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--xpl-border-2);
  white-space: nowrap;
  transition: background 0.15s;
}
.xpl-nav-cta:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ------------------------------- Hero ---------------------------------- */
.xpl-hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 4rem 0 1rem;
  text-align: center;
}

.xpl-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--xpl-panel-2);
  border: 1px solid var(--xpl-border);
  font-size: 0.8rem;
  color: var(--xpl-muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-green { background: var(--xpl-green); }
.dot-purple { background: var(--xpl-purple); }
.pulse { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: xpl-pulse 2s infinite; }
@keyframes xpl-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.xpl-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 1.5rem 0 1rem;
}

.xpl-gradient {
  background: linear-gradient(100deg, #5b8cff, #9d7bff 55%, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.xpl-lead {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  color: var(--xpl-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ----------------------------- Search bar ------------------------------ */
.xpl-search-wrap { max-width: 880px; margin: 0 auto; }

.xpl-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(20, 20, 35, 0.7);
  border: 1px solid var(--xpl-border-2);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
}

.xpl-search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.75rem;
  color: var(--xpl-faint);
  min-width: 0;
}
.xpl-search-input input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--xpl-text);
  font-size: 0.95rem;
  font-family: "SFMono-Regular", ui-monospace, Menlo, monospace;
  padding: 0.7rem 0;
}
.xpl-search-input input::placeholder { color: var(--xpl-faint); font-family: inherit; }

.xpl-search-select { position: relative; }
.xpl-search-select select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--xpl-panel-2);
  border: 1px solid var(--xpl-border);
  color: var(--xpl-text);
  border-radius: 12px;
  padding: 0.7rem 2.2rem 0.7rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
}
.xpl-search-select::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--xpl-muted);
  border-bottom: 2px solid var(--xpl-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.xpl-search-select option { background: #15152a; color: var(--xpl-text); }

.xpl-search-btn {
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(100deg, #5b8cff, #8b5cf6);
  transition: filter 0.15s, transform 0.15s;
  white-space: nowrap;
}
.xpl-search-btn:hover:not(:disabled) { filter: brightness(1.1); }
.xpl-search-btn:active:not(:disabled) { transform: translateY(1px); }
.xpl-search-btn:disabled { opacity: 0.6; cursor: progress; }

.xpl-samples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--xpl-muted);
}
.xpl-samples button {
  background: none;
  border: none;
  color: var(--xpl-blue);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.xpl-samples button:hover { color: #8fb0ff; }

/* ------------------------------- Main ---------------------------------- */
.xpl-main { max-width: 1080px; margin: 3rem auto 0; }

/* ----------------------------- Stat cards ------------------------------ */
.xpl-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.xpl-stat {
  background: var(--xpl-panel);
  border: 1px solid var(--xpl-border);
  border-radius: 16px;
  padding: 1.25rem;
}
.xpl-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.xpl-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--xpl-muted);
}
.xpl-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.xpl-stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.xpl-stat-value .unit { font-size: 0.95rem; font-weight: 500; color: var(--xpl-muted); }
.xpl-stat-sub { margin-top: 0.4rem; font-size: 0.8rem; color: var(--xpl-faint); }
.xpl-stat-sub .up { color: var(--xpl-green); }
.xpl-stat-sub .down { color: var(--xpl-red); }

/* ------------------------------- Panels -------------------------------- */
.xpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.xpl-panel {
  background: var(--xpl-panel);
  border: 1px solid var(--xpl-border);
  border-radius: 16px;
  overflow: hidden;
}
.xpl-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--xpl-border);
}
.xpl-panel-head h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.xpl-live { font-size: 0.75rem; color: var(--xpl-faint); }

.xpl-list { display: flex; flex-direction: column; }
.xpl-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-align: left;
  width: 100%;
}
.xpl-row:last-child { border-bottom: none; }
.xpl-row-btn {
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s;
}
.xpl-row-btn:hover { background: var(--xpl-panel-2); }

.xpl-row-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xpl-row-icon.block { background: rgba(157, 123, 255, 0.12); color: var(--xpl-purple); }
.xpl-row-icon.tx { background: rgba(52, 211, 153, 0.12); color: var(--xpl-green); }

.xpl-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.xpl-row-meta { text-align: right; display: flex; flex-direction: column; gap: 0.25rem; align-items: flex-end; }
.xpl-row-title { font-size: 0.92rem; font-weight: 600; }
.xpl-row-sub { font-size: 0.78rem; color: var(--xpl-muted); }
.mono { font-family: "SFMono-Regular", ui-monospace, Menlo, monospace; }

.xpl-row-main .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.xpl-empty { padding: 1.5rem 1.25rem; color: var(--xpl-muted); font-size: 0.9rem; }

/* Status pills */
.xpl-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.xpl-pill.ok { background: rgba(52, 211, 153, 0.14); color: var(--xpl-green); }
.xpl-pill.pending { background: rgba(245, 196, 81, 0.14); color: var(--xpl-yellow); }
.xpl-pill.fail { background: rgba(248, 113, 113, 0.14); color: var(--xpl-red); }
.xpl-pill.local { background: rgba(91, 140, 255, 0.16); color: var(--xpl-blue); }
.xpl-tx-src {
  margin-left: 0.5rem;
  padding: 0.05rem 0.4rem;
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--xpl-blue);
  background: rgba(91, 140, 255, 0.16);
  vertical-align: middle;
}

/* ------------------------------- Result -------------------------------- */
.xpl-result {
  background: var(--xpl-panel-2);
  border: 1px solid var(--xpl-border-2);
  border-radius: 16px;
  padding: 1.25rem 1.5rem 1.5rem;
  margin-bottom: 2.5rem;
}
.xpl-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.xpl-result-head h2 { margin: 0; font-size: 1.1rem; }
.xpl-close {
  background: var(--xpl-panel-2);
  border: 1px solid var(--xpl-border);
  color: var(--xpl-muted);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.xpl-close:hover { color: var(--xpl-text); background: rgba(255, 255, 255, 0.1); }
.xpl-close:active { transform: scale(0.94); }

.xpl-result-loading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--xpl-muted);
  padding: 1rem 0;
}
.xpl-result-loading code { color: var(--xpl-text); }
.xpl-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--xpl-blue);
  border-radius: 50%;
  animation: xpl-spin 0.8s linear infinite;
}
@keyframes xpl-spin { to { transform: rotate(360deg); } }

.xpl-result-error strong { color: var(--xpl-text); display: block; margin-bottom: 0.4rem; }
.xpl-result-error p { color: var(--xpl-muted); margin: 0; font-size: 0.9rem; line-height: 1.5; }
.xpl-result-error code { color: var(--xpl-yellow); word-break: break-all; }

.xpl-detail-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--xpl-panel);
  border: 1px solid var(--xpl-border);
  border-radius: 12px;
  margin-bottom: 0.5rem;
}
.xpl-detail-kind {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--xpl-muted);
}
.xpl-detail-amount { font-size: 1.5rem; font-weight: 700; margin-top: 0.2rem; }
.xpl-detail-badges { display: flex; gap: 0.5rem; align-items: center; }
.xpl-chain-badge {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.xpl-detail-row {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}
.xpl-detail-row:last-child { border-bottom: none; }
.xpl-detail-label { flex-shrink: 0; width: 140px; color: var(--xpl-muted); }
.xpl-detail-value { flex: 1; min-width: 0; word-break: break-all; display: flex; align-items: center; gap: 0.4rem; }
.xpl-copy {
  background: none;
  border: none;
  color: var(--xpl-faint);
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.xpl-copy:hover { color: var(--xpl-blue); }

/* Address → clickable transaction list */
.xpl-addr-txs {
  margin-top: 1rem;
  border-top: 1px solid var(--xpl-border);
  padding-top: 0.75rem;
}
.xpl-addr-txs-head {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--xpl-muted);
  margin-bottom: 0.4rem;
}
.xpl-addr-tx {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  color: var(--xpl-text);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.xpl-addr-tx:hover { background: var(--xpl-panel-2); }
.xpl-dir {
  flex-shrink: 0;
  width: 38px;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.18rem 0;
  border-radius: 6px;
}
.xpl-dir-in { color: var(--xpl-green); background: rgba(52, 211, 153, 0.14); }
.xpl-dir-out { color: var(--xpl-yellow); background: rgba(245, 196, 81, 0.14); }
.xpl-dir-none { color: var(--xpl-muted); background: var(--xpl-panel-2); }
.xpl-addr-tx-hash { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 0.85rem; }
.xpl-addr-tx-amt { flex-shrink: 0; font-size: 0.82rem; color: var(--xpl-muted); }
.xpl-addr-tx-time { flex-shrink: 0; width: 78px; text-align: right; font-size: 0.76rem; color: var(--xpl-faint); }

@media (max-width: 560px) {
  .xpl-addr-tx-amt { display: none; }
  .xpl-addr-tx-time { width: 60px; }
}

/* Skeletons */
.skeleton .xpl-row-icon { background: rgba(255, 255, 255, 0.05); }
.sk {
  display: block;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: xpl-shimmer 1.3s infinite;
}
.sk-wide { width: 60%; margin-bottom: 0.4rem; }
.sk-narrow { width: 35%; }
@keyframes xpl-shimmer { to { background-position: -200% 0; } }

/* ------------------------------- Footer -------------------------------- */
.xpl-footer {
  max-width: 1080px;
  margin: 4rem auto 0;
  border-top: 1px solid var(--xpl-border);
  padding-top: 2.5rem;
}
.xpl-footer-top {
  padding-bottom: 2.5rem;
}
.xpl-footer-brand .xpl-brand {
  margin-bottom: 1rem;
}
.xpl-footer-brand p {
  color: var(--xpl-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 420px;
  margin: 0;
}
.xpl-footer-col h4 {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--xpl-faint);
}
.xpl-footer-col a,
.xpl-footer-col button {
  display: block;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 0.7rem;
  text-align: left;
  color: var(--xpl-muted);
  font-size: 0.9rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}
.xpl-footer-col a:hover,
.xpl-footer-col button:hover {
  color: var(--xpl-blue);
}

.xpl-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--xpl-border);
}
.xpl-footer-bottom p {
  margin: 0;
  color: var(--xpl-faint);
  font-size: 0.82rem;
  max-width: 640px;
}
.xpl-footer-links {
  display: flex;
  gap: 1.25rem;
}
.xpl-footer-links a {
  color: var(--xpl-muted);
  font-size: 0.82rem;
  text-decoration: none;
}
.xpl-footer-links a:hover {
  color: var(--xpl-text);
}

/* ----------------------------- Responsive ------------------------------ */
@media (max-width: 860px) {
  .xpl-stats { grid-template-columns: repeat(2, 1fr); }
  .xpl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .xpl-search { flex-wrap: wrap; }
  .xpl-search-input { flex-basis: 100%; }
  .xpl-search-select { flex: 1; }
  .xpl-search-select select { width: 100%; }
  .xpl-stats { grid-template-columns: 1fr; }
  .xpl-detail-label { width: 100px; }
  .xpl-topbar-inner { height: 56px; }
  .xpl-brand-name { font-size: 1.05rem; }
  .xpl-nav-link { padding: 0.5rem 0.5rem; font-size: 0.85rem; }
}

/* --------------------- Demo / sample watermark ------------------------- */
/* Rendered only when the build flag NODE_SAMPLE=yes (see ExplorerApp.js).
   Big diagonal banner across the whole page; non-interactive so it never
   blocks clicks. */
.xpl-demo-watermark {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.xpl-demo-watermark span {
  transform: rotate(-30deg);
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: clamp(2.2rem, 11vw, 9rem);
  line-height: 1;
  text-transform: uppercase;
  color: rgba(248, 113, 113, 0.16);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}
@media (max-width: 560px) {
  .xpl-demo-watermark span { white-space: normal; text-align: center; }
}

