/* MyOperário — aba Operações: escritório em 3D, visto de frente.
   Prefixo fx- para não colidir com o resto do painel. Só transform/opacity animam. */
.fx {
  --fx-bg: #0D1016; --fx-card: #141922; --fx-card2: #10141B; --fx-line: #232A37; --fx-line2: #2C3546;
  --fx-text: #E7EAF0; --fx-muted: #A0A9B8; --fx-soft: #C9D0DB;
  --fx-orange: #FF8A1F; --fx-orange-t: #FFB070; --fx-up: #3DDC97; --fx-down: #FF7070; --fx-wait: #FFC531;
  --fx-off: #5B6372;
  --fx-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: var(--fx-text);
}
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- toolbar */
.fx-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.fx-title { margin: 0; font-size: 24px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fx-sub { color: var(--fx-muted); margin: 6px 0 0; font-size: 13px; max-width: 70ch; }
.fx-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  color: var(--fx-muted); background: rgba(160,169,184,.1); border: 1px solid rgba(160,169,184,.3); }
.fx-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fx-live[data-state="on"] { color: var(--fx-up); background: rgba(61,220,151,.1); border-color: rgba(61,220,151,.3); }
.fx-live[data-state="on"] i { animation: fx-blink 1.4s infinite; }
.fx-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fx-seg { display: flex; background: #151A23; border: 1px solid var(--fx-line); border-radius: 12px; padding: 3px; }
.fx-seg button { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--fx-muted); background: none;
  border: 0; border-radius: 9px; padding: 0 14px; min-height: 40px; }
.fx-seg button[aria-pressed="true"] { background: var(--fx-orange); color: #1A0F02; }
.fx-ibtn { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--fx-text); background: #151A23;
  border: 1px solid var(--fx-line); border-radius: 10px; padding: 0 12px; min-height: 44px; min-width: 44px; }
.fx-ibtn[aria-pressed="true"] { border-color: var(--fx-orange); color: var(--fx-orange-t); }

/* ------------------------------------- Algo Trading (na barra do Som) */
.fx-algo { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; background: #151A23;
  border: 1px solid var(--fx-line2); border-radius: 10px; padding: 4px 4px 4px 12px; color: var(--fx-soft); flex-wrap: wrap; }
.fx-algo .fx-btn { min-height: 34px; font-size: 13px; padding: 0 12px; }
.fx-acc { display: inline-flex; align-items: center; gap: 6px; color: var(--fx-text); padding-right: 10px; border-right: 1px solid var(--fx-line2); }
.fx-cent { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 1px 7px; border-radius: 20px;
  background: rgba(255,197,49,.16); color: #FFC531; }
.fx-algo b.on { color: var(--fx-up); } .fx-algo b.off { color: var(--fx-down); } .fx-algo b.unk { color: var(--fx-muted); }
.fx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; border-radius: 10px;
  min-height: 44px; padding: 0 14px; border: 1px solid var(--fx-line2); background: #1A202B; color: var(--fx-text); }
.fx-btn.primary { background: var(--fx-orange); border-color: var(--fx-orange); color: #1A0F02; }
.fx-btn.danger { border-color: rgba(255,112,112,.5); color: var(--fx-down); }
.fx-btn:disabled { opacity: .5; cursor: not-allowed; }

/* -------------------------------------------------------------------- cena */
.fx-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.fx-card { background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: 16px; }
.fx-scene-card { flex: 999 1 640px; min-width: 0; padding: 14px; }
.fx-side { flex: 1 1 300px; min-width: 0; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.fx-scene { position: relative; isolation: isolate; /* z-index das bancadas fica dentro da cena (não passa por cima do menu) */ width: 100%; aspect-ratio: 1000 / 600; container-type: inline-size; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 20%, #161B25 0%, #0B0E13 70%); }
.fx-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* parede do fundo (x 17%–83%): placa, Algo Trading e telão, retos e de frente */
.fx-wall { position: absolute; left: 25%; top: 3.5%; width: 56%; height: 21%; display: flex; gap: 1cqw; align-items: stretch; }
.fx-wall-r { flex: 2 1 0; min-width: 0; display: flex; flex-direction: column; gap: .5cqw; }
.fx-ticker { height: 1.9cqw; background: #090C11; border: 1px solid #2A3140; border-radius: .3cqw; overflow: hidden; position: relative; }
.fx-ticker-track { position: absolute; top: 0; left: 0; white-space: nowrap; display: flex; align-items: center; height: 100%; gap: 4cqw;
  font: 500 .95cqw var(--fx-mono); color: var(--fx-orange-t); animation: fx-marquee 38s linear infinite; }
.fx-screen { flex: 1; display: flex; gap: 1cqw; background: #0A0F17; border: 1px solid var(--fx-line2); border-radius: .4cqw; padding: .7cqw 1cqw;
  box-shadow: 0 0 2cqw rgba(255,138,31,.10), inset 0 0 1.5cqw rgba(76,141,255,.08); min-height: 0; }
.fx-scr-l { display: flex; flex-direction: column; justify-content: center; gap: .2cqw; min-width: 0; }
.fx-scr-k { font-weight: 600; font-size: .8cqw; letter-spacing: .12em; color: var(--fx-muted); }
.fx-scr-v { font: 700 2.4cqw var(--fx-mono); color: var(--fx-up); line-height: 1; white-space: nowrap; }
.fx-scr-s { font: 500 .85cqw var(--fx-mono); color: var(--fx-soft); white-space: nowrap; }
.fx-scr-chart { flex: 1; min-width: 0; height: 100%; }
.fx-sign { flex: 1.1 1 0; display: flex; flex-direction: column; justify-content: center; gap: .3cqw; background: #10151D; border: 1px solid var(--fx-line2);
  border-radius: .4cqw; padding: .6cqw 1cqw; min-width: 0; }
.fx-sign b { font-weight: 700; font-size: 1.7cqw; color: #fff; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-sign span { font-weight: 600; font-size: .75cqw; color: var(--fx-orange-t); letter-spacing: .14em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-sign .fx-sign-sub { color: var(--fx-muted); letter-spacing: .04em; }
.fx-sema { flex: .9 1 0; min-width: 0; overflow: hidden; display: flex; gap: .8cqw; align-items: center; background: #10151D; border: 1px solid var(--fx-line2); border-radius: .4cqw; padding: .6cqw .9cqw; }
.fx-lamps { display: flex; flex-direction: column; gap: .35cqw; background: #07090D; border-radius: .8cqw; padding: .4cqw; }
.fx-lamps i { width: 1.6cqw; height: 1.6cqw; border-radius: 50%; opacity: .18; display: block; }
.fx-lamps i[data-lamp="off"] { background: #FF5A5A; color: #FF5A5A; }
.fx-lamps i[data-lamp="warn"] { background: var(--fx-wait); color: var(--fx-wait); }
.fx-lamps i[data-lamp="on"] { background: var(--fx-up); color: var(--fx-up); }
.fx-lamps i.lit { opacity: 1; box-shadow: 0 0 1.4cqw currentColor; animation: fx-glow 2s ease-in-out infinite; }
.fx-sema-t { display: flex; flex-direction: column; gap: .15cqw; min-width: 0; }
.fx-sema-t small { font-weight: 600; font-size: .7cqw; letter-spacing: .12em; color: var(--fx-muted); white-space: nowrap; }
/* textos longos ("SEM CONTROLADOR") quebram em duas linhas dentro do próprio quadro */
.fx-sema-t b { font-weight: 700; font-size: 1.1cqw; line-height: 1.05; }
.fx-sema-t b.long { font-size: .82cqw; letter-spacing: -.01em; }
.fx-chip-scene { position: absolute; display: flex; align-items: center; gap: .5cqw; font-weight: 600; font-size: 1cqw; color: var(--fx-soft);
  background: rgba(10,13,18,.8); border: 1px solid var(--fx-line2); border-radius: 999px; padding: .35cqw .9cqw; z-index: 900; }
/* saldo atual + resultado liquido, embaixo do escritorio */
.fx-balance-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 12px; padding: 10px 14px;
  background: var(--fx-card2); border: 1px solid var(--fx-line); border-radius: 12px; color: var(--fx-soft); font-size: 13px; }
.fx-balance-bar b { font: 700 17px var(--fx-mono); color: var(--fx-text); margin-left: 6px; }
.fx-balance-bar span + span { padding-left: 20px; border-left: 1px solid var(--fx-line2); }
.fx-balance-bar .fx-clocks { margin-left: auto; font-size: 12px; color: var(--fx-muted); position: relative;
  display: inline-flex; align-items: center; gap: 6px; }
.fx-balance-bar .fx-clocks b { font-size: 14px; margin: 0 2px 0 4px; }
.fx-balance-bar .fx-clocks em { font-style: normal; font-size: 11px; }
/* fechado por dia da semana atual + total, embaixo do saldo */
.fx-week { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.fx-wday { background: var(--fx-card2); border: 1px solid var(--fx-line); border-radius: 12px; padding: 9px 12px;
  display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fx-wday small { font-size: 12px; font-weight: 600; color: var(--fx-muted); letter-spacing: .04em; }
.fx-wday b { font: 700 17px var(--fx-mono); letter-spacing: -.02em; }
.fx-wday em { font: 500 11px var(--fx-mono); font-style: normal; color: var(--fx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-wday.today { border-color: var(--fx-orange); }
.fx-wday.future { opacity: .45; }
.fx-wday.total { background: #18202B; border-color: var(--fx-line2); }
.fx-empty { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); text-align: center; color: var(--fx-soft); font-size: 1.5cqw;
  background: rgba(10,13,18,.85); border: 1px solid var(--fx-line2); border-radius: 1cqw; padding: 1.2cqw 2cqw; z-index: 900; max-width: 60%; }

/* bancadas */
.fx-st { position: absolute; width: 17%; height: 26.5%; padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
  pointer-events: none; border-radius: 10px; color: inherit; }
.fx-st:focus-visible { outline: 2px solid var(--fx-orange); outline-offset: 2px; }
.fx-st > svg { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: visiblePainted; }
.fx-st.fx-enter { animation: fx-drop .3s ease-out both; }
/* crachá em cima do monitor; --s = escala da mesa (as do fundo ficam menores) */
.fx-st { --s: 1; transition: left .6s ease, top .6s ease, width .6s ease, height .6s ease; }
.fx-badge { position: absolute; left: 50%; top: 4%; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center;
  gap: .25cqw; pointer-events: auto; white-space: nowrap; }
.fx-bname { font-weight: 600; font-size: max(9px, calc(1cqw * var(--s))); color: var(--fx-text); background: rgba(10,13,18,.82); border: 1px solid var(--fx-line2);
  border-radius: .4cqw; padding: .2cqw .5cqw; display: inline-flex; gap: .4cqw; align-items: baseline; }
.fx-bname b { font: 700 max(10px, calc(1.15cqw * var(--s))) var(--fx-mono); color: #fff; }
.fx-bname em { font-style: normal; color: var(--fx-muted); }
/* nome do EA so na bancada selecionada; o valor (chip) fica sempre visivel */
/* crachá: par + valor numa linha, semáforo embaixo (cortado se for longo) */
.fx-brow { display: flex; gap: .3cqw; align-items: center; }
.fx-badge .fx-sem { max-width: calc(17cqw * var(--s)); overflow: hidden; text-overflow: ellipsis; }
/* o nome do EA fica só na mesa selecionada (está também no painel ao lado); com 3
   fileiras o magic também, para não tapar quem está atrás */
.fx-st:not([aria-pressed="true"]) .fx-bname em,
#fxStations.dense .fx-st:not([aria-pressed="true"]) .fx-mag { display: none; }
.fx-bname em { max-width: calc(11cqw * var(--s)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* magic number embaixo do operador */
.fx-mag { font: 700 9px var(--fx-mono); fill: #E7EAF0; paint-order: stroke; stroke: rgba(8,10,14,.92); stroke-width: 3px; }
.fx-st[aria-pressed="true"] .fx-mag { fill: var(--fx-orange-t); }
.fx-earow.me { background: rgba(255,138,31,.08); border-radius: 8px; box-shadow: inset 3px 0 0 var(--fx-orange); padding-left: 6px; }
.fx-chip { font: 700 max(10px, calc(1.05cqw * var(--s))) var(--fx-mono); border-radius: 999px; padding: .15cqw .6cqw; background: rgba(10,13,18,.85); border: 1px solid var(--fx-line2); }
.fx-chip.pos { color: var(--fx-up); border-color: rgba(61,220,151,.45); }
.fx-chip.neg { color: var(--fx-down); border-color: rgba(255,112,112,.45); }
.fx-chip.mute { color: var(--fx-soft); }
.fx-chip.off { color: var(--fx-muted); border-style: dashed; }
.fx-pop { position: absolute; left: 50%; top: 2%; transform: translate(-50%, -100%); font: 700 1.45cqw var(--fx-mono); white-space: nowrap;
  pointer-events: none; background: rgba(10,13,18,.9); border: 1px solid; border-radius: 999px; padding: .25cqw .7cqw; animation: fx-rise 2.8s ease-out forwards; }
.fx-pop.pos { color: var(--fx-up); border-color: var(--fx-up); box-shadow: 0 0 1.5cqw rgba(61,220,151,.35); }
.fx-pop.neg { color: var(--fx-down); border-color: var(--fx-down); }
.fx-pop.open { color: var(--fx-orange-t); border-color: var(--fx-orange); font-size: calc(1.1cqw * var(--s)); }

/* partes do SVG que dependem do estado */
.fx-st .fx-ring, .fx-st .fx-spark, .fx-st .fx-mon-wait, .fx-st .fx-mon-off, .fx-st .fx-zzz { opacity: 0; }
.fx-st[aria-pressed="true"] .fx-ring { opacity: 1; }
.fx-st[data-state="operando"] .fx-spark { opacity: 1; }
.fx-st[data-state="aguardando"] .fx-mon-wait { opacity: 1; }
.fx-st[data-state="pausado"] .fx-mon-off, .fx-st[data-state="pausado"] .fx-zzz { opacity: 1; }
.fx-st[data-state="parado"] .fx-zzz { opacity: 1; }
.fx-st[data-state="parado"] .fx-spark { opacity: .35; }
/* operador: digitando (operando), respirando (aguardando), dormindo (Algo off) */
.fx-bot .head { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .6s ease; }
.fx-bot .arm { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .6s ease; }
.fx-bot.op .bob { animation: fx-bob 1.1s ease-in-out infinite; }
.fx-bot.op .arm { animation: fx-type .3s ease-in-out infinite alternate; }
.fx-bot.op .head { animation: fx-focus 3.6s ease-in-out infinite; }
.fx-bot.wait .bob { animation: fx-breathe 3.2s ease-in-out infinite; }
/* dormindo: tronco debruçado sobre a mesa, cabeça apoiada nos braços.
   O transform fixo vale também com prefers-reduced-motion (sem a animação). */
.fx-bot .bob { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .6s ease; }
.fx-bot.off .bob { transform: scaleY(.84); animation: fx-sleep 4.4s ease-in-out infinite; }
.fx-bot.off .head { transform: translateY(4px) scale(.94); }
.fx-bot.off .arm { transform: rotate(-6deg); }
/* visual de cada operador: cabelo 0-3, roupa 0-3, fone */
.fx-seat [class^="v-"] { display: none; }
.fx-seat[data-hair="0"] .v-hair0, .fx-seat[data-hair="1"] .v-hair1,
.fx-seat[data-hair="2"] .v-hair2, .fx-seat[data-hair="3"] .v-hair3,
.fx-seat[data-top="1"] .v-top1, .fx-seat[data-top="2"] .v-top2,
.fx-seat[data-top="3"] .v-top3, .fx-seat[data-acc="1"] .v-acc1 { display: inline; }
.fx-bot.op .chest { animation: fx-blink 1s infinite; }
.fx-zzz text { animation: fx-zzz 2.6s ease-in-out infinite; }
.fx-zzz text:nth-child(2) { animation-delay: .9s; }
.fx-zzz text:nth-child(3) { animation-delay: 1.8s; }
.fx-ring ellipse:first-child { animation: fx-pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.fx-led { animation: fx-blink 1.6s steps(2) infinite; }
.fx-mon-wait circle { animation: fx-blink 1.2s infinite; }

/* KPIs */
.fx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.fx-kpis-top { margin: 0 0 12px; }
.fx-kpi { background: var(--fx-card2); border: 1px solid var(--fx-line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.fx-kpi small { font-size: 12px; font-weight: 600; color: var(--fx-muted); letter-spacing: .04em; }
.fx-kpi b { font: 700 21px var(--fx-mono); letter-spacing: -.02em; }
.fx-kpi b span { color: var(--fx-muted); font-size: 14px; }
/* % de lucro sobre o saldo do inicio do dia */
.fx-pct { font: 600 12px var(--fx-mono); font-style: normal; color: var(--fx-muted); }
.fx-pct.pos { color: var(--fx-up); }
.fx-pct.neg { color: var(--fx-down); }
.fx-pct:empty { display: none; }
.fx-fact .fx-pct { display: block; }
.fx-chip .fx-pct { font-size: 11px; opacity: .85; color: inherit; }
.fx .pos { color: var(--fx-up); } .fx .neg { color: var(--fx-down); } .fx .mutec { color: var(--fx-muted); }

/* painel do par */
.fx-side h3 { font: 700 22px var(--fx-mono); margin: 0; }
.fx-side-head { display: flex; align-items: center; gap: 10px; }
.fx-side-head > i { flex: none; width: 14px; height: 14px; border-radius: 4px; }
.fx-st-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; align-self: flex-start; }
.fx-st-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.fx-st-pill.operando { color: var(--fx-up); background: rgba(61,220,151,.1); }
.fx-st-pill.aguardando { color: var(--fx-wait); background: rgba(255,197,49,.1); }
.fx-st-pill.pausado, .fx-st-pill.parado { color: var(--fx-muted); background: rgba(160,169,184,.12); }
.fx-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-fact { background: var(--fx-card2); border: 1px solid var(--fx-line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fx-fact small { font-size: 11.5px; color: var(--fx-muted); font-weight: 600; }
.fx-fact b { font: 700 15px var(--fx-mono); }
.fx-fact .fx-mono { font: 500 14px var(--fx-mono); }
.fx-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--fx-muted); }
.fx-earow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #1E2531; font-size: 13px; }
.fx-earow small { display: block; color: var(--fx-muted); font-size: 12px; }
.fx-swatch { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); }
.fx-legend { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--fx-line); padding-top: 14px; }
.fx-lg { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--fx-soft); line-height: 1.4; }
.fx-lg i { flex: none; width: 10px; height: 10px; border-radius: 3px; margin-top: 4px; }

/* linha do tempo */
.fx-feed { margin-top: 16px; padding: 18px; }
.fx-feed-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.fx-feed h3 { font-size: 16px; margin: 0; }
.fx-link { background: none; border: 0; color: var(--fx-orange-t); font-weight: 600; min-height: 44px; padding: 0 8px; }
.fx-ev { display: grid; grid-template-columns: 56px minmax(0, 1.2fr) minmax(0, 2fr) 110px; gap: 12px; align-items: center; padding: 10px 4px;
  border-top: 1px solid #1E2531; font-size: 14px; }
.fx-ev .t { font-family: var(--fx-mono); color: var(--fx-muted); font-size: 13px; }
.fx-ev .v { font-family: var(--fx-mono); font-weight: 700; text-align: right; }
.fx-ev .w { color: var(--fx-muted); }

/* filtro vindo da cena, acima da Lista */
.fx-fchip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--fx-orange-t); background: rgba(255,138,31,.1);
  border: 1px solid rgba(255,138,31,.35); border-radius: 999px; padding: 0 4px 0 12px; margin-bottom: 12px; }
.fx-fchip button { background: none; border: 0; color: var(--fx-orange-t); font-size: 18px; min-width: 40px; min-height: 40px; }

/* login rápido */
.fx-dialog { background: var(--fx-card); color: var(--fx-text); border: 1px solid var(--fx-line2); border-radius: 14px; padding: 22px; width: min(420px, 92vw); }
.fx-dialog::backdrop { background: rgba(5,7,10,.7); }
.fx-dialog h3 { margin: 0; }
.fx-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* -------------------------------------------------------------- animações */
@keyframes fx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.8px); } }
@keyframes fx-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.6px); } }
@keyframes fx-sleep { 0%, 100% { transform: scaleY(.84); } 50% { transform: scaleY(.87); } }
@keyframes fx-type { from { transform: translateY(0); } to { transform: translateY(-1.2px); } }
@keyframes fx-focus { 0%, 70%, 100% { transform: rotate(0); } 80%, 90% { transform: rotate(-8deg); } }
@keyframes fx-blinkeye { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes fx-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes fx-zzz { 0% { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -10px); } }
@keyframes fx-pulse { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes fx-glow { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
@keyframes fx-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fx-rise { 0% { opacity: 0; transform: translate(-50%, -60%); } 12% { opacity: 1; transform: translate(-50%, -110%); }
  70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -300%); } }
@keyframes fx-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.fx.fx-paused *, .fx.fx-paused *::before { animation-play-state: paused !important; }
/* ------------------------------------------------------ Semáforo do EA */
.fx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--fx-off); flex: none; }
.fx-dot.big { width: 16px; height: 16px; box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.fx-dot.verde { background: var(--fx-up); } .fx-dot.amarelo { background: var(--fx-wait); } .fx-dot.vermelho { background: var(--fx-down); }
.fx-sema-board { margin-top: 12px; background: var(--fx-card2); border: 1px solid var(--fx-line); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px; }
.fx-sema-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.fx-sema-head .fx-dot.big { margin-top: 3px; }
.fx-sema-hl { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--fx-soft); }
.fx-risk { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; border: 1px solid var(--fx-line2); color: var(--fx-soft); white-space: nowrap; }
.fx-risk.crítico { color: var(--fx-down); border-color: rgba(255,112,112,.5); }
.fx-risk.elevado { color: var(--fx-wait); border-color: rgba(255,197,49,.5); }
.fx-risk.normal { color: var(--fx-up); border-color: rgba(61,220,151,.4); }
.fx-sema-pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.fx-sema-pair { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px;
  background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: 10px; padding: 8px 10px; }
.fx-sema-pair b { font-size: 13px; }
.fx-sema-pair strong { color: var(--fx-text); }
.fx-sema-pair small { display: block; color: var(--fx-muted); font-size: 12px; margin-top: 2px; }
.fx-agenda summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--fx-soft); min-height: 28px; display: flex; align-items: center; }
.fx-agenda ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.fx-agenda li { display: grid; grid-template-columns: 46px 38px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13px;
  padding: 5px 0; border-top: 1px solid #1E2531; }
.fx-agenda li .fx-mono { font: 500 13px var(--fx-mono); color: var(--fx-soft); }
.fx-agenda li.past { opacity: .45; }
.fx-agenda li.next { color: var(--fx-text); }
.fx-agenda li.next .fx-mono { color: var(--fx-orange-t); }
.fx-agenda em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--fx-muted); }
.fx-agenda em.alto { color: var(--fx-down); } .fx-agenda em.médio { color: var(--fx-wait); }
.fx-sema-err { color: var(--fx-wait); font-size: 12px; }
.fx-risks { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.fx-sema-alert { font-size: 14px; font-weight: 600; line-height: 1.45; border-radius: 10px; padding: 8px 12px;
  border: 1px solid rgba(255,197,49,.5); background: rgba(255,197,49,.08); color: var(--fx-text); }
.fx-sema-alert.parar { border-color: rgba(255,112,112,.6); background: rgba(160,32,32,.25); }
.fx-sema-note { color: var(--fx-soft); font-size: 12px; line-height: 1.45; }
.fx-sema-note b { color: var(--fx-text); }
.fx-cmd { font-style: normal; font: 700 11px var(--fx-mono); text-transform: uppercase; border-radius: 999px; padding: 1px 7px;
  border: 1px solid var(--fx-line2); color: var(--fx-soft); }
.fx-cmd.vermelho { color: #fff; background: rgba(160,32,32,.85); border-color: var(--fx-down); }
.fx-cmd.amarelo { color: var(--fx-wait); border-color: rgba(255,197,49,.5); }
.fx-cmd.verde { color: var(--fx-up); border-color: rgba(61,220,151,.4); }
.fx-sem-risk { margin: 0; font-size: 13px; line-height: 1.45; color: var(--fx-text); }
.fx-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fx-weeknav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: stretch; }
.fx-wnav { min-width: 36px; min-height: 40px; border-radius: 10px; border: 1px solid var(--fx-line); background: var(--fx-card);
  color: var(--fx-soft); font-size: 18px; cursor: pointer; }
.fx-wnav:hover, .fx-wd:hover { border-color: var(--fx-line2); background: #18202B; }
.fx-wd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--fx-card); border: 1px solid var(--fx-line);
  border-radius: 10px; padding: 6px 8px; font-size: 13px; min-width: 0; min-height: 40px; color: var(--fx-text); cursor: pointer; text-align: left; }
.fx-wd.sel { background: #1C2430; box-shadow: inset 0 0 0 1px var(--fx-orange); }
.fx-today { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--fx-orange-t); background: none; border: 0; cursor: pointer;
  text-decoration: underline; padding: 0; }
.fx-wd b { text-transform: capitalize; }
.fx-wd small { color: var(--fx-muted); font-size: 11px; margin-left: auto; }
.fx-wd.today { border-color: var(--fx-orange); }
.fx-wd.past { opacity: .6; }
/* na bancada: restrição valendo agora */
.fx-sem { font: 700 max(9px, calc(.9cqw * var(--s))) var(--fx-mono); border-radius: 999px; padding: .12cqw .55cqw; background: rgba(10,13,18,.88);
  border: 1px solid var(--fx-line2); color: var(--fx-soft); }
.fx-sem.amarelo { color: var(--fx-wait); border-color: rgba(255,197,49,.5); }
.fx-sem.vermelho { color: var(--fx-down); border-color: rgba(255,112,112,.5); }
.fx-sem.news { color: #fff; background: rgba(160,32,32,.92); border-color: var(--fx-down); }
.fx-sem.hidden { display: none; }
.fx-news { color: var(--fx-soft) !important; }
.fx-news-on { color: var(--fx-down) !important; font-weight: 700; }
/* no painel do par */
.fx-semp { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--fx-line); border-left-width: 3px; border-radius: 10px; padding: 10px 12px; }
.fx-semp.verde { border-left-color: var(--fx-up); } .fx-semp.amarelo { border-left-color: var(--fx-wait); } .fx-semp.vermelho { border-left-color: var(--fx-down); }
.fx-semp > b, .fx-semp summary > b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
/* blocos recolhíveis do painel (notícias, semáforo, legenda) */
.fx-semp summary, .fx-legend summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 6px; position: relative; padding-right: 18px; }
.fx-semp summary::-webkit-details-marker, .fx-legend summary::-webkit-details-marker { display: none; }
.fx-semp summary::after, .fx-legend summary::after { content: "▸"; position: absolute; right: 0; top: 0; color: var(--fx-muted); }
.fx-semp[open] summary::after, .fx-legend[open] summary::after { content: "▾"; }
.fx-semp[open] summary { margin-bottom: 6px; }
.fx-legend summary { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--fx-muted); }
.fx-legend[open] summary { margin-bottom: 8px; }
.fx-sem-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-sem-tags em { font-style: normal; font: 700 12px var(--fx-mono); color: var(--fx-wait); border: 1px solid rgba(255,197,49,.45); border-radius: 999px; padding: 2px 8px; }
.fx-sem-wins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fx-sem-wins li { font-size: 13px; }
.fx-sem-wins li .fx-mono { font: 600 13px var(--fx-mono); }
.fx-sem-wins li small { display: block; color: var(--fx-muted); font-size: 12px; }
.fx-sem-wins li.past { opacity: .45; }
.fx-sem-wins li.now .fx-mono { color: var(--fx-wait); }
.fx-sem-watch { color: var(--fx-muted); font-size: 12px; line-height: 1.4; }

@media (prefers-reduced-motion: reduce) {
  .fx *, .fx *::before, .fx *::after { animation: none !important; transition: none !important; }
}

/* -------------------------------------------------------------- celular */
@media (max-width: 720px) {
  .fx-ev { grid-template-columns: 48px minmax(0, 1fr) 90px; }
  .fx-ev .w { display: none; }
  .fx-bname { display: none; }
  .fx-st[aria-pressed="true"] .fx-bname { display: inline-flex; }
  .fx-chip-scene { font-size: 1.8cqw; }
  .fx-sem { font-size: 1.6cqw; }
  .fx-wd small { display: none; }
  .fx-sema-head { grid-template-columns: auto minmax(0, 1fr); }
  .fx-risks { grid-column: 2; justify-self: start; flex-direction: row; flex-wrap: wrap; }
  .fx-agenda li { grid-template-columns: 42px 34px minmax(0, 1fr); }
  .fx-agenda li em { display: none; }
}

/* <details> nao se comporta bem com display:flex em todos os navegadores */
details.fx-semp, details.fx-legend { display: block; }
details.fx-semp > :not(summary) + :not(summary), details.fx-legend > .fx-lg + .fx-lg { margin-top: 8px; }
/* cestas do operador (um magic por cesta) */
.fx-cesta { grid-template-columns: auto minmax(0, 1fr) auto; }
.fx-cesta > .fx-mono { font: 500 12px var(--fx-mono); color: var(--fx-soft); }
/* notícias do Claude: qual par a notícia crítica atinge */
.fx-impact { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.fx-impact i { font-style: normal; font: 600 11px var(--fx-mono); border-radius: 999px; padding: 1px 7px; border: 1px solid var(--fx-line2); color: var(--fx-muted); }
.fx-impact i.crit { color: #fff; background: rgba(160,32,32,.85); border-color: var(--fx-down); }
.fx-impact i.hit { color: var(--fx-wait); border-color: rgba(255,197,49,.5); }
.fx-impact i.none { opacity: .7; text-decoration: line-through; }
.fx-agenda li.crit > b { color: var(--fx-orange-t); }

/* ------------------------------------------------------------ aba Notícias */
.nx .nx-card { padding: 14px 16px; margin-top: 12px; }
.nx .fx-sema-board.nx-card { margin-top: 0; }
#nxMt5Body { display: flex; flex-direction: column; gap: 12px; margin-top: 0; }
.nx-daynav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.nx-day { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; justify-content: center; text-align: center; }
.nx-day b { font-size: 16px; text-transform: capitalize; }
.nx-day em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--fx-orange-t); }
.nx-day small { flex-basis: 100%; color: var(--fx-muted); font-size: 12px; }
.nx-pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.nx-pair > b { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.nx-pair .nx-st { font-weight: 600; color: var(--fx-soft); }
.nx-sec h3 { font-size: 15px; margin: 0 0 4px; }
.nx-sec .fx-agenda li small { display: block; color: var(--fx-muted); font-size: 12px; margin-top: 2px; }
.fx-agenda em.i3 { color: var(--fx-down); } .fx-agenda em.i2 { color: var(--fx-wait); }
.nx-cfg summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.nx-cfg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nx-cfg-table th { text-align: left; font-size: 12px; color: var(--fx-muted); font-weight: 600; padding: 6px; white-space: nowrap; }
.nx-cfg-table td { padding: 4px 6px; vertical-align: top; border-top: 1px solid var(--fx-line); }
.nx-cfg-table input[type="text"], .nx-cfg-table input[type="number"], .nx-cfg-table textarea {
  background: var(--fx-card2); color: var(--fx-text); border: 1px solid var(--fx-line2); border-radius: 8px; padding: 6px 8px; font: inherit; }
.nx-cfg-table .n-sym, .nx-cfg-table .n-cur { width: 92px; }
.nx-cfg-table input[type="number"] { width: 70px; }
.nx-cfg-table textarea { width: 100%; min-width: 220px; resize: vertical; }
.nx-cfg-table td.center { text-align: center; }
.nx-cfg-table .nx-src { display: block; font-size: 11px; color: var(--fx-muted); margin-top: 3px; white-space: nowrap; }
.nx-cfg-table .nx-src.ea { color: var(--fx-orange-t); font-weight: 600; }
.nx-cfg-table tr.nx-ea input:disabled, .nx-cfg-table tr.nx-ea textarea:disabled { opacity: .75; cursor: not-allowed; }
.fx-semp.off { opacity: .7; } .fx-dot.off { background: var(--fx-off); }
@media (max-width: 720px) {
  .nx-seg button { padding: 0 10px; font-size: 12px; }
}
