/* Vidrio: el mismo estilo para todos los popups (carteles del gráfico, menús desplegables, selectores, avisos flotantes y
   ventanas), como el menú de IA (web/barra.css .tbm-in). Se carga al final para pisar el fondo, el borde y la sombra de
   cada uno sin tocar su tamaño ni su posición. --c es el color del popup (por defecto violeta); el cartel del gráfico lo
   toma del cuadrito de su encabezado (web/app.js placeTip). */

#tip, #tbTip, #iaToast, #ayCard, #cal, #sxPop, #cpk, .of-menu, #prPop, #themePop, .pop-box, #fxMenu, .tb2 #presets, .tb3 .dt-more,
.tb4 .dt-pop, .micro-pop, .sim-toast, .iw-toast, #grHint, #bfPill, #rsBack, #top #dtPop, .tb12 #tfCtl.tfo #tfs,
.aj-sheet, .cap-sheet, .mv, #taEd, #iwz, #thEd {
  --vc: var(--c, #a78bfa);
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--vc) 13%, transparent), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(103, 232, 249, .06), transparent 60%),
    rgba(var(--float-rgb), .92) !important;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--vc) 26%, var(--line-2)) !important;
  box-shadow: 0 22px 50px rgba(var(--shadow-rgb), .55), 0 0 26px color-mix(in srgb, var(--vc) 14%, transparent), inset 0 1px 0 rgba(var(--hi-rgb), .07) !important;
}
#tip, #ayCard, #cal, #cpk, .of-menu, #prPop, #themePop, #fxMenu, .mv, #top #dtPop { border-radius: 16px !important; }
#tbTip, .pop-box, .micro-pop, #sxPop, .tb2 #presets, .tb3 .dt-more, .tb4 .dt-pop { border-radius: 13px !important; }
#iaToast, .sim-toast, .iw-toast { border-radius: 16px !important; }

/* el cartel del gráfico (Big Trades, muros, niveles, setups, puntos de interés…): borde de luz que gira en su color,
   encabezado con el ícono en un cuadrito que brilla, el dato grande en blanco y la etiqueta del resultado como píldora */
#tip { isolation: isolate; min-width: 270px; }
#tip::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: conic-gradient(from var(--tbm-a, 0deg), transparent 0 18%, var(--vc) 30%, transparent 44% 68%, rgba(103, 232, 249, .9) 80%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: tbmSpin 4s linear infinite; opacity: .8; }
#tip .hd { padding: 11px 14px 10px; gap: 10px; font: 700 13px var(--sans); color: var(--hi); border-bottom: 1px solid rgba(var(--hi-rgb), .06);
  background: linear-gradient(90deg, color-mix(in srgb, var(--vc) 12%, transparent), transparent 70%) !important; }
#tip .hd i { position: relative; width: 22px; height: 22px; flex: none; border-radius: 7px; box-shadow: none;
  background: color-mix(in srgb, var(--vc) 18%, transparent) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vc) 45%, transparent), 0 0 14px color-mix(in srgb, var(--vc) 45%, transparent); }
#tip .hd i::after { content: ""; position: absolute; inset: 6px; border-radius: 3px; background: var(--vc); box-shadow: 0 0 8px var(--vc); }
#tip .bd { padding: 11px 14px 12px; }
#tip .qty { font: 700 14px var(--mono); color: var(--hi); margin-bottom: 7px; letter-spacing: -.01em; }
#tip .row { line-height: 1.6; }
#tip .res { margin-top: 9px; padding: 3px 10px; border-radius: 999px; font-size: 12px;
  background: color-mix(in srgb, currentColor 12%, transparent) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 30%, transparent); }

/* la explicación del botón de la barra (#tbTip) y los avisos flotantes: un poco más de aire */
#tbTip { padding: 9px 12px 10px !important; }
#iaToast, .sim-toast, .iw-toast { padding-left: 16px; padding-right: 16px; }

/* entran con un pequeño rebote (sólo los que se abren y cierran con display) */
#ayCard, #cal, #cpk, #prPop, #themePop, .pop-box, .micro-pop, #fxMenu { animation: vdIn .32s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes vdIn { from { opacity: 0; transform: translateY(-6px) scale(.97); filter: blur(4px); } }

@media (prefers-reduced-motion: reduce) {
  #tip::before, #ayCard, #cal, #cpk, #prPop, #themePop, .pop-box, .micro-pop, #fxMenu { animation: none !important; }
}

/* ---------------------------------------------------------------------------------------------------------------------
   Paneles y ventanas con el diseño del menú de IA (como #iaPanel, #grafo, #alertas): vidrio oscuro con aura, borde de luz,
   encabezado con el ícono en un cuadrito que flota, título blanco con su etiqueta y una línea que explica qué es.
   Cada uno pone sus colores: --vc (principal) y --vc2 (segundo).
   · Laterales: Trading (#simPanel), MetaTrader 5 (#mt5), Indicadores (#taPanel, a la izquierda).
   · Ventanas: crear indicador con IA (#iwz), crear / editar indicador (#taEd), editor de temas (#thEd), foto (.cap-sheet),
     ajustes (.aj-sheet).
   --------------------------------------------------------------------------------------------------------------------- */
#simPanel { --vc: #34d399; --vc2: #22d3ee; }
#side { --vc: #22d3ee; --vc2: #e879f9; }
#layers { --vc: #a78bfa; --vc2: #22d3ee; }
#mt5 { --vc: #60a5fa; --vc2: #818cf8; }
#taPanel { --vc: #22d3ee; --vc2: #a78bfa; }
#iwz { --vc: #e879f9; --vc2: #a78bfa; }
#taEd { --vc: #2dd4bf; --vc2: #a78bfa; }
#thEd { --vc: #f472b6; --vc2: #fbbf24; }
.cap-sheet { --vc: #fb923c; --vc2: #f472b6; }
.aj-sheet { --vc: #a78bfa; --vc2: #67e8f9; }
#iwz, #taEd, #thEd, .cap-sheet, .aj-sheet { --c: var(--vc); }   /* el vidrio de arriba toma este color */

#side, #layers { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, rgba(var(--float-rgb), .96), var(--surface)) !important; }
#side::before, #layers::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--vc) 22%, var(--vc2) 60%, transparent); opacity: .6; }
#side::before { left: 0; }
#layers::before { right: 0; }
#simPanel, #mt5 { position: relative; overflow: hidden; isolation: isolate; width: 384px;
  background: linear-gradient(180deg, rgba(var(--float-rgb), .96), var(--surface)) !important; }
#simPanel.hide, #mt5.hide { display: none; }
#simPanel::before, #mt5::before, #taPanel.open::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--vc) 22%, var(--vc2) 60%, transparent); opacity: .6; }
#taPanel.open::before { left: auto; right: 0; }
#taPanel { background: linear-gradient(180deg, rgba(var(--float-rgb), .96), var(--surface)) !important; isolation: isolate; }
#iwz, #taEd, #thEd { isolation: isolate; overflow: hidden; }
.cap-sheet, .aj-sheet { isolation: isolate; position: relative; }
.cap-sheet { overflow-x: hidden; }

.vd-aura { position: absolute; inset: -60px -40px auto; height: 220px; z-index: -1; pointer-events: none; filter: blur(40px); opacity: .45;
  background: radial-gradient(50% 60% at 20% 40%, color-mix(in srgb, var(--vc) 45%, transparent), transparent),
    radial-gradient(45% 55% at 85% 30%, color-mix(in srgb, var(--vc2) 30%, transparent), transparent);
  animation: vdAura 7s ease-in-out infinite; }
@keyframes vdAura { 50% { opacity: .7; transform: translateY(8px) scale(1.04); } }

.vd-head { display: flex; align-items: center; gap: 11px; padding: 14px 12px 10px 16px; flex: none; position: relative; }
.vd-ht { flex: 1; min-width: 0; }
.vd-ht b { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 7px; font: 700 14px var(--sans); color: var(--hi); }
.vd-ht b em { font: 600 10.5px var(--mono); font-style: normal; color: color-mix(in srgb, var(--vc) 70%, var(--hi)); padding: 1px 6px; border-radius: 6px;
  background: color-mix(in srgb, var(--vc) 13%, transparent); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vd-ht b em:empty { display: none; }
.vd-ht > span { display: block; font: 400 11.5px/1.35 var(--sans); color: var(--muted); margin-top: 2px; }
.vd-hic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; color: color-mix(in srgb, var(--vc) 75%, var(--hi));
  background: linear-gradient(135deg, color-mix(in srgb, var(--vc) 28%, transparent), color-mix(in srgb, var(--vc2) 14%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vc) 34%, transparent), 0 0 18px color-mix(in srgb, var(--vc) 34%, transparent);
  animation: tbmFloat 3s ease-in-out infinite; }
.vd-hic svg { width: 19px; height: 19px; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--vc) 70%, transparent)); }
.vd-x { align-self: flex-start; width: 28px; height: 28px; flex: none; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; font-size: 13px;
  transition: color .2s, background .2s, rotate .35s cubic-bezier(.34, 1.9, .5, 1); }
.vd-x:hover { color: var(--hi); background: rgba(var(--hi-rgb), .08); rotate: 90deg; }
.vd-sep { height: 1px; margin: 0 14px; flex: none; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--vc) 35%, transparent), transparent); }

/* Trading: lo de adentro sobre el vidrio */
#simPanel .sim-body { padding-top: 4px; }
#simPanel .sim-ticket, #simPanel .sim-pos, #simPanel .sim-st, #simPanel .sim-tr, #simPanel .sim-bk, #simPanel .cx-form, #simPanel .sim-curve {
  background-color: rgba(var(--float-rgb), .5); border-color: rgba(var(--hi-rgb), .07); }
#simPanel .sim-ticket, #simPanel .cx-form { border-radius: 16px; }
#simPanel .sim-pos { border-radius: 14px; transition: border-color .3s, translate .4s cubic-bezier(.34, 1.9, .5, 1); }
#simPanel .sim-pos:hover { border-color: color-mix(in srgb, var(--c) 40%, transparent); translate: 2px 0; }
#simPanel .sim-venue { background: rgba(var(--float-rgb), .55); border-color: var(--line); border-radius: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* MT5 */
#mt5 .m5-body { position: relative; }
#mt5 .m5-sec { border-color: rgba(var(--hi-rgb), .05) !important; }

/* Indicadores (a la izquierda) */
#taPanel .ta-in > .vd-head { padding-top: 13px; }
#taPanel .ta-search { background: rgba(var(--float-rgb), .55); border-color: var(--line); border-radius: 12px; }

/* ventanas */
#iwz > .vd-head, #taEd > .vd-head, #thEd > .vd-head { padding: 15px 12px 10px 16px; }
#iwz .iw-steps { border-bottom-color: transparent; }
.cap-sheet > .vd-head { padding: 0 0 4px; }
.cap-sheet > .vd-head .vd-ht b em { font-weight: 500; }

/* Ajustes: el menú de la izquierda como el de la cuenta (ícono en un cuadrito de color) */
.aj-nav { position: relative; background: linear-gradient(180deg, color-mix(in srgb, var(--vc) 7%, transparent), transparent 40%) !important; }
.aj-brand { display: flex; align-items: center; gap: 10px; font: 700 14px var(--sans) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--hi) !important;
  padding: 2px 6px 14px !important; }
.aj-brand .vd-hic { width: 32px; height: 32px; border-radius: 10px; }
.aj-brand .vd-hic svg { width: 17px; height: 17px; }
.aj-nav button i { width: 26px !important; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; font-size: 13px;
  background: color-mix(in srgb, var(--tc, var(--vc)) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc, var(--vc)) 30%, transparent);
  transition: scale .45s cubic-bezier(.34, 2, .5, 1), box-shadow .3s; }
.aj-nav button:hover i { scale: 1.1; }
.aj-nav button.on { background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--tc, var(--vc)) 20%, transparent), transparent 80%) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc, var(--vc)) 30%, transparent) !important; }
.aj-nav button.on i { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc, var(--vc)) 50%, transparent), 0 0 12px color-mix(in srgb, var(--tc, var(--vc)) 45%, transparent); }

@media (prefers-reduced-motion: reduce) { .vd-aura, .vd-hic { animation: none !important; } }

/* Pantallas completas (Resumen del día, Metodologías, Clima): el mismo encabezado, más grande, y el Resumen con el mismo vidrio */
#rsWrap { --vc: #fbbf24; --vc2: #fb923c; }
#mtWrap { --vc: #a78bfa; --vc2: #f472b6; }
#ckWrap { --vc: #38bdf8; --vc2: #34d399; }
.vd-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.vd-brand .vd-hic { width: 44px; height: 44px; border-radius: 14px; }
#rsWrap .vd-brand .vd-hic svg, #mtWrap .vd-brand .vd-hic svg, #ckWrap .vd-brand .vd-hic svg { width: 22px; height: 22px; color: inherit;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--vc) 75%, transparent)); }
.vd-brand .vd-ht b { font: 800 18px var(--sans); letter-spacing: -.01em; color: var(--hi); }
.vd-brand .vd-ht b em { font-size: 11.5px; padding: 2px 8px; border-radius: 8px; }
.vd-brand .vd-ht > span { font-size: 12px; }
.rs-sheet { isolation: isolate; border-color: color-mix(in srgb, var(--vc) 26%, var(--line-2)) !important;
  box-shadow: 0 50px 140px rgba(var(--shadow-rgb), .65), 0 0 40px color-mix(in srgb, var(--vc) 12%, transparent), inset 0 1px 0 rgba(var(--hi-rgb), .07) !important; }
.rs-sheet::before { z-index: -1; }
.rs-sheet::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--tbm-a, 0deg), transparent 0 18%, var(--vc) 30%, transparent 44% 68%, var(--vc2) 80%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: tbmSpin 6s linear infinite; opacity: .55; }
.rs-sheet > .vd-aura { height: 260px; }
:is(.rs-x, .mt-x, .ck-x) { transition: rotate .35s cubic-bezier(.34, 1.9, .5, 1), background .2s, color .2s; }
:is(.rs-x, .mt-x):hover { rotate: 90deg; color: var(--hi); }
@media (max-width: 700px) { .vd-brand .vd-hic { width: 36px; height: 36px; } .vd-brand .vd-ht b { font-size: 15px; } .vd-brand .vd-ht > span { display: none; } }
@media (prefers-reduced-motion: reduce) { .rs-sheet::after { animation: none; } }

/* ✕ de los paneles de los costados: una tecla redonda en relieve (luz arriba, sombra abajo, se hunde al tocarla), más
   grande que antes y con un aro que late en loop para que se encuentre de un vistazo. En el celular, más grande todavía */
:is(.vd-x, .ia-head .x, .gr-head .x, .al-head .x) { position: relative; width: 34px; height: 34px; flex: none; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; font: 800 15px/1 var(--sans); color: var(--hi); cursor: pointer; isolation: isolate;
  background: radial-gradient(120% 120% at 30% 18%, color-mix(in srgb, var(--h-rose) 58%, var(--surface-4, var(--surface-3))) 0%, color-mix(in srgb, var(--h-rose) 24%, var(--surface-2)) 62%, var(--surface-2) 100%);
  box-shadow: inset 0 1px 0 rgba(var(--hi-rgb), .28), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 3px 0 rgba(0, 0, 0, .45), 0 6px 14px rgba(var(--shadow-rgb), .45),
    0 0 0 1px color-mix(in srgb, var(--h-rose) 50%, transparent), 0 0 16px color-mix(in srgb, var(--h-rose) 35%, transparent);
  translate: 0 -1.5px; transition: translate .12s, box-shadow .12s, scale .4s cubic-bezier(.34, 1.9, .5, 1), rotate .35s cubic-bezier(.34, 1.9, .5, 1); }
:is(.vd-x, .ia-head .x, .gr-head .x, .al-head .x)::after { content: ""; position: absolute; inset: -4px; z-index: -1; border-radius: 50%; pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--h-rose) 75%, transparent); animation: vdXPulse 1.8s ease-out infinite; }
@keyframes vdXPulse { 0% { opacity: .95; scale: .82; } 70%, 100% { opacity: 0; scale: 1.4; } }
:is(.vd-x, .ia-head .x, .gr-head .x, .al-head .x):hover { color: var(--hi); rotate: 90deg; scale: 1.08;
  background: radial-gradient(120% 120% at 30% 18%, color-mix(in srgb, var(--h-rose) 75%, var(--surface-4, var(--surface-3))) 0%, color-mix(in srgb, var(--h-rose) 34%, var(--surface-2)) 62%, var(--surface-2) 100%); }
:is(.vd-x, .ia-head .x, .gr-head .x, .al-head .x):active { translate: 0 1.5px; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5), 0 0 0 1px color-mix(in srgb, var(--h-rose) 60%, transparent); }
@media (pointer: coarse), (max-width: 760px) { :is(.vd-x, .ia-head .x, .gr-head .x, .al-head .x) { width: 42px; height: 42px; font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { :is(.vd-x, .ia-head .x, .gr-head .x, .al-head .x)::after { animation: none; opacity: .6; scale: 1; } }
