/* Controlador X — tema azul animado (Home, Controlador, Corretoras, Histórico, Config) */
@property --cxa { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

body.cx {
  --bg: #030713;
  --bg2: #071026;
  --card: rgba(10, 22, 50, 0.62);
  --border: rgba(90, 160, 255, 0.18);
  --text: #eaf2ff;
  --muted: #8fa3c7;
  --blue: #3b95ff;
  --cy: #5fd0ff;
  --acc: #1f6bff;
  --gold: #fbbf24;
  --radius: 16px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}
body.cx::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(38% 30% at 20% 12%, rgba(31, 107, 255, 0.32), transparent 70%),
    radial-gradient(34% 28% at 85% 30%, rgba(56, 189, 248, 0.2), transparent 70%),
    radial-gradient(40% 32% at 50% 95%, rgba(80, 60, 255, 0.22), transparent 70%),
    linear-gradient(180deg, #030713, #050b1d 60%, #030713);
  animation: cxAurora 18s ease-in-out infinite alternate;
}
body.cx::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(80, 150, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 150, 255, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 85%);
  animation: cxGrid 14s linear infinite;
}
@keyframes cxAurora {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(3%, -2%, 0) scale(1.02); }
}
@keyframes cxGrid { to { background-position: 0 34px, 34px 0; } }
#cxbg { position: fixed; inset: 0; z-index: -1; pointer-events: none; width: 100%; height: 100%; }
body.cx .bg-chart { display: none; }
body.cx a { color: var(--cy); }

/* entrada */
body.cx .cx-rise { opacity: 0; transform: translateY(18px) scale(0.985); animation: cxRise 0.7s cubic-bezier(0.2, 0.75, 0.2, 1) var(--d, 0s) forwards !important; }
@keyframes cxRise { to { opacity: 1; transform: none; } }

/* shells */
body.cx .app-shell { background: transparent; }
body.cx .screen { padding-top: 14px; }

/* header */
body.cx .app-header {
  position: relative;
  margin: 8px 10px 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 32, 72, 0.75), rgba(6, 14, 34, 0.75));
  border: 1px solid rgba(90, 160, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}
body.cx .app-header::after {
  content: "";
  position: absolute;
  left: -40%;
  bottom: 0;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cy), transparent);
  box-shadow: 0 0 12px var(--cy);
  animation: cxSweep 3.6s ease-in-out infinite;
}
@keyframes cxSweep { 0% { left: -40%; } 100% { left: 110%; } }
body.cx .app-header__title strong,
body.cx .brand strong {
  font-family: "Exo 2", Inter, sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  background: linear-gradient(100deg, #ffffff 0%, #bcd8ff 35%, #ffffff 50%, #7fb6ff 65%, #ffffff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: cxShine 5s linear infinite;
}
@keyframes cxShine { to { background-position: -250% 0; } }
body.cx .app-header__title small,
body.cx .brand span { color: var(--cy); font-weight: 600; letter-spacing: 0.04em; }
body.cx .candles-icon { width: 30px; height: 30px; padding: 4px; border-radius: 9px; background: rgba(31, 107, 255, 0.18); border: 1px solid rgba(90, 160, 255, 0.35); box-shadow: 0 0 14px rgba(40, 130, 255, 0.35); align-items: flex-end; justify-content: center; }
body.cx .candles-icon i { width: 4px; border-radius: 2px; background: linear-gradient(180deg, #8fd0ff, #1f6bff); box-shadow: 0 0 6px rgba(80, 170, 255, 0.8); animation: cxBar 1.6s ease-in-out infinite; }
body.cx .candles-icon i:nth-child(2) { animation-delay: -0.5s; }
body.cx .candles-icon i:nth-child(3) { animation-delay: -1s; }
@keyframes cxBar { 0%, 100% { transform: scaleY(0.55); } 50% { transform: scaleY(1); } }
body.cx .candles-icon i { transform-origin: bottom; }
body.cx .app-header > a {
  color: var(--cy) !important;
  border-color: rgba(90, 160, 255, 0.4) !important;
  background: rgba(31, 107, 255, 0.14);
  box-shadow: 0 0 12px rgba(40, 130, 255, 0.35);
  animation: cxSpin 8s linear infinite;
}
@keyframes cxSpin { to { transform: rotate(360deg); } }

/* brand (Home / Corretoras) */
body.cx .brand { padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(14, 32, 72, 0.7), rgba(6, 14, 34, 0.7)); border: 1px solid rgba(90, 160, 255, 0.22); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
body.cx .cx-logo {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 25%, #2a6dff, #0a1c4d 70%);
  box-shadow: 0 0 22px rgba(40, 130, 255, 0.6);
  overflow: visible;
}
body.cx .cx-logo::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;
  background: conic-gradient(from var(--cxa), transparent 0 60%, #5fd0ff 80%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: cxRot 3s linear infinite;
}
body.cx .cx-logo span { font-family: "Exo 2", sans-serif; font-style: italic; font-weight: 900; font-size: 26px; line-height: 1; color: #fff; text-shadow: 0 0 10px rgba(120, 190, 255, 0.95), 0 0 22px rgba(40, 130, 255, 0.8); animation: cxFlick 4s infinite; }
@keyframes cxRot { to { --cxa: 360deg; } }
@keyframes cxFlick { 0%, 92%, 100% { opacity: 1; } 94% { opacity: 0.55; } 96% { opacity: 1; } 97% { opacity: 0.7; } }

/* cards */
body.cx .card {
  position: relative;
  background: linear-gradient(160deg, rgba(14, 30, 68, 0.72), rgba(5, 12, 30, 0.78));
  border: 1px solid rgba(90, 160, 255, 0.2);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.cx .card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: conic-gradient(from var(--cxa), transparent 0 70%, rgba(95, 208, 255, 0.9) 82%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: cxRot 6s linear infinite;
}
body.cx .card h2 { font-family: "Exo 2", Inter, sans-serif; font-weight: 800; letter-spacing: 0.01em; }
body.cx .card p { color: var(--muted); }
body.cx #nome { font-size: 1.25rem; background: linear-gradient(90deg, #fff, #9cc8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* botões */
body.cx .btn { position: relative; overflow: hidden; border-radius: 14px; letter-spacing: 0.02em; transition: transform 0.15s, filter 0.2s, box-shadow 0.2s; }
body.cx .btn:hover { filter: brightness(1.1); }
body.cx .btn--primary {
  background: linear-gradient(135deg, #1a5cff, #2f8dff 55%, #46b4ff);
  color: #fff;
  box-shadow: 0 10px 30px rgba(31, 107, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: cxPulse 2.6s ease-in-out infinite;
}
body.cx .btn--primary::after,
body.cx .ctrl-market-btn::after,
body.cx .ctrl-dir-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: rotate(20deg);
  animation: cxGloss 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cxGloss { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@keyframes cxPulse { 50% { box-shadow: 0 10px 44px rgba(40, 140, 255, 0.75), 0 0 0 4px rgba(59, 149, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.3); } }
body.cx .btn--ghost { background: rgba(14, 30, 68, 0.5); border: 1px solid rgba(90, 160, 255, 0.3); color: #cfe1ff; backdrop-filter: blur(8px); }
body.cx #btn-start { font-family: "Exo 2", Inter, sans-serif; font-weight: 800; font-size: 1.12rem !important; letter-spacing: 0.08em; text-transform: uppercase; margin: 4px 0 14px; }
body.cx #btn-start::before { content: "⚡"; margin-right: 10px; filter: drop-shadow(0 0 6px #fff); }

/* ripple */
body.cx .cx-rip { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, 0.45); pointer-events: none; animation: cxRip 0.6s ease-out forwards; }
@keyframes cxRip { to { transform: scale(4); opacity: 0; } }

/* Home */
body.cx .sub-box { border-top-color: rgba(90, 160, 255, 0.18); }
body.cx .sub-box p { padding: 6px 0; border-bottom: 1px dashed rgba(90, 160, 255, 0.1); }
body.cx .sub-status--ok { color: #4ade80 !important; display: flex !important; align-items: center; gap: 8px; }
body.cx .sub-status--ok::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); animation: cxDot 1.8s infinite; }
@keyframes cxDot { 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
body.cx .countdown { border: 1px solid rgba(90, 160, 255, 0.3); background: linear-gradient(160deg, rgba(31, 107, 255, 0.14), rgba(5, 12, 30, 0.4)); border-radius: 16px; }
body.cx .countdown__label { color: var(--cy); letter-spacing: 0.22em; }
body.cx .countdown__value { font-family: "Exo 2", Inter, sans-serif; font-size: 1.15rem; }
body.cx .countdown__grid div { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(20, 44, 100, 0.8), rgba(6, 14, 34, 0.9)); border: 1px solid rgba(90, 160, 255, 0.3); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.35); }
body.cx .countdown__grid div::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.45); }
body.cx .countdown__grid b { font-family: "Exo 2", Inter, sans-serif; font-size: 1.35rem; background: linear-gradient(180deg, #fff, #8fc4ff); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 8px rgba(60, 150, 255, 0.6)); display: inline-block; }
body.cx .countdown__grid b.cx-tick { animation: cxTick 0.45s ease-out; }
@keyframes cxTick { 0% { transform: translateY(-40%) scale(1.15); opacity: 0.2; } 100% { transform: none; opacity: 1; } }
body.cx .countdown__grid span { color: var(--muted); }
body.cx .menu-links a {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(14, 30, 68, 0.6), rgba(5, 12, 30, 0.6));
  border: 1px solid rgba(90, 160, 255, 0.18);
  border-radius: 14px;
  color: #dbe8ff;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  backdrop-filter: blur(8px);
}
body.cx .menu-links a::after { content: "›"; font-size: 1.3rem; line-height: 1; color: var(--cy); transition: transform 0.2s; }
body.cx .menu-links a:hover { transform: translateX(4px); border-color: rgba(95, 208, 255, 0.55); background: rgba(31, 107, 255, 0.18); }
body.cx .menu-links a:hover::after { transform: translateX(4px); }
body.cx .plan-pick { border-color: rgba(90, 160, 255, 0.25); background: rgba(14, 30, 68, 0.5); transition: transform 0.2s, border-color 0.2s; }
body.cx .plan-pick:hover, body.cx .plan-pick.is-on { border-color: rgba(95, 208, 255, 0.6); background: rgba(31, 107, 255, 0.16); transform: translateY(-2px); }

/* navegação inferior */
body.cx .nav-bottom {
  left: 10px;
  right: 10px;
  bottom: 10px;
  max-width: 460px;
  border-radius: 20px;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom) * 0.5);
  background: linear-gradient(180deg, rgba(14, 30, 68, 0.78), rgba(5, 12, 30, 0.9));
  border: 1px solid rgba(90, 160, 255, 0.28);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(31, 107, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.cx .nav-bottom a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 14px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.25s, background 0.25s, transform 0.2s;
}
body.cx .nav-bottom a svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s, filter 0.25s; }
body.cx .nav-bottom a:active { transform: scale(0.94); }
body.cx .nav-bottom a.active { color: #fff; background: linear-gradient(180deg, rgba(47, 141, 255, 0.35), rgba(31, 107, 255, 0.12)); box-shadow: inset 0 0 0 1px rgba(95, 208, 255, 0.35); }
body.cx .nav-bottom a.active svg { color: var(--cy); filter: drop-shadow(0 0 6px rgba(95, 208, 255, 0.9)); transform: translateY(-1px); animation: cxIco 2.4s ease-in-out infinite; }
body.cx .nav-bottom a.active::before { content: ""; position: absolute; top: -9px; left: 30%; right: 30%; height: 3px; border-radius: 3px; background: var(--cy); box-shadow: 0 0 12px var(--cy); }
@keyframes cxIco { 50% { transform: translateY(-3px); } }

/* Controlador */
body.cx.go-ctrl .app-shell { padding: 2px 8px 96px; }
body.cx .status-row { margin: 0 4px; padding: 6px 4px 8px; gap: 6px; }
body.cx .status-row > span { padding: 4px 9px; border-radius: 999px; background: rgba(14, 30, 68, 0.6); border: 1px solid rgba(90, 160, 255, 0.2); }
body.cx .status-row .ativo { color: var(--cy); }
body.cx .status-row .modo { color: #9cc8ff; }
body.cx .status-row { display: flex; flex-wrap: wrap; justify-content: space-between; row-gap: 6px; }
body.cx .status-row > span { white-space: nowrap; font-size: 0.7rem; }
body.cx .status-row .ativo { padding: 0; border: 0; background: none; }
body.cx .app-shell { padding-bottom: 120px !important; }
body.cx #clock { font-variant-numeric: tabular-nums; color: #fff; }
body.cx .asset-tabs { scrollbar-color: #3b95ff #050b1d; padding: 0 4px 10px; }
body.cx .asset-tabs::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #1f6bff, #5fd0ff); box-shadow: 0 0 8px rgba(59, 149, 255, 0.5); border-color: #050b1d; }
body.cx .asset-tabs button { border-radius: 999px; border-color: rgba(90, 160, 255, 0.2); background: rgba(14, 30, 68, 0.5); color: #a9bde0; font-weight: 600; padding: 7px 12px; transition: all 0.2s; }
body.cx .asset-tabs button:hover { border-color: rgba(95, 208, 255, 0.5); color: #fff; }
body.cx .asset-tabs button.active { background: linear-gradient(135deg, #1a5cff, #3b95ff); border-color: transparent; color: #fff; box-shadow: 0 0 16px rgba(59, 149, 255, 0.6); }
body.cx .chart-wrap {
  margin: 0 2px;
  border-radius: 18px;
  border: 1px solid rgba(90, 160, 255, 0.3);
  background: radial-gradient(120% 80% at 50% 0%, rgba(31, 107, 255, 0.14), transparent 60%), linear-gradient(180deg, rgba(6, 14, 34, 0.92), rgba(3, 8, 20, 0.95));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 30px rgba(31, 107, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
body.cx .chart-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 40%;
  top: -40%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(95, 208, 255, 0.07), transparent);
  animation: cxScan 4.5s linear infinite;
}
@keyframes cxScan { to { top: 100%; } }
body.cx .chart-wrap::after {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 3;
  pointer-events: none;
  border-radius: 14px;
  background:
    linear-gradient(var(--cy), var(--cy)) left top / 16px 2px no-repeat,
    linear-gradient(var(--cy), var(--cy)) left top / 2px 16px no-repeat,
    linear-gradient(var(--cy), var(--cy)) right top / 16px 2px no-repeat,
    linear-gradient(var(--cy), var(--cy)) right top / 2px 16px no-repeat,
    linear-gradient(var(--cy), var(--cy)) left bottom / 16px 2px no-repeat,
    linear-gradient(var(--cy), var(--cy)) left bottom / 2px 16px no-repeat,
    linear-gradient(var(--cy), var(--cy)) right bottom / 16px 2px no-repeat,
    linear-gradient(var(--cy), var(--cy)) right bottom / 2px 16px no-repeat;
  opacity: 0.55;
  filter: drop-shadow(0 0 4px var(--cy));
}
body.cx .price-tag { background: linear-gradient(135deg, #1a5cff, #46b4ff); color: #fff; border-radius: 6px; box-shadow: 0 0 14px rgba(59, 149, 255, 0.8); animation: cxTag 1.6s ease-in-out infinite; }
@keyframes cxTag { 50% { box-shadow: 0 0 24px rgba(95, 208, 255, 1); } }
body.cx .ctrl-alpha-badge { color: #fff; background: linear-gradient(135deg, rgba(26, 92, 255, 0.95), rgba(59, 149, 255, 0.95)); border-radius: 999px; padding: 5px 10px 5px 22px; box-shadow: 0 0 16px rgba(59, 149, 255, 0.6); }
body.cx .ctrl-alpha-badge::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.7); animation: cxLive 1.4s infinite; }
@keyframes cxLive { 70% { box-shadow: 0 0 0 7px rgba(255, 59, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); } }
body.cx .ctrl-deck { margin-top: 10px; padding: 14px 12px 12px; border-radius: 20px; background: linear-gradient(160deg, rgba(14, 30, 68, 0.66), rgba(5, 12, 30, 0.8)); border: 1px solid rgba(90, 160, 255, 0.22); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
body.cx .ctrl-field label { color: var(--cy); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }
body.cx .broker-dd__btn { padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(90, 160, 255, 0.3); background: rgba(10, 22, 50, 0.8); transition: border-color 0.2s, box-shadow 0.2s; }
body.cx .broker-dd__btn:hover, body.cx .broker-dd__btn[aria-expanded="true"] { border-color: rgba(95, 208, 255, 0.6); box-shadow: 0 0 16px rgba(59, 149, 255, 0.35); }
body.cx .broker-dd__btn img, body.cx .broker-dd__list img { background: #08132e; box-shadow: 0 0 8px rgba(59, 149, 255, 0.3); }
body.cx .broker-dd__btn em { color: var(--cy); transition: transform 0.2s; }
body.cx .broker-dd__btn[aria-expanded="true"] em { transform: rotate(180deg); }
body.cx .broker-dd__list { background: rgba(8, 18, 42, 0.97); border: 1px solid rgba(90, 160, 255, 0.3); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(31, 107, 255, 0.2); scrollbar-color: #3b95ff #050b1d; animation: cxDrop 0.22s ease-out; }
@keyframes cxDrop { from { opacity: 0; transform: translateY(-6px); } }
body.cx .broker-dd__list button:hover, body.cx .broker-dd__list button.is-active { background: rgba(59, 149, 255, 0.16); }
body.cx .ctrl-hint { color: var(--muted); }
body.cx .ctrl-hint b { color: #fff; }
body.cx .ctrl-force-box { background: linear-gradient(160deg, rgba(20, 44, 100, 0.55), rgba(6, 14, 34, 0.7)); border: 1px solid rgba(90, 160, 255, 0.3); border-radius: 16px; }
body.cx .ctrl-force-box__head { color: #bcd8ff; }
body.cx .ctrl-force-box__head strong { color: #fff; font-family: "Exo 2", Inter, sans-serif; font-size: 1.05rem; text-shadow: 0 0 10px rgba(95, 208, 255, 0.8); }
body.cx .ctrl-force-scale { color: #6f87b3; }
body.cx .ctrl-force-range { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; accent-color: var(--blue); }
body.cx .ctrl-force-range::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, #1a5cff, #5fd0ff 60%, #a78bfa); box-shadow: 0 0 12px rgba(59, 149, 255, 0.5); }
body.cx .ctrl-force-range::-moz-range-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, #1a5cff, #5fd0ff 60%, #a78bfa); }
body.cx .ctrl-force-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #8fd0ff 45%, #1f6bff); border: 2px solid #fff; box-shadow: 0 0 0 4px rgba(59, 149, 255, 0.25), 0 0 16px rgba(95, 208, 255, 0.9); }
body.cx .ctrl-force-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #8fd0ff 45%, #1f6bff); border: 2px solid #fff; box-shadow: 0 0 16px rgba(95, 208, 255, 0.9); }
body.cx .ctrl-dir-btn { position: relative; overflow: hidden; border-radius: 16px; padding: 18px 12px; font-family: "Exo 2", Inter, sans-serif; font-size: 1.12rem; letter-spacing: 0.12em; transition: transform 0.12s, filter 0.2s; }
body.cx .ctrl-dir-btn--alta { background: linear-gradient(160deg, #22e07a, #12a150 60%, #0b7a3b); box-shadow: 0 10px 26px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35); animation: cxUp 2.4s ease-in-out infinite; }
body.cx .ctrl-dir-btn--baixa { background: linear-gradient(160deg, #ff5a6e, #e11d38 60%, #9f1026); box-shadow: 0 10px 26px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35); animation: cxDn 2.4s ease-in-out infinite; animation-delay: -1.2s; }
body.cx .ctrl-dir-btn--alta::before { content: "▲ "; }
body.cx .ctrl-dir-btn--baixa::before { content: "▼ "; }
@keyframes cxUp { 50% { box-shadow: 0 10px 36px rgba(34, 197, 94, 0.75), 0 0 0 4px rgba(34, 197, 94, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35); } }
@keyframes cxDn { 50% { box-shadow: 0 10px 36px rgba(239, 68, 68, 0.75), 0 0 0 4px rgba(239, 68, 68, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35); } }
body.cx .ctrl-dir-btn:hover { filter: brightness(1.1); }
body.cx .ctrl-dir-btn.is-active { outline: 2px solid #fff; outline-offset: 3px; filter: brightness(1.15); }
body.cx .ctrl-dir-btn:disabled { animation: none; filter: grayscale(0.6) brightness(0.7); }
body.cx .ctrl-market-btn { position: relative; overflow: hidden; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #1a5cff, #2f8dff 55%, #46b4ff); box-shadow: 0 10px 28px rgba(31, 107, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
body.cx .ctrl-status { color: var(--cy); font-weight: 600; }
body.cx .ctrl-safety { color: #fcd34d; }
body.cx .modal { background: rgba(2, 6, 18, 0.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.cx .modal__panel { background: linear-gradient(160deg, rgba(14, 30, 68, 0.95), rgba(5, 12, 30, 0.97)); border: 1px solid rgba(90, 160, 255, 0.35); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(31, 107, 255, 0.25); animation: cxRise 0.35s ease-out both; }

/* Corretoras */
body.cx .corretoras-lead { color: #a9bde0; padding: 0 2px; }
body.cx .corretora-card-wrap { position: relative; padding: 10px; border-radius: 18px; background: linear-gradient(160deg, rgba(14, 30, 68, 0.6), rgba(5, 12, 30, 0.75)); border: 1px solid rgba(90, 160, 255, 0.2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
body.cx .corretora-card-wrap:hover { transform: translateY(-3px); border-color: rgba(95, 208, 255, 0.5); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 22px rgba(31, 107, 255, 0.25); }
body.cx .corretora-card { border: 0; background: transparent; padding: 4px 4px 6px; }
body.cx .corretora-card img { width: 48px; height: 48px; border-radius: 14px; background: #08132e; border: 1px solid rgba(90, 160, 255, 0.3); box-shadow: 0 0 14px rgba(59, 149, 255, 0.35); animation: cxFloat 4s ease-in-out infinite; animation-delay: var(--d, 0s); }
body.cx .corretora-card { grid-template-columns: 48px 1fr auto; }
@keyframes cxFloat { 50% { transform: translateY(-3px); box-shadow: 0 0 22px rgba(95, 208, 255, 0.6); } }
body.cx .corretora-card__info strong { font-family: "Exo 2", Inter, sans-serif; font-size: 0.98rem; }
body.cx .corretora-card__info span { color: var(--muted); }
body.cx .corretora-card__cta { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #1a5cff, #3b95ff); border: 0; box-shadow: 0 0 14px rgba(59, 149, 255, 0.5); }
body.cx .corretora-card__cta::after { content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); animation: cxGloss 3s ease-in-out infinite; animation-delay: var(--d, 0s); }
body.cx .corretora-card__ctrl { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid rgba(95, 208, 255, 0.45); background: rgba(31, 107, 255, 0.14); color: #bfe3ff; transition: background 0.2s, box-shadow 0.2s; }
body.cx .corretora-card__ctrl:hover { background: rgba(31, 107, 255, 0.28); box-shadow: 0 0 16px rgba(59, 149, 255, 0.4); }
body.cx .corretora-card__ctrl::before { content: "◎ "; color: var(--cy); }

/* Histórico */
body.cx .hist-list { padding: 8px 4px 24px; gap: 10px; }
body.cx .hist-item { position: relative; overflow: hidden; padding: 13px 14px 13px 54px; border-radius: 16px; background: linear-gradient(160deg, rgba(14, 30, 68, 0.66), rgba(5, 12, 30, 0.8)); border: 1px solid rgba(90, 160, 255, 0.18); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }
body.cx .hist-item::before { content: "▲"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 0.8rem; color: #fff; background: linear-gradient(160deg, #22e07a, #0b7a3b); box-shadow: 0 0 14px rgba(34, 197, 94, 0.55); }
body.cx .hist-item--baixa::before { content: "▼"; background: linear-gradient(160deg, #ff5a6e, #9f1026); box-shadow: 0 0 14px rgba(239, 68, 68, 0.55); }
body.cx .hist-item::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #22c55e; box-shadow: 0 0 10px #22c55e; }
body.cx .hist-item--baixa::after { background: #ef4444; box-shadow: 0 0 10px #ef4444; }
body.cx .hist-item--alta { border-color: rgba(34, 197, 94, 0.3); }
body.cx .hist-item--baixa { border-color: rgba(239, 68, 68, 0.3); }
body.cx .hist-item__time strong { font-family: "Exo 2", Inter, sans-serif; color: #fff; }
body.cx .hist-empty { color: var(--muted); }
body.cx .hist-empty::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; border: 2px solid rgba(95, 208, 255, 0.5); border-top-color: transparent; animation: cxSpin 2.4s linear infinite; box-shadow: 0 0 20px rgba(59, 149, 255, 0.35); }
body.cx .app-header .chart-tools span { color: #cfe1ff !important; border-color: rgba(90, 160, 255, 0.4) !important; background: rgba(31, 107, 255, 0.14); }

/* Config */
body.cx .cfg-color-row { padding: 12px; border-radius: 14px; background: rgba(5, 12, 30, 0.55); border: 1px solid rgba(90, 160, 255, 0.16); }
body.cx .cfg-color-row label { color: #bcd8ff; font-weight: 600; }
body.cx .cfg-color-row input[type="color"] { width: 60px; height: 40px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px rgba(90, 160, 255, 0.35), 0 0 14px rgba(59, 149, 255, 0.3); }
body.cx .cfg-color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
body.cx .cfg-color-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 12px; }
body.cx .cfg-preview { width: 16px; border-radius: 4px; position: relative; animation: cxCandle 2.2s ease-in-out infinite; box-shadow: 0 0 14px currentColor; }
body.cx .cfg-preview::before { content: ""; position: absolute; left: 50%; top: -12px; bottom: -12px; width: 2px; margin-left: -1px; background: inherit; z-index: -1; border-radius: 2px; }
body.cx .cfg-preview--down { animation-delay: -1.1s; }
@keyframes cxCandle { 50% { transform: scaleY(0.75); } }

@media (min-width: 700px) {
  body.cx .app-shell, body.cx .screen { padding-top: 18px; }
}
