/* El Chappo — house gold identity.
   ---------------------------------
   The engine is a rebuild of MILLI 2.0's G Trader, but the SKIN is ours: this
   workspace wears the same gold the rest of the app does, using the core
   tokens from theme.css rather than its own palette, so it reads as part of
   Rob E Bank AI and not a bolted-on third-party page.

   Two house rules this file follows deliberately:
     * green is reserved for LIVE state only (a running bot, a won trade) -
       it is never decoration here;
     * primary buttons layer --cta-sheen ON TOP of their own fill rather than
       setting background-image separately, which is what once silently
       stripped the colour off every CTA in the app.

   Everything is scoped under #milli-g-page. */

#milli-g-page {
  --mg-line: rgba(198, 140, 44, 0.30);
  --mg-line-soft: rgba(198, 140, 44, 0.16);

  position: relative;
  min-height: 100vh;
  padding: 22px 16px 60px;
  background: var(--page-bg, #07080c);
  color: var(--text-primary, #fdf4e2);
  font-family: var(--font, Inter, system-ui, sans-serif);
}

/* Faint gold graph paper — texture, not pattern. */
#milli-g-page::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .025;
  background-image:
    linear-gradient(rgba(226, 166, 58, 1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 166, 58, 1) 1px, transparent 1px);
  background-size: 40px 40px;
}
#milli-g-page > * { position: relative; z-index: 1; }

.mg-wrap { max-width: 1180px; margin: 0 auto; }

/* ── header ──────────────────────────────────────────────────────────────── */
.mg-head { text-align: center; margin-bottom: 26px; }

.mg-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 999px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(226, 166, 58, .10) 0%, rgba(198, 140, 44, .05) 100%);
  border: 1px solid var(--border-amber, rgba(198, 140, 44, .66));
  box-shadow: 0 0 20px var(--glow-amber, rgba(205, 142, 42, .32));
  font-size: 10.5px; font-weight: 900; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold-bright, #f9c750);
}

.mg-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900; letter-spacing: -.02em; line-height: 1; margin: 0 0 10px;
  background: linear-gradient(135deg, #fdf4e2 0%, #f9c750 45%, #e2a63a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.mg-sub {
  max-width: 620px; margin: 0 auto;
  font-size: 14px; line-height: 1.7; color: var(--text-secondary, rgba(236, 213, 176, .88));
}

/* ── cards ───────────────────────────────────────────────────────────────── */
.mg-card {
  position: relative;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(145deg, var(--card-from, #2b2113) 0%, var(--card-to, #15100a) 100%);
  border: 1px solid var(--mg-line);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.mg-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%,
              var(--border-bright, rgba(232, 172, 64, .9)) 45%, transparent 95%);
}
.mg-card-title {
  font-size: 10.5px; font-weight: 900; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-muted, rgba(208, 180, 136, .64));
  margin: 0 0 12px;
}

.mg-grid { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.mg-col-4 { grid-column: span 4; }
.mg-col-5 { grid-column: span 5; }
.mg-col-7 { grid-column: span 7; }
.mg-col-8 { grid-column: span 8; }
.mg-col-12 { grid-column: span 12; }

/* ── preset picker ───────────────────────────────────────────────────────── */
.mg-presets { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mg-preset {
  text-align: left; cursor: pointer;
  padding: 15px; border-radius: 14px;
  background: linear-gradient(145deg, rgba(43, 33, 19, .8) 0%, rgba(21, 16, 10, .9) 100%);
  border: 1px solid var(--mg-line-soft);
  color: inherit; transition: all .25s; font-family: inherit;
}
.mg-preset:hover {
  border-color: var(--border-amber, rgba(198, 140, 44, .66));
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .4), 0 0 20px var(--glow-amber, rgba(205, 142, 42, .32));
}
.mg-preset.on {
  border-color: var(--border-bright, rgba(232, 172, 64, .9));
  box-shadow: 0 0 24px var(--glow-strong, rgba(238, 164, 52, .55));
}
.mg-preset-name { font-size: 15px; font-weight: 800; color: var(--text-primary, #fdf4e2); margin-bottom: 3px; }
.mg-preset-tag { font-size: 11px; font-weight: 700; color: var(--gold-bright, #f9c750); margin-bottom: 7px; }
.mg-preset-blurb { font-size: 11.5px; line-height: 1.55; color: var(--text-muted, rgba(208, 180, 136, .64)); }

/* ── live readout ────────────────────────────────────────────────────────── */
.mg-price { font-size: 34px; font-weight: 900; letter-spacing: -.02em; color: var(--text-primary, #fdf4e2); }
.mg-digits { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.mg-digit {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  background: rgba(226, 166, 58, .07);
  border: 1px solid var(--mg-line-soft);
  color: var(--text-secondary, rgba(236, 213, 176, .88));
}
/* Green = live. The newest tick is the only genuinely live cell here. */
.mg-digit.last {
  background: var(--green-dim, rgba(34, 197, 94, .16));
  border-color: rgba(34, 197, 94, .45);
  color: var(--green, #22c55e);
}

/* ── digit distribution ──────────────────────────────────────────────────── */
.mg-dist { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.mg-bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mg-bar-track {
  width: 100%; height: 58px; border-radius: 6px; overflow: hidden;
  display: flex; align-items: flex-end;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--mg-line-soft);
}
.mg-bar-fill { width: 100%; background: var(--gold-dim, rgba(226, 166, 58, .7)); transition: height .3s; }
.mg-bar-col.hot .mg-bar-fill { background: var(--gold-bright, #f9c750); }
.mg-bar-col.cold .mg-bar-fill { background: rgba(124, 58, 237, .75); }
.mg-bar-label { font-size: 10px; font-weight: 800; color: var(--text-muted, rgba(208, 180, 136, .64)); }
.mg-bar-col.hot .mg-bar-label { color: var(--gold-bright, #f9c750); }
.mg-bar-col.cold .mg-bar-label { color: #a78bfa; }
.mg-bar-n { font-size: 9px; color: var(--text-muted, rgba(208, 180, 136, .5)); }

.mg-quality {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
}
.mg-analysis-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.mg-reason { font-size: 11.5px; line-height: 1.55; color: var(--text-muted, rgba(208, 180, 136, .64)); margin-top: 10px; }

/* ── stats ───────────────────────────────────────────────────────────────── */
.mg-stats { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mg-stat {
  padding: 12px; border-radius: 12px; text-align: center;
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--mg-line-soft);
}
.mg-stat-label {
  font-size: 9.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted, rgba(208, 180, 136, .64)); margin-bottom: 5px;
}
.mg-stat-value { font-size: 18px; font-weight: 900; color: var(--text-primary, #fdf4e2); }
.mg-pos { color: var(--green, #22c55e); }
.mg-neg { color: var(--red, #ef4444); }

/* ── the ladder ──────────────────────────────────────────────────────────── */
.mg-rungs { display: flex; gap: 6px; margin: 12px 0 10px; }
.mg-rung {
  flex: 1; min-width: 0; text-align: center;
  padding: 9px 4px; border-radius: 10px;
  background: rgba(226, 166, 58, .05);
  border: 1px solid var(--mg-line-soft);
  font-size: 12px; font-weight: 800; color: var(--text-secondary, rgba(236, 213, 176, .88));
  transition: all .2s;
}
.mg-rung.done { background: var(--red-dim, rgba(239, 68, 68, .16)); border-color: rgba(239, 68, 68, .35); color: #ff9d9d; }
.mg-rung.now {
  background: rgba(226, 166, 58, .16); border-color: var(--border-bright, rgba(232, 172, 64, .9));
  color: var(--gold-bright, #f9c750); box-shadow: 0 0 16px var(--glow-amber, rgba(205, 142, 42, .32));
}
.mg-rung-step { display: block; font-size: 8.5px; letter-spacing: .1em; opacity: .7; margin-bottom: 2px; }

.mg-risk {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
}

/* ── controls ────────────────────────────────────────────────────────────── */
.mg-field { margin-bottom: 11px; }
.mg-label {
  display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted, rgba(208, 180, 136, .64)); margin-bottom: 5px;
}
.mg-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(0, 0, 0, .38);
  border: 1px solid var(--mg-line-soft);
  color: var(--text-primary, #fdf4e2); font-size: 13.5px; font-weight: 700;
  font-family: inherit; transition: border-color .2s;
}
.mg-input:focus { outline: none; border-color: var(--border-bright, rgba(232, 172, 64, .9)); }

/* --cta-sheen is layered ON TOP of the fill, never as a separate
   background-image — see the note in theme.css. */
.mg-btn {
  width: 100%; padding: 13px 18px; border-radius: 12px;
  border: 1px solid var(--border-bright, rgba(232, 172, 64, .9));
  font-size: 13.5px; font-weight: 900; letter-spacing: .04em;
  cursor: pointer; font-family: inherit; transition: filter .15s, transform .15s;
  background: var(--cta-sheen), linear-gradient(135deg, #f9c750 0%, #c68c2c 100%);
  color: #221703;
}
.mg-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.mg-btn:disabled { opacity: .45; cursor: not-allowed; }
.mg-btn.stop {
  background: var(--cta-sheen), linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  border-color: rgba(239, 68, 68, .8); color: #fff;
}

.mg-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.mg-switch {
  width: 44px; height: 24px; border-radius: 999px; flex: none; cursor: pointer;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--mg-line-soft);
  position: relative; transition: all .2s;
}
.mg-switch.on { background: rgba(226, 166, 58, .28); border-color: var(--border-bright, rgba(232, 172, 64, .9)); }
.mg-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #d8c8a8; transition: transform .2s;
}
.mg-switch.on::after { transform: translateX(20px); background: var(--gold-bright, #f9c750); }

/* ── status strip ────────────────────────────────────────────────────────── */
.mg-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 15px; border-radius: 12px; margin-bottom: 14px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--mg-line-soft);
  font-size: 12.5px; color: var(--text-secondary, rgba(236, 213, 176, .88));
}
.mg-dot { width: 8px; height: 8px; border-radius: 50%; background: #6b5a3c; flex: none; }
.mg-dot.live { background: var(--green, #22c55e); box-shadow: 0 0 10px rgba(34, 197, 94, .8); }
.mg-dot.err { background: var(--red, #ef4444); }

.mg-signal { font-weight: 800; color: var(--gold-bright, #f9c750); }
.mg-recovery { color: #ff9d3c; font-weight: 800; }

/* ── history ─────────────────────────────────────────────────────────────── */
.mg-hist { display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow-y: auto; }
.mg-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .04);
  font-size: 12px;
}
.mg-row-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mg-tag {
  font-size: 9px; font-weight: 900; letter-spacing: .08em;
  padding: 3px 7px; border-radius: 5px; flex: none;
}
.mg-tag.won { background: var(--green-dim, rgba(34, 197, 94, .16)); color: var(--green, #22c55e); }
.mg-tag.lost { background: var(--red-dim, rgba(239, 68, 68, .16)); color: #ff9d9d; }
.mg-tag.pending { background: rgba(226, 166, 58, .14); color: var(--gold-bright, #f9c750); }
.mg-empty { padding: 26px; text-align: center; color: var(--text-muted, rgba(208, 180, 136, .64)); font-size: 12.5px; }

/* ── honesty note ────────────────────────────────────────────────────────── */
.mg-note {
  margin-top: 16px; padding: 12px 15px; border-radius: 11px;
  background: rgba(226, 166, 58, .05);
  border: 1px solid var(--mg-line-soft);
  font-size: 11.5px; line-height: 1.6; color: var(--text-muted, rgba(208, 180, 136, .78));
}

/* ── mode tabs + guide ───────────────────────────────────────────────────── */
.mg-modes {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.mg-mode {
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(0, 0, 0, .28); color: var(--text-muted, rgba(208, 180, 136, .64));
  border: 1px solid var(--mg-line-soft); transition: all .2s;
}
.mg-mode:hover { color: var(--text-primary, #fdf4e2); border-color: var(--mg-line); }
.mg-mode.on {
  color: #221703;
  background: var(--cta-sheen), linear-gradient(135deg, #f9c750 0%, #c68c2c 100%);
  border-color: var(--border-bright, rgba(232, 172, 64, .9));
}
.mg-guide-btn {
  margin-left: auto; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 800;
  background: none; color: var(--gold-bright, #f9c750);
  border: 1px solid var(--border-amber, rgba(198, 140, 44, .66));
  transition: all .2s;
}
.mg-guide-btn:hover { box-shadow: 0 0 16px var(--glow-amber, rgba(205, 142, 42, .32)); }

/* ── chips (trade type / barrier) ────────────────────────────────────────── */
.mg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-chip {
  --chip: #e2a63a;
  padding: 7px 12px; border-radius: 9px; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 800;
  background: rgba(0, 0, 0, .3); color: var(--text-secondary, rgba(236, 213, 176, .88));
  border: 1px solid var(--mg-line-soft); transition: all .15s;
}
.mg-chips-num .mg-chip { min-width: 36px; text-align: center; padding: 7px 0; }
.mg-chip:hover { border-color: var(--chip); color: var(--text-primary, #fdf4e2); }
.mg-chip.on {
  color: #fff; border-color: var(--chip);
  background: color-mix(in srgb, var(--chip) 28%, rgba(0, 0, 0, .35));
  box-shadow: 0 0 12px color-mix(in srgb, var(--chip) 45%, transparent);
}

.mg-exposure {
  margin: 4px 0 11px; font-size: 11.5px; font-weight: 700;
  color: var(--text-muted, rgba(208, 180, 136, .64));
}

/* ── Bulk analyzer ───────────────────────────────────────────────────────── */
.mg-analyzer { margin-top: 14px; }
.mg-an-head { margin-bottom: 10px; }
.mg-an-title { font-size: 13px; font-weight: 900; letter-spacing: .04em; color: var(--gold-bright, #f9c750); }
.mg-an-odds { margin-top: 3px; font-size: 12px; color: var(--text-secondary, rgba(236, 213, 176, .88)); }
.mg-an-odds b { color: var(--gold-bright, #f9c750); font-weight: 900; }
.mg-an-exp { margin-top: 3px; font-size: 11px; color: var(--text-muted, rgba(208, 180, 136, .6)); }
.mg-an-exp b { color: var(--text-primary, #fdf4e2); }
.mg-an-pairs { display: flex; flex-direction: column; gap: 6px; }
.mg-an-row { display: grid; grid-template-columns: minmax(92px, auto) 1fr auto auto; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 9px; background: rgba(0, 0, 0, .22); border: 1px solid var(--mg-line-soft); }
.mg-an-row.best { border-color: var(--border-bright, rgba(232, 172, 64, .9));
  background: linear-gradient(160deg, rgba(226, 166, 58, .14), rgba(0, 0, 0, .24)); }
.mg-an-row.cur { box-shadow: inset 0 0 0 1px rgba(226, 166, 58, .35); }
.mg-an-name { font-size: 12px; font-weight: 800; color: var(--text-primary, #fdf4e2); display: flex; align-items: center; gap: 6px; }
.mg-an-badge { font-size: 8.5px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px;
  border-radius: 5px; color: #221703; background: linear-gradient(135deg, #f9c750, #c68c2c); }
.mg-an-bar { height: 6px; border-radius: 999px; overflow: hidden; background: rgba(0, 0, 0, .4); border: 1px solid var(--mg-line-soft); }
.mg-an-bar span { display: block; height: 100%; background: linear-gradient(90deg, #c68c2c, #f9c750); }
.mg-an-val { font-size: 11px; font-weight: 800; color: var(--text-secondary, rgba(236, 213, 176, .82)); white-space: nowrap; }
.mg-an-use { font-family: inherit; font-size: 10.5px; font-weight: 800; cursor: pointer; padding: 4px 10px; border-radius: 7px;
  color: #221703; background: linear-gradient(135deg, #f9c750, #c68c2c); border: 0; }
.mg-an-use.is-cur { background: none; color: var(--text-muted, rgba(208, 180, 136, .55)); cursor: default; padding: 4px 6px; }
.mg-an-use:disabled { opacity: .45; cursor: not-allowed; }
.mg-an-note { margin: 10px 0 0; font-size: 10px; line-height: 1.5; color: rgba(208, 180, 136, .42); }
/* auto-pick + contextual smart controls */
.mg-an-auto { font-family: inherit; font-size: 11px; font-weight: 900; letter-spacing: .02em; cursor: pointer;
  padding: 6px 12px; border-radius: 9px; color: #221703; border: 0;
  background: var(--cta-sheen), linear-gradient(135deg, #f9c750 0%, #c68c2c 100%); box-shadow: 0 4px 16px rgba(226, 166, 58, .3); }
.mg-an-auto:hover { filter: brightness(1.06); }
.mg-an-auto:disabled { opacity: .5; cursor: not-allowed; }
.mg-an-smart:not(:empty) { margin: 4px 0 12px; }
.mg-an-sub { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted, rgba(208, 180, 136, .55)); margin-bottom: 7px; }
.mg-an-sub b { color: var(--gold-bright, #f9c750); }
.mg-an-pairs-label { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted, rgba(208, 180, 136, .55)); margin: 2px 0 7px; }
.mg-an-risks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mg-an-risk { display: flex; flex-direction: column; gap: 2px; padding: 9px 8px; border-radius: 10px; cursor: pointer;
  font-family: inherit; text-align: center; color: var(--text-secondary, rgba(236, 213, 176, .82));
  background: rgba(0, 0, 0, .22); border: 1px solid var(--mg-line-soft); transition: all .15s; }
.mg-an-risk:hover { border-color: var(--mg-line); }
.mg-an-risk.on { border-color: var(--border-bright, rgba(232, 172, 64, .9));
  background: linear-gradient(160deg, rgba(226, 166, 58, .16), rgba(0, 0, 0, .24)); color: var(--gold-bright, #f9c750); }
.mg-an-risk b { font-size: 12px; font-weight: 900; }
.mg-an-risk small { font-size: 9.5px; color: var(--text-muted, rgba(208, 180, 136, .55)); }
.mg-an-risk.on small { color: rgba(249, 199, 80, .8); }
.mg-an-digits { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.mg-an-dig { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0 4px; border-radius: 8px; cursor: pointer;
  font-family: inherit; background: rgba(0, 0, 0, .24); border: 1px solid var(--mg-line-soft); transition: all .15s; }
.mg-an-dig:hover { border-color: var(--mg-line); }
.mg-an-dig.on { border-color: var(--border-bright, rgba(232, 172, 64, .9)); }
.mg-an-dig.best { background: linear-gradient(180deg, rgba(226, 166, 58, .2), rgba(0, 0, 0, .22)); border-color: var(--border-amber, rgba(226, 166, 58, .5)); }
.mg-an-dig-bar { width: 6px; height: 26px; display: flex; align-items: flex-end; border-radius: 3px; overflow: hidden; background: rgba(0, 0, 0, .35); }
.mg-an-dig-bar span { width: 100%; background: linear-gradient(180deg, #f9c750, #c68c2c); border-radius: 3px; }
.mg-an-dig-n { font-size: 11px; font-weight: 900; color: var(--text-primary, #fdf4e2); }
.mg-an-dig.best .mg-an-dig-n { color: var(--gold-bright, #f9c750); }
.mg-an-dig-c { font-size: 9px; font-weight: 700; color: var(--text-muted, rgba(208, 180, 136, .5)); }
.mg-stats.mg-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
.mg-bar-label {
  margin: 10px 0 4px; font-size: 10px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted, rgba(208, 180, 136, .64));
}
/* The win-rate bar is a verdict, not a progress meter: green at or above
   break-even, red below. Same pos/neg pairing as the P/L and WON/LOST tags. */
.mg-progress-fill.wr { background: linear-gradient(90deg, #15803d 0%, var(--green, #22c55e) 100%); }
.mg-progress-fill.wr.bad { background: linear-gradient(90deg, #991b1b 0%, var(--red, #ef4444) 100%); }
.mg-chip:disabled, #milli-g-page .mg-input:disabled { opacity: .45; cursor: not-allowed; }
.mg-chip:disabled:hover { border-color: var(--mg-line-soft); color: var(--text-secondary, rgba(236, 213, 176, .88)); }
#mg-bk-acct.mg-virtual { color: var(--gold-bright, #f9c750); }
.mg-progress {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--mg-line-soft);
}
.mg-progress-fill {
  height: 100%; width: 0; transition: width .3s;
  background: linear-gradient(90deg, #c68c2c 0%, #f9c750 100%);
}

/* ── locked screen ───────────────────────────────────────────────────────── */
.mg-lock { max-width: 560px; margin: 40px auto; text-align: center; }
.mg-lock-mark { font-size: 40px; margin-bottom: 14px; }
.mg-lock h2 {
  font-size: 26px; font-weight: 900; margin: 0 0 10px;
  color: var(--gold-bright, #f9c750);
}
.mg-lock p { font-size: 13.5px; line-height: 1.7; color: var(--text-secondary, rgba(236, 213, 176, .88)); margin: 0 0 8px; }
.mg-lock-price {
  display: inline-block; margin: 18px 0 6px; padding: 14px 26px; border-radius: 14px;
  background: linear-gradient(145deg, var(--card-from, #2b2113) 0%, var(--card-to, #15100a) 100%);
  border: 1px solid var(--border-bright, rgba(232, 172, 64, .9));
  box-shadow: 0 0 26px var(--glow-amber, rgba(205, 142, 42, .32));
}
.mg-lock-amount { font-size: 30px; font-weight: 900; color: var(--gold-bright, #f9c750); line-height: 1; }
.mg-lock-term { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
                color: var(--text-muted, rgba(208, 180, 136, .64)); margin-top: 6px; }
.mg-lock-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.mg-lock-btn {
  padding: 12px 22px; border-radius: 11px; text-decoration: none;
  font-size: 13px; font-weight: 800; font-family: inherit; cursor: pointer;
  border: 1px solid var(--border-bright, rgba(232, 172, 64, .9));
  background: var(--cta-sheen), linear-gradient(135deg, #f9c750 0%, #c68c2c 100%);
  color: #221703;
}
.mg-lock-btn.ghost {
  background: none; color: var(--text-secondary, rgba(236, 213, 176, .88));
  border-color: var(--mg-line);
}

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .mg-col-4, .mg-col-5, .mg-col-7, .mg-col-8 { grid-column: span 12; }
  .mg-presets { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  #milli-g-page { padding: 16px 11px 50px; }
  .mg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-rungs { flex-wrap: wrap; }
  .mg-rung { flex: 0 0 calc(33.333% - 4px); }
  .mg-dist { gap: 3px; }
  .mg-bar-track { height: 44px; }
}

/* ── G Trader consoles (milli_g_gt.js) ───────────────────────────────────── */
#milli-g-page .gt-console { display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px; }
#milli-g-page .gt-console[hidden] { display: none; }
#milli-g-page [hidden] { display: none !important; }
#milli-g-page .gt-card {
  border-radius: 16px; padding: 12px 14px 13px;
  background: linear-gradient(160deg, var(--card-from, rgba(34, 27, 12, .92)) 0%, rgba(12, 9, 4, .94) 100%);
  border: 1px solid var(--mg-line-soft);
}
#milli-g-page .gt-card.gt-amber { border-color: rgba(245, 158, 11, .25); }
.gt-card-head { margin-bottom: 8px; }
.gt-card-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted, rgba(208, 180, 136, .64)); }
.gt-card-sub { font-size: 10.5px; margin-top: 2px; color: rgba(208, 180, 136, .42); }
.gt-section { font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-primary, #fdf4e2); margin: 6px 2px -4px; }
.gt-help { font-size: 11px; color: rgba(208, 180, 136, .5); margin: 8px 0 0; line-height: 1.45; }
.gt-err { margin: 8px 0 0; font-size: 11.5px; color: #ff8080; min-height: 14px; }

/* market card */
.gt-market-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 2px 0; background: none;
  border: 0; color: inherit; cursor: pointer; font-family: inherit; text-align: left; }
.gt-market-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.gt-tile { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: var(--gold-bright, #f9c750); background: rgba(226, 166, 58, .1);
  border: 1px solid var(--border-amber, rgba(198, 140, 44, .5)); flex: none; }
.gt-tile.small { width: 32px; height: 32px; font-size: 9px; }
.gt-market-name { font-size: 13px; font-weight: 800; color: var(--text-primary, #fdf4e2); }
.gt-market-right { text-align: right; }
.gt-quote { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text-primary, #fdf4e2); line-height: 1.1; }
.gt-digit-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 11px; color: rgba(208, 180, 136, .6); margin-top: 3px; }
.gt-digit-row b.gold { color: var(--gold-bright, #f9c750); }
.gt-digit-row b.even { color: #8fbfe0; } .gt-digit-row b.odd { color: #ff9a3c; }
.gt-chev { font-size: 12px; color: rgba(208, 180, 136, .5); margin-left: 4px; }
.gt-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; border: 1px solid transparent; }
.gt-pill.hi { color: var(--green, #22c55e); background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .3); }
.gt-pill.mid { color: var(--gold-bright, #f9c750); background: rgba(226, 166, 58, .12); border-color: rgba(226, 166, 58, .3); }
.gt-pill.lo { color: #ff8888; background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .25); }
.gt-pill.dim { color: rgba(208, 180, 136, .4); background: rgba(0, 0, 0, .2); }
.gt-pairs { margin-top: 10px; border-top: 1px solid var(--mg-line-soft); }
.gt-pair { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 4px; background: none; border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04); color: inherit; cursor: pointer; font-family: inherit; text-align: left; }
.gt-pair.on { background: rgba(226, 166, 58, .07); }
.gt-pair-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gt-pair-text b { font-size: 12.5px; color: var(--text-primary, #fdf4e2); }
.gt-pair.on .gt-pair-text b { color: var(--gold-bright, #f9c750); }
.gt-pair-text small { font-size: 10px; color: rgba(208, 180, 136, .45); }
.gt-pair-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-bright, #f9c750); }
.gt-notconn { margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-size: 11.5px; color: #ff9a3c;
  background: rgba(255, 140, 0, .08); border: 1px solid rgba(255, 140, 0, .25); }

/* stats + streak */
.gt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gt-stat { border-radius: 12px; padding: 9px 10px; background: rgba(0, 0, 0, .28); border: 1px solid var(--mg-line-soft); }
.gt-stat-label { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(208, 180, 136, .5); }
.gt-stat-value { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text-primary, #fdf4e2); margin-top: 2px; }
.gt-stat-value.muted { color: rgba(236, 213, 176, .7); }
.gt-stat-value.gold, .gt-pill.gold { color: var(--gold-bright, #f9c750); }
.gt-stat-value.pos, .pos { color: var(--green, #22c55e) !important; }
.gt-stat-value.neg, .neg { color: var(--red, #ef4444) !important; }
.gt-streak { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gt-streak-box { min-width: 48px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .2); }
.gt-streak-box.s1 { background: rgba(255, 68, 68, .12); border-color: rgba(255, 100, 100, .3); color: rgba(255, 120, 100, .9); }
.gt-streak-box.s3 { background: rgba(255, 68, 68, .12); border-color: rgba(255, 68, 68, .6); color: #ff6644; box-shadow: 0 0 12px rgba(255, 68, 68, .2); }
.gt-streak-box.s5 { background: rgba(255, 68, 68, .12); border-color: rgba(255, 68, 68, .6); color: #ff2222; box-shadow: 0 0 12px rgba(255, 68, 68, .2); }
.gt-peak { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 68, 68, .08); border: 1px solid rgba(255, 68, 68, .25); }
.gt-peak span { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: rgba(255, 100, 100, .6); }
.gt-peak b { color: rgba(255, 120, 120, .9); } .gt-peak b.hot { color: #ff4444; }

/* side toggle + segmented controls */
.gt-seg { display: flex; gap: 4px; padding: 5px; border-radius: 12px; background: rgba(0, 0, 0, .3); }
.gt-seg-btn { flex: 1; padding: 10px 6px; border-radius: 9px; border: 1px solid transparent; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 800; color: rgba(208, 180, 136, .55); transition: all .15s; }
.gt-seg-btn.on { color: #221703; background: var(--cta-sheen), linear-gradient(135deg, #f9c750 0%, #c68c2c 100%); box-shadow: 0 4px 14px rgba(226, 166, 58, .3); }
.gt-seg-btn.alt.on { color: #fff; background: linear-gradient(135deg, #e55, #ff4444); box-shadow: 0 4px 14px rgba(255, 68, 68, .3); }
.gt-seg-btn.gold.on { color: var(--gold-bright, #f9c750); background: rgba(226, 166, 58, .14); border-color: rgba(226, 166, 58, .45); box-shadow: none; }
.gt-seg-btn:disabled { cursor: not-allowed; opacity: .75; }
.gt-seg-mini .gt-seg-btn { padding: 7px 6px; font-size: 11.5px; }
.gt-mode-banner { margin: 0 0 8px; padding: 7px 10px; border-radius: 9px; font-size: 11.5px; font-weight: 800; }
.gt-mode-banner.purple { color: #c9a0ff; background: rgba(168, 85, 247, .12); border: 1px solid rgba(168, 85, 247, .3); }
.gt-mode-banner.teal { color: #6fd6f2; background: rgba(0, 180, 216, .1); border: 1px solid rgba(0, 180, 216, .3); }

/* toggles */
.gt-jy, .gt-ku { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 12px;
  border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .06); color: inherit; cursor: pointer;
  font-family: inherit; text-align: left; transition: all .15s; --tint: var(--gold-bright, #f9c750); }
.gt-jy.on, .gt-ku.on { background: color-mix(in srgb, var(--tint) 8%, rgba(0, 0, 0, .25)); border-color: color-mix(in srgb, var(--tint) 45%, transparent); }
.gt-jy-label { font-size: 13px; font-weight: 800; color: rgba(236, 213, 176, .85); }
.gt-jy.on .gt-jy-label { color: var(--tint); }
.gt-jy-sub { font-size: 10.5px; color: rgba(208, 180, 136, .45); margin-top: 2px; }
.gt-jy-state, .gt-ku-text { font-size: 11px; font-weight: 700; color: rgba(208, 180, 136, .5); margin-top: 3px; }
.gt-ku-text { margin-top: 0; }
.gt-ku.on .gt-ku-text, .gt-jy.on .gt-jy-state { color: var(--tint); }
.gt-ku:disabled, .gt-jy:disabled { opacity: .55; cursor: not-allowed; }
.gt-switch { position: relative; width: 44px; height: 24px; border-radius: 999px; flex: none; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1); transition: all .2s; }
.gt-switch.lone { cursor: pointer; padding: 0; }
.gt-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(208, 180, 136, .4); transition: all .2s; }
.on > .gt-switch, .gt-switch.on { background: color-mix(in srgb, var(--tint, #f9c750) 30%, rgba(0, 0, 0, .3)); border-color: color-mix(in srgb, var(--tint, #f9c750) 55%, transparent); }
.on > .gt-switch .gt-knob, .gt-switch.on .gt-knob { left: 22px; background: var(--tint, #f9c750); }
.gt-safeguard { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 11px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, .25); border: 1px solid rgba(208, 180, 136, .15); color: inherit; cursor: pointer; font-family: inherit; }
.gt-safeguard .gt-sg-main { font-size: 12.5px; font-weight: 800; color: rgba(208, 180, 136, .5); }
.gt-safeguard .gt-sg-side { font-size: 11px; color: rgba(208, 180, 136, .4); }
.gt-safeguard.on { background: rgba(255, 68, 68, .1); border-color: rgba(255, 68, 68, .4); }
.gt-safeguard.on .gt-sg-main { color: #ff4444; } .gt-safeguard.on .gt-sg-side { color: rgba(255, 68, 68, .7); }

/* inputs */
.gt-num { display: flex; align-items: center; gap: 8px; }
.gt-num-prefix { font-size: 12px; font-weight: 700; color: rgba(208, 180, 136, .6); }
#milli-g-page .gt-input { flex: 1; width: 100%; padding: 10px 12px; border-radius: 11px; font-family: inherit; font-size: 15px; font-weight: 800;
  text-align: right; color: var(--text-primary, #fdf4e2); background: rgba(0, 0, 0, .3); border: 1px solid var(--mg-line-soft); }
#milli-g-page .gt-input:focus { outline: none; border-color: var(--border-bright, rgba(232, 172, 64, .9)); }
#milli-g-page .gt-input:disabled { opacity: .5; }
#milli-g-page .gt-input.small { max-width: 120px; flex: none; }
.gt-num.pos .gt-input { border-color: rgba(34, 197, 94, .25); } .gt-num.neg .gt-input { border-color: rgba(239, 68, 68, .25); }
.gt-inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gt-inline-label { font-size: 12px; font-weight: 800; } .gt-inline-label.amber { color: #f59e0b; }
.gt-range-row { display: flex; align-items: center; gap: 12px; }
.gt-range { flex: 1; accent-color: var(--gold-bright, #f9c750); }
.gt-range-val { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900;
  color: var(--gold-bright, #f9c750); background: rgba(226, 166, 58, .1); border: 1px solid var(--border-amber, rgba(198, 140, 44, .5)); }
.gt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gt-chip { padding: 8px 14px; border-radius: 9px; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 800;
  background: rgba(255, 255, 255, .04); color: rgba(208, 180, 136, .5); border: 1px solid rgba(255, 255, 255, .07); transition: all .15s; }
.gt-chip.on { color: var(--gold-bright, #f9c750); background: rgba(226, 166, 58, .15); border-color: rgba(226, 166, 58, .45); }
.gt-chip.amber.on { color: #f59e0b; background: rgba(245, 158, 11, .2); border-color: rgba(245, 158, 11, .5); }
.gt-chip:disabled { opacity: .5; cursor: not-allowed; }
.gt-quick { display: flex; gap: 6px; margin-top: 8px; }
.gt-quick-btn { flex: 1; padding: 7px 0; border-radius: 9px; font-family: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer;
  background: rgba(255, 255, 255, .04); color: rgba(208, 180, 136, .5); border: 1px solid rgba(255, 255, 255, .07); }
.gt-quick-btn.on { color: var(--gold-bright, #f9c750); background: rgba(226, 166, 58, .12); border-color: rgba(226, 166, 58, .4); }
.gt-quick-btn:disabled { opacity: .5; cursor: not-allowed; }

/* digits grid (Match/Differ) */
.gt-digit-count { text-align: right; font-size: 11px; font-weight: 800; color: #ff9a3c; margin-bottom: 6px; }
.gt-digit-count.full { color: #ff4444; }
.gt-digit-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.gt-digit-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border-radius: 10px; cursor: pointer; font-family: inherit;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); color: rgba(236, 213, 176, .85); }
.gt-digit-btn b { font-size: 15px; } .gt-digit-btn small { font-size: 9.5px; color: rgba(208, 180, 136, .45); }
.gt-digit-btn small.hot { color: var(--green, #22c55e); }
.gt-digit-btn.on { color: #ff9a3c; background: rgba(255, 140, 0, .15); border-color: rgba(255, 140, 0, .45); }
.gt-digit-btn:disabled { opacity: .55; cursor: not-allowed; }

/* presets */
.gt-presets { display: flex; flex-direction: column; gap: 8px; }
.gt-presets-title { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: rgba(208, 180, 136, .45); }
#milli-g-page .gt-select { width: 100%; padding: 11px 36px 11px 14px; border-radius: 11px; font-family: inherit; font-size: 13px; font-weight: 700;
  color: var(--text-primary, #fdf4e2); background: rgba(0, 0, 0, .32); border: 1px solid var(--mg-line); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(208, 180, 136, .6) 50%), linear-gradient(135deg, rgba(208, 180, 136, .6) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.gt-active { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 9px; font-size: 12px;
  color: #6ee7b7; background: rgba(16, 185, 129, .08); border: 1px solid rgba(16, 185, 129, .25); }
.gt-clear { background: none; border: 0; color: #f87171; font-family: inherit; font-size: 12px; font-weight: 800; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.gt-clear:hover { background: rgba(239, 68, 68, .15); }
.gt-preset-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 14px; border-radius: 12px; cursor: pointer;
  font-family: inherit; text-align: left; color: inherit; --tint: var(--gold-bright, #f9c750);
  background: color-mix(in srgb, var(--tint) 6%, rgba(0, 0, 0, .2)); border: 1px solid color-mix(in srgb, var(--tint) 30%, transparent); transition: all .15s; }
.gt-preset-btn:hover { background: color-mix(in srgb, var(--tint) 12%, rgba(0, 0, 0, .2)); }
.gt-preset-btn span b { display: block; font-size: 12.5px; color: var(--tint); }
.gt-preset-btn span small { display: block; font-size: 10.5px; color: rgba(208, 180, 136, .5); margin-top: 2px; }
.gt-preset-btn.purple { --tint: #a855f7; } .gt-preset-btn.teal { --tint: #00b4d8; }
.gt-preset-btn.on { background: color-mix(in srgb, var(--tint) 15%, rgba(0, 0, 0, .2)); }
.gt-preset-right { font-size: 10.5px; font-weight: 800; color: rgba(208, 180, 136, .5); white-space: nowrap; }
.gt-preset-btn.on .gt-preset-right, .gt-ku.on .gt-preset-right { color: var(--tint); }

/* ── account-protection (Steady) plans — house gold ──────────────────────── */
.gt-protect-body { display: flex; flex-direction: column; gap: 8px; }
.gt-steady-btns { display: flex; flex-direction: column; gap: 8px; }
.gt-steady-btn { display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  font-family: inherit; text-align: left; color: inherit;
  background: linear-gradient(160deg, rgba(226, 166, 58, .07), rgba(0, 0, 0, .22));
  border: 1px solid var(--mg-line-soft); transition: all .15s; }
.gt-steady-btn:hover { border-color: var(--mg-line); background: linear-gradient(160deg, rgba(226, 166, 58, .12), rgba(0, 0, 0, .22)); }
.gt-steady-btn.on { border-color: var(--border-bright, rgba(232, 172, 64, .9));
  background: linear-gradient(160deg, rgba(226, 166, 58, .18), rgba(0, 0, 0, .24)); box-shadow: 0 0 16px rgba(226, 166, 58, .18); }
.gt-steady-btn:disabled { opacity: .5; cursor: not-allowed; }
.gt-steady-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gt-steady-name { font-size: 13px; font-weight: 800; color: var(--gold-bright, #f9c750); }
.gt-steady-tag { font-size: 10px; font-weight: 900; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px;
  color: #221703; background: linear-gradient(135deg, #f9c750, #c68c2c); white-space: nowrap; }
.gt-steady-lines { font-size: 11px; line-height: 1.5; color: rgba(208, 180, 136, .62); }
.gt-steady-active { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 9px; font-size: 12px;
  color: var(--gold-bright, #f9c750); background: rgba(226, 166, 58, .08); border: 1px solid var(--mg-line); }
.gt-steady-why { font-size: 11px; line-height: 1.5; color: rgba(208, 180, 136, .75); padding: 8px 12px; border-radius: 9px;
  background: rgba(0, 0, 0, .22); border: 1px dashed var(--mg-line-soft); }
.gt-steady-note { font-size: 10.5px; line-height: 1.5; color: rgba(208, 180, 136, .42); margin: 2px 0 0; }
.gt-ku.purple { --tint: #a855f7; } .gt-ku.teal { --tint: #00b4d8; } .gt-ku.sky { --tint: #38bdf8; }
.gt-startwith { align-self: flex-start; background: none; border: 1px solid rgba(0, 180, 216, .3); border-radius: 8px; padding: 6px 10px; margin-top: 6px;
  font-family: inherit; font-size: 11px; color: rgba(0, 180, 216, .7); cursor: pointer; }
.gt-startwith b { color: #00b4d8; }
.gt-o1 { }
.gt-repeat { padding: 12px; border-radius: 12px; background: rgba(226, 166, 58, .06); border: 1px solid rgba(226, 166, 58, .2); }
.gt-repeat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gt-repeat-title { font-size: 13px; font-weight: 900; color: var(--gold-bright, #f9c750); }
.gt-repeat-next { margin-top: 10px; padding: 10px; border-radius: 10px; text-align: center; background: rgba(226, 166, 58, .1); border: 1px solid rgba(226, 166, 58, .25); }
.gt-repeat-next span { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: rgba(208, 180, 136, .5); }
.gt-repeat-next b { display: block; font-size: 22px; font-family: ui-monospace, monospace; color: var(--gold-bright, #f9c750); }
.gt-repeat-restarted { margin-top: 8px; display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--gold-bright, #f9c750); background: rgba(226, 166, 58, .15); }
.gt-repeat-list, .gt-sessions { margin-top: 8px; max-height: 128px; overflow: auto; }
.gt-sess-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 4px; font-size: 12px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.gt-sess-row.total { color: var(--gold-bright, #f9c750); font-weight: 800; border-top: 1px solid rgba(226, 166, 58, .2); }
.gt-sess-row.sky { color: #38bdf8; }

/* collapsibles: chart, scanner, schedule */
.gt-collapse-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gt-collapse-btn { background: none; border: 0; color: var(--text-primary, #fdf4e2); font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer; padding: 2px 0; text-align: left; }
.gt-collapse-btn.wide { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.gt-collapse-body { margin-top: 10px; }
#milli-g-page .gt-mini-select { padding: 5px 8px; border-radius: 8px; font-family: inherit; font-size: 11px; font-weight: 800;
  color: var(--gold-bright, #f9c750); background: rgba(226, 166, 58, .1); border: 1px solid rgba(226, 166, 58, .3); }
.gt-chart-empty { text-align: center; padding: 30px 0; font-size: 12px; color: rgba(208, 180, 136, .4); }
#gt-ou-chart-svg { width: 100%; height: 180px; display: block; }
.gt-chart-foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: rgba(208, 180, 136, .45); font-weight: 700; }
.gt-scan { padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--mg-line-soft); margin-top: 8px; }
.gt-scan-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.gt-scan-short { font-size: 12px; font-weight: 900; color: var(--gold-bright, #f9c750); }
.gt-scan-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.gt-scan-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; border-radius: 6px; background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .03); }
.gt-scan-cell.best { background: rgba(226, 166, 58, .1); border-color: rgba(226, 166, 58, .3); }
.gt-scan-cell b { font-size: 11px; color: var(--text-primary, #fdf4e2); }
.gt-scan-track { width: 80%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.gt-scan-fill { display: block; height: 100%; } .gt-scan-fill.hi { background: var(--green, #22c55e); } .gt-scan-fill.mid { background: #ffc800; } .gt-scan-fill.lo { background: #ff5050; }
.gt-scan-cell small { font-size: 9px; font-weight: 800; } .gt-scan-cell small.hi { color: var(--green, #22c55e); } .gt-scan-cell small.mid { color: #ffc800; }
.gt-scan-cell small.lo { color: #ff5050; } .gt-scan-cell small.none { color: rgba(208, 180, 136, .3); }
.gt-queued { margin-left: auto; margin-right: 8px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: #f59e0b; background: rgba(245, 158, 11, .15); border: 1px solid rgba(245, 158, 11, .3); }
.gt-sched-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.gt-sched-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: rgba(208, 180, 136, .5); font-weight: 800; }
#milli-g-page .gt-sched-grid .gt-input { text-align: left; font-size: 13px; padding: 8px 10px; color-scheme: dark; }
.gt-btn { width: 100%; padding: 12px; border-radius: 12px; border: 0; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 900; letter-spacing: .04em;
  color: #221703; background: var(--cta-sheen), linear-gradient(135deg, #f9c750 0%, #c68c2c 100%); }
.gt-btn.amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.gt-btn.ghost { background: rgba(226, 166, 58, .12); color: var(--gold-bright, #f9c750); border: 1px solid rgba(226, 166, 58, .3); }
.gt-sched-progress { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .25); }
.gt-sched-row { display: flex; justify-content: space-between; font-size: 11px; color: rgba(245, 158, 11, .8); font-weight: 800; margin-bottom: 6px; }
.gt-progress { height: 8px; border-radius: 999px; overflow: hidden; background: rgba(0, 0, 0, .35); border: 1px solid var(--mg-line-soft); }
.gt-progress-fill { height: 100%; width: 0; transition: width .3s; background: linear-gradient(90deg, #c68c2c, #f9c750); }
.gt-progress-fill.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.gt-progress-fill.pos { background: linear-gradient(90deg, #15803d, #22c55e); } .gt-progress-fill.neg { background: linear-gradient(90deg, #991b1b, #ef4444); }
.gt-sched-item { display: flex; justify-content: space-between; font-size: 11px; padding: 4px 0; color: rgba(236, 213, 176, .8); border-bottom: 1px solid rgba(255, 255, 255, .04); }
.gt-sched-item.won b { color: var(--green, #22c55e); } .gt-sched-item.lost b { color: var(--red, #ef4444); } .gt-sched-item.error b { color: #f59e0b; }
.gt-sched-item.firing b { color: var(--gold-bright, #f9c750); }

/* status line */
.gt-ep { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; font-size: 12.5px; font-weight: 700; }
.gt-ep-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; animation: gtPulse 1.4s ease-in-out infinite; }
.gt-ep-msg { flex: 1; min-width: 0; }
.gt-ep-pill { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 900; }
.gt-ep.idle { background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); color: rgba(208, 180, 136, .6); }
.gt-ep.idle .gt-ep-dot { display: none; }
.gt-ep.running { background: rgba(226, 166, 58, .06); border: 1px solid rgba(226, 166, 58, .25); color: var(--gold-bright, #f9c750); }
.gt-ep.running .gt-ep-dot { background: var(--gold-bright, #f9c750); }
.gt-ep.cool { background: rgba(255, 165, 0, .08); border: 1px solid rgba(255, 165, 0, .3); color: #ffa500; }
.gt-ep.cool .gt-ep-dot { background: #ffa500; } .gt-ep.cool .gt-ep-pill { background: rgba(255, 165, 0, .15); color: #ffa500; }
.gt-ep.check { background: rgba(255, 80, 80, .08); border: 1px solid rgba(255, 80, 80, .3); color: #ff5050; }
.gt-ep.check .gt-ep-dot { background: #ff5050; } .gt-ep.check .gt-ep-pill { background: rgba(255, 80, 80, .15); color: #ff5050; }
@keyframes gtPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* recent trades */
.gt-recent { padding: 0; overflow: hidden; }
.gt-recent-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(208, 180, 136, .5); border-bottom: 1px solid rgba(255, 255, 255, .05); }
.gt-trow { display: grid; grid-template-columns: 18px 1fr auto auto; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.gt-trow-ico { font-size: 10px; } .gt-trow-ico.won { color: var(--green, #22c55e); } .gt-trow-ico.lost { color: var(--red, #ef4444); }
.gt-trow-what { font-size: 12px; font-weight: 700; color: rgba(236, 213, 176, .75); }
.gt-trow-pl { font-size: 12.5px; font-weight: 900; font-variant-numeric: tabular-nums; }
.gt-trow-ts { font-size: 10px; color: rgba(208, 180, 136, .35); }

/* fixed bottom bar */
/* Inline in the flow, not fixed. A fixed bottom bar gets parked behind the
   mobile browser's bottom chrome / the system nav bar, where scrolling can
   never reveal it — that is why the Run button "hides." (Sticky is no help
   here: the page scrolls on the window while an overflow ancestor owns the
   sticky scrollport, so a sticky bar stays inert.) In the flow the button
   simply sits at the end of the console and is always reachable by scrolling,
   the way the other strategies do it. The bottom padding (with the home-
   indicator inset — the page ships viewport-fit=cover) keeps it clear of the
   screen edge when scrolled to the end. */
.gt-bar { position: static; padding: 14px 0 calc(22px + env(safe-area-inset-bottom, 0px)); }
.gt-bar[hidden] { display: none; }
.gt-bar-inner, .gt-bar { display: flex; gap: 10px; max-width: 760px; margin: 0 auto; }
.gt-bar-btn { padding: 18px 20px; border-radius: 16px; border: 0; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 900; color: #221703; flex: 1; transition: all .2s; }
.gt-bar-btn.pause, .gt-bar-btn.resume { flex: none; min-width: 110px; }
.gt-bar-btn.run { background: var(--cta-sheen), linear-gradient(135deg, #f9c750 0%, #c68c2c 100%); box-shadow: 0 8px 30px rgba(226, 166, 58, .35); }
.gt-bar-btn.ticks { background: linear-gradient(135deg, #ffe08a 0%, #f9c750 100%); box-shadow: 0 8px 30px rgba(249, 199, 80, .45); }
.gt-bar-btn.stop { color: #fff; background: linear-gradient(135deg, #ff3a3a, #cc0000); box-shadow: 0 8px 30px rgba(255, 50, 50, .4); }
.gt-bar-btn.pause { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 8px 30px rgba(251, 191, 36, .4); }
.gt-bar-btn.resume { color: #fff; background: linear-gradient(135deg, #15803d, #22c55e); box-shadow: 0 8px 30px rgba(34, 197, 94, .35); }
.gt-bar-btn:disabled { cursor: not-allowed; }

/* batch complete modal */
.gt-modal-back { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px); }
.gt-modal-back[hidden] { display: none; }
.gt-modal { position: relative; width: 340px; max-width: 92vw; border-radius: 16px; padding: 22px 20px 18px; overflow: hidden;
  background: linear-gradient(170deg, rgba(38, 30, 12, .98) 0%, rgba(12, 9, 4, .98) 100%); border: 1px solid rgba(226, 166, 58, .3); box-shadow: 0 25px 60px rgba(0, 0, 0, .6); text-align: center; }
.gt-modal-stripe { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.gt-modal-stripe.pos { background: linear-gradient(90deg, #22c55e, #00cc6a); } .gt-modal-stripe.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.gt-modal-stripe.neg { background: linear-gradient(90deg, #ff4444, #ff6b6b); }
.gt-modal-x { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: rgba(208, 180, 136, .6); font-size: 22px; cursor: pointer; }
.gt-modal-icon { width: 48px; height: 48px; border-radius: 50%; margin: 4px auto 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.gt-modal-icon.pos { color: var(--green, #22c55e); background: rgba(34, 197, 94, .12); } .gt-modal-icon.neg { color: var(--red, #ef4444); background: rgba(239, 68, 68, .12); }
.gt-modal h3 { margin: 0 0 4px; font-size: 17px; color: var(--text-primary, #fdf4e2); }
.gt-modal-sub { margin: 0 0 12px; font-size: 11.5px; color: rgba(208, 180, 136, .5); }
.gt-modal-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.gt-modal-row { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; border: 1px solid transparent; }
.gt-modal-row.pos { background: rgba(34, 197, 94, .06); border-color: rgba(34, 197, 94, .15); } .gt-modal-row.pos b { color: var(--green, #22c55e); }
.gt-modal-row.neg { background: rgba(239, 68, 68, .06); border-color: rgba(239, 68, 68, .15); } .gt-modal-row.neg b { color: var(--red, #ef4444); }
.gt-modal-row.amber { background: rgba(245, 158, 11, .06); border-color: rgba(245, 158, 11, .15); } .gt-modal-row.amber b { color: #f59e0b; }
.gt-modal-row.net { background: rgba(226, 166, 58, .08); border-color: rgba(226, 166, 58, .25); color: var(--gold-bright, #f9c750); }
.gt-modal-row.net b { font-size: 16px; font-family: ui-monospace, monospace; }

/* tab running dots */
#milli-g-page .mg-mode { position: relative; }
#milli-g-page .mg-mode.live::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%;
  background: var(--green, #22c55e); animation: gtPulse 1.4s ease-in-out infinite; vertical-align: middle; }

@media (max-width: 600px) {
  .gt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gt-sched-grid { grid-template-columns: 1fr; }
  .gt-scan-grid { gap: 2px; } .gt-scan-cell b { font-size: 10px; }
  #milli-g-page .mg-modes { flex-wrap: wrap; }
}

/* ── trade-results / recent bin (delete a session) ───────────────────────── */
.mg-card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mg-card-head-row .mg-card-title { margin: 0; }
.mg-bin, .gt-bin {
  display: inline-flex; align-items: center; justify-content: center; padding: 5px;
  border-radius: 8px; cursor: pointer; background: none; color: rgba(208, 180, 136, .5);
  border: 1px solid var(--mg-line-soft); transition: all .15s; line-height: 0;
}
.mg-bin:hover, .gt-bin:hover {
  color: var(--red, #ef4444); border-color: rgba(239, 68, 68, .45);
  background: rgba(239, 68, 68, .1);
}
.mg-bin[hidden] { display: none !important; }

/* ── the strategy-row entry (index.html #mg-row, right under X Trader) ──
   `.strategy-icon` sets font-size: 0 to kill the whitespace between its
   children, so a mark that does not set its own box renders at 0x0 — which is
   exactly what the old bare <b>EC</b> did. Give it a real box like every
   sibling mark does. */
.strategy-icon-elchappo {
  background: linear-gradient(150deg, rgba(245, 207, 107, .2), rgba(150, 104, 26, .16));
  border: 1px solid rgba(232, 168, 50, .45);
}
.strategy-mark-elchappo {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: #ffd479;
  filter: drop-shadow(0 0 6px rgba(210, 152, 48, .45));
}
.strategy-mark-elchappo svg { width: 76%; height: 76%; }
