/* Ion Swap — Uniswap-inspired polish with Monero palette.
 * Design goals:
 *   - Large, rounded, glass-bordered cards that read as products, not forms.
 *   - Chunky swap inputs with asset pills; a clear arrow between sides.
 *   - Generous spacing, sharp type scale (Inter-like via system stack).
 *   - Monero orange as the single accent; everything else is neutral.
 *   - Subtle gradient halo behind the primary surface to add warmth.
 */

:root {
  --orange:        #ff6600;
  --orange-hover:  #ff7a1f;
  --orange-soft:   rgba(255, 102, 0, 0.10);
  --orange-border: rgba(255, 102, 0, 0.35);

  --bg-0:   #0a0a0a;                 /* page */
  --bg-1:   #111111;                 /* outer card */
  --bg-2:   #1a1a1a;                 /* inner card / input row */
  --bg-3:   #232323;                 /* raised pill / hover */
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  --fg:     #f5f5f5;
  --fg-2:   #c9c9c9;
  --muted:  #8a8a8a;
  --muted-2:#6a6a6a;

  --ok:     #46d888;
  --danger: #ff5c5c;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.35);
  --shadow-2: 0 1px 0 rgba(255,255,255,0.06) inset, 0 16px 48px rgba(0,0,0,0.55);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--fg);
  font-family: var(--font);
  font-feature-settings: "ss01", "cv01", "cv02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}

/* Ambient orange halo behind content, like Uniswap's radial tint. */
body::before {
  content: "";
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 60vh;
  background: radial-gradient(ellipse at 50% 0%,
              rgba(255, 102, 0, 0.10) 0%,
              rgba(255, 102, 0, 0.04) 30%,
              transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--orange); }

/* ----- Top nav ----- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10,10,10,0.65);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
}
.brand .logo {
  color: var(--orange);
  font-size: 22px;
  filter: drop-shadow(0 0 14px rgba(255,102,0,0.55));
}
.brand .brand-logo-svg {
  width: 28px; height: 28px;
  filter: drop-shadow(0 0 10px rgba(255,102,0,0.45));
}
.nav-primary {
  display: flex; gap: 4px;
  background: var(--bg-1);
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
}
.nav-primary a {
  color: var(--muted);
  font-size: 14px; font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  transition: background .15s ease, color .15s ease;
}
.nav-primary a:hover { color: var(--fg); background: var(--bg-2); }
.nav-primary a.active { color: var(--fg); background: var(--bg-3); }

.nav-secondary {
  display: flex; gap: 2px; justify-content: center;
  padding: 0 28px 10px;
}
.nav-secondary a {
  color: var(--muted-2);
  font-size: 12.5px; font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  transition: background .15s ease, color .15s ease;
}
.nav-secondary a:hover { color: var(--fg-2); background: var(--bg-2); }
.nav-secondary a.active { color: var(--orange); background: var(--orange-soft); }

.connect { display: flex; gap: 10px; align-items: center; }
.mobile-only { display: none; }

/* ----- Buttons ----- */
.btn {
  appearance: none; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 14px;
  color: var(--fg-2);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s;
}
.btn:hover { background: var(--bg-3); color: var(--fg); border-color: rgba(255,255,255,0.2); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  color: #0a0a0a;
  background: linear-gradient(180deg, var(--orange-hover), var(--orange));
  border: none;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 20px rgba(255, 102, 0, 0.35), 0 1px 0 rgba(255,255,255,0.2) inset;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled {
  background: var(--bg-2);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}
.btn.ghost { background: transparent; }
.btn.full { width: 100%; padding: 16px 20px; font-size: 16px; border-radius: var(--r-md); }

.pill {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--muted);
}
.pill.good   { color: var(--ok);     border-color: rgba(70,216,136,0.25); background: rgba(70,216,136,0.06); }
.pill.warn   { color: var(--danger); border-color: rgba(255,92,92,0.25);  background: rgba(255,92,92,0.06); }

/* ----- Layout ----- */
main {
  position: relative; z-index: 1;
  max-width: 1120px;
  margin: 28px auto 80px;
  padding: 0 24px;
  min-height: calc(100vh - 260px);
}

/* ----- Card ----- */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-1);
}
.card h2 {
  margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
}
.card h3 {
  margin: 0 0 10px; font-size: 14px; font-weight: 500; color: var(--muted);
}
.card .subhead { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

/* ----- Swap card — the hero ----- */
.swap-card {
  max-width: 480px;
  margin: 8px auto 0;
  padding: 18px;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  position: relative;
}
.swap-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 14px;
}
.swap-head h2 { font-size: 20px; margin: 0; }
.swap-head .subtitle { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Input box — the chunky dual-row inputs */
.swap-input {
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  padding: 16px 18px;
  transition: border-color .15s ease, background .15s ease;
}
.swap-input:focus-within { border-color: var(--border-strong); background: #1e1e1e; }
.swap-input .row-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.swap-input .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.swap-input .balance { color: var(--muted); font-size: 12.5px; }
.swap-input .row-main {
  display: flex; align-items: center; gap: 12px;
}
.swap-input .amt {
  flex: 1 1 auto;
  background: transparent; border: none; outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 28px; font-weight: 500; letter-spacing: -0.02em;
  padding: 0;
  min-width: 0;
}
.swap-input .amt::placeholder { color: var(--muted-2); }
.swap-input .amt:read-only { color: var(--fg); }

/* Asset pill (replaces raw <select> for a cleaner look) */
.asset-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 8px 12px 8px 10px;
  font-weight: 600; font-size: 14px;
  color: var(--fg);
  cursor: pointer;
  position: relative;
  transition: background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.asset-pill:hover { background: #2c2c2c; border-color: rgba(255,255,255,0.2); }
.asset-pill .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px rgba(255,102,0,0.55);
  flex: 0 0 auto;
}
.asset-pill .token-logo,
.token-logo {
  width: 20px; height: 20px; border-radius: 50%;
  flex: 0 0 auto;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.08);
  display: block;
}
.asset-pill select {
  /* Keep the native select for a11y, but visually hidden over the pill. */
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  appearance: none;
  font-family: inherit;
}
.asset-pill .caret { opacity: 0.6; font-size: 10px; }

/* The arrow button between input rows */
.swap-arrow-wrap {
  display: flex; justify-content: center;
  margin: -10px 0;
  position: relative; z-index: 2;
}
.swap-arrow {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--bg-1);
  border: 4px solid var(--bg-0); /* creates the "notch" look */
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, background .15s ease, transform .2s ease;
  box-shadow: var(--shadow-1);
}
.swap-arrow:hover { color: var(--orange); background: var(--bg-2); transform: rotate(180deg); }
.swap-arrow svg { width: 16px; height: 16px; }

/* Slippage / route subrow */
.sub-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 14px;
}
.sub-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.sub-card .label {
  color: var(--muted); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.sub-card .val { font-size: 14px; font-weight: 500; color: var(--fg); }
.sub-card select {
  background: transparent; border: none; color: var(--fg);
  font-size: 14px; font-weight: 500;
  padding: 0; outline: none; cursor: pointer;
  appearance: none; width: 100%;
  font-family: inherit;
}

.fee-breakdown {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--orange-soft);
  border: 1px solid var(--orange-border);
  border-radius: var(--r-md);
  color: var(--fg-2);
  font-size: 12.5px; line-height: 1.5;
}

/* Notice callout */
.notice {
  padding: 10px 14px;
  background: var(--orange-soft);
  border: 1px solid var(--orange-border);
  border-radius: var(--r-md);
  font-size: 12.5px; line-height: 1.5;
  color: var(--fg-2);
  margin: 0 0 16px;
}
.notice strong { color: var(--orange); font-weight: 600; }

/* Status line */
.status { margin-top: 14px; min-height: 1em; font-size: 13.5px; }
.status .ok { color: var(--ok); }
.status .danger { color: var(--danger); }

/* Batch status card */
.batch-status {
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--muted);
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
}
.batch-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255,102,0,0.55);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}
.batch-countdown { color: var(--orange); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ----- Generic tables + grids (for other pages) ----- */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row .grow { flex: 1 1 auto; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input, select {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--fg);
  padding: 12px 14px; border-radius: var(--r-md); font-size: 14.5px; width: 100%;
  font-family: inherit;
  transition: border-color .15s ease;
}
.input:focus, select:focus { outline: none; border-color: var(--orange); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
th { color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }
td { color: var(--fg-2); }
tr:last-child td { border-bottom: none; }
tr:hover td { color: var(--fg); }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ----- Balance row under swap inputs ----- */
.swap-input .row-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px;
  font-size: 12px;
}
.balance-line {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chip {
  appearance: none; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 11px;
  color: var(--orange);
  background: var(--orange-soft);
  border: 1px solid var(--orange-border);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background .15s ease, color .15s ease;
}
.chip:hover:not(:disabled) { background: rgba(255,102,0,0.18); color: var(--orange-hover); }
.chip:disabled { opacity: 0.4; cursor: default; }

/* ----- Wallet balance strip (Uniswap-style) ----- */
.wallet-bal {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 10px 14px;
  background: rgba(255, 102, 0, 0.04);
  border: 1px solid rgba(255, 102, 0, 0.10);
  border-radius: var(--r-sm);
  font-size: 12.5px; font-variant-numeric: tabular-nums;
  transition: border-color .2s ease, background .2s ease;
}
.wallet-bal:hover { border-color: rgba(255, 102, 0, 0.22); }
.wallet-bal .wb-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--orange); opacity: 0.7;
}
.wallet-bal .wb-label { color: var(--muted); white-space: nowrap; }
.wallet-bal .wb-amt { color: var(--fg-2); font-weight: 600; letter-spacing: -0.01em; }
.wallet-bal .wb-asset { color: var(--muted); }
.wallet-bal .wb-max { margin-left: auto; }
.wallet-bal.wb-off {
  background: var(--bg-2); border-color: var(--border);
}
.wallet-bal.wb-off .wb-icon { color: var(--muted-2); }
.wallet-bal.wb-off .wb-label { color: var(--muted-2); }

/* ----- Fee breakdown rows ----- */
.fee-breakdown { padding: 10px 14px; }
.fee-breakdown .fee-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--fg-2);
}
.fee-breakdown .fee-row + .fee-row { border-top: 1px dashed rgba(255,255,255,0.05); }
.fee-breakdown .fee-label { color: var(--muted); }
.fee-breakdown .fee-value { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.fee-breakdown .fee-note {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  color: var(--muted); font-size: 11.5px; line-height: 1.5;
}
.fee-breakdown .fee-note.warn { color: #ffb066; }

.notice.warn { border-color: rgba(255,176,0,0.35); background: rgba(255,176,0,0.06); }
.notice.warn strong { color: #ffb066; }

/* ----- Active nav styling ----- */
.nav-primary a.active {
  color: var(--fg);
  background: linear-gradient(180deg, rgba(255,102,0,0.18), rgba(255,102,0,0.10));
  border: 1px solid rgba(255,102,0,0.30);
  padding: 7px 15px;
}

/* ----- Connect consent sheet ----- */
.consent-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: overlay-fade .18s ease-out;
}
@keyframes overlay-fade { from { opacity: 0; } to { opacity: 1; } }
.consent-sheet {
  width: 100%; max-width: 440px;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: 24px 24px 20px;
  animation: sheet-in .22s ease-out;
}
@keyframes sheet-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.consent-head {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.consent-ion, .consent-wallet {
  width: 44px; height: 44px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
}
.consent-arrow {
  color: var(--orange);
  font-size: 18px;
  text-shadow: 0 0 8px rgba(255,102,0,0.5);
}
.consent-sheet h3 {
  margin: 0 0 6px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  text-align: center;
}
.consent-origin {
  color: var(--muted); font-size: 12px;
  text-align: center;
  margin-bottom: 18px;
  font-family: ui-monospace, SF Mono, Menlo, monospace;
}
.consent-perms {
  list-style: none; margin: 0 0 20px; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.consent-perms li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; line-height: 1.45;
}
.consent-perms li .muted { color: var(--muted); font-size: 12px; margin-top: 2px; }
.consent-perms strong { color: var(--fg); font-weight: 600; }
.perm-ico {
  flex: 0 0 auto;
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  margin-top: 1px;
}
.perm-ico.ok  { background: rgba(70,216,136,0.14); color: var(--ok); border: 1px solid rgba(70,216,136,0.3); }
.perm-ico.warn{ background: rgba(138,138,138,0.14); color: var(--muted); border: 1px solid rgba(138,138,138,0.3); }

.consent-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.consent-actions .btn { padding: 12px 16px; font-size: 14px; }
.consent-actions .btn.primary { padding: 12px 16px; }

/* ----- Footer ----- */
.foot {
  padding: 28px 24px;
  color: var(--muted); font-size: 12.5px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1120px; margin: 40px auto 0;
  border-top: 1px solid var(--border);
}
.foot-left { display: flex; align-items: center; gap: 12px; max-width: 680px; }
.foot-logo {
  width: 36px; height: 36px; flex: 0 0 auto;
  filter: drop-shadow(0 0 8px rgba(255,102,0,0.25));
}
.foot-right { white-space: nowrap; }

/* ----- Page card — centered panels for non-trade pages ----- */
.page-card {
  max-width: 520px;
  margin: 8px auto 0;
  padding: 22px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
}
.page-card.wide { max-width: 720px; }
.page-card .page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 2px 18px;
}
.page-card .page-head h2 {
  font-size: 20px; font-weight: 600; margin: 0;
  letter-spacing: -0.01em;
}
.page-card .page-head .subtitle {
  color: var(--muted); font-size: 12.5px; margin-top: 2px;
}

/* ----- Tab bar (pill-style, like Uniswap sub-tabs) ----- */
.tab-bar {
  display: flex; gap: 4px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: var(--r-pill);
  margin-bottom: 18px;
}
.tab-bar button {
  flex: 1;
  appearance: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  transition: background .15s ease, color .15s ease;
}
.tab-bar button:hover { color: var(--fg-2); }
.tab-bar button.active {
  color: var(--fg);
  background: var(--bg-3);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.btn.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn.btn-sm:hover { color: var(--fg-2); }
.btn.btn-sm.active {
  background: var(--orange-soft);
  color: var(--orange);
  border-color: var(--orange);
}

/* ----- Stat grid — chunky metric cards ----- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.stat-box .stat-label {
  color: var(--muted); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.stat-box .stat-value {
  font-size: 22px; font-weight: 600; color: var(--fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-box .stat-sub {
  color: var(--muted); font-size: 11.5px; margin-top: 2px;
}

/* ----- Form field — swap-input style for page forms ----- */
.field {
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color .15s ease;
}
.field:focus-within { border-color: var(--border-strong); }
.field .field-label {
  color: var(--muted); font-size: 12px; font-weight: 500;
  margin-bottom: 8px;
}
.field .field-input {
  width: 100%;
  background: transparent; border: none; outline: none;
  color: var(--fg);
  font-family: inherit; font-size: 16px; font-weight: 500;
  padding: 0;
}
.field .field-input::placeholder { color: var(--muted-2); }
.field select.field-input {
  appearance: none; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a8a8a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 0 center;
  padding-right: 18px;
}
.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

/* ----- Empty state — centered placeholder ----- */
.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
  filter: grayscale(0.6);
}
.empty-state strong { color: var(--fg-2); }

/* ----- Copy block — monospace address/URL block ----- */
.copy-block {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.copy-block code {
  flex: 1; overflow: hidden; text-overflow: ellipsis;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px; color: var(--fg-2);
  white-space: nowrap;
}
.copy-block .btn { flex: 0 0 auto; padding: 6px 12px; font-size: 12px; }

/* ----- Info list — permission/feature list ----- */
.info-list {
  list-style: none; margin: 0 0 16px; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.info-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; line-height: 1.45;
  padding: 10px 14px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.info-list li .ico {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  background: var(--orange-soft);
  border: 1px solid var(--orange-border);
  color: var(--orange);
}

/* ----- Portfolio table ----- */
.port-total {
  text-align: center;
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em;
  padding: 8px 0 18px;
  font-variant-numeric: tabular-nums;
}
.port-total .total-label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; font-weight: 400; }
.port-table { width: 100%; border-collapse: collapse; }
.port-table th { text-align: left; padding: 10px 8px; color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.port-table td { padding: 12px 8px; font-size: 14px; border-bottom: 1px solid var(--border); color: var(--fg-2); }
.port-table tr:last-child td { border-bottom: none; }
.port-table tr:hover td { color: var(--fg); background: rgba(255,255,255,0.015); }
.port-table .asset-cell { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* ----- NFT grid ----- */
.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.nft-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  transition: border-color .15s ease, transform .1s ease;
}
.nft-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

/* ----- Wizard steps (token create) ----- */
.wizard-steps {
  display: flex; gap: 4px; margin-bottom: 18px;
}
.wizard-step {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--bg-3);
}
.wizard-step.done { background: var(--orange); }
.wizard-step.active { background: var(--orange); opacity: 0.6; }
.wizard-subtitle { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }

/* ----- NFT upload area ----- */
.nft-upload-area {
  cursor: pointer;
  margin-bottom: 10px;
}
.nft-preview {
  background: var(--bg-2);
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  transition: border-color .15s ease, background .15s ease;
}
.nft-upload-area:hover .nft-preview { border-color: var(--orange-border); background: var(--orange-soft); }
.nft-preview img { display: block; margin: 0 auto; }

/* ----- Divider ----- */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ----- Utility colors ----- */
.muted  { color: var(--muted); }
.ok     { color: var(--ok); }
.danger { color: var(--danger); }
.orange { color: var(--orange); }
.num    { font-variant-numeric: tabular-nums; }

/* ----- Pool row hover + lock icon ----- */
.pool-row:hover td { background: rgba(255,255,255,0.02); }
.lock-icon {
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 4px; vertical-align: middle;
}

/* ----- Activity feed table (pair detail) ----- */
.card table tr:hover td { background: rgba(255,255,255,0.02); }

/* ----- Collection card hover ----- */
.coll-card:hover { border-color: var(--orange-border); }

/* ----- Responsive ----- */
@media (max-width: 680px) {
  .nav-top { padding: 10px 16px 6px; }
  .nav-primary { display: none; }
  .nav-secondary {
    padding: 0 12px 8px;
    overflow-x: auto; justify-content: flex-start;
    gap: 0; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-secondary::-webkit-scrollbar { display: none; }
  .nav-secondary a { white-space: nowrap; font-size: 12.5px; padding: 6px 10px; }
  .nav-secondary .mobile-only { display: inline; }
  main { padding: 0 12px; margin-top: 16px; }
  .swap-card { padding: 14px; }
  .swap-input .amt { font-size: 24px; }
  .sub-row { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
  .consent-sheet { padding: 18px 18px 16px; }
  .consent-actions { grid-template-columns: 1fr; }
  .page-card { padding: 14px; margin-top: 4px; }
  .page-card .page-head { padding: 2px 2px 12px; }
  .page-card .page-head h2 { font-size: 18px; }
  .field { padding: 10px 14px; margin-bottom: 6px; }
  .field .field-input { font-size: 15px; }
  .field .field-label { margin-bottom: 5px; font-size: 11.5px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row.field-row-2col { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
  .stat-box { padding: 10px 12px; }
  .stat-box .stat-value { font-size: 18px; }
  .nft-grid { grid-template-columns: 1fr 1fr; }
  .wizard-steps { margin-bottom: 10px; }
  .wizard-subtitle { margin-bottom: 10px; font-size: 12px; }
  .notice { padding: 8px 12px; font-size: 12px; margin-bottom: 12px; }
  .sub-card { padding: 10px 12px; }
  .sub-card .label { font-size: 11px; margin-bottom: 4px; }
  .sub-card .val { font-size: 13px; }
  .fee-breakdown { padding: 8px 12px; }
  .fee-breakdown .fee-row { font-size: 12px; }
  .info-list li { padding: 8px 12px; font-size: 13px; }
  .info-list li .ico { width: 24px; height: 24px; font-size: 12px; }
  .copy-block { padding: 10px 12px; }
  .copy-block code { font-size: 11.5px; }
  .empty-state { padding: 24px 16px; }
  .port-total { font-size: 24px; padding: 4px 0 14px; }
  .btn.full { padding: 14px 16px; font-size: 15px; }
  .btn.primary { padding: 12px 16px; font-size: 14px; }
  .trade-tabs { gap: 4px; }
  .trade-tab { padding: 8px 14px; font-size: 13px; }
}

/* ── Trade tabs (Swap / Wrap / Unwrap) ── */
.trade-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  justify-content: center;
}
.trade-tab {
  background: var(--bg-2);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.trade-tab:hover {
  background: var(--bg-3);
  color: var(--fg-2);
}
.trade-tab.active {
  background: var(--orange-soft);
  color: var(--orange);
  border-color: var(--orange-border);
}

/* Asset selector for wrap/unwrap panels */
.asset-select {
  width: 100%;
  background: var(--bg-3);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  appearance: auto;
}
.asset-select:focus {
  outline: none;
  border-color: var(--orange-border);
}
