/* =====KEEP DONT DELETE=== */
/* Align labels + values into two neat columns */
#pmPositions,
#pmBets {
  --kv-label-w: 88px;
}

/* adjust if your longest label wraps */
#pmPositions .pill-text,
#pmBets .pill-text {
  white-space: normal;
  display: block
}

#pmPositions .kv,
#pmBets .kv {
  display: grid;
  grid-template-columns: var(--kv-label-w) 1fr;
  column-gap: 10px;
  align-items: baseline;
  margin: 2px 0;
}

#pmPositions .kv b,
#pmBets .kv b {
  justify-self: end;
  opacity: .85
}

#pmPositions .kv .v,
#pmBets .kv .v {
  font-variant-numeric: tabular-nums
}

/* ===== Positions Tab Section ===== */

/* Positions Section */
.positions-section {
  margin: 12px 0 24px 0;
  width: 100%;
}

.positions-section #positionsHeader {
  margin-top: 8px;
  margin-bottom: 12px;
}

/* Tab Buttons Container - Make it look more like tabs */
.tab-buttons {
  display: inline-flex;
  background: rgba(106, 153, 78, 0.15);
  border-radius: 10px;
  padding: 6px;
  border: 1px solid var(--stroke);
  gap: 0;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-button {
  padding: 10px 24px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-transform: uppercase;
}

.tab-button:hover {
  color: var(--text);
  background: rgba(106, 153, 78, 0.15);
}

.tab-button:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  margin-right: -1px;
}

.tab-button:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.tab-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.tab-button.active {
  background: linear-gradient(180deg,
      #056837 0%,
      #1c4732 50%,
      #0e3d2a 100%);
  color: #fffef7;
  box-shadow:
    0 0 19px rgba(252, 195, 91, .5),
    0 0 12px rgba(252, 195, 91, .3),
    0 0 0 1px rgba(252, 195, 91, .2),
    inset 0 2px 4px rgba(255, 255, 255, .15),
    inset 0 -3px 6px rgba(0, 0, 0, .4),
    inset 0 0 20px rgba(0, 0, 0, .1);
  z-index: 1;
  border: 1px solid rgba(252, 195, 91, .3);
}

.tab-button.active:hover {
  background: linear-gradient(180deg,
      #056837 0%,
      #1c4732 50%,
      #0e3d2a 100%);
  box-shadow:
    0 0 24px rgba(252, 195, 91, .6),
    0 0 16px rgba(252, 195, 91, .4),
    0 0 0 1px rgba(252, 195, 91, .3),
    inset 0 1px 0 rgba(255, 255, 255, .2);
  border: 1px solid rgba(252, 195, 91, .5);
}

/* Tab Content */
.tab-content {
  position: relative;
  width: 100%;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}



/* ===== Base + Theme ===== */
:root {
  --maxw: 1136.8px;
  /* Increased by 16% from 980px */
  --content-maxw: 980px;
  /* Original width for content */
  --gap: 12px;
  --radius: 12px;
  --control-h: 52px;

  /* New Color Palette */
  --hunter-green: #056837;
  --sage-green: #6a994eff;
  --yellow-green: #a7c957ff;
  --vanilla-cream: #f2e8cfff;
  --blushed-brick: #bc4749ff;
  --golden-earth: #9c6123ff;
  --sunflower-gold: #fcc35bff;
  --pine-teal: #1c4732ff;
  --emerald-depths: #0e5a3fff;
  --golden-orange: #ee9715ff;
  --card-bg: #2a6041;

  /* Color Usage */
  --bg-body: #9c6123;
  /* Main background */
  --bg-container: #1c4732;
  /* Container/card background */
  --bg-container-alt: var(--sage-green);
  /* Alternative container background */
  --text: #fffef7;
  /* Main text color - lighter cream white */
  --muted: rgba(242, 232, 207, 0.7);
  /* Muted text (vanilla-cream with opacity) */
  --ring: var(--yellow-green);
  /* Focus ring, accents */
  --stroke: rgba(242, 232, 207, 0.15);
  /* Borders */
  --accent: var(--yellow-green);
  /* Accent color for highlights */
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: var(--bg-body);
  /* Blushed brick background */
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  padding: 20px;
  min-height: 100vh;
}

/* ===== Layout ===== */
.page-wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Floating Card / Centered Container Layout */
.container {
  max-width: var(--maxw);
  width: 100%;
  margin: 8px auto 0;
  padding: 32px;
  background: var(--bg-container);
  /* Hunter green container */
  border-radius: 20px;
  border: 2px solid #f2e8cf;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(242, 232, 207, 0.1);
  /* Depth effect with shadow */
  position: relative;
  z-index: 1;
}

/* Constrain content width to original size, centered within wider container */
.pipeline-section {
  max-width: var(--content-maxw);
  margin: 0 auto;
}

/* Responsive container padding */
@media (max-width: 768px) {
  .container {
    padding: 24px 20px;
    border-radius: 16px;
    margin: 0 10px;
  }

  body {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 16px;
    border-radius: 12px;
  }
}

.brand-wrap {
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 24px;
}

.dora-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .2px
}

/* ===== Search Row (YOUR TEXTBOX + BUTTON) =====
   Always uniform size, no shift before/after clicking */
.pipeline-section .d-flex {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) auto;
  /* input grows, button auto */
  column-gap: var(--gap);
  align-items: center;
}

/* Textbox */
#addrInput {
  height: var(--control-h);
  width: 100%;
  min-width: 0;
  /* allows shrinking on smaller screens */
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid #f2e8cf !important;
  background: #2a6041;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border .25s, box-shadow .25s, transform .12s;
}

#addrInput::placeholder {
  color: var(--muted);
  font-weight: 500
}

#addrInput:hover {
  border-color: #fcc35b;
  background: #2a6041;
}

#addrInput:focus {
  border: 1px solid #f2e8cf !important;
  box-shadow: none;
  transform: none;
  background: #2a6041;
}

/* Button */
#addrBtn {
  all: unset;
  /* neutralize Bootstrap/old styles */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h);
  min-width: 130px;
  /* same as your other project */
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .3px;
  color: rgb(255, 255, 255);

}



/* ===== Section Titles & Results ===== */
.section-title {
  margin: 16px 0 6px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pill-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px
}

/* Pills (updated with new colors) */
.link-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(106, 153, 78, 0.2);
  /* Sage green with opacity */
  transition: border .18s, transform .12s, box-shadow .2s;
}

.link-pill:hover {
  border-color: var(--ring);
  border-width: 2px;
  transform: translateY(-1px);
  background: rgba(106, 153, 78, 0.3);
}

.pill-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis
}

.new-tab-icon {
  display: flex;
  align-items: center;
  opacity: .85
}

.pill-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: white;
  margin-right: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .pipeline-section .d-flex {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 560px) {
  .pipeline-section .d-flex {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  #addrBtn {
    min-width: 0;
    width: 100%;
  }

  /* full-width button on small screens */
}

/* Revert results to theme text color (from your variables) */
.pill-wrap a.link-pill,
.pill-wrap .pill-text,
#pmPositions .kv b,
#pmPositions .kv .v,
.pill-wrap .new-tab-icon {
  color: inherit !important;
}

/* Let the "No open positions" stay muted like before */
#pmNoPositions {
  color: var(--muted) !important;
}


/* If your section titles should stay grey, nothing else to do.
   If you also want the titles white, add: */
/* .section-title { color: #fff !important; } */

/* No underline on results pills */
.pill-wrap a.link-pill,
.pill-wrap a.link-pill:link,
.pill-wrap a.link-pill:visited,
.pill-wrap a.link-pill:hover,
.pill-wrap a.link-pill:focus,
.pill-wrap a.link-pill:active {
  text-decoration: none !important;
}

/* Optional: keep a clear focus style without underline */
.pill-wrap a.link-pill:focus-visible {
  text-decoration: none !important;
  outline: none;
  box-shadow: 0 0 0 2px var(--ring), 0 0 0 8px rgba(79, 135, 246, .12);
}



/* Dark-purple gradient button 

/* === Purple-unify + consistent borders (drop at END) === */

/* 1) Theme ring/glow: updated to new color scheme */
:root {
  --ring: var(--yellow-green);
  /* yellow-green focus ring */
  --ring-soft: rgba(167, 201, 87, .14);
  /* outer halo */
  --stroke: rgba(242, 232, 207, .15);
}

/* 2) TEXT BOX BORDER = RESULTS PILL BORDER (no color shift on hover) */
#addrInput {
  border: 1px solid #f2e8cf !important;
}

#addrInput:hover {
  border: 1px solid #fcc35b !important;
  /* stop hover from changing the border color */
}

#addrInput:focus {
  border: 1px solid #f2e8cf !important;
  box-shadow: none !important;
  /* no focus effect */
}

/* 3) Results pills: remove any blue focus glow, keep border as-is */
.pill-wrap a.link-pill:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px var(--ring), 0 0 0 8px var(--ring-soft) !important;
}



/* 5) (Optional) If you want pill borders to stay EXACTLY the same on hover, uncomment:
.link-pill:hover{
  border-color: var(--stroke) !important;
  border-width: 1px !important;
  transform: translateY(-1px);
}
*/

/* Text box + button: 1px border with new colors */
#addrInput {
  border: 1px solid #f2e8cf !important;
}

#addrInput:hover,
#addrInput:focus {
  border: 1px solid #fcc35b !important;
}

/* Button uses shadow with border */
#addrBtn {
  border: 1px solid rgba(252, 195, 91, .3) !important;
}

#addrBtn .fa {
  font-size: 18px;
  line-height: 1;
}

/* HL Account Balance: multiline lines inside the pill */
#pmBalance .pill-text {
  white-space: normal;
  display: block;
}

#pmBalance .kv {
  display: block;
  line-height: 1.25;
  margin: 2px 0;
}

#pmBalance .kv b {
  opacity: .85;
  margin-right: 6px;
}

/* HL Account pill: align values in a second column */
#pmBalance {
  --kv-label-w: 110px;
}

#pmBalance .pill-text {
  white-space: normal;
  display: block;
}

#pmBalance .kv {
  display: grid;
  grid-template-columns: var(--kv-label-w) 1fr;
  column-gap: 10px;
  align-items: baseline;
  margin: 2px 0;
}

#pmBalance .kv b {
  justify-self: end;
  opacity: .85;
}

#pmBalance .kv .v {
  font-variant-numeric: tabular-nums;
}

/* ===== Global KV layout for ALL pills ===== */
/* Default label column width (override per section if needed) */
.pill-wrap {
  --kv-label-w: 136px;
}

/* Only switch pills to multiline when they actually contain .kv rows or <br> */
.pill-wrap .link-pill .pill-text:has(.kv),
.pill-wrap .link-pill .pill-text:has(br) {
  display: block;
  white-space: normal;
  /* allow wrapping */
  overflow: visible;
  /* prevent first-letter clipping */
  text-overflow: clip;
  /* cancel global ellipsis */
}

/* Card/Pill background color override */
.link-pill {
  background: var(--card-bg) !important;
  border: 1px solid #9c6123 !important;
}

/* Label | Value alignment shared by all pills using .kv rows */
.pill-wrap .kv {
  display: grid;
  grid-template-columns: var(--kv-label-w) 1fr;
  column-gap: 10px;
  align-items: baseline;
  margin: 2px 0;
}

.pill-wrap .kv b {
  justify-self: end;
  opacity: .85;
  padding-right: 6px;
}

.pill-wrap .kv .v {
  font-variant-numeric: tabular-nums;
}

/* Optional: section-specific widths if a label is longer */
#pmPositions {
  --kv-label-w: 128px;
}

#pmBalance {
  --kv-label-w: 136px;
}

/* "Withdrawable" fits comfortably */

/* Button: gradient tuned to rgba(138, 92, 246, 0.23) */
/* Button gradient around #28033ad6 (deep plum) */



/* Bridge sections: one pill per row */
#polyToPmTransfers,
#pmToPolyTransfers {
  display: grid;
  grid-template-columns: 1fr;
  /* single column */
  gap: 10px;
}

/* Make each pill fill the row + allow line breaks */
#polyToPmTransfers .link-pill,
#pmToPolyTransfers .link-pill {
  width: 100%;
}

#polyToPmTransfers .pill-text,
#pmToPolyTransfers .pill-text {
  white-space: normal;
  /* enable second line */
}

/* Subtle styling for the date/time line */
.pill-dt {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

/* === Deposit/Withdraw: keep compact tile width even with 1 item === */
#polyToPmTransfers,
#pmToPolyTransfers {
  /* fixed-ish tile tracks instead of 1fr so a single pill won't stretch */
  --pill-min: 260px;
  --pill-max: 345px;
  /* tweak this to match your other tiles */
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(var(--pill-min), var(--pill-max))) !important;
  justify-content: start;
  /* leftover space stays on the right */
  gap: 10px !important;
}

/* Pills fill their track (so all equal) but never full-width of the container */
#polyToPmTransfers .link-pill,
#pmToPolyTransfers .link-pill {
  width: 100% !important;
  max-width: 100% !important;
}

/* Keep multiline (date/time on line 2) */
#polyToPmTransfers .pill-text,
#pmToPolyTransfers .pill-text {
  white-space: normal;
}

/* Date/time style stays compact */
.pill-dt {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

/* External Deposits (Other sources → Polygon) */
#extHeader2 {
  grid-area: extH2;
}

/* H2: External Deposits */
#extHeader {
  grid-area: extH4;
}

/* H4: subtitle */
#extToPolyTransfers {
  grid-area: extPills;
}

/* pills list */
/* Keep each column's content height-only, even if neighbor is taller */
#polyToPmTransfers,
#pmToPolyTransfers,
#extToPolyTransfers {
  align-self: start;
  /* don't stretch to full row height */
}

#polyToPmTransfers .link-pill,
#pmToPolyTransfers .link-pill,
#extToPolyTransfers .link-pill {
  height: auto !important;
  /* ensure the pill itself doesn't stretch */
  align-self: start;
  /* belt & suspenders */
}

#extToPolyTransfers .pill-icon-pm {
  display: none !important;
}


/* === Two-column placement (no HTML changes) === */
/* === Three-column placement (Deposits | Withdrawals | External) === */
.pipeline-section {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "search       search       search"
    "polyAccHeader pmAccHeader  ."
    "polyAccPills  pmAccPills   ."
    "extH2        depH2        wdrH2"
    "extH4        depH4        wdrH4"
    "extPills     depPills     wdrPills"
    /* Positions section at the bottom */
    "positionsSection  positionsSection  positionsSection";
  column-gap: 24px;
  row-gap: 12px;
}

/* Search row stays full width */
.search-card {
  grid-area: search;
  margin-bottom: 0 !important;
}

/* Override Bootstrap mb-3 class on search card */
.search-card.mb-3,
.d-flex.search-card.mb-3,
.d-flex.gap-2.mb-3.search-card {
  margin-bottom: 0 !important;
}

/* Also target the d-flex container directly */
.d-flex.search-card {
  margin-bottom: 0 !important;
}

/* Reduce bottom padding of container on landing page (when no results shown) */
.container.py-4 {
  padding-bottom: 0px !important;
}

/* When results are shown, restore normal padding via JavaScript or add class */
.container.py-4.has-results {
  padding-bottom: 32px !important;
}

/* Positions Section - full width at bottom */
#positionsSection {
  grid-area: positionsSection;
}

/* LEFT column: Hyperliquid Account + Deposits (Polygon → Polymarket) */
#pmAccountHeader {
  grid-area: pmAccHeader;
}

#pmBalance {
  grid-area: pmAccPills;
}

#bridgeHeader2 {
  grid-area: depH2;
}

/* "Perps Deposits" (H2) */
#bridgeHeader {
  grid-area: depH4;
}

/* "Polygon → Polymarket L1" (H4) */
#polyToPmTransfers {
  grid-area: depPills;
}

/* RIGHT column: Arbitrum Account + Withdrawals (Polymarket → Polygon) */
#polyUsdcBalanceHeader {
  grid-area: polyAccHeader;
}

#polyUsdcBalance {
  grid-area: polyAccPills;
}

#bridgeHeaderBack2 {
  grid-area: wdrH2;
}

/* "Perps Withdrawals" (H2) */
#bridgeHeaderBack {
  grid-area: wdrH4;
}

/* "Hyperliquid L1 → Arbitrum" (H4) */
#pmToPolyTransfers {
  grid-area: wdrPills;
}

/* Positions are now inside #positionsSection which has its own grid area */

#pmNoPositions {
  grid-column: 1 / -1;
}

/* full width when shown */

/* Responsive: stack on small screens */
@media (max-width: 900px) {
  .pipeline-section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "search"
      "pmAccHeader"
      "pmAccPills"
      "polyAccHeader"
      "polyAccPills"
      "extH2"
      "extH4"
      "extPills"
      "depH2"
      "depH4"
      "depPills"
      "wdrH2"
      "wdrH4"
      "wdrPills"
      "positionsSection";
  }

  /* Tab buttons responsive */
  .tab-buttons {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  .tab-button {
    flex: 0 1 auto;
    min-width: 140px;
    text-align: center;
    padding: 10px 20px;
  }
}

/* Make Polygon balance pill use the same label width as PM balance */
#polyUsdcBalance {
  --kv-label-w: 136px;
}

/* Override justify-content for Polygon Account to move content left */
#polyUsdcBalance .link-pill {
  justify-content: flex-start;
  padding-left: 16px;
  padding-right: 16px;
}

/* Force the pill content to be left-aligned */
#polyUsdcBalance .pill-text {
  text-align: left;
  width: 100%;
}

/* Position the icon to the right but keep content left */
#polyUsdcBalance .new-tab-icon {
  margin-left: auto;
  margin-right: 0;
}

/* Add a subtle bottom spacer so the Polygon pill matches PM visually */
#polyUsdcBalance .pill-text::after {
  content: "";
  display: block;
  height: 4px;
  margin-left: 10px;
  /* adjust 4–8px as needed */
}


/* Bigger, whiter labels for top-of-section H2s */
#bridgeHeader2,
#bridgeHeaderBack2,
#extHeader2,
#positionsHeader,
#pmPositionsHeader,
#pmAccountHeader,
#polyUsdcBalanceHeader,
#pmBetsHeader {
  font-size: 16px;
  /* larger than your 12px section-title */
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fffef7;
  /* lighter cream white - already updated */
  margin: 16px 0 2px;
  /* a bit tighter above the H4 */
}

/* Remove space between H2 and H4 headers */
#bridgeHeader2,
#bridgeHeaderBack2 {
  margin-bottom: 0 !important;
  /* H2 bottom = 0 */
}

#bridgeHeader2+#bridgeHeader,
#bridgeHeaderBack2+#bridgeHeaderBack {
  margin-top: 0 !important;
  /* H4 top = 0 when following its H2 */
}

/* Ultra-tight H2 → H4 stack */
#bridgeHeader2,
#bridgeHeaderBack2 {
  margin: 0 !important;
  /* no outside gap from H2 */
  line-height: 1.05;
  /* tighten the H2 line box */
}

#bridgeHeader2+#bridgeHeader,
#bridgeHeaderBack2+#bridgeHeaderBack {
  margin-top: -6px !important;
  /* pull H4 up into the H2 */
  line-height: 1.05;
  /* keep H4 compact too */
}

/* Add space ABOVE "Deposits" (H2) only */
#bridgeHeader2 {
  margin-top: 18px !important;
  /* adjust 12–24px to taste */
  margin-bottom: 0 !important;
  /* keep it tight to the H4 below */
}

/* Preserve the tight H2 → H4 stack */
#bridgeHeader2+#bridgeHeader {
  margin-top: -6px !important;
  /* same pull-up you liked */
  line-height: 1.05;
}

#bridgeHeaderBack2 {
  margin-top: 18px !important;
  margin-bottom: 0 !important;
}

#bridgeHeaderBack2+#bridgeHeaderBack {
  margin-top: -6px !important;
  line-height: 1.05;
}

/* Slightly smaller gap between any section title and its pills */
.section-title {
  margin-bottom: 0px;
  /* was 6px */
}

/* Ensure no extra top margin sneaks in on the pill container */
.section-title+.pill-wrap {
  margin-top: 0;
}

/* Keep your ultra-tight H2→H4 stack intact (from earlier) */
#bridgeHeader2,
#bridgeHeaderBack2 {
  margin-bottom: 0;
  /* H2 stays tight to H4 */
}

#bridgeHeader2+#bridgeHeader,
#bridgeHeaderBack2+#bridgeHeaderBack {
  /* keep whatever negative top you liked previously (e.g., -6px) */
  margin-top: -6px;
}


/* Background system for floating card layout */
html {
  background: var(--bg-body) !important;
  /* Blushed brick background */
}

/* Remove old background plate system - using simple body background */
.bg-plate {
  display: none;
  /* Hide the old background plate */
}

.page-wrap {
  position: relative;
}

/* ===== Button theme around --bg-0 / --bg-1 ===== */
:root {
  /* helper tones derived from your palette */
  --btn-deep: #3b174e;
  /* darker than --bg-0 */
  --btn-mid: #5f2783;
  /* close to --bg-0 */
  --btn-pop: #8d5ac4;
  /* brighter purple accent */
  --btn-glow: rgba(141, 90, 196, .55);
  --btn-glow-2: rgba(141, 90, 196, .18);
}



/* Button: updated gradient with new colors */
#addrBtn {
  color: #fffef7;
  border: 1px solid rgba(252, 195, 91, .3) !important;
  background: linear-gradient(180deg,
      #056837 0%,
      #1c4732 50%,
      #0e3d2a 100%);
  box-shadow:
    0 0 19px rgba(252, 195, 91, .5),
    0 0 12px rgba(252, 195, 91, .3),
    0 0 0 1px rgba(252, 195, 91, .2),
    inset 0 2px 4px rgba(255, 255, 255, .15),
    inset 0 -3px 6px rgba(0, 0, 0, .4),
    inset 0 0 20px rgba(0, 0, 0, .1);
  transition: all .2s ease;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

#addrBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, .12) 0%,
      rgba(255, 255, 255, .05) 50%,
      transparent 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}

#addrBtn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
  transition: left .5s ease;
}

#addrBtn:hover {
  filter: brightness(1.15) saturate(1.1);
  box-shadow:
    0 0 24px rgba(252, 195, 91, .6),
    0 0 16px rgba(252, 195, 91, .4),
    0 0 0 1px rgba(252, 195, 91, .3),
    inset 0 1px 0 rgba(255, 255, 255, .2);
  transform: translateY(-2px);
  border: 1px solid rgba(252, 195, 91, .5) !important;
}

#addrBtn:hover::after {
  left: 100%;
}

#addrBtn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(252, 195, 91, .4),
    0 0 24px rgba(252, 195, 91, .6),
    0 0 16px rgba(252, 195, 91, .4),
    0 0 0 1px rgba(252, 195, 91, .3);
  border: 1px solid rgba(252, 195, 91, .5) !important;
}

#addrBtn:active {
  transform: translateY(0px);
  box-shadow:
    0 0 12px rgba(252, 195, 91, .3),
    inset 0 2px 4px rgba(0, 0, 0, .3);
}

/* Bold all pill text only */
.pill-wrap .link-pill,
.pill-wrap .link-pill .pill-text,
.pill-wrap .link-pill .kv {
  font-weight: 700 !important;
}

/* Allow inline color styles to override for Result and PnL - don't force color on .v */
.pill-wrap .link-pill .kv .v {
  font-weight: 700 !important;
  /* Color is set via inline styles in JavaScript for Result and PnL */
}

/* Ensure <b>/<strong> in pills matches the same weight */
.pill-wrap .link-pill b,
.pill-wrap .link-pill strong {
  font-weight: 700 !important;
}

/* Keep Font Awesome icons crisp (don’t down-weight them) */
.pill-wrap .link-pill .fa {
  font-weight: 900 !important;
}

/* Outer header (for site links only) - positioned top-left, scrolls with page */
.page-wrap {
  position: relative;
  margin-top: 0;
  padding-top: 0;
}

.brand-wrap {
  position: absolute;
  top: -20px;
  left: -20px;
  z-index: 100;
  padding: 0 20px 0 0;
  margin: 0;
  border-bottom: none;
  width: auto;
  max-width: none;
}

/* Inner header (title inside container) */
.brand-wrap-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 0 12px;
  margin-bottom: 12px;
  border-bottom: none;
}

/* Animated gradient text using new color palette */
.dora-title {
  margin: -15px 0 0 0;
  line-height: 1.05;
  letter-spacing: .3px;
  font-weight: 900;
  font-size: clamp(20px, 5vw, 54px);

  /* Gradient using new colors */
  background:
    linear-gradient(135deg,
      var(--sunflower-gold) 0%,
      var(--golden-earth) 30%,
      #fcc35b 70%,
      #9c6123 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* animate the gradient position */
  background-size: 220% 220%;
  animation: dora-title-pan 7s ease-in-out infinite alternate;

  text-shadow: 0 2px 12px rgba(42, 96, 65, .3);
}

/* animated accent line under the title (same colors) */


/* keyframes for the title gradient */
@keyframes dora-title-pan {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

/* keyframes for the underline sweep */
@keyframes dora-underline-scan {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dora-title {
    animation: none;
    background-position: 50% 50%;
  }

  .dora-title::after {
    animation: none;
  }
}

/* Remove the full-width header line */
.brand-wrap {
  border-bottom: none !important;
  box-shadow: none !important;
  /* just in case */
}

/* If you also added the short accent under the title and want to keep it: do nothing.
   If you want to remove that too, uncomment below: */
/* .dora-title::after { display: none !important; } */

/* Right-side icon row inside transfer pills */
.pill-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  flex-shrink: 0;
}

.pill-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  opacity: .92;
  transition: opacity .15s ease, transform .15s ease;
}

.pill-icon:hover svg {
  opacity: 1;
  transform: translateY(-1px);
}

/* ===== Transfer pill icon sizing ===== */
:root {
  --pill-icon-size: 24px;
  /* tweak 24–28px to taste */
  --pill-icon-pad: 6px;
  /* click padding around the icon */
}

/* Make Deposits / Withdrawals / External all use the same icon size */
#polyToPmTransfers,
#pmToPolyTransfers,
#extToPolyTransfers {
  --pill-icon-size: 26px;
}




.pill-icon:hover {
  transform: translateY(-1px);
  opacity: 1;
}

/* Inline SVGs */
.pill-icon svg {
  width: var(--pill-icon-size);
  height: var(--pill-icon-size);
  display: block;
}

/* If you use <img> icons instead of inline SVGs */
.pill-icon img {
  width: var(--pill-icon-size);
  height: var(--pill-icon-size);
  display: block;
}

/* If you ever use a Font Awesome fallback (<i class="fa ...">) */
.pill-icon i.fa {
  font-size: var(--pill-icon-size);
  line-height: 1;
}

/* Keep the "fallback" PM icon slightly softer if it links to address (no tx) */
.pill-icon-pm.is-fallback {
  opacity: .8;
}

.title-link {
  text-decoration: none;
  color: inherit;
}

.title-link:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Ensure the same size system */
:root {
  --pill-icon-size: 22px;
}

/* Make new-tab icon box exactly the same footprint as pill-icon */
.link-pill .new-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pill-icon-size);
  height: var(--pill-icon-size);
  margin-left: 8px;
  cursor: pointer;
}

/* Scale the actual art to fill the box */
.link-pill .new-tab-icon svg,
.link-pill .new-tab-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

/* If you still use a Font Awesome fallback inside */
.link-pill .new-tab-icon i.fa,
.link-pill .new-tab-icon .custom-icon-size {
  font-size: var(--pill-icon-size) !important;
  line-height: 1;
}

/* (Optional) optical tweak: some SVGs have internal padding.
   Bump slightly to match your other logos visually. */
.link-pill .new-tab-icon svg {
  transform: scale(1.08);
  transform-origin: center;
}

:root {
  --pill-icon-size: 22px;
}

/* single source of truth */

/* Make *every* pill’s end icon the same size */
.link-pill .new-tab-icon,
.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pill-icon-size) !important;
  height: var(--pill-icon-size) !important;
  flex: 0 0 var(--pill-icon-size);
}

/* Scale the artwork inside (SVG/IMG/FA) to fill that box */
.link-pill .new-tab-icon svg,
.link-pill .new-tab-icon img,
.link-pill .new-tab-icon i.fa,
.pill-icon svg,
.pill-icon img,
.pill-icon i.fa {
  width: 95% !important;
  height: 95% !important;
  line-height: 1;
  font-size: var(--pill-icon-size) !important;
  /* for FA fallback */
}

/* Match Deposits/Withdrawals icon size (26px) */
#pmBalance,
#polyUsdcBalance,
#pmPositions {
  --pill-icon-size: 26px;
}

/* Small, top-left link list - positioned in top-left corner */
.site-links {
  position: relative;
  top: 0;
  left: 0;
  margin: 0;
  margin-left: 0;
  padding: 5px;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.site-links .sep {
  opacity: .7;
  color: var(--muted);
}

.site-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  /* subtle emphasis, still "small" */
}

.site-links a:hover,
.site-links a:focus-visible {
  color: var(--text);
  /* brighten on hover/focus */
  text-decoration: underline;
  /* remove this line if you prefer no underline */
  outline: none;
}

/* Optional: on very small screens, shrink or adjust positioning */
@media (max-width: 768px) {
  .brand-wrap {
    top: -10px;
    left: -10px;
    padding: 0 16px;
  }
}

@media (max-width: 420px) {
  .brand-wrap {
    padding: 0 16px;
  }

  .site-links {
    font-size: 11px;
    gap: 6px;
  }
}

/* Bigger, whiter labels for top-of-section H2s */
#bridgeHeader2,
#bridgeHeaderBack2,
#pmPositionsHeader,
#pmAccountHeader,
#polyUsdcBalanceHeader,
#extHeader2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
  margin: 16px 0 2px;
}

/* Remove space between H2 and H4 headers */
#bridgeHeader2,
#bridgeHeaderBack2,
#extHeader2 {
  /* ← add this */
  margin-bottom: 0 !important;
}

#bridgeHeader2+#bridgeHeader,
#bridgeHeaderBack2+#bridgeHeaderBack,
#extHeader2+#extHeader {
  /* ← add this */
  margin-top: 0 !important;
}

/* --- Mobile fixes: center search, make button smaller than input --- */
@media (max-width: 560px) {
  .pipeline-section .d-flex {
    grid-template-columns: 1fr;
    /* already stacking */
    row-gap: 10px;
    justify-items: center;
    /* center children horizontally */
  }

  #addrInput {
    width: min(520px, 92%);
    /* full-ish width but centered */
    margin: 0 auto;
  }

  /* override earlier "width: 100%" on mobile */
  #addrBtn {
    width: auto !important;
    /* not full width */
    min-width: 110px;
    /* smaller than input */
    margin: 0 auto;
    /* center the button */
  }
}

/* --- Header overlap fix on small screens --- */
@media (max-width: 720px) {
  .brand-wrap {
    display: flex;
    flex-direction: column;
    /* title on top, links below */
    align-items: center;
    gap: 6px;
    padding-top: 12px;
  }

  .site-links {
    position: static !important;
    /* no absolute overlap */
    order: 2;
    font-size: 12px;
    left: auto;
    top: auto;
  }

  .dora-title {
    text-align: center;
  }
}


/* Betting History: match open positions layout (multi-column grid) */
/* #pmBets uses same grid layout as pill-wrap (default) - no override needed */


/* Skeleton loading state for pills — shimmer bars + icon blocks */
.link-pill.skeleton {
  position: relative;
  overflow: hidden;
  opacity: 0.9;
  border-radius: 16px;
}

/* hide any real text inside the skeleton pill */
.link-pill.skeleton .pill-text {
  display: none;
}

/* layout for the placeholder content */
.link-pill.skeleton .sk-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0px 0px;
}

.link-pill.skeleton .sk-left {
  flex: 1;
  min-width: 0;
}

.link-pill.skeleton .sk-right {
  display: flex;
  gap: 8px;
}

/* the bars that mimic title + meta lines */
.link-pill.skeleton .sk-line {
  height: 12px;
  margin: 6px 0;
  border-radius: 6px;
  background: #f2e8cf;
}

.link-pill.skeleton .sk-title {
  height: 14px;
  width: 55%;
}

.link-pill.skeleton .sk-meta {
  width: 80%;
  opacity: 0.85;
}

/* icon placeholders on the right */
.link-pill.skeleton .sk-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f2e8cf;
}

/* shimmer sweep */
.link-pill.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, .25) 45%,
      rgba(255, 255, 255, 0) 90%);
  transform: translateX(-100%);
  animation: shimmer 1.1s infinite;
  mix-blend-mode: overlay;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* subtle fade when swapping skeleton → real content */
.link-pill {
  transition: opacity .18s ease, transform .18s ease;
}

/* Compact skeleton (used in Trade History) */
.link-pill.skeleton.compact .sk-wrap {
  padding: 6px 10px;
  /* tighter vertical padding */
  gap: 8px;
}

.link-pill.skeleton.compact .sk-title {
  height: 12px;
  /* shorter bar */
  width: 50%;
  margin: 0;
}

.link-pill.skeleton.compact .sk-meta {
  display: none;
  /* single-line look, like the pill */
}

.link-pill.skeleton.compact .sk-icon {
  width: 20px;
  /* smaller icons to match pill’s feel */
  height: 20px;
  border-radius: 6px;
}

.link-pill.skeleton.compact {
  border-radius: 14px;
  /* closer to your pill radius */
}