/* =========================================================
   LOG DASHBOARD — GLASS / NEON
   VISUALS ONLY (AUTHORITATIVE)
   ---------------------------------------------------------
   OWNS:
   • Desktop panel glass
   • Desktop table glass (visuals only)
   • Mobile trade card glass + hierarchy
   • Mobile CTA brand colors
   • Mobile exchange confirm modal visuals
   ---------------------------------------------------------
   DOES NOT OWN:
   • Scroll ownership
   • Table existence
   • Header offsets
   ========================================================= */
/* =========================================================
   LAYOUT OWNERSHIP — MOBILE vs DESKTOP (AUTHORITATIVE)
   Ensures only ONE Recent Winners renders at a time
   ========================================================= */

/* Desktop must NEVER show mobile layout */
html.is-desktop .mobile-only{
  display:none !important;
}

/* Desktop layout must be visible */
html.is-desktop .desktop-only{
  display:block !important;
}

/* Mobile must NEVER show desktop layout */
@media (max-width:768px){
  html.is-mobile .desktop-only{
    display:none !important;
  }

  html.is-mobile .mobile-only{
    display:block !important;
  }
}

/* =========================================================
   DESKTOP — PANEL GLASS
   ========================================================= */
.log-panel{
  position:relative;
  background:linear-gradient(
    180deg,
    rgba(15,23,42,.82),
    rgba(2,6,23,.80)
  );
  border-radius:18px;
  padding:16px;
  border:1px solid rgba(99,102,241,.25);
  box-shadow:
    0 0 0 1px rgba(99,102,241,.15),
    0 20px 60px rgba(0,0,0,.70),
    0 0 60px rgba(99,102,241,.15);
}

/* =========================================================
   LOG PAGER — GLASS / NEON (AUTHORITATIVE)
   ========================================================= */

#log-pager{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;

  margin-top:12px;
  padding:10px 14px;

  border-radius:999px;

  background:
    linear-gradient(
      180deg,
      rgba(15,23,42,.85),
      rgba(5,8,20,.95)
    );

  border:1px solid rgba(99,102,241,.35);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.05),
    0 12px 30px rgba(0,0,0,.55),
    0 0 28px rgba(99,102,241,.25);
}

/* Pager buttons */
#log-pager .pager-btn{
  min-width:34px;
  height:34px;

  border-radius:999px;
  border:1px solid rgba(99,102,241,.35);

  background:
    linear-gradient(
      180deg,
      rgba(99,102,241,.18),
      rgba(15,23,42,.85)
    );

  color:#c7d2fe;
  font-weight:900;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    0 6px 16px rgba(0,0,0,.45);

  cursor:pointer;

  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease,
    color .15s ease;
}

/* Hover */
#log-pager .pager-btn:hover{
  color:#ffffff;

  background:
    linear-gradient(
      180deg,
      rgba(99,102,241,.35),
      rgba(15,23,42,.95)
    );

  box-shadow:
    0 0 0 1px rgba(99,102,241,.55),
    0 0 18px rgba(99,102,241,.45),
    0 10px 24px rgba(0,0,0,.55);

  transform:translateY(-1px);
}

/* Disabled */
#log-pager .pager-btn:disabled{
  opacity:.35;
  cursor:default;
  box-shadow:none;
  transform:none;
}

/* Status text */
#log-pager .pager-status{
  font-family:var(--mono);
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.06em;

  color:#a5b4fc;

  padding:0 6px;
}

#log-pager{
  width: fit-content;
  max-width: 100%;
}

#log-pager > *{
  flex: 0 0 auto;
  width: auto;

}
#log-pager .pager-status{
  white-space: nowrap;
}

.log-pager-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  margin-top:10px;
}

/* =========================================================
   DESKTOP — KPI STRIP
   ========================================================= */
html.is-desktop #kpi-strip-wrap{
  margin-bottom:14px;
}

html.is-desktop .summary-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
}
/* =========================================================
   DESKTOP — LAYOUT GROWTH (CRITICAL)
   ========================================================= */
html.is-desktop .desktop-right{
  display:flex;
  flex-direction:column;
  min-height:0;
}

html.is-desktop .log-kpi-chart-grid{
  flex:1 1 auto;
  min-height:0;
}

html.is-desktop .log-chart-panel{
  display:flex;
  flex-direction:column;
  min-height:0;
}

html.is-desktop #tv-chart-container{
  flex:1 1 auto;
  min-height:0;
}

/* =========================================================
   DESKTOP — TABLE GLASS (VISUAL ONLY)
   ========================================================= */
html.is-desktop #trade-log thead th{
  background:linear-gradient(
    180deg,
    rgba(10,14,30,.92),
    rgba(6,10,22,.92)
  );
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}

html.is-desktop #trade-log tbody tr{
  background:linear-gradient(
    180deg,
    rgba(15,23,42,.55),
    rgba(8,12,26,.55)
  );
  transition:background .15s ease, box-shadow .15s ease;
}

@media (min-width:769px){
  html.is-desktop #trade-log tbody tr:hover{
    background:linear-gradient(
      180deg,
      rgba(99,102,241,.18),
      rgba(15,23,42,.90)
    );
    box-shadow:
      inset 0 0 0 1px rgba(99,102,241,.28),
      0 0 34px rgba(99,102,241,.22);
  }
}

/* =========================================================
   DESKTOP — EV COLUMN (FINAL, CANONICAL)
   ========================================================= */
html.is-desktop #trade-log th[data-col="entry_ev"],
html.is-desktop #trade-log td[data-col="entry_ev"]{
  text-align:right;
  padding-right:16px;          /* consistent with other numeric cols */
  font-variant-numeric: tabular-nums;
}

/* ================= CARD SHELL ================= */

html.is-desktop .desktop-only .winner-card{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:10px;

  padding:16px 18px;
  border-radius:18px;

  background:
    radial-gradient(
      140% 160% at 50% 0%,
      rgba(99,102,241,.22),
      rgba(8,12,30,.96)
    ),
    linear-gradient(
      180deg,
      rgba(15,23,42,.95),
      rgba(5,8,20,.95)
    );

  border:1px solid rgba(99,102,241,.45);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 20px 50px rgba(0,0,0,.85),
    0 0 40px rgba(99,102,241,.25);

  cursor:pointer;
  user-select:none;

  transition:
    transform .15s ease,
    box-shadow .15s ease;
}

/* Hover lift */
html.is-desktop .desktop-only .winner-card:hover{
  transform:translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 28px 70px rgba(0,0,0,.85),
    0 0 55px rgba(99,102,241,.45);
}

/* ================= META ================= */

/* Hold time (tertiary meta) */
html.is-desktop .desktop-only .winner-hold{
  font-size:.66rem;
  font-weight:700;
  letter-spacing:.06em;
  color:#a5b4fc;
  opacity:.85;
}

/* =========================================================
   RECENT WINNERS — HEADER VISIBILITY FIX (DESKTOP ONLY)
   ========================================================= */
html.is-desktop .desktop-only .recent-winners-header,
html.is-desktop .desktop-only .recent-winners header{
  color:#e7ecf7 !important;
  font-weight:800;
  letter-spacing:.04em;
  opacity:1 !important;
}

/* ================= HEADER ================= */
html.is-desktop .winner-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:6px;
}

html.is-desktop .winner-symbol{
  font-size:.9rem;
  font-weight:900;
  letter-spacing:.05em;
  color:#e7ecf7;
}

html.is-desktop .winner-exchange{
  font-size:.65rem;
  font-weight:800;
  letter-spacing:.08em;
  opacity:.75;
}

/* ================= META ================= */
html.is-desktop .winner-meta{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:6px;

  font-size:.62rem;        /* ⬅ smaller */
  font-weight:700;
  letter-spacing:.06em;
  color:#a5b4fc;
  opacity:.85;
}

/* ================= RESULT ================= */
html.is-desktop .winner-result{
  display:flex;
  align-items:baseline;
  gap:6px;
}

html.is-desktop .winner-pl{
  font-size:.95rem;
  font-weight:900;
}

html.is-desktop .winner-pl-pct{
  font-size:.75rem;
  opacity:.8;
}


/* =========================================================
   CLOSED ROW — GLASS / NEON (ROW-LEVEL, SMOOTH)
   ========================================================= */
html.is-desktop #trade-log tbody tr.is-closed{
  background:linear-gradient(
    to right,
    rgba(248,113,113,.10),
    rgba(15,23,42,.92)
  );
}

/* Cells must stay transparent so the row gradient flows */
html.is-desktop #trade-log tbody tr.is-closed > td{
  background:transparent !important;
}
/* =========================================================
   GATED ROW — TRACKED-STYLE BLUE (AUTHORITATIVE)
   ---------------------------------------------------------
   Meaning:
   • Trade logged
   • Gate blocked execution
   • Lifecycle still tracked
   ========================================================= */
html.is-desktop #trade-log tbody tr.is-gated{
  background:linear-gradient(
    to right,
    rgba(96,165,250,.16),
    rgba(15,23,42,.92)
  );
  box-shadow:
    inset 0 0 0 1px rgba(96,165,250,.35),
    0 0 28px rgba(96,165,250,.18);
}

/* Ensure row gradient flows */
html.is-desktop #trade-log tbody tr.is-gated > td{
  background:transparent !important;
}

/* Hover (subtle, not louder than LIVE) */
@media (min-width:769px){
  html.is-desktop #trade-log tbody tr.is-gated:hover{
    background:linear-gradient(
      to right,
      rgba(96,165,250,.26),
      rgba(15,23,42,.95)
    );
    box-shadow:
      inset 0 0 0 1px rgba(96,165,250,.55),
      0 0 36px rgba(96,165,250,.30);
  }
}

/* =========================================================
   DESKTOP — SYMBOL LIST (NEON BUBBLE STYLE)
   ========================================================= */
html.is-desktop .symbol-list a,
html.is-desktop .symbol-item,
html.is-desktop .symbol-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:8px 14px;
  margin-bottom:8px;

  border-radius:999px;

  font-size:.72rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  text-decoration:none;

  color:#9aa8ff;

  background:
    linear-gradient(
      180deg,
      rgba(99,102,241,.18),
      rgba(15,23,42,.85)
    );

  border:1px solid rgba(99,102,241,.35);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    0 6px 18px rgba(0,0,0,.45);

  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease,
    color .15s ease;
}

/* Hover = neon wake */
html.is-desktop .symbol-list a:hover,
html.is-desktop .symbol-item:hover,
html.is-desktop .symbol-link:hover{
  color:#e7ecf7;

  background:
    linear-gradient(
      180deg,
      rgba(99,102,241,.35),
      rgba(15,23,42,.95)
    );

  box-shadow:
    0 0 0 1px rgba(99,102,241,.55),
    0 0 22px rgba(99,102,241,.45),
    0 12px 30px rgba(0,0,0,.55);

  transform:translateY(-1px);
}

/* Active / selected symbol */
html.is-desktop .symbol-list a.active,
html.is-desktop .symbol-item.active{
  color:#ffffff;

  background:
    linear-gradient(
      180deg,
      rgba(99,102,241,.55),
      rgba(59,75,220,.95)
    );

  border-color:rgba(99,102,241,.85);

  box-shadow:
    0 0 0 1px rgba(99,102,241,.75),
    0 0 30px rgba(99,102,241,.65),
    0 16px 40px rgba(0,0,0,.65);
}
/* =========================================================
   TOOLTIP — HARD LOCK (TIME + CORR ID) — FINAL (SOLID)
   ========================================================= */

@media (min-width:769px){

  /* 🔒 TABLE CELLS NEVER RESIZE */
  #trade-log tbody td{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  /* Tooltip anchor */
  #trade-log .has-tip{
    position:relative;
    display:inline-block;
    max-width:100%;
    cursor:default;
  }

  /* Inline content never expands */
  #trade-log .has-tip > *{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  /* ================= TOOLTIP OVERLAY ================= */

  #trade-log .has-tip::after{
    content:attr(data-tip);

    position:fixed;

    /* ❗ DO NOT DEFAULT TO (0,0) */
    left:var(--tip-x, -9999px);
    top:var(--tip-y, -9999px);

    /* 🔑 Center above cursor */
    transform:translate(-50%, -120%);
    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding:6px 12px;
    min-height:24px;
    border-radius:9999px;

    font-family:var(--mono);
    font-size:.75rem;
    font-weight:800;
    letter-spacing:.03em;
    white-space:nowrap;

    /* 🔒 SOLID background (blocks everything behind it) */
    background:#2563eb; /* solid blue */
    color:#ffffff;

    box-shadow:
      0 6px 18px rgba(0,0,0,.55),
      0 0 0 1px rgba(255,255,255,.25);

    pointer-events:none;
    opacity:0;
    z-index:2147483647;

    transition:
      opacity .12s ease,
      transform .12s ease;
  }

  /* Reveal ONLY when positioned */
  #trade-log .has-tip[data-tip]:hover::after{
    opacity:1;
    transform:translate(-50%, -135%);
  }

  /* Safety: never show empty tooltips */
  #trade-log .has-tip:not([data-tip])::after,
  #trade-log .has-tip[data-tip=""]::after{
    display:none !important;
  }
}

/* =========================================================
   MOBILE — CARD CONTAINER
   ========================================================= */
@media (max-width:768px){

  html.is-mobile .trade-cards{
    display:flex;
    flex-direction:column;
    gap:22px;
    padding-bottom:36px;
  }
}


/* =========================================================
   MOBILE — CARD GLASS (BASE)
   ========================================================= */
@media (max-width:768px){

  html.is-mobile .trade-card-glass{
    position:relative;

    background:
      radial-gradient(
        140% 160% at 50% 0%,
        rgba(99,102,241,.30),
        rgba(8,12,30,.96)
      ),
      linear-gradient(
        180deg,
        rgba(15,23,42,.96),
        rgba(5,8,20,.96)
      );

    border-radius:28px;
    padding:22px 20px 24px;
    border:1px solid rgba(99,102,241,.45);

    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.06),
      0 28px 70px rgba(0,0,0,.85),
      0 0 45px rgba(99,102,241,.30);
  }
}
/* =========================================================
   MOBILE — P/L COLOR BINDING (AUTHORITATIVE)
   ---------------------------------------------------------
   Ensures profit/loss color on mobile trade cards
   ========================================================= */
@media (max-width:768px){

  /* Positive P/L */
  html.is-mobile .trade-card-grid .pl-row.pos .mono{
    color:var(--profit);
    text-shadow:0 0 14px rgba(16,185,129,.45);
  }

  /* Negative P/L */
  html.is-mobile .trade-card-grid .pl-row.neg .mono{
    color:var(--loss);
    text-shadow:0 0 14px rgba(248,113,113,.45);
  }
}


/* =========================================================
   MOBILE — HERO HEADER (CENTERED)
   ========================================================= */
@media (max-width:768px){

  html.is-mobile .trade-card-header-centered{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    margin-bottom:18px;
    text-align:center;
  }

  html.is-mobile .trade-card-symbol{
    font-size:1.15rem;
    font-weight:900;
    letter-spacing:.06em;
    color:#e7ecf7;
    text-decoration:none;
  }

  html.is-mobile .trade-card-symbol:hover{
    text-decoration:underline;
  }

  html.is-mobile .trade-card-symbol .dot{
    opacity:.45;
    margin:0 6px;
  }

  html.is-mobile .trade-card-pills{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
  }
}

/* =========================================================
   EXECUTION MODE — FLAG PILLS (AUTHORITATIVE)
   ========================================================= */

.flag-pill{
  padding:6px 14px;
  border-radius:999px;
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,.14);
}

/* LIVE — green */
.flag-live{
  color:#4ade80;
  background:rgba(16,185,129,.12);
  box-shadow:
    0 0 12px rgba(16,185,129,.45),
    inset 0 0 0 1px rgba(16,185,129,.25);
}

/* MOCK — indigo */
.flag-mock{
  color:#a5b4fc;
  background:rgba(99,102,241,.18);
  box-shadow:
    0 0 12px rgba(99,102,241,.35),
    inset 0 0 0 1px rgba(99,102,241,.25);
}

/* SIM — simulated / paper trades */
.flag-sim{
  color:#9ecbff;                       /* soft neon blue */
  background:rgba(80,140,255,.14);
  box-shadow:
    0 0 14px rgba(120,170,255,.45),
    inset 0 0 0 1px rgba(120,170,255,.25);
}

/* BLOCKED / NF — red */
.flag-blocked{
  color:#f87171;
  background:rgba(248,113,113,.14);
  box-shadow:
    0 0 14px rgba(248,113,113,.45),
    inset 0 0 0 1px rgba(248,113,113,.25);
}

/* SKIPPED — amber */
.flag-skipped{
  color:#fbbf24;
  background:rgba(251,191,36,.14);
  box-shadow:
    0 0 14px rgba(251,191,36,.45),
    inset 0 0 0 1px rgba(251,191,36,.25);
}

/* TRACKED — blue */
.flag-tracked{
  color:#60a5fa;
  background:rgba(96,165,250,.14);
  box-shadow:
    0 0 14px rgba(96,165,250,.45),
    inset 0 0 0 1px rgba(96,165,250,.25);

}
/* GATED — tracked-blue (blocked execution) */
.flag-gated{
  color:#93c5fd;
  background:rgba(96,165,250,.10);
  box-shadow:
    0 0 12px rgba(96,165,250,.35),
    inset 0 0 0 1px rgba(96,165,250,.20);
}

/* Fallback safety */
.flag-unknown{
  color:#e5e7eb;
  background:rgba(148,163,184,.18);
}

/* =========================================================
   MOBILE — STATUS PILLS (HARD OVERRIDE)
   Fixes white pills + matches desktop colors
   ========================================================= */
@media (max-width:768px){

  /* Base status pill */
  html.is-mobile .pill.pill-status{
    background:rgba(15,23,42,.85);
    color:#e5e7eb;
  }

  /* OPEN — green */
  html.is-mobile .pill.pill-status.open{
    color:#4ade80;
    background:rgba(16,185,129,.16);
    box-shadow:
      0 0 14px rgba(16,185,129,.55),
      inset 0 0 0 1px rgba(16,185,129,.35);
  }

  /* CLOSED — red */
  html.is-mobile .pill.pill-status.closed{
    color:#f87171;
    background:rgba(248,113,113,.16);
    box-shadow:
      0 0 14px rgba(248,113,113,.55),
      inset 0 0 0 1px rgba(248,113,113,.35);
  }

  /* SIM — blue */
  html.is-mobile .pill.pill-status.sim{
    color:#9ecbff;
    background:rgba(80,140,255,.18);
    box-shadow:
      0 0 14px rgba(120,170,255,.55),
      inset 0 0 0 1px rgba(120,170,255,.35);
  }

  /* NF — red (blocked) */
  html.is-mobile .pill.pill-status.nf{
    color:#f87171;
    background:rgba(248,113,113,.18);
    box-shadow:
      0 0 14px rgba(248,113,113,.55),
      inset 0 0 0 1px rgba(248,113,113,.35);
  }

  /* SKIPPED — yellow / amber */
  html.is-mobile .pill.pill-status.skipped{
    color:#fbbf24;
    background:rgba(251,191,36,.22);
    box-shadow:
      0 0 16px rgba(251,191,36,.60),
      inset 0 0 0 1px rgba(251,191,36,.40);
  }
}
@media (max-width:768px){
  html.is-mobile .pill.pill-muted{
    opacity:1;
    color:#c7d2fe;
    background:rgba(99,102,241,.22);
    box-shadow:
      0 0 10px rgba(99,102,241,.35),
      inset 0 0 0 1px rgba(99,102,241,.25);
  }
}

/* =========================================================
   MOBILE — META STACK (ENTRY TIME + CORR ID)
   ========================================================= */
@media (max-width:768px){

  html.is-mobile .trade-card-meta-stack{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    margin-bottom:20px;
    text-align:center;
  }

  html.is-mobile .trade-card-meta-stack label{
    font-size:.65rem;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#94a3b8;
  }

  html.is-mobile .corr-id.clamp{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}


/* =========================================================
   MOBILE — DATA GRID
   ========================================================= */
@media (max-width:768px){

  html.is-mobile .trade-card-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px 16px;
  }

  html.is-mobile .trade-card-grid .kv{
    display:flex;
    flex-direction:column;
    gap:2px;
  }

  html.is-mobile .trade-card-grid label{
    font-size:.62rem;
    letter-spacing:.07em;
    text-transform:uppercase;
    color:#94a3b8;
  }

  html.is-mobile .trade-card-grid .mono{
    font-size:.82rem;
    font-weight:700;
    color:#e7ecf7;
  }
}


/* =========================================================
   MOBILE — BIG P/L ANCHOR
   ========================================================= */
@media (max-width:768px){

  html.is-mobile .trade-card-grid .pl-row{
    grid-column:1 / -1;
    margin-top:10px;
    padding:14px 16px;
    border-radius:16px;

    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,.04),
        rgba(0,0,0,.18)
      );

    border:1px solid rgba(255,255,255,.10);
    text-align:center;
  }

  html.is-mobile .trade-card-grid .pl-row .mono{
    font-size:1.25rem;
    font-weight:900;
    letter-spacing:.02em;
  }

  html.is-mobile .pl-row.pos{
    color:#4ade80;
    box-shadow:0 0 22px rgba(74,222,128,.35);
  }

  html.is-mobile .pl-row.neg{
    color:#f87171;
    box-shadow:0 0 22px rgba(248,113,113,.35);
  }
}


/* =========================================================
   MOBILE — CTA BUTTONS (PRESERVED)
   ========================================================= */
@media (max-width:768px){

  html.is-mobile .trade-card-actions{
    display:flex;
    gap:16px;
    margin-top:22px;
  }

  html.is-mobile .trade-card-actions .cta-btn{
    flex:1;
    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding:14px 12px;
    border-radius:18px;

    font-weight:900;
    font-size:.9rem;
    letter-spacing:.04em;

    text-decoration:none;
    border:1px solid rgba(255,255,255,.12);
    color:#e7ecf7;

    background:linear-gradient(
      180deg,
      rgba(99,102,241,.22),
      rgba(10,16,32,.92)
    );

    box-shadow:
      0 0 0 1px rgba(255,255,255,.08),
      0 12px 28px rgba(0,0,0,.55);
  }

  html.is-mobile .cta-tv{
    background:linear-gradient(180deg,#4f6bff,#3b4bdc);
    color:#fff;
  }

  html.is-mobile .cta-exchange.coinbase{
    background:linear-gradient(180deg,#5b7cff,#3759ff);
    color:#fff;
  }

  html.is-mobile .cta-exchange.gemini{
    background:linear-gradient(180deg,#ffb020,#ff8c00);
    color:#1a1200;
  }
}

/* =========================================================
   MOBILE — EXCHANGE CONFIRM MODAL (VISUAL ONLY)
   ========================================================= */
@media (max-width:768px){

  html.is-mobile .exchange-confirm-overlay{
    position:fixed;
    inset:0;
    z-index:100000;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(5,10,30,.75);
    backdrop-filter:blur(8px);
  }

  html.is-mobile .exchange-confirm-card{
    width:min(92vw, 360px);
    padding:22px;
    border-radius:22px;

    background:
      radial-gradient(
        120% 140% at 50% 0%,
        rgba(99,102,241,.28),
        rgba(10,16,32,.95)
      ),
      linear-gradient(
        180deg,
        rgba(15,23,42,.95),
        rgba(5,8,20,.95)
      );

    border:1px solid rgba(99,102,241,.55);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.06),
      0 30px 80px rgba(0,0,0,.85),
      0 0 40px rgba(99,102,241,.45);

    text-align:center;
    animation:exchangePop .18s ease-out;
  }

  @keyframes exchangePop{
    from{ transform:scale(.94); opacity:0; }
    to  { transform:scale(1); opacity:1; }
  }
}
/* =========================================================
   MOBILE — EXCHANGE CONFIRM CLICK FIX (AUTHORITATIVE)
   ========================================================= */
@media (max-width:768px){

  /* Ensure overlay accepts clicks */
  html.is-mobile .exchange-confirm-overlay{
    pointer-events:auto !important;
    z-index:100000 !important;
  }

  /* Ensure card is above everything */
  html.is-mobile .exchange-confirm-card{
    position:relative;
    z-index:100001 !important;
    pointer-events:auto !important;
  }

  /* FIX: actions row must be horizontal */
  html.is-mobile .exchange-confirm-card .confirm-actions{
    display:flex !important;
    flex-direction:row !important;
    gap:14px !important;
    margin-top:18px;
  }

  /* FIX: buttons must NOT be full width stacked */
  html.is-mobile .exchange-confirm-card .confirm-actions button,
  html.is-mobile .exchange-confirm-card .confirm-actions a{
    flex:1 1 0 !important;
    width:auto !important;
    max-width:none !important;
    pointer-events:auto !important;
    z-index:100002 !important;
  }

  /* Safety: prevent any child from blocking taps */
  html.is-mobile .exchange-confirm-card *{
    pointer-events:auto;
  }
}

/* =========================================================
   RECENT WINNERS — DESKTOP (FINAL, CANONICAL)
   Owns ALL desktop Recent Winners visuals
   ========================================================= */

html.is-desktop .desktop-only .recent-winners{
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:18px;

  background:
    radial-gradient(
      120% 140% at 50% 0%,
      rgba(99,102,241,.26),
      rgba(8,12,30,.96)
    );

  border-radius:26px;
  border:1px solid rgba(99,102,241,.50);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 30px 80px rgba(0,0,0,.80);

  /* 🔑 Break out of global 13px clamp */
  font-size:15px;
}

/* ================= HEADER ================= */

html.is-desktop .desktop-only .recent-winners-header{
  color:#e7ecf7;
  font-size:.9rem;
  font-weight:900;
  letter-spacing:.06em;
}

/* ================= CARD ================= */

html.is-desktop .desktop-only .winner-card{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:12px;

  padding:18px 20px;
  border-radius:20px;

  background:
    radial-gradient(
      140% 160% at 50% 0%,
      rgba(99,102,241,.30),
      rgba(8,12,30,.96)
    ),
    linear-gradient(
      180deg,
      rgba(15,23,42,.96),
      rgba(5,8,20,.96)
    );

  border:1px solid rgba(99,102,241,.55);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 22px 60px rgba(0,0,0,.85),
    0 0 48px rgba(99,102,241,.35);

  cursor:pointer;
  user-select:none;

  transition:
    transform .15s ease,
    box-shadow .15s ease;
}

html.is-desktop .desktop-only .winner-card:hover{
  transform:translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.12),
    0 32px 90px rgba(0,0,0,.90),
    0 0 65px rgba(99,102,241,.55);
}

/* ================= TOP ROW ================= */

html.is-desktop .desktop-only .winner-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

html.is-desktop .desktop-only .winner-symbol{
  font-family:var(--mono);
  font-size:1.15rem;     /* 🔥 clearly larger */
  font-weight:900;
  letter-spacing:.06em;
  color:#e7ecf7;
}

html.is-desktop .desktop-only .winner-exchange{
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.08em;
  opacity:.75;
}

/* ================= META ================= */

html.is-desktop .desktop-only .winner-meta{
  display:flex;
  align-items:center;
  gap:12px;

  font-size:.75rem;
  font-weight:700;
  letter-spacing:.06em;
  color:#a5b4fc;
  opacity:.9;
}

/* ================= RESULT ================= */

html.is-desktop .desktop-only .winner-result{
  display:flex;
  align-items:baseline;
  gap:10px;
}

html.is-desktop .desktop-only .winner-pl{
  font-size:1.2rem;      /* 🔥 unmistakably bigger */
  font-weight:900;
  color:var(--profit);

  text-shadow:
    0 0 18px rgba(16,185,129,.65),
    0 0 30px rgba(16,185,129,.45);
}

html.is-desktop .desktop-only .winner-pl-pct{
  font-size:.85rem;
  font-weight:800;
  opacity:.85;
}

/* ================= FLAG PILLS ================= */

html.is-desktop .desktop-only .recent-winners .flag-pill{
  font-size:.7rem;
  padding:6px 14px;
  letter-spacing:.08em;
}

html.is-desktop .winner-card .flag-pill.flag-nf{
  color:#f87171;
}
/* ===============================
   Shadow Engine Toggle (Display)
   =============================== */

.shadow-engine-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.shadow-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shadow-toggle-track {
  position: relative;
  width: 64px;
  height: 34px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  transition: all 0.25s ease;
}

.shadow-toggle-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #999;
  transition: all 0.25s ease;
}

/* ON state */
.shadow-toggle.on .shadow-toggle-track {
  background: rgba(0, 255, 160, 0.15);
  box-shadow:
    inset 0 0 0 1px rgba(0,255,160,0.4),
    0 0 12px rgba(0,255,160,0.25);
}

.shadow-toggle.on .shadow-toggle-knob {
  left: 34px;
  background: #00ff9c;
  box-shadow: 0 0 12px rgba(0,255,160,0.7);
}

/* OFF state */
.shadow-toggle.off .shadow-toggle-track {
  background: rgba(255,80,80,0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255,80,80,0.35),
    0 0 10px rgba(255,80,80,0.25);
}

.shadow-toggle.off .shadow-toggle-knob {
  background: #ff5a5a;
}

/* Label */
.shadow-toggle-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}
.shadow-icon{
  width:42px;
  height:42px;
  border-radius:50%;
  margin-bottom:6px;

  background:
    radial-gradient(
      circle at 35% 35%,
      rgba(255,255,255,.35),
      rgba(0,0,0,.65)
    );

  opacity:.55;
  transition:all .3s ease;
}

/* ON = alive */
.shadow-icon.on{
  background:
    radial-gradient(
      circle at 35% 35%,
      rgba(0,255,160,.95),
      rgba(0,120,80,.65)
    );

  box-shadow:
    0 0 18px rgba(0,255,160,.55),
    0 0 36px rgba(0,255,160,.25);

  animation:shadowPulse 2.5s ease-in-out infinite;
}

/* OFF = dormant */
.shadow-icon.off{
  background:
    radial-gradient(
      circle at 35% 35%,
      rgba(255,90,90,.6),
      rgba(80,0,0,.5)
    );

  box-shadow:
    0 0 12px rgba(255,90,90,.25);
}

@keyframes shadowPulse{
  0%   { box-shadow:0 0 12px rgba(0,255,160,.35); }
  50%  { box-shadow:0 0 28px rgba(0,255,160,.65); }
  100% { box-shadow:0 0 12px rgba(0,255,160,.35); }
}

/* =========================================================
   RECENT WINNERS — SYMBOL PILL (MATCH LOG EXACTLY)
   ========================================================= */

html.is-desktop .desktop-only .winner-symbol{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:6px 14px;
  border-radius:999px;

  font-family:var(--mono);
  font-size:.72rem !important;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;

  color:#9aa8ff;

  background:
    linear-gradient(
      180deg,
      rgba(99,102,241,.18),
      rgba(15,23,42,.85)
    );

  border:1px solid rgba(99,102,241,.35);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    0 6px 18px rgba(0,0,0,.45);

  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease,
    color .15s ease;
}

/* Hover parity with log */
html.is-desktop .desktop-only .winner-card:hover .winner-symbol{
  color:#e7ecf7;

  background:
    linear-gradient(
      180deg,
      rgba(99,102,241,.35),
      rgba(15,23,42,.95)
    );

  box-shadow:
    0 0 0 1px rgba(99,102,241,.55),
    0 0 22px rgba(99,102,241,.45),
    0 12px 30px rgba(0,0,0,.55);

  transform:translateY(-1px);
}
.shadow-toggle-row{
  display:flex;
  align-items:center;
  gap:14px;
}

.shadow-state-label{
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.12em;
  opacity:.35;
  color:#c7d2fe;
  transition:opacity .2s ease, color .2s ease;
}

.shadow-state-label.active{
  opacity:1;
  color:#ffffff;
  text-shadow:0 0 10px rgba(0,255,160,.45);
}

/* =========================================================
   RECENT WINNERS — REMOVE LINK UNDERLINE (SAFE)
   ========================================================= */

/* Kill underline on winner cards + symbol pills */
html.is-desktop .desktop-only .winner-card,
html.is-desktop .desktop-only .winner-card *{
  text-decoration:none !important;
}

/* Extra safety for modern underline engines */
html.is-desktop .desktop-only .winner-card{
  text-decoration-skip-ink:none;
  text-underline-offset:unset;
}

/* =========================================================
   TOOLTIP FIX — prevent fixed-position containing-block drift
   (backdrop-filter can break position:fixed coordinates)
   ========================================================= */
html.is-desktop .log-panel.desktop-right{
  backdrop-filter:none !important;
}
/* ================================
   ENTRY RULES — MODE KEY POLISH
   ================================ */

/* Give Mode Key rows breathing room */
.kpi-config .mode-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* Slightly loosen the whole box */
.kpi-config .summary-kpi:last-child {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Ensure NF shows as RED like the log */
.flag-pill.flag-nf {
  background: rgba(255, 70, 70, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 70, 70, 0.35);
}

/* Optional: improve readability of descriptions */
.mode-desc {
  font-size: 0.85rem;
  opacity: 0.85;
  white-space: nowrap;
}

/* MODE KEY — aligned like log rows */
.kpi-mode-key .mode-key-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-mode-key .mode-key-row {
  display: grid;
  grid-template-columns: 92px 1fr; /* 👈 FIXED pill column */
  align-items: center;
  column-gap: 12px;
}

.kpi-mode-key .mode-desc {
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.3;
}

