:root {
  --bg1: #f5f5f5;
  --bg2: #ffffff;
  --ink: #101014;
  --muted: #5c5f66;
  --brand: #e0464d;
  --stroke: #e0e0e0;
  --ring: #e8c6c9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  height: 56px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.brand h1 {
  margin: 0;
  font-weight: 700;
  letter-spacing: .2px;
}

.brand h1 span {
  font-weight: 800;
  color: var(--brand);
}

.pill {
  border: 1px solid var(--ring);
  background: #f8f8f8;
  color: #333;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.btn {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.btn.primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 10px 30px rgba(224, 70, 77, 0.25);
}

.btn.red-outline {
  background: white;
  border-color: var(--brand);
  color: var(--brand);
}

.btn.circle {
  border-radius: 999px;
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.connect {
  display: flex;
  gap: 10px;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  margin-top: 24px;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.06);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .row {
    grid-template-columns: 1fr;
  }
}

label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.swapbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.status {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  margin-top: 12px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
}

.muted {
  color: var(--muted);
}

.ok {
  color: #178a45;
}

.warn {
  color: #c77700;
}

.err {
  color: #b00020;
}

.balance {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.balance b {
  color: #111;
}

.feePreview {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.feePreview b {
  color: #111;
}

/* Right-panel chart */
.tv-card-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #333;
}

 .footer{
    margin-top:40px;
    padding:20px 14px;
    background:#fff7f8;
    border-top:1px solid #efeaec;
    text-align:center;
  }
  .f-inner{
    display:flex;
    justify-content:center;
    gap:20px;
    margin-bottom:10px;
  }
  .f-link img{
    width:28px; height:28px;
    border-radius:8px;
    transition:transform .2s;
  }
  .f-link img:hover{
    transform:scale(1.15);
  }
  .f-copy{
    font-size:12px;
    color:#5c5f66;
  }
  
  .btn-red {
    display:inline-block;
    padding:12px 22px;
    background:#e0464d; /* brand red */
    color:#fff;
    font-weight:700;
    font-size:14px;
    border-radius:999px; /* circle/pill */
    text-decoration:none;
    transition:all .2s ease;
    box-shadow:0 8px 20px rgba(224,70,77,0.25);
  }
  .btn-red:hover {
    background:#c73940;
    transform:scale(1.05);
  }
  .btn-red:active {
    background:#a42d34;
    transform:scale(0.97);
  }
  
   .footer{
    text-align:center;
    padding:20px;
    background:#fff;
    border-top:1px solid #eee;
    margin-top:40px;
  }
  .f-inner{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:16px;
    flex-wrap:wrap;
    margin-bottom:12px;
  }
  .f-link img{
    width:28px;height:28px;object-fit:contain;
  }
  .f-copy{font-size:13px;color:#666}

  /* ✅ Apply button */
  .apply-btn{
    display:inline-block;
    padding:10px 16px;
    background:var(--brand,#e0464d);
    color:#fff;
    font-weight:700;
    border-radius:12px;
    text-decoration:none;
    box-shadow:0 6px 20px rgba(224,70,77,.25);
    transition:.2s;
  }
  .apply-btn:hover{filter:brightness(.95)}