:root {
  --bg: #edf1f8;
  --ink: #23344f;
  --muted: #74839d;
  --line: #d8dfeb;
  --card: #ffffff;
  --accent: #268fe6;
  --accent-soft: #e9f4ff;
  --radius-xl: 14px;
  --radius-md: 10px;
  --shadow: 0 10px 24px rgba(34, 58, 96, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(760px 420px at 80% 0%, rgba(146, 203, 229, 0.18), transparent 72%),
    var(--bg);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  color: inherit;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

.small {
  font-size: 12px;
}

.subtle {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.break {
  word-break: break-all;
}

.page-shell {
  width: 100%;
  max-width: 1344px;
  margin: 0 auto;
  padding: 8px 10px 28px;
  display: grid;
  gap: 12px;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
}

.brand-copy h1 {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand-copy p {
  margin-top: 3px;
  font-size: 14px;
  color: #677996;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #cad8ec;
  background: #fff;
  color: #405372;
  font-size: 13px;
  font-weight: 600;
}

.chain-pill {
  gap: 7px;
}

.eth-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 252px;
}

.account-pill .mono {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disconnect-icon-btn {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #6a7f9f;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.disconnect-icon-btn:hover {
  background: #eaf1fb;
  color: #334c72;
}

.disconnect-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #ced9ea;
  background: linear-gradient(140deg, #eaf3ff, #dae8fc);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.btn {
  border: 1px solid #2785db;
  background: linear-gradient(145deg, #2f9ef1, #1574cf);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover {
  filter: brightness(1.04);
}

.btn.secondary {
  border-color: #c7d7eb;
  background: #fff;
  color: #3a5478;
}

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

.header-wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mm-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.content-grid {
  display: grid;
  gap: 12px;
}

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

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 1fr);
  gap: 12px;
}

.box-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 12px;
  display: grid;
  gap: 10px;
}

h2 {
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.stat-card .stat-value {
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1c4f94;
}

.links-card .link-buttons {
  display: grid;
  gap: 8px;
}

.link-btn {
  text-decoration: none;
  border: 1px solid #c8d8ee;
  border-radius: var(--radius-md);
  background: #f8fbff;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.link-btn:hover {
  border-color: #99bce8;
  background: #f1f7ff;
}

.link-btn span {
  font-size: 14px;
  font-weight: 800;
  color: #2d4f80;
}

.link-btn small {
  font-size: 11px;
  color: #6a7fa1;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

label {
  font-size: 12px;
  font-weight: 700;
  color: #5a6d8d;
  display: grid;
  gap: 6px;
}

input {
  width: 100%;
  border: 1px solid #c8d6ea;
  border-radius: 10px;
  background: #fff;
  color: #2b3f5f;
  font-size: 14px;
  padding: 10px 11px;
  outline: none;
}

input:focus {
  border-color: #7faee2;
  box-shadow: 0 0 0 3px rgba(43, 143, 230, 0.14);
}

.transfer-meta,
.kv-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f9fbff;
  padding: 9px;
}

.transfer-meta {
  display: grid;
  gap: 6px;
}

.transfer-meta div,
.kv-grid div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.transfer-meta span,
.kv-grid div:nth-child(odd) {
  font-size: 12px;
  color: #6f809b;
}

.transfer-meta strong,
.kv-grid div:nth-child(even) {
  font-size: 13px;
  font-weight: 700;
  color: #2e4465;
}

.kv-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 6px 10px;
}

.inline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.notice {
  min-height: 18px;
  font-size: 13px;
  color: #5e7294;
}

.notice.ok {
  color: #1f805b;
}

.notice.error {
  color: #b25151;
}

.activity-card .transfer-list {
  display: grid;
  gap: 8px;
}

.transfer-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 4px;
}

.transfer-item .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.transfer-item .title {
  font-size: 14px;
  font-weight: 700;
  color: #2f4568;
}

.transfer-item .meta {
  font-size: 12px;
  color: #6e7f9a;
}

.status-pill {
  border: 1px solid;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.status-pill.pending {
  color: #996718;
  border-color: #e2cd9e;
  background: #fbf4e6;
}

.status-pill.confirmed {
  color: #2f8f7f;
  border-color: #add7cb;
  background: #e8f7f2;
}

.status-pill.failed {
  color: #a04f4f;
  border-color: #e3c4c4;
  background: #f9eded;
}

.inline-link {
  color: #236eb8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.inline-link:hover {
  text-decoration: underline;
}

@media (max-width: 1120px) {
  .stats-grid,
  .main-grid {
    grid-template-columns: 1fr;
  }

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

  .header-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 8px 8px 22px;
  }

  .brand-copy h1 {
    font-size: 22px;
  }

  .inline-actions,
  .kv-grid {
    grid-template-columns: 1fr;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
