.trade-preview-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 214, 74, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 6%, rgba(157, 98, 32, 0.16), transparent 28rem),
    #0b0805;
  color: #fff5d6;
}

.trade-shell {
  padding: 28px 0 72px;
}

.trade-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 28px;
}

.trade-hero-copy,
.trade-card,
.trade-safety-card {
  border: 1px solid rgba(255, 214, 74, 0.22);
  background: linear-gradient(145deg, rgba(30, 18, 9, 0.92), rgba(10, 7, 4, 0.94));
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
  border-radius: 28px;
}

.trade-hero-copy { padding: clamp(24px, 4vw, 48px); }
.trade-hero-copy h2 { margin: 8px 0 14px; font-size: clamp(2rem, 5vw, 4.3rem); letter-spacing: -0.07em; line-height: 0.92; }
.trade-hero-copy p, .trade-safety-card li, .trade-details p, .trade-status { color: rgba(255, 245, 214, 0.74); }
.trade-safety-card { padding: 24px; }
.trade-safety-card strong { display: block; color: #ffd64a; margin-bottom: 12px; }
.trade-safety-card ul { margin: 0; padding-left: 18px; display: grid; gap: 10px; }

.trade-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(280px, 0.74fr); gap: 24px; align-items: start; }
.trade-card { padding: clamp(20px, 3vw, 30px); }
.trade-card-head, .trade-settings-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.trade-card h3 { margin: 4px 0 0; font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: -0.045em; }
.trade-live-pill { border: 1px solid rgba(255, 227, 148, 0.42); color: #fff8df; background: radial-gradient(circle at 24% 16%, rgba(255, 250, 216, 0.28), transparent 42%), linear-gradient(180deg, rgba(255, 205, 93, 0.22), rgba(255, 127, 22, 0.14)); border-radius: 999px; padding: 7px 10px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; box-shadow: inset 0 1px 0 rgba(255, 246, 218, 0.14), 0 10px 24px rgba(255, 132, 0, 0.12); }

.trade-label-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.trade-balance { color: rgba(255, 214, 74, 0.82); font-size: 0.78rem; font-weight: 850; }
.trade-field { display: grid; gap: 9px; margin: 14px 0; color: rgba(255, 245, 214, 0.76); font-weight: 700; }
.trade-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 154px; gap: 10px; background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 214, 74, 0.16); border-radius: 20px; padding: 12px; align-items: center; }
.trade-output-row { grid-template-columns: minmax(0, 1fr) 154px; }
.trade-input-row input, .trade-input-row select, .trade-settings-row select { width: 100%; border: 1px solid rgba(255, 255, 255, 0.08); color: #fff5d6; background: rgba(4, 3, 2, 0.78); border-radius: 14px; padding: 13px 12px; font: inherit; font-weight: 750; outline: none; }
.trade-input-row input { font-size: 1.25rem; }
.trade-input-row input[readonly] { color: rgba(255, 245, 214, 0.82); }
.trade-token-select-shell { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(4,3,2,.78); padding-left: 8px; }
.trade-token-select-shell select { border: 0; background: transparent; padding-left: 0; }
.trade-token-logo, .route-token-logo { width: 28px; height: 28px; border-radius: 999px; display: inline-grid; place-items: center; overflow: hidden; color: #160e03; background: linear-gradient(135deg, #ffd64a, #9f6425); box-shadow: 0 0 0 1px rgba(255,214,74,.28), 0 8px 18px rgba(0,0,0,.28); font-size: .55rem; font-weight: 950; letter-spacing: -.04em; }
.trade-token-logo img, .route-token-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trade-max-button { min-height: 44px; padding-inline: 16px; }
.trade-percent-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: -2px; }
.trade-percent-pill { min-height: 36px; border-radius: 999px; border: 1px solid rgba(255, 227, 148, 0.42); color: #fff8df; background: radial-gradient(circle at 24% 16%, rgba(255, 250, 216, 0.28), transparent 42%), linear-gradient(180deg, rgba(255, 205, 93, 0.22), rgba(255, 127, 22, 0.14)); font: inherit; font-size: .82rem; font-weight: 900; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 246, 218, 0.14), 0 10px 24px rgba(255, 132, 0, 0.12); }
.trade-percent-pill:hover { transform: translateY(-1px); border-color: rgba(255, 240, 178, 0.62); background: radial-gradient(circle at 24% 16%, rgba(255, 250, 216, 0.34), transparent 42%), linear-gradient(180deg, rgba(255, 205, 93, 0.3), rgba(255, 127, 22, 0.2)); }
.trade-percent-pill:disabled { opacity: .46; cursor: not-allowed; transform: none; }
.trade-swap-arrow { width: 46px; height: 46px; display: grid; place-items: center; margin: -2px auto; border-radius: 999px; border: 1px solid rgba(255, 214, 74, 0.28); color: #160e03; background: linear-gradient(135deg, #ffd64a, #9f6425); font-weight: 950; font-size: 1.2rem; cursor: pointer; box-shadow: 0 12px 28px rgba(0,0,0,.32); }
.trade-swap-arrow:hover { transform: translateY(-1px); filter: brightness(1.06); }
.trade-settings-row { margin-top: 18px; align-items: end; }
.trade-settings-row label { display: grid; gap: 8px; color: rgba(255, 245, 214, 0.7); font-size: 0.9rem; font-weight: 800; }
.trade-small-button { min-height: 46px; }
.trade-route-box, .trade-warning { margin: 16px 0; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(255, 214, 74, 0.16); background: rgba(255, 214, 74, 0.055); color: rgba(255, 245, 214, 0.78); line-height: 1.55; }
.trade-route-visual { min-height: 44px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 16px; padding: 10px 12px; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); }
.trade-route-empty { color: rgba(255,245,214,.48); font-size: .9rem; }
.route-arrow { color: #ffd64a; font-weight: 950; opacity: .9; }
.trade-route-visual.is-processing .route-token-logo { animation: routePulse 0.9s ease-in-out infinite alternate; }
@keyframes routePulse { from { transform: scale(.94); filter: brightness(.9); } to { transform: scale(1.12); filter: brightness(1.25); box-shadow: 0 0 22px rgba(255,214,74,.38); } }
.trade-warning { border-color: rgba(255, 169, 60, 0.24); background: rgba(255, 169, 60, 0.075); }
.trade-warning-soft { border-color: rgba(139, 201, 255, 0.18); background: rgba(139, 201, 255, 0.055); }
.trade-actions-stack { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
.trade-actions-stack button:disabled { opacity: 0.46; cursor: not-allowed; }
.trade-status { min-height: 1.5em; margin: 14px 0 0; font-weight: 700; }
.trade-status.ok { color: #7ff1a3; }
.trade-status.warn { color: #ffd64a; }
.trade-status.err { color: #ff8b8b; }
.trade-details dl { display: grid; gap: 14px; margin: 18px 0; }
.trade-details dl div { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.trade-details dt { color: rgba(255, 245, 214, 0.55); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.trade-details dd { margin: 0; color: rgba(255, 245, 214, 0.9); overflow-wrap: anywhere; }
.trade-details code { color: #ffd64a; font-size: 0.82rem; }

@media (max-width: 880px) {
  .trade-hero, .trade-grid { grid-template-columns: 1fr; }
  .trade-card-head, .trade-settings-row { align-items: stretch; flex-direction: column; }
  .trade-input-row, .trade-output-row { grid-template-columns: 1fr; }
  .trade-token-select-shell { grid-template-columns: 34px minmax(0, 1fr); }
  .trade-label-row { align-items: flex-start; flex-direction: column; }
}
