/* Paleta: base #0B0E11 (carbón), panel #12151A, línea #1E232B,
   acento señal #F0B90B (ámbar, referencia a tickers de futuros),
   alcista #26A69A, bajista #EF5350, texto #C7CCD1 */

:root {
  --bg: #0b0e11;
  --panel: #12151a;
  /* Fondo de las barras (superior, herramientas y lateral derecho): más negro
     que el panel, con un brillo tenue de arriba abajo. */
  --barra: #000000;
  --barra-brillo: #000000;   /* negro puro, el más intenso */
  --line: #1e232b;
  --text: #c7ccd1;
  --text-dim: #6b7280;
  --accent: #f0b90b;
  --bull: #26a69a;
  --bear: #ef5350;
  --mono: 'JetBrains Mono', 'Consolas', monospace;
  --sans: 'Inter', -apple-system, sans-serif;
}

[data-theme="light"] {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #e2e5ea;
  --text: #1a1d23;
  --text-dim: #71767f;
  --accent: #b8860b;
  --bull: #0d9488;
  --bear: #dc2626;
}

body { transition: background 0.15s, color 0.15s; }

* { box-sizing: border-box; }

body {
  margin: 0;
  /* Negro pleno, el mismo de las barras. Era el gris del body el que se veía
     por detrás de la franja de las horas. */
  background: #000000;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  height: 100vh;
  overflow: hidden;
}

/* ---- Barra superior ---- */
#topbar {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  /* Sin margen a la izquierda: el logo tiene que quedar pegado a la esquina.
     El hueco lo recupera el primer elemento después de la marca. */
  padding: 0 16px 0 0;
  border-bottom: 1px solid var(--line);
  background: var(--barra-brillo);
}

/* La línea de separación, dibujada por encima de los hijos de la barra: así
   cruza entera de lado a lado aunque el logo llegue hasta abajo. */
#topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

#topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.3px;
  font-size: 13px;
  white-space: nowrap;
  padding-right: 4px;
}
/* El logo llena el alto de la barra y arranca en el píxel 0. */
#topbar .brand .brand-logo {
  /* Cuadrado y con 'contain': el logo es cuadrado, así que cualquier caja que
     no lo sea lo recorta o lo aplasta. Un píxel menos de alto para que la línea
     de separación se vea entera por debajo. */
  width: 47px;
  height: 47px;
  margin: 0;
  border-radius: 0;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

#topbar select, #topbar input {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
}

#tfFavorites { display: flex; gap: 4px; }

/* ---- Buscador de par (símbolo) con lupa ---- */
.symbol-picker {
  position: relative;
  display: flex;
  align-items: center;
}
.symbol-picker-icon {
  position: absolute;
  left: 8px;
  font-size: 11px;
  opacity: 0.6;
  pointer-events: none;
}
#symbolSearchInput {
  width: 150px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 8px 6px 26px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
}
#symbolSearchInput:focus { outline: none; border-color: var(--accent); }
#symbolDropdown {
  position: absolute;
  top: 32px;
  left: 0;
  /* Más ancho: ahora lleva precio, variación y porcentaje. */
  width: 400px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.symbol-option {
  /* Columnas fijas: logo, par, precio, variación, porcentaje y estrella. Así
     los números quedan alineados de una fila a otra. */
  display: grid;
  grid-template-columns: 24px 1fr 100px 70px 18px;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
}
.symbol-option .so-logo { display: flex; align-items: center; }
.symbol-option .so-logo .par-logo { margin-right: 0; }
.symbol-option .so-par { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.symbol-option .so-precio { text-align: right; }
.symbol-option .so-pct { text-align: right; font-size: 11px; color: var(--text-dim); }
.symbol-option .sube { color: #00c853; }
.symbol-option .baja { color: #e53935; }
.symbol-option:hover { background: rgba(240,185,11,0.12); }
.symbol-option.highlighted { background: rgba(240,185,11,0.2); }
.symbol-option .fav-star { color: var(--accent); }
.symbol-empty { padding: 10px; font-size: 12px; color: var(--text-dim); text-align: center; }
/* Letras y números de las temporalidades en blanco, activa o no. */
.tf-fav-btn {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 6px 9px;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
}
/* Letras y números de las temporalidades siempre en blanco; lo que cambia al
   estar activa es el borde y el fondo, no el color del texto. */
.tf-fav-btn, .tf-fav-btn.active, .tf-fav-btn:hover { color: #ffffff; }
.tf-fav-btn.active { border-color: var(--accent); background: rgba(240,185,11,0.08); }

#topbar .spacer { flex: 1; }

#priceTicker {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
}
#priceTicker.up { color: var(--bull); }
#priceTicker.down { color: var(--bear); }

.btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  transition: border-color 0.15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: #0b0e11; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { opacity: 0.9; color: #0b0e11; }
.btn.danger:hover { border-color: var(--bear); color: var(--bear); }

/* ---- Layout principal ---- */
#main {
  display: flex;
  height: calc(100vh - 48px);
}

#chartPanel {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

#indicatorBar {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-wrap: wrap;
}

.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  user-select: none;
}
.chip.active { color: var(--accent); border-color: var(--accent); }
.chip-label { cursor: pointer; }
.chip-gear {
  cursor: pointer;
  font-size: 12px;
  opacity: 0.6;
  padding: 2px 4px;
  border-radius: 50%;
}
.chip-gear:hover { opacity: 1; background: rgba(240,185,11,0.15); }

/* ---- Modal de configuración de indicador ---- */
#cfgModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cfg-box {
  width: 300px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  /* La caja nunca pasa del alto de la ventana. Lo que se desplaza es la lista
     de campos, así que los botones de abajo quedan siempre a la vista: en
     Estructura y en el Sniper había tantos campos que Aplicar quedaba fuera de
     la pantalla y no se podía pulsar. */
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
#cfgFields {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 4px;
  margin-right: -4px;
}
.cfg-footer { flex-shrink: 0; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.cfg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--accent);
}
.cfg-header #cfgClose { cursor: pointer; color: var(--text-dim); font-weight: 400; }
.cfg-header #cfgClose:hover { color: var(--text); }
.cfg-field { margin-bottom: 12px; }
.cfg-field label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.cfg-field input[type="number"], .cfg-field input[type="text"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 7px 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
}
/* El campo de mensaje de las alertas: sin esto salía con el estilo por defecto
   del navegador y no se distinguía del fondo. */
.cfg-field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 4px;
  padding: 7px 9px;
  font-family: var(--mono);
  font-size: 12px;
  resize: vertical;
  min-height: 46px;
}
.cfg-field textarea:focus { outline: none; border-color: var(--accent, #f0b90b); }

.cfg-field input[type="color"] {
  width: 100%;
  height: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px;
  cursor: pointer;
}
.cfg-footer {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.cfg-footer .btn { flex: 1; }

/* min-height: 0 es imprescindible. En una columna flex el tamaño mínimo por
   defecto es el del contenido, y el lienzo del gráfico tiene alto propio: sin
   esto el contenedor no cede y la columna se desborda, empujando los paneles
   de abajo (RSI, USDT.D) fuera de la pantalla. Se veían "activados" pero
   quedaban por debajo del borde inferior de la ventana. */
#chartContainer { flex: 1; position: relative; min-height: 0; }
/* Los paneles de abajo son hijos de un contenedor flex en columna. Con solo
   `height` el navegador los deja encoger cuando falta sitio, y el RSI acababa
   aplastado a unos 30px: se abría, pero no se veía nada dentro. Con `flex` se
   les reserva su alto y no ceden. */
#rsiContainer { flex: 0 0 140px; height: 140px; border-top: 1px solid var(--line); }
#rsiContainer.hidden, 

#liveIndicator {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

#smcCanvas {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 2;
}

#smcPanels {
  position: absolute;
  right: 12px;
  bottom: 12px;
  /* Por encima de la franja de paneles (z-index 3): Fuerza y Delta deben
     quedar delante del RSI y el Estocástico, no debajo. */
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.corner-table {
  background: rgba(13,17,23,0.92);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  min-width: 150px;
  overflow: hidden;
}
[data-theme="light"] .corner-table { background: rgba(255,255,255,0.95); }
.corner-table .ct-header {
  padding: 6px 10px;
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--line);
}
.corner-table .ct-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
}
.corner-table .ct-row + .ct-row { border-top: 1px solid var(--line); }
.corner-table .ct-label { color: var(--text-dim); }
.corner-table .ct-value.buy { color: #00c853; }
.corner-table .ct-value.sell { color: var(--bear); }
.corner-table .ct-value.delta-pos { color: var(--bull); font-weight: 700; font-size: 14px; }
.corner-table .ct-value.delta-neg { color: var(--bear); font-weight: 700; font-size: 14px; }

/* ---- Barra de herramientas de dibujo ---- */
/* Fila: herramientas a la izquierda, gráfico y paneles a la derecha. */
#chartRow {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  min-width: 0;
}
#chartStack {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

/* Barra de herramientas en vertical, pegada al borde izquierdo. */
#drawToolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  /* Con los iconos al triple ya no caben todos de alto: la barra se desplaza. */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  border-right: 1px solid var(--line);
  border-bottom: none;
  background: #000000;
  flex: 0 0 auto;
}
#drawToolbar .draw-sep {
  width: 28px;
  height: 1px;
  margin: 4px 0;
  background: var(--line);
}
.draw-btn {
  /* Iconos al doble: de 14 px de letra a 28. Fijo, sin ajuste que lo cambie. */
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  cursor: pointer;
  color: #8f959e;   /* trazos de los iconos: gris medio, sin llegar a blanco */
  font-size: 28px;
  line-height: 1;
  user-select: none;
}
.draw-btn:hover { background: rgba(240,185,11,0.12); color: #cfd3d8; }
.draw-btn.active { background: var(--accent); color: #0b0e11; }
.draw-sep { width: 1px; height: 26px; background: var(--line); margin: 0 6px; }

#drawCanvas {
  position: absolute;
  top: 0; left: 0;
  z-index: 4;
  pointer-events: none; /* por defecto no bloquea el pan/zoom del gráfico; se activa solo con una herramienta seleccionada */
}

#volumeResizeHandle {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  margin-top: -4px;
  cursor: ns-resize;
  z-index: 5;
  background: transparent;
}
#volumeResizeHandle:hover, #volumeResizeHandle.dragging {
  background: rgba(240, 185, 11, 0.25);
}

/* Lateral estilo TradingView: tira de iconos pegada al borde derecho y panel
   que se despliega hacia la izquierda. En reposo solo ocupa el ancho de la
   tira, así el gráfico gana sitio. */
#sidebar {
  display: flex;
  flex-direction: row;
  background: transparent;
  border-left: none;
  width: 48px;
  transition: width .15s ease;
}
#sidebar.desplegado { width: 348px; }

/* Sin esto el panel del gráfico no puede encogerse: en flexbox el tamaño
   mínimo por defecto es el del contenido, y la barra de indicadores es ancha.
   El resultado era que al desplegar el lateral la fila se desbordaba en vez de
   dejarle sitio, y el gráfico quedaba tapado por el panel. */
#chartPanel { min-width: 0; min-height: 0; overflow: hidden; }

#rail {
  width: 48px;
  flex: 0 0 48px;
  border-left: 1px solid var(--line);
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
  gap: 4px;
  order: 2;
}
.rail-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  opacity: 0.7;
}
.rail-btn:hover { background: var(--line); opacity: 1; }
.rail-btn.activo { background: var(--line); opacity: 1; box-shadow: inset 2px 0 0 var(--accent, #f0b90b); }

#flyout {
  width: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--panel);
  order: 1;
  display: flex;
  flex-direction: column;
}
#sidebar.desplegado #flyout { width: 300px; overflow-y: auto; }

/* Dentro del desplegable solo se ve el panel activo, y ya sin la flecha, que
   ahora no aporta nada: se cierra pulsando otra vez su icono o la cabecera. */
#flyout .panel { display: none; }
#flyout .panel.abierto { display: block; }
#flyout .panel-arrow { display: none; }

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.sidebar-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 12px;
  border-bottom: 2px solid transparent;
}
.sidebar-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.sidebar-content { flex: 1; overflow-y: auto; padding: 12px; display: none; }
.sidebar-content.active { display: block; }

.alert-item, .invite-item, .user-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}
.alert-item .row, .invite-item .row, .user-item .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
}
.tag.bull { background: rgba(38,166,154,0.15); color: var(--bull); }
.tag.bear { background: rgba(239,83,80,0.15); color: var(--bear); }
.tag.used { background: rgba(107,114,128,0.15); color: var(--text-dim); }
.tag.revoked { background: rgba(239,83,80,0.15); color: var(--bear); }

.form-group { margin-bottom: 10px; }
.form-group label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.form-group input, .form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
}

/* ---- Pantalla de login ---- */
#authScreen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.auth-box {
  width: 340px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 28px;
}
/* Título y logo centrados en la pantalla de entrada. */
.auth-box h1 { text-align: center; }
.auth-box p.sub { text-align: center; }
.auth-box h1 {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 18px;
  margin: 0 0 4px;
}
.auth-box p.sub { color: var(--text-dim); font-size: 12px; margin: 0 0 20px; }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.auth-tabs .btn { flex: 1; }
.error-msg { color: var(--bear); font-size: 12px; margin-top: 8px; min-height: 16px; }

#toastContainer {
  position: fixed;
  top: 56px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  padding: 10px 11px;
  border-radius: 4px;
  font-size: 12px;
  min-width: 220px;
  animation: slideIn 0.2s ease-out;
}
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.hidden { display: none !important; }

/* Recuadro del precio en vivo sobre la escala: precio arriba y cuenta atrás
   debajo, dentro de la misma caja. Sustituye a la etiqueta que dibuja la
   librería del gráfico (apagada con lastValueVisible: false). */
#priceBadge {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 0;
  border-radius: 2px;
  font-family: monospace;
  line-height: 1.1;
  color: #ffffff;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
}
#priceBadge.hidden { display: none; }
#priceBadge .pb-precio { font-size: 12px; font-weight: 700; }
#priceBadge .pb-cuenta { font-size: 11px; opacity: 0.9; }
#priceBadge.pb-urgente .pb-cuenta { font-weight: 700; opacity: 1; }

/* Menú del clic derecho sobre el gráfico */
#chartContextMenu {
  position: fixed;
  z-index: 999;
  background: #1b1f27;
  border: 1px solid #2a2e3d;
  border-radius: 6px;
  padding: 4px 0;
  min-width: 210px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.55);
}
#chartContextMenu.hidden { display: none; }
#chartContextMenu .ctx-item {
  padding: 8px 16px;
  font-size: 13px;
  color: #c7ccd1;
  cursor: pointer;
  user-select: none;
}
#chartContextMenu .ctx-item:hover { background: #262b35; color: #fff; }

/* ===== Buscador de pares: la lupa a la derecha ===== */
/* El icono va después del input en el HTML y posicionado a la derecha, para
   que no se solape con la primera letra de lo que se escribe. */
.symbol-picker { position: relative; }
.symbol-picker .symbol-picker-icon {
  position: absolute;
  /* Hay una regla anterior que fija left: 8px. Si se deja puesta, el navegador
     tiene el elemento sobre-restringido y en escritura de izquierda a derecha
     gana `left`, así que el icono seguía tapando la primera letra pese a pedir
     `right`. Anulándolo explícitamente, el icono se va a la derecha. */
  left: auto;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.55;
  font-size: 12px;
}
.symbol-picker #symbolSearchInput {
  padding-left: 8px;
  padding-right: 26px;
}

/* ===== Panel lateral por secciones plegables ===== */
.panel { border-bottom: 1px solid var(--line); }
.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--text);
}
.panel-head:hover { background: rgba(255,255,255,0.035); }
.panel-ico { font-size: 15px; width: 18px; text-align: center; }
.panel-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-count {
  font-size: 10px;
  background: var(--line);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 1px 7px;
}
.panel-arrow { color: var(--text-dim); font-size: 11px; transition: transform 0.15s; }
.panel.abierto .panel-arrow { transform: rotate(90deg); }
.panel-body { display: none; padding: 4px 12px 14px; }
.panel.abierto .panel-body { display: block; }
.panel-vacio { font-size: 11px; color: var(--text-dim); line-height: 1.5; }

/* ===== Perfil ===== */
.perfil-fila { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar-wrap {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.avatar-wrap:hover { border-color: var(--accent, #f0b90b); }
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; display: none; }
.avatar-wrap.con-foto img { display: block; }
.avatar-wrap.con-foto span { display: none; }
.avatar-wrap span { font-size: 22px; opacity: 0.5; }
.perfil-datos { min-width: 0; }
#perfilUsuario { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.perfil-rol { font-size: 11px; color: var(--text-dim); }

/* ===== Lista de favoritos con precio ===== */
.fav-item {
  /* Mismas columnas que la lista de pares, para que se lean igual. */
  display: grid;
  grid-template-columns: 1fr 86px 62px 14px;
  align-items: center;
  gap: 6px;
  padding: 7px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.fav-item:hover { background: rgba(255,255,255,0.05); }
.fav-item.activo { background: rgba(240,185,11,0.10); }
.fav-sym { font-family: var(--mono); font-weight: 700; display: inline-flex; align-items: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-pct { font-family: var(--mono); font-size: 11px; text-align: right; color: var(--text-dim); }
.fav-pct.sube { color: #00c853; }
.fav-pct.baja { color: #e53935; }
.fav-precio { font-family: var(--mono); font-size: 12px; text-align: right; }
.fav-precio.sube { color: #26a69a; }
.fav-precio.baja { color: #ef5350; }
.fav-quitar { color: var(--text-dim); font-size: 13px; padding: 0 2px; }
.fav-quitar:hover { color: #ef5350; }

/* Autor del indicador en el editor */
.ci-autor { font-size: 10px; color: var(--text-dim); }

/* Subsección plegable dentro de un panel (el envío por Telegram va dentro de
   Alertas, porque configura a dónde se mandan esas mismas alertas). */
.subpanel { border-top: 1px solid var(--border, #1e232b); margin-top: 14px; padding-top: 10px; }
.subpanel-head {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
  font-size: 12px; color: var(--text-dim, #8b90a0); padding: 4px 0;
}
.subpanel-head:hover { color: var(--text, #c7ccd1); }
.subpanel-head .panel-arrow { transition: transform .15s; }
.subpanel.abierto .subpanel-head .panel-arrow { transform: rotate(90deg); }
.subpanel-body { display: none; padding-top: 8px; }
.subpanel.abierto .subpanel-body { display: block; }

/* Apodo del invitado en la lista de administración */
.apodo-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--line);
  color: var(--text-dim);
  font-size: 10px;
  vertical-align: middle;
}

/* Aviso de fallo de un indicador personalizado */
.ci-error {
  margin-top: 6px;
  padding: 5px 7px;
  border-radius: 4px;
  background: rgba(242, 54, 69, 0.12);
  border: 1px solid rgba(242, 54, 69, 0.35);
  color: #f2919a;
  font-size: 11px;
  line-height: 1.4;
  word-break: break-word;
}

/* Tirador para cambiar el alto de los paneles inferiores arrastrando */
.panel-resizer {
  flex: 0 0 6px;
  height: 6px;
  cursor: ns-resize;
  background: transparent;
  border-top: 1px solid var(--line);
  position: relative;
}
.panel-resizer::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 1px;
  transform: translateX(-50%);
  width: 46px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  opacity: 0;
  transition: opacity .12s;
}
.panel-resizer:hover::after, .panel-resizer.arrastrando::after { opacity: 1; }
.panel-resizer.arrastrando { background: rgba(240,185,11,0.12); }
.panel-resizer.hidden { display: none; }
/* Mientras se arrastra no se debe seleccionar texto ni cambiar el cursor */
body.redimensionando { cursor: ns-resize; user-select: none; }

/* Aviso de descuadre entre la compilación del navegador y la del servidor */
#avisoVersion {
  position: fixed;
  left: 50%;
  /* Debajo de la barra superior, para no tapar sus botones. */
  top: 58px;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: 640px;
  padding: 10px 36px 10px 14px;
  border-radius: 6px;
  background: #3a2a08;
  border: 1px solid #f0b90b;
  color: #f5d67b;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
#avisoVersion code { background: rgba(0,0,0,0.35); padding: 1px 5px; border-radius: 3px; }
#cerrarAvisoVersion { position: absolute; right: 12px; top: 9px; cursor: pointer; opacity: 0.7; }
#cerrarAvisoVersion:hover { opacity: 1; }

/* Panel del Estocástico, mismas reglas que el del RSI */
#stochContainer { flex: 0 0 140px; height: 140px; border-top: 1px solid var(--line); }
#stochContainer.hidden { display: none; }

/* Panel de Fuerza: cuadro grande con la dirección resumida y sus motivos */
.fuerza-panel {
  background: rgba(13,17,23,0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 250px;   /* más estrecho: tapaba demasiado gráfico */
  max-height: 70vh;
  overflow-y: auto;
  font-family: var(--mono);
  padding: 10px 11px;
}
[data-theme="light"] .fuerza-panel { background: rgba(255,255,255,0.96); }
.fuerza-panel .fp-head {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-dim); margin-bottom: 10px;
}
.fuerza-panel .fp-dir { font-size: 19px; font-weight: 700; line-height: 1.2; }
.fuerza-panel .fp-flecha { font-size: 16px; }
.fuerza-panel .fp-sub { font-size: 11px; color: var(--text-dim); margin: 4px 0 10px; line-height: 1.4; }
.fuerza-panel .fp-barra {
  height: 7px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 6px;
}
.fuerza-panel .fp-relleno { height: 100%; border-radius: 99px; transition: width .6s ease; }
.fuerza-panel .fp-score { font-size: 10px; color: var(--text-dim); margin-bottom: 10px; }
.fuerza-panel .fp-destacado {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 11px; line-height: 1.4;
  padding: 8px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  margin-bottom: 10px;
}
.fuerza-panel .fp-motivos { display: flex; flex-direction: column; gap: 5px; }
.fuerza-panel .fp-motivo {
  font-size: 11px; line-height: 1.4;
  padding-left: 9px; border-left: 2px solid var(--line);
}
.f-alcista { color: #00c853; } /* mismo verde que las compras del libro */
.f-bajista { color: #ef5350; }
.f-neutro  { color: #f0b90b; }
.fuerza-panel .fp-relleno.f-alcista { background: #00c853; }
.fuerza-panel .fp-relleno.f-bajista { background: #ef5350; }
.fuerza-panel .fp-relleno.f-neutro  { background: #f0b90b; }
.fuerza-panel .fp-motivo.f-alcista { border-left-color: #00c853; }
.fuerza-panel .fp-motivo.f-bajista { border-left-color: #ef5350; }
.fuerza-panel .fp-motivo.f-neutro  { border-left-color: #f0b90b; }

/* Desplegable de indicadores, junto a la estrella de temporalidades */
#indicadoresWrap { position: relative; }
#indicadoresLista {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  /* Por encima de los avisos y de las notificaciones: si alguno se le ponía
     delante, se tragaba los clics y parecía que la lista respondía mal. */
  z-index: 10050;
  min-width: 250px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 26px rgba(0,0,0,0.55);
  padding: 4px 0;
}
#indicadoresLista.hidden { display: none; }
.ind-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.ind-item:hover { background: var(--line); color: var(--text); }
.ind-item.activo { color: var(--accent, #f0b90b); }
.ind-check { width: 12px; text-align: center; font-size: 11px; }
.ind-label { flex: 1; }
.ind-gear { width: 16px; text-align: center; opacity: 0.5; font-size: 12px; }
.ind-gear:hover { opacity: 1; }
#btnIndicadores { white-space: nowrap; }
.subpanel-body .fila-check { display:flex; align-items:center; gap:8px; margin:10px 0 4px; font-size:12px; color:var(--text); }
.subpanel-body textarea { width:100%; background:var(--bg); border:1px solid var(--line); color:var(--text); border-radius:4px; padding:6px; font-family:var(--mono); font-size:11px; resize:vertical; }

/* Cartel de alerta disparada, centrado y bien visible */
/* Los avisos salen arriba a la derecha, no tapando el gráfico. */
#avisoAlerta {
  position: fixed;
  top: 62px;
  right: 58px;
  left: auto;
  transform: none;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  min-width: 320px;
  border-radius: 10px;
  background: #1b1f27;
  border: 2px solid #f0b90b;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  cursor: pointer;
  animation: aaEntra .18s ease-out;
}
@keyframes aaEntra { from { opacity:0; transform:translateX(-50%) translateY(-10px); } to { opacity:1; } }
#avisoAlerta .aa-icono { font-size: 30px; }
#avisoAlerta .aa-titulo { font-size: 16px; font-weight: 700; color: #f0b90b; font-family: var(--mono); }
#avisoAlerta .aa-precio { font-size: 12px; color: var(--text-dim); margin-top: 3px; font-family: var(--mono); }
#avisoAlerta .aa-cerrar { margin-left: auto; opacity: .6; font-size: 14px; }
#avisoAlerta .aa-cerrar:hover { opacity: 1; }
.cfg-nota { margin: 4px 0 12px; padding: 8px 10px; border-radius: 5px; background: rgba(240,185,11,0.08); border: 1px solid rgba(240,185,11,0.3); color: var(--text-dim); font-size: 11px; line-height: 1.5; }
.cfg-nota b { color: var(--accent, #f0b90b); }
/* Panel del flujo de órdenes, mismas reglas que RSI y Estocástico */
#flowContainer { flex: 0 0 140px; height: 140px; border-top: 1px solid var(--line); }
#flowContainer.hidden { display: none; }

/* Franja de paneles inferiores. Va superpuesta sobre el gráfico para que este
   conserve su tamaño: al encender el RSI o el Estocástico las velas no se
   aplastan, simplemente quedan tapadas por abajo. */
#franjaPaneles {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px; /* deja libre el eje de fechas del gráfico */
  z-index: 3;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}
#franjaPaneles:empty { display: none; }
#chartStack { position: relative; }
#rsiContainer, #stochContainer, #flowContainer {
  /* Opacos del todo y en el negro de las barras: al 96% se transparentaba lo
     de detrás y la franja de las horas de estos paneles se veía lavada. */
  background: #05070a;
}
[data-theme="light"] #rsiContainer,
[data-theme="light"] #stochContainer,
[data-theme="light"] #flowContainer { background: rgba(255, 255, 255, 0.96); }

/* Aviso mientras el panel de dominancia todavía no tiene datos que enseñar */

/* Lista de tutoriales: cada enlace separado del siguiente por una línea */
.tut-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tut-item:last-child { border-bottom: none; }
.tut-titulo {
  display: block; font-size: 13px; line-height: 1.4;
  color: var(--text); text-decoration: none; margin-bottom: 4px;
}
.tut-titulo:hover { color: var(--accent, #f0b90b); text-decoration: underline; }
.tut-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tut-url { font-size: 10px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tut-borrar { cursor: pointer; opacity: .6; font-size: 12px; flex-shrink: 0; }
.tut-borrar:hover { opacity: 1; color: #ef5350; }
.tut-vacio { font-size: 12px; color: var(--text-dim); }

/* Lista de indicadores activos, arriba a la izquierda del gráfico */
#leyendaIndicadores {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  max-width: 45%;
  /* Si no cabe, se desplaza con la rueda en vez de meterse debajo de los
     paneles. El alto exacto lo pone ajustarAltoLeyenda(). */
  max-height: calc(100% - 60px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(199,204,209,.35) transparent;
}
#leyendaIndicadores::-webkit-scrollbar { width: 5px; }
#leyendaIndicadores::-webkit-scrollbar-thumb { background: rgba(199,204,209,.35); border-radius: 3px; }
.leyenda-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(11, 14, 17, 0.55);
  font-family: var(--mono);
  /* Un poco mayor: la lista de indicadores activos se lee de lejos. */
  font-size: 14.5px;
  color: #ffffff;
  pointer-events: auto;
  width: fit-content;
}
[data-theme="light"] .leyenda-item { background: rgba(255,255,255,0.7); }
.leyenda-item:hover { background: rgba(11, 14, 17, 0.9); }
.leyenda-punto { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.leyenda-nombre { white-space: nowrap; }
/* Iconos del ojo, la rueda y la X, algo mayores para poder acertarles. */
.leyenda-acc { opacity: 0; cursor: pointer; font-size: 19px; line-height: 1; padding: 0 2px; }
.leyenda-item:hover .leyenda-acc { opacity: .65; }
.leyenda-acc:hover { opacity: 1; }
.leyenda-acc.borrar:hover { color: #ef5350; }

/* Casilla de guardar sesión en la pantalla de entrada */
.recordar {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim);
  margin: 4px 0 12px; cursor: pointer;
}
.recordar input { width: auto; margin: 0; }
.leyenda-cabecera { cursor: pointer; color: #ffffff; }

.leyenda-flecha { font-size: 9px; width: 8px; }
/* Indicador oculto: sigue en la lista, apagado */
/* Oculto: se distingue por el tachado y el icono, no atenuando el texto. */
.leyenda-item.oculto .leyenda-nombre { opacity: .75; }
.leyenda-item.oculto .leyenda-nombre { text-decoration: line-through; }
.leyenda-acc.ojo { opacity: .5; font-size: 18px; }
.leyenda-item.oculto .leyenda-acc.ojo { opacity: .9; }

/* Logo de la marca */
.login-logo { display: block; width: 110px; height: 110px; margin: 0 auto 14px; border-radius: 50%; object-fit: contain; }
.brand-logo { width: 20px; height: 20px; vertical-align: middle; margin-right: 8px; border-radius: 50%; }

/* Panel del Sniper Oscillator */
#sniperContainer { flex: 0 0 160px; height: 160px; border-top: 1px solid var(--line); position: relative; background: #05070a; }
#sniperContainer.hidden { display: none; }
/* El lienzo va POR ENCIMA de los lienzos de la librería: sin z-index quedaba
   debajo y la cinta se dibujaba pero no se veía. */
#sniperCanvas { position: absolute; inset: 0; pointer-events: none; z-index: 3; }

/* Calendario económico */
.cal-nota { font-size: 11px; color: var(--text-dim); line-height: 1.5; margin-bottom: 10px; }
.cal-item { padding: 9px 0; border-bottom: 1px solid var(--line); }
.cal-item:last-child { border-bottom: none; }
.cal-item.pasado { opacity: .55; }
.cal-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.cal-hora { font-family: var(--mono); font-size: 11px; color: var(--accent, #f0b90b); flex-shrink: 0; }
.cal-estrellas { font-size: 9px; letter-spacing: 1px; }
.cal-titulo { font-size: 12px; color: var(--text); line-height: 1.35; }
.cal-datos { display: flex; gap: 12px; margin-top: 4px; font-size: 10px; color: var(--text-dim); font-family: var(--mono); }
.cal-real { color: var(--text); font-weight: 700; }
.cal-real.mejor { color: #26a69a; }
.cal-real.peor { color: #ef5350; }
.cal-vacio { font-size: 12px; color: var(--text-dim); }

/* Variación de 24 horas, al lado del precio */
#cambio24h { font-family: var(--mono); font-size: 12px; margin-left: 6px; padding: 2px 6px; border-radius: 4px; }
#cambio24h.sube { color: #00c853; background: rgba(0,200,83,.12); }
#cambio24h.baja { color: #e53935; background: rgba(229,57,53,.12); }


/* Ideas */
.idea-adjuntos { display: flex; gap: 6px; margin-bottom: 10px; }
.idea-adjuntos .btn { flex: 1; font-size: 11px; text-align: center; cursor: pointer; }
#ideaPrevia img { width: 100%; border-radius: 4px; border: 1px solid var(--line); margin-bottom: 8px; }
#ideaPrevia .quitar { font-size: 11px; color: var(--text-dim); cursor: pointer; display: block; margin-bottom: 8px; }
#ideaPrevia .quitar:hover { color: #ef5350; }
.idea-item { padding: 11px 0; border-bottom: 1px solid var(--line); }
.idea-item:last-child { border-bottom: none; }
.idea-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.idea-autor { font-size: 12px; font-weight: 700; color: var(--text); }
.idea-fecha { font-size: 10px; color: var(--text-dim); }
.idea-borrar { margin-left: auto; cursor: pointer; opacity: .5; font-size: 11px; }
.idea-borrar:hover { opacity: 1; color: #ef5350; }
.idea-texto { font-size: 12px; line-height: 1.5; color: var(--text); white-space: pre-wrap; margin-bottom: 6px; }
.idea-item img { width: 100%; border-radius: 4px; border: 1px solid var(--line); cursor: zoom-in; }
.idea-vacio { font-size: 12px; color: var(--text-dim); }

/* Aviso de que el acceso está a punto de caducar */
#avisoVencimiento {
  position: fixed; left: 50%; top: 58px; transform: translateX(-50%);
  z-index: 10040; display: flex; align-items: center; gap: 12px;
  background: rgba(40, 26, 8, .97); border: 1px solid #f0b90b; border-radius: 6px;
  padding: 11px 16px; font-size: 13px; color: #f5deb3; max-width: 620px;
}
#avisoVencimiento.urgente { background: rgba(48, 14, 14, .97); border-color: #ef5350; color: #ffd6d6; }
#avisoVencimiento b { color: #fff; }
#avisoVencimiento .av-cerrar { cursor: pointer; opacity: .7; margin-left: 4px; }
#avisoVencimiento .av-cerrar:hover { opacity: 1; }

/* Reproducción de velas */
#reproWrap { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
#reproControles { display: flex; align-items: center; gap: 4px; }
#reproControles.hidden { display: none; }
.repro-b { padding: 3px 8px; font-size: 12px; }
#reproVel { background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 4px; padding: 3px 6px; font-family: var(--mono); font-size: 11px; }
#reproPos { font-family: var(--mono); font-size: 11px; color: var(--text-dim); min-width: 74px; text-align: center; }
#btnRepro.activo { background: var(--accent, #f0b90b); color: #0b0e11; }
#chartContainer.eligiendo-repro { cursor: crosshair; }

/* Lista de temporalidades con estrella */
#tfWrap { position: relative; }
#tfBoton { font-family: var(--mono); font-size: 12px; min-width: 52px; text-align: center; }
#tfDropdown {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 10050;
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px;
  min-width: 120px; max-height: 340px; overflow-y: auto; padding: 4px 0;
}
#tfDropdown.hidden { display: none; }
.tf-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 10px; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--text);
}
.tf-option:hover { background: rgba(255,255,255,.06); }
.tf-option.actual { color: var(--accent, #f0b90b); font-weight: 700; }
.fav-star { cursor: pointer; opacity: .45; font-size: 13px; }
.fav-star.on { opacity: 1; color: #f0b90b; }
.fav-star:hover { opacity: 1; }
/* Firma al pie de los avisos. Fija: no depende de ningún ajuste. */
#avisoAlerta .aa-firma { font-size: 9px; color: var(--text-dim); opacity: .75; margin-top: 6px; letter-spacing: .4px; }

/* Recuadro para escribir un texto en el gráfico */
#modalTexto {
  position: fixed; inset: 0; z-index: 10060;
  background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center;
}
#modalTexto.hidden { display: none; }
#modalTexto .mt-caja {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; width: 340px;
}
#modalTexto h4 { margin: 0 0 12px; font-size: 14px; color: var(--text); }
#modalTexto textarea {
  width: 100%; min-height: 76px; resize: vertical;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  color: var(--text); padding: 8px; font-size: 13px; font-family: inherit;
}
#modalTexto .mt-fila { display: flex; gap: 10px; margin-top: 10px; align-items: flex-end; }
#modalTexto .mt-fila > div { flex: 1; }
#modalTexto label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
#modalTexto input[type="number"], #modalTexto input[type="color"] {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 4px; color: var(--text); padding: 5px; font-family: var(--mono); font-size: 12px;
}
#modalTexto input[type="color"] { height: 30px; padding: 2px; cursor: pointer; }
#modalTexto .mt-botones { display: flex; gap: 8px; margin-top: 14px; }
#modalTexto .mt-botones .btn { flex: 1; }
#modalTexto .mt-previa {
  margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 4px;
  background: var(--bg); text-align: center; overflow: hidden; white-space: pre-wrap;
}

/* Botones de posición: recuadro verde con L y rojo con S */
.ls-caja {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 4px;
  font-family: var(--mono); font-weight: 700; font-size: 17px;
  color: #0b0e11; line-height: 1;
}
.ls-largo { background: #00c853; }
.ls-corto { background: #e53935; color: #fff; }
.draw-btn.active .ls-caja { outline: 2px solid #0b0e11; }

/* Logo de cada moneda. El círculo con la inicial queda debajo: si la imagen
   carga, la tapa; si no, es lo que se ve. */
.par-logo {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #2a2f3a; overflow: hidden; flex-shrink: 0;
  vertical-align: middle; margin-right: 8px;
}
.par-logo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; transition: opacity .15s;
}
.par-inicial { color: #c7ccd1; font-weight: 700; font-family: var(--mono); line-height: 1; }
.so-nombre { display: inline-flex; align-items: center; }
#logoPar { display: inline-flex; align-items: center; margin-right: -2px; }
#logoPar .par-logo { margin-right: 4px; }
.fav-sym { display: inline-flex; align-items: center; }
/* El par en la lista de indicadores activos */
.leyenda-par { font-weight: 700; }
.leyenda-par .par-logo { margin-right: 2px; }
.leyenda-par .lp-precio { font-family: var(--mono); font-weight: 400; }
.leyenda-par .lp-pct { font-family: var(--mono); font-size: 11px; font-weight: 400; }
.leyenda-par .sube { color: #00c853; }
.leyenda-par .baja { color: #e53935; }

/* Recuadro de confirmación propio, en vez del aviso del navegador */
#modalConfirmar {
  position: fixed; inset: 0; z-index: 10070;
  background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center;
}
#modalConfirmar.hidden { display: none; }
#modalConfirmar .mc-caja {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 20px; width: 330px; text-align: center;
}
#modalConfirmar .mc-icono { font-size: 34px; margin-bottom: 8px; }
#modalConfirmar h4 { margin: 0 0 6px; font-size: 15px; color: var(--text); }
#modalConfirmar .mc-texto { font-size: 12px; color: var(--text-dim); line-height: 1.5; margin-bottom: 16px; }
#modalConfirmar .mc-botones { display: flex; gap: 8px; }
#modalConfirmar .mc-botones .btn { flex: 1; }
.btn.peligro { background: #e53935; color: #fff; border-color: #e53935; }
.btn.peligro:hover { background: #c62828; }

/* Con las herramientas ocultas, el ojo se marca */
#btnOcultarDibujos.oculto { color: #e53935; }

/* Pantalla dividida */
#dividirWrap { position: relative; margin-left: 6px; }
/* Icono de pantalla dividida más grande, que se distinga de un vistazo. */
#btnDividir { font-family: var(--mono); font-size: 19px; line-height: 1; padding: 4px 10px; }
#dividirMenu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 10050;
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px;
  min-width: 130px; padding: 4px 0;
}
#dividirMenu.hidden { display: none; }
.div-op { padding: 7px 12px; font-size: 12px; cursor: pointer; color: var(--text); }
.div-op:hover { background: rgba(255,255,255,.07); }
.div-op.actual { color: var(--accent, #f0b90b); font-weight: 700; }

/* Los gráficos añadidos se reparten el espacio a la derecha o debajo */
#zonaGraficos { display: flex; flex: 1; min-height: 0; min-width: 0; }
/* Con pantalla dividida, el principal y los añadidos se reparten a partes
   iguales; sin ella, el principal ocupa todo. */
#chartStack { min-width: 0; flex: 1 1 0; }
#panelesExtra { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; min-height: 0; }
#panelesExtra.hidden { display: none; }
.grafico-extra { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--line); }
.ge-barra { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-bottom: 1px solid var(--line); background: var(--panel); }
.ge-barra input { width: 92px; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 4px; padding: 3px 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.ge-barra select { background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 4px; padding: 3px 4px; font-family: var(--mono); font-size: 11px; }
.ge-precio { margin-left: auto; font-family: var(--mono); font-size: 11px; }
.ge-precio.sube { color: #00c853; }
.ge-precio.baja { color: #e53935; }
.ge-lienzo { flex: 1; min-height: 0; }

/* Rejilla de gráficos. Con "display: contents" los gráficos añadidos pasan a
   ser celdas de la rejilla igual que el principal, así que 4 pantallas quedan
   en un cuadro de 2x2 en vez de uno grande y tres apilados. */
#rejillaGraficos { display: grid; flex: 1; min-width: 0; min-height: 0; gap: 2px; }
#rejillaGraficos.p1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
#rejillaGraficos.p2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
#rejillaGraficos.p3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
#rejillaGraficos.p3 #chartStack { grid-row: span 2; }
#rejillaGraficos.p4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
#panelesExtra:not(.hidden) { display: contents; }
/* La foto de perfil, redonda, en la cabecera y en la barra lateral */
.ico-avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.panel-ico:has(.ico-avatar), .rail-ico:has(.ico-avatar) { width: 22px; height: 22px; display: inline-block; }
/* La pantalla seleccionada se marca con un borde, para saber a cuál va el par */
#rejillaGraficos:not(.p1) #chartStack.activa,
.grafico-extra.activa { outline: 1px solid var(--accent, #f0b90b); outline-offset: -1px; }
/* Arrastrar favoritos para ordenarlos */
.fav-item { cursor: grab; }
.fav-item.arrastrando { opacity: .4; }
.fav-item.encima { box-shadow: inset 0 2px 0 var(--accent, #f0b90b); }

/* Contraseñas con ojito */
.campo-clave { position: relative; display: flex; align-items: center; }
.campo-clave input { flex: 1; padding-right: 34px; }
.ver-clave {
  position: absolute; right: 8px; cursor: pointer; font-size: 14px; opacity: .5; user-select: none;
}
.ver-clave:hover { opacity: 1; }
.ver-clave.viendo { opacity: 1; color: var(--accent, #f0b90b); }
.aviso-clave { font-size: 11px; margin-top: 5px; min-height: 14px; }
.aviso-clave.mal { color: #ef5350; }
.aviso-clave.bien { color: #00c853; }

/* La pestaña elegida se resalta */
.auth-tabs .btn { flex: 1; }
/* Globo de ideas nuevas en la barra lateral */
.rail-btn { position: relative; }
.rail-globo {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px;
  background: #e53935; color: #fff; border-radius: 8px;
  font-size: 9px; font-weight: 700; line-height: 15px; text-align: center; padding: 0 3px;
}

/* Visor de imágenes de las ideas */
#visorImagen {
  position: fixed; inset: 0; z-index: 10080;
  background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center;
  padding: 48px 16px 16px; cursor: zoom-out;
}
#visorImagen img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; border-radius: 4px; }
#visorImagen .vi-barra { position: absolute; top: 10px; right: 14px; display: flex; gap: 8px; }
#visorImagen .vi-boton {
  background: rgba(30,35,43,.95); border: 1px solid #2a2f3a; color: #c7ccd1;
  border-radius: 5px; padding: 6px 12px; font-size: 12px; cursor: pointer; text-decoration: none;
}
#visorImagen .vi-boton:hover { color: #fff; border-color: #f0b90b; }
#ideaPrevia img { cursor: zoom-in; }

/* Large order */
#modalLargeOrder { position: fixed; inset: 0; z-index: 10075;
  background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; }
#modalLargeOrder.hidden { display: none; }
#modalLargeOrder .mlo-caja { background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px; width: 330px; }
#modalLargeOrder h4 { margin: 0 0 6px; font-size: 15px; color: var(--text); }
#modalLargeOrder .mlo-nota { font-size: 11px; color: var(--text-dim); line-height: 1.5; margin-bottom: 14px; }
#modalLargeOrder input { width: 100%; }
.mlo-lados { display: flex; gap: 8px; }
.mlo-lado { flex: 1; text-align: center; padding: 8px; border: 1px solid var(--line);
  border-radius: 5px; cursor: pointer; font-size: 12px; color: var(--text-dim); }
.mlo-lado[data-lado="compra"].activo { background: #00c853; border-color: #00c853; color: #0b0e11; font-weight: 700; }
.mlo-lado[data-lado="venta"].activo { background: #e53935; border-color: #e53935; color: #fff; font-weight: 700; }
.mlo-botones { display: flex; gap: 8px; margin-top: 16px; }
.mlo-botones .btn { flex: 1; }
.draw-btn.hidden { display: none; }

/* Delta buy and sell: tabla con sus columnas */
#deltaTfPanel { pointer-events: auto; }
#deltaTfPanel.hidden { display: none; }
.corner-table.dtf { min-width: 245px; }
.dtf-cabecera, .dtf-fila {
  display: grid;
  grid-template-columns: 38px 1fr 1fr 1fr;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 12px;
}
.dtf-cabecera { color: #c7ccd1; font-size: 11px; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.dtf-cabecera span { text-align: right; }
.dtf-fila.destacada { font-size: 14px; font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dtf-lista { padding: 4px 0 2px; }
.dtf-fila[data-tf] { cursor: pointer; }
.dtf-fila[data-tf]:hover { background: rgba(255,255,255,.05); }
.dtf-fila.elegida { background: rgba(240,185,11,.16); border-left: 3px solid var(--accent, #f0b90b); }
.dtf-tf { color: var(--accent, #f0b90b); font-weight: 700; text-align: left; }
.dtf-compra { color: #00c853; text-align: right; }
.dtf-venta { color: #e53935; text-align: right; }
.dtf-delta { color: #ffffff; text-align: right; font-weight: 700; }
/* La volatilidad, al pie del panel de Fuerza */
.fp-volatilidad {
  margin-top: 8px; padding: 6px 8px; border-radius: 4px; text-align: center;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .4px;
}
.fp-volatilidad.v-normal  { background: rgba(120,123,134,.18); color: #9aa0ab; }
.fp-volatilidad.v-media   { background: rgba(41,182,246,.16); color: #29b6f6; }
.fp-volatilidad.v-alta    { background: rgba(255,167,38,.18); color: #ffa726; }
.fp-volatilidad.v-extrema { background: rgba(229,57,53,.20); color: #ef5350; }
.dtf-fuentes { font-size: 9.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }
.dtf-fuentes { margin-top: 6px; font-size: 9px; color: var(--text-dim); line-height: 1.4; font-family: var(--mono); }

/* Fuerza a la derecha con el Delta buy and sell a su izquierda */
#smcPanels { display: flex; flex-direction: row; align-items: flex-end; gap: 8px; }
/* El Delta Spot, abajo a la izquierda */
#panelesIzquierda {
  position: absolute; left: 12px; bottom: 12px; z-index: 6;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
#panelesIzquierda > * { pointer-events: auto; }
/* La marca dorada, encima del Delta Spot */


/* Verde cuando el dato sale positivo y rojo cuando sale negativo. */
#avisoAlerta.positivo { border-color: #00c853; }
#avisoAlerta.positivo .aa-titulo { color: #00c853; }
#avisoAlerta.negativo { border-color: #e53935; }
#avisoAlerta.negativo .aa-titulo { color: #ef5350; }

/* La franja de la fecha y la hora, con el mismo fondo que las laterales. */
#chartContainer .tv-lightweight-charts td:last-child { background: transparent; }
#ejeFechas, .franja-fecha { background: var(--barra, #000000); }

/* La marca dorada, más pequeña y algo más abajo. */

/* Filtro de importancia del calendario */
.cal-filtro { display: flex; gap: 12px; padding: 6px 2px 8px; font-size: 11px; color: var(--text-dim); }
.cal-filtro label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
/* Resumen de invitados en administración */
.resumen-invitados { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.ri-fila { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; color: var(--text-dim); }
.ri-fila b { color: var(--text); font-family: var(--mono); }
.ri-ok { color: #00c853 !important; }
.ri-no { color: #ef5350 !important; }
.ri-lista { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.ri-chip { background: rgba(0,200,83,.12); color: #00c853; border-radius: 10px; padding: 2px 9px; font-size: 11px; font-family: var(--mono); }
.ri-vacio { color: var(--text-dim); font-size: 11px; }
/* Iconos a trazo de la barra superior */
#btnIndicadores svg, #btnRepro svg { display: block; color: #ffffff; }
#btnIndicadores, #btnRepro { display: inline-flex; align-items: center; justify-content: center; }
/* Panel del MACD */
#macdContainer { flex: 0 0 140px; height: 140px; border-top: 1px solid var(--line); position: relative; background: #05070a; }
#macdContainer.hidden { display: none; }
/* Marca dorada: por encima de todo, sin transparencia */
#marcaOroFija {
  position: fixed;
  width: 165px;
  height: auto;
  z-index: 9000;
  pointer-events: none;
  opacity: 1;
  display: block;
}

/* Franja inferior de las horas: negra del todo, como las laterales */
#chartStack .tv-lightweight-charts { background: transparent; }
#ejeFechas, .franja-fecha, #timeAxisStrip { background: #000000 !important; }

/* La marca no debe sobresalir hacia arriba: altura fija */
#marcaOroFija { width: 120px; height: 30px; object-fit: contain; object-position: left bottom; }



/* Paneles inferiores: negro pleno, sin transparencia. Va al final del archivo
   para que gane a cualquier regla anterior que los dejara en el gris del
   fondo, que es lo que hacía que su franja de horas se viera lavada. */
#rsiContainer, #stochContainer, #flowContainer,
#sniperContainer, #macdContainer { background: #05070a; }

/* Etiqueta breve de aviso: dos segundos, arriba a la derecha, sin sonido */
#etiquetaAviso {
  position: fixed;
  top: 60px;
  right: 58px;
  z-index: 10001;
  background: #05070a;
  border: 1px solid var(--accent, #f0b90b);
  border-radius: 6px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: #ffffff;
  pointer-events: none;
}

/* En la lista de favoritos, puntero normal en vez de manita */
#favList, #favList *, .fav-item, .fav-item * { cursor: default; }

/* ---- Mensajes del administrador ---- */
.msg-opciones { display: flex; gap: 6px; margin-bottom: 10px; }
.msg-opciones label { flex: 1; font-size: 10px; color: var(--text-dim, #8b8f98); display: flex; flex-direction: column; gap: 3px; }
.msg-opciones input { width: 100%; box-sizing: border-box; }
.msg-item { display: flex; gap: 6px; align-items: flex-start; padding: 6px 8px; margin-bottom: 6px;
  border: 1px solid var(--line, #1e232b); border-radius: 6px; font-size: 12px; }
.msg-item .msg-txt { flex: 1; white-space: pre-wrap; word-break: break-word; }
.msg-item .msg-meta { display: block; color: var(--text-dim, #8b8f98); font-size: 10px; margin-top: 3px; }
.msg-item .msg-borrar { cursor: pointer; color: #ef5350; }
#avisoAdmin { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 99999;
  max-width: min(640px, 90vw); padding: 16px 44px 16px 20px; border-radius: 10px;
  background: #0d1116; border: 1px solid #f0b90b; color: #e8e8e8; font-size: 15px; line-height: 1.4;
  box-shadow: 0 10px 40px rgba(0,0,0,.6); white-space: pre-wrap; word-break: break-word; }
#avisoAdmin .aviso-cerrar { position: absolute; top: 8px; right: 12px; cursor: pointer; color: #8b8f98; }
.mensaje-inicio { margin: 10px 0 14px; padding: 10px 12px; border-radius: 8px; border: 1px solid #f0b90b;
  background: rgba(240,185,11,.08); color: #e8e8e8; font-size: 13px; line-height: 1.4;
  white-space: pre-wrap; word-break: break-word; text-align: left; }

/* Pestañas de la lista de pares: todos, cripto, acciones */
.so-pestanas { display: flex; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line, #1e232b);
  position: sticky; top: 0; background: #0b0e11; z-index: 1; }
.so-pestana { flex: 1; text-align: center; font-size: 11px; padding: 4px 6px; border-radius: 4px;
  cursor: pointer; color: #8b8f98; border: 1px solid var(--line, #1e232b); }
.so-pestana.activa { color: #0b0e11; background: #f0b90b; border-color: #f0b90b; font-weight: bold; }
.so-tag { font-size: 9px; padding: 1px 4px; border-radius: 3px; background: rgba(33,150,243,.2);
  color: #5b8def; margin-left: 4px; vertical-align: middle; }

.so-tag-bitunix { background: rgba(240,185,11,.18); color: #f0b90b; }

/* El desplegable "Indicadores (n)" se queda fijo arriba al desplazar la lista
   con la rueda; solo se mueve lo demás. */
#leyendaIndicadores .leyenda-cabecera {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(11, 14, 17, 0.95);
}
[data-theme="light"] #leyendaIndicadores .leyenda-cabecera { background: rgba(255,255,255,0.95); }

/* Soporte por Telegram */
.soporte-flotante { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; align-items: center;
  gap: 8px; padding: 10px 16px; border-radius: 24px; background: #229ED9; color: #fff; text-decoration: none;
  font-weight: bold; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.45); }
.soporte-flotante:hover { filter: brightness(1.1); }
.soporte-flotante.hidden { display: none; }
.rail-btn[data-panel="soporte"] .rail-ico { color: #229ED9; display: inline-flex; }
.panel-head[data-panel="soporte"] .panel-ico { color: #229ED9; display: inline-flex; }

/* Recuadro de precio + cuenta atrás en las pantallas divididas */
.ge-badge {
  position: absolute; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 3px 0; border-radius: 2px;
  font-family: monospace; line-height: 1.1; color: #ffffff;
  pointer-events: none; white-space: nowrap; overflow: hidden;
}
.ge-badge.hidden { display: none; }
.ge-badge .pb-precio { font-size: 12px; font-weight: 700; }
.ge-badge .pb-cuenta { font-size: 11px; opacity: 0.9; }
.ge-badge.pb-urgente .pb-cuenta { font-weight: 700; opacity: 1; }

/* Línea vertical del cursor, compartida entre el gráfico y los paneles */
.cursor-vertical {
  position: absolute; top: 0; width: 0; display: none;
  border-left: 1px dashed rgba(200, 205, 215, 0.75);
  pointer-events: none; z-index: 6;
}

/* Firma bajo el título de la pantalla de entrada */
.auth-box p.by { text-align: center; color: var(--text-dim); font-size: 10px; margin: 0 0 4px; letter-spacing: 0.5px; }

/* Alertas de cruce de precio: línea punteada movible con su etiqueta */
.cruce-linea {
  position: absolute; left: 0; height: 7px; margin-top: -3px; z-index: 7;
  cursor: ns-resize; pointer-events: auto;
}
.cruce-linea::before {
  content: ''; position: absolute; left: 0; right: 0; top: 3px;
  border-top: 1px dashed #ffffff; opacity: 0.85;
}
.cruce-etiqueta {
  position: absolute; left: 4px; z-index: 8; transform: translateY(-50%);
  display: flex; align-items: center; gap: 0;
  background: #0b0e11; border: 1px solid #ffffff; border-radius: 3px;
  color: #ffffff; font-size: 10px; font-weight: 600; white-space: nowrap; line-height: 1.2;
  cursor: ns-resize; user-select: none; pointer-events: auto;
}
.cruce-etiqueta .ce-texto { padding: 1px 5px; }
.cruce-etiqueta .ce-borrar {
  padding: 1px 4px; font-size: 9px; border-left: 1px solid rgba(255,255,255,0.5); cursor: pointer;
}
.cruce-etiqueta .ce-borrar:hover { background: rgba(255,255,255,0.15); }
.cruce-linea.hidden, .cruce-etiqueta.hidden { display: none; }

/* Precio del cursor en la columna de precios, por encima del precio actual */
.cursor-precio {
  position: absolute; z-index: 9; pointer-events: none;
  background: #4c525e; color: #ffffff;
  font-family: monospace; font-size: 12px; line-height: 1;
  text-align: center; padding: 4px 0; border-radius: 2px; white-space: nowrap;
}
.cursor-precio.hidden { display: none; }

/* ETF al contado */
.etf-pestanas { display: flex; gap: 4px; margin: 8px 0; }
.etf-pestanas .etf-tab { flex: 1; }
.etf-pestanas .etf-tab.activo { background: var(--accent); color: #0b0e11; }
.etf-hoy { padding: 10px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; }
.etf-hoy .etf-fecha { color: var(--text-dim); font-size: 11px; }
.etf-hoy .etf-total { font-family: var(--mono); font-size: 20px; font-weight: 700; margin: 2px 0 8px; }
.etf-sube { color: #26a69a; }
.etf-baja { color: #ef5350; }
.etf-fila { display: grid; grid-template-columns: 52px 1fr 64px; align-items: center; gap: 6px; font-size: 11px; margin: 3px 0; }
.etf-fila .etf-nombre { font-family: var(--mono); color: var(--text); }
.etf-fila .etf-valor { font-family: var(--mono); text-align: right; }
.etf-barra { height: 8px; background: rgba(255,255,255,0.05); border-radius: 2px; position: relative; overflow: hidden; }
.etf-barra span { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.etf-sub { color: var(--text-dim); font-size: 11px; margin: 10px 0 4px; }

.etf-meses { max-height: 260px; overflow-y: auto; }
.etf-fila-mes { grid-template-columns: 70px 1fr 78px; }


.etf-vistas { display: flex; gap: 4px; margin: 4px 0 8px; }
.etf-vistas .etf-vista { flex: 1; padding: 3px 0; font-size: 11px; }
.etf-vistas .etf-vista.activo { background: var(--accent); color: #0b0e11; }
.etf-fila-mes .etf-nombre { white-space: nowrap; }
.etf-fila-mes { grid-template-columns: 62px 1fr 98px; }
.etf-fila .etf-valor { white-space: nowrap; }

/* Selector de emojis de la barra de herramientas */
.selector-emojis {
  position: fixed; z-index: 1000; width: 360px; max-height: 460px;
  display: flex; flex-direction: column;
  background: #1e222d; border: 1px solid #363a45; border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.selector-emojis.hidden { display: none; }
.se-pestanas { display: flex; border-bottom: 1px solid #363a45; padding: 4px; gap: 2px; }
.se-tab { flex: 1; background: none; border: none; border-bottom: 2px solid transparent; font-size: 18px; padding: 4px 0; cursor: pointer; filter: grayscale(.6); }
.se-tab.activo { border-bottom-color: #2962ff; filter: none; }
.se-tab:hover { filter: none; }
.se-cuerpo { overflow-y: auto; padding: 6px 10px; flex: 1; }
.se-titulo { color: #787b86; font-size: 11px; letter-spacing: .5px; margin: 8px 0 4px; }
.se-rejilla { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; }
.se-emoji { background: none; border: none; font-size: 24px; line-height: 1; padding: 4px 0; border-radius: 6px; cursor: pointer; }
.se-emoji:hover { background: #2a2e39; }
.se-vacio { grid-column: 1 / -1; color: #787b86; font-size: 12px; }
.se-pie { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid #363a45; color: #b2b5be; font-size: 12px; }
.se-pie .se-tamano { flex: 1; }

/* ---------- Trading ---------- */
.tr-cuenta { border: 1px solid var(--line); border-radius: 6px; padding: 8px; margin-bottom: 8px; }
.tr-cuenta .tr-ex { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.tr-cuenta .tr-ex select { flex: 1; }
.tr-demo { font-size: 10px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.tr-num { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; font-size: 11px; color: var(--text-dim); }
.tr-num b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.tr-lados { display: flex; gap: 4px; margin: 6px 0; }
.tr-lado { flex: 1; }
.tr-lado.activo[data-lado="long"] { background: #26a69a; color: #fff; }
.tr-lado.activo[data-lado="short"] { background: #ef5350; color: #fff; }
.tr-fila { display: flex; gap: 4px; margin: 4px 0; }
.tr-fila > * { flex: 1; min-width: 0; }
.tr-etq { display: block; font-size: 11px; color: var(--text-dim); margin: 8px 0 2px; }
#panelTrading input[type=number], #panelTrading select { width: 100%; box-sizing: border-box; }
#trApal { width: 100%; }
.tr-pcts { display: flex; gap: 3px; }
.tr-pct { flex: 1; padding: 2px 0; font-size: 11px; }
.tr-tp { display: grid; grid-template-columns: 1fr 64px 22px; gap: 4px; margin: 3px 0; }
.tr-tp button { padding: 0; }
.tr-mas { width: 100%; font-size: 11px; padding: 3px 0; margin-top: 2px; }
.tr-info { font-size: 11px; color: var(--text-dim); margin: 8px 0; line-height: 1.5; }
.tr-enviar { width: 100%; padding: 8px 0; font-weight: 700; color: #fff; }
.tr-enviar.long { background: #26a69a; } .tr-enviar.short { background: #ef5350; }
.tr-sub { font-size: 11px; color: var(--text-dim); margin: 14px 0 4px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.tr-pos { border: 1px solid var(--line); border-radius: 6px; padding: 6px; margin: 4px 0; font-size: 11px; }
.tr-pos .tr-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.tr-pos .tr-cab b { font-size: 12px; }
.tr-tag { font-size: 10px; padding: 1px 5px; border-radius: 3px; color: #fff; }
.tr-tag.long { background: #26a69a; } .tr-tag.short { background: #ef5350; }
.tr-pnl { font-family: var(--mono); font-weight: 700; }
.tr-sube { color: #26a69a; } .tr-baja { color: #ef5350; }
.tr-pos .tr-det { color: var(--text-dim); line-height: 1.5; }
.tr-pos .tr-bot { display: flex; gap: 3px; margin-top: 4px; }
.tr-pos .tr-bot button { flex: 1; padding: 2px 0; font-size: 10px; }
.tr-vacio { font-size: 11px; color: var(--text-dim); }
.tr-hist { display: grid; grid-template-columns: 1fr auto; font-size: 11px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.tr-hist span:first-child { color: var(--text-dim); }
/* Líneas de la posición en el gráfico */
.tr-linea { position: absolute; left: 0; height: 7px; margin-top: -3px; z-index: 7; pointer-events: none; }
.tr-linea::before { content: ''; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px dashed currentColor; }
.tr-linea.movible { pointer-events: auto; cursor: ns-resize; }
.tr-linea.solida::before { border-top-style: solid; }
.tr-etiq { position: absolute; left: 4px; z-index: 8; transform: translateY(-50%); background: #0b0e11; border: 1px solid currentColor; border-radius: 3px; font-size: 10px; font-weight: 600; padding: 1px 5px; white-space: nowrap; pointer-events: none; }
.tr-linea.hidden, .tr-etiq.hidden { display: none; }
#panelTrading input[type=number], #panelTrading select {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  padding: 6px; border-radius: 3px; font-family: var(--mono); font-size: 12px;
}

/* Asas para sacar SL y TP desde la línea de entrada */
.tr-asas { position: absolute; z-index: 9; transform: translateY(-50%); display: flex; gap: 3px; }
.tr-asa { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; cursor: ns-resize; user-select: none;
  background: #0b0e11; border: 1px solid currentColor; }
.tr-asa.sl { color: #ef5350; }
.tr-asa.tp { color: #26a69a; }
.tr-asa:hover { background: #1e222d; }

.tr-pos .tr-bot-etq { flex: 1.4; font-size: 10px; color: var(--text-dim); align-self: center; }

.tr-quitar { margin-left: 6px; padding: 0 3px; border-left: 1px solid currentColor; cursor: pointer; pointer-events: auto; opacity: .85; }
.tr-quitar:hover { opacity: 1; background: rgba(255,255,255,0.1); }

.tr-modo .tr-modo-b { font-size: 11px; padding: 3px 0; }
.tr-modo .tr-modo-b.activo { background: var(--accent); color: #0b0e11; }

.tr-conectar { flex: 0 0 auto; font-size: 11px; padding: 4px 8px; white-space: nowrap; }
.tr-claves { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.tr-claves.hidden { display: none; }
.tr-clave-ex { margin-bottom: 8px; }
.tr-clave-nombre { font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
#panelTrading .tr-clave { width: 100%; box-sizing: border-box; margin: 2px 0; background: var(--bg); border: 1px solid var(--line);
  color: var(--text); padding: 5px 6px; border-radius: 3px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; }

.tr-conectar.desconectar { color: #ef5350; border-color: rgba(239,83,80,.5); }
.tr-oculto { display: none !important; }
.tr-num.hidden { display: none; }

/* Selector de exchange con logo */
.tr-exsel { position: relative; flex: 1; min-width: 0; }
.tr-exsel-b { width: 100%; display: flex; align-items: center; gap: 8px; padding: 5px 8px; text-align: left; }
.tr-exsel-b .tr-flecha { margin-left: auto; opacity: .7; }
.tr-exsel-menu { position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 20; background: var(--panel, #161a22);
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.tr-exsel-menu.hidden { display: none; }
.tr-exsel-op { display: flex; align-items: center; gap: 8px; padding: 7px 8px; cursor: pointer; font-size: 12px; }
.tr-exsel-op:hover, .tr-exsel-op.activo { background: rgba(255,255,255,0.06); }
.tr-logo { position: relative; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; overflow: hidden;
  background: #2a2e39; display: inline-flex; align-items: center; justify-content: center; }
.tr-logo i { font-style: normal; font-size: 8px; font-weight: 700; color: #c7ccd1; }
.tr-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
/* Claves API plegables */
.tr-claves-t { width: 100%; margin-top: 6px; background: none; border: 1px dashed var(--line); color: var(--text-dim);
  border-radius: 4px; padding: 4px 8px; font-size: 11px; cursor: pointer; display: flex; justify-content: space-between; }
.tr-claves-t:hover { color: var(--text); }

/* Compartir operación */
.co-fondo { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; }
.co-fondo.hidden { display: none; }
.co-caja { background: #161a22; border: 1px solid #2a2e39; border-radius: 10px; padding: 14px; max-width: min(560px, 92vw); }
.co-caja img { width: 100%; border-radius: 8px; display: block; }
.co-botones { display: flex; gap: 6px; margin-top: 10px; }
.co-botones .btn { flex: 1; padding: 8px 0; }
.tr-compartir-h { padding: 0 6px; font-size: 11px; margin-left: 4px; }
.tr-hist span:last-child { white-space: nowrap; }

.tr-irpar { cursor: pointer; border-bottom: 1px dashed rgba(255,255,255,.35); }
.tr-irpar:hover { color: var(--accent); border-bottom-color: var(--accent); }

.co-firma { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--text-dim); }
.co-firma input { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 6px; border-radius: 3px; }
.co-firma .btn { padding: 6px 10px; }

.tr-apals { margin-top: 4px; }
.tr-apal.activo { background: var(--accent); color: #0b0e11; }

.co-firma span { min-width: 118px; }

.bot-cats { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.bot-cat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); cursor: pointer; }

/* Registro: invitación o UID */
.reg-modos { display: flex; gap: 4px; margin-bottom: 12px; }
.reg-modos .reg-modo { flex: 1; font-size: 12px; }
.reg-modos .reg-modo.activo { background: var(--accent); color: #0b0e11; }
.reg-modos.hidden, #grupoInvite.hidden, #grupoUid.hidden { display: none; }
.reg-nota { font-size: 11px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; }
.reg-nota a { color: var(--accent); }

/* Pantalla de inicio con la imagen de fondo (1280x800, con el suelo y el
   cielo alargados para que llene la pantalla sin bandas desenfocadas). */
#authScreen { background: #05070a; overflow: hidden; }
#authScreen::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(rgba(5, 7, 10, 0.05), rgba(5, 7, 10, 0.18)),
    url('/img/fondo-inicio.jpg?v=11') center top / cover no-repeat;
}
/* Pantallas anchas: la imagen sube un poco (el logo queda pegado arriba) para
   que el recuadro de registro quepa entero. */
@media (min-aspect-ratio: 5/4) {
  #authScreen::after {
    background:
      linear-gradient(rgba(5, 7, 10, 0.05), rgba(5, 7, 10, 0.18)),
      url('/img/fondo-inicio.jpg?v=11') center calc(-0.055 * max(100vh, 62.5vw)) / cover no-repeat;
  }
}
@media (max-aspect-ratio: 5/4) {
  #authScreen::after {
    background:
      linear-gradient(rgba(5, 7, 10, 0.55), rgba(5, 7, 10, 0.70)),
      url('/img/fondo-inicio.jpg?v=11') center center / cover no-repeat;
  }
}
@media (min-aspect-ratio: 5/4) {
  /* El recuadro va CENTRADO, debajo de "ANÁLISIS / ESTRATEGIA / RESULTADOS",
     en el hueco que deja la imagen entre la tableta (izquierda) y el
     teléfono (derecha). */
  #authScreen {
    align-items: flex-start;
    justify-content: center;
    padding-top: max(10px, calc(max(100vh, 100vw * 0.625) * 0.268));
    box-sizing: border-box;
  }
  #authScreen .auth-box {
    width: min(340px, 22vw);
    min-width: 280px;
    max-height: calc(100vh - max(10px, calc(max(100vh, 100vw * 0.625) * 0.268)) - 10px);
    padding: 16px 22px;
  }
  body #authScreen > .auth-box {
    background: rgba(10, 12, 17, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  /* Recuadro compacto: sin el logo pequeño (el grande ya está en la imagen) y
     con menos espacio entre campos. */
  #authScreen .login-logo { display: none; }
  #authScreen .auth-box h1 { margin: 0 0 2px; font-size: 18px; }
  #authScreen .auth-box .sub { margin: 2px 0 10px; }
  #authScreen .auth-box .form-group { margin-bottom: 9px; }
  #authScreen .auth-box .form-group label { margin-bottom: 3px; }
  #authScreen .auth-box .reg-modos { margin-bottom: 8px; }
  #authScreen .auth-box .reg-nota { margin-top: 4px; }
}
@media (max-aspect-ratio: 5/4) {
  #authScreen::after {
    background:
      linear-gradient(rgba(5, 7, 10, 0.55), rgba(5, 7, 10, 0.70)),
      url('/img/fondo-inicio.jpg?v=11') center center / cover no-repeat;
  }
}
#authScreen .auth-box {
  position: relative; z-index: 1;
  /* Más transparente para que se vea la tableta del gráfico de detrás. */
  background: rgba(14, 17, 23, 0.45);
  border-color: rgba(240, 185, 11, 0.30);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

/* Campos del inicio un poco más sólidos que el recuadro, para escribir cómodo. */
#authScreen .auth-box input[type=text], #authScreen .auth-box input[type=password] {
  background: rgba(5, 7, 10, 0.72);
}

.reg-exs { display: flex; gap: 4px; margin-bottom: 8px; }
.reg-exs:empty { display: none; }
.reg-exs .reg-ex { flex: 1; font-size: 12px; padding: 4px 0; }
.reg-exs .reg-ex.activo { border-color: var(--accent); color: var(--accent); }

/* El alto máximo del recuadro manda sobre la regla general (si no, en pantallas
   bajas se salía por abajo). En pantallas bajas, campos más compactos. */
@media (min-aspect-ratio: 5/4) {
  body #authScreen > .auth-box {
    max-height: calc(100vh - max(10px, calc(max(100vh, 100vw * 0.625) * 0.268)) - 10px);
    overflow-y: auto;
  }
}
@media (min-aspect-ratio: 5/4) and (max-height: 820px) {
  body #authScreen > .auth-box { padding: 12px 18px; }
  #authScreen .auth-box input[type=text], #authScreen .auth-box input[type=password] { padding: 6px 8px; }
  #authScreen .auth-box .form-group { margin-bottom: 6px; }
  #authScreen .auth-box .tabs button, #authScreen .auth-box .reg-modo, #authScreen .auth-box .reg-ex { padding-top: 5px; padding-bottom: 5px; }
  #authScreen .auth-box .reg-nota { font-size: 10px; line-height: 1.35; }
}

/* ---- Recuperar contraseña y seguridad de la cuenta ---- */
.enlace-olvide { display: block; text-align: center; margin-top: 10px; font-size: 12px; color: var(--accent, #f0b90b); text-decoration: none; }
.enlace-olvide:hover { text-decoration: underline; }
.ok-msg { color: var(--bull, #00c853); font-size: 12px; margin-top: 8px; line-height: 1.45; }
.ok-msg:empty { display: none; }
.seg-titulo { font-size: 12px; font-weight: 600; color: var(--text, #c7ccd1); margin-bottom: 6px; }
.seg-estado { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; line-height: 1.45; word-break: break-all; }
.seg-estado .ok { color: var(--bull, #00c853); }
.seg-estado .pend { color: #f0b90b; }
.aviso-seguridad { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px;
  background: #f0b90b; color: #0b0e11; font-size: 11px; font-weight: 700; margin-left: 4px; }
.user-item .correo-usuario { color: var(--text-dim); font-size: 11px; margin-top: 2px; word-break: break-all; }

/* Anuncio en la pantalla de inicio: abajo a la izquierda, debajo de la tableta
   de la imagen de fondo. Se amplía al pulsarlo. Solo en pantallas anchas. */
.promo-inicio {
  position: absolute; z-index: 2; left: 3.5vw; bottom: 16px;
  /* La imagen mide 1280x1360: el ancho se calcula para que quepa bajo la tableta. */
  width: min(22vw, calc((100vh - max(100vh, 62.5vw) * 0.54 - 28px) * 0.941));
  min-width: 140px; height: auto;
  border-radius: 10px; border: 1px solid rgba(240, 185, 11, 0.45);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(240, 185, 11, 0.15);
  cursor: zoom-in; transition: transform .2s ease;
}
.promo-inicio:hover { transform: scale(1.03); }
.promo-grande { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, 0.8);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.promo-grande.hidden { display: none; }
.promo-grande img { max-width: min(92vw, 820px); max-height: 92vh; border-radius: 12px; box-shadow: 0 10px 50px rgba(0,0,0,.7); }
@media (max-aspect-ratio: 5/4) { .promo-inicio { display: none; } }

/* Enlaces de referido de Bitunix y Bitget en la pantalla de inicio: uno a
   cada lado del recuadro de entrada, con el enlace escrito debajo de cada
   imagen, y el texto explicativo a la derecha. */
.ref-bloque {
  position: absolute; z-index: 2; bottom: 18px;
  width: min(12.5vw, 240px); min-width: 150px;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
}
.ref-bitunix { right: calc(50% + 185px); }
.ref-bitget { left: calc(50% + 185px); }
.ref-banner {
  display: block; border-radius: 10px; overflow: hidden; line-height: 0;
  border: 1px solid rgba(240, 185, 11, 0.45);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(240, 185, 11, 0.15);
  transition: transform .2s ease, box-shadow .2s ease;
}
.ref-banner img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
.ref-banner:hover { transform: scale(1.04); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 22px rgba(240, 185, 11, 0.35); }
.ref-boton {
  display: block; text-align: center; text-decoration: none;
  background: #f0b90b; color: #0b0e11; font-family: var(--sans);
  font-size: clamp(12px, 0.95vw, 15px); font-weight: 700; white-space: nowrap;
  padding: 7px 6px; border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  animation: refLatido 2.4s ease-in-out infinite;
}
.ref-boton:hover { background: #ffd23f; }
@keyframes refLatido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.ref-url {
  display: block; text-align: center; font-family: var(--sans); font-size: 11.5px;
  color: #f5d67a; text-decoration: underline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95);
}
.ref-texto {
  position: absolute; z-index: 2; bottom: 18px;
  left: calc(50% + 185px + min(12.5vw, 240px) + 18px); right: 2vw;
  max-width: 230px; height: calc(min(12.5vw, 240px) * 0.52 + 70px);
  display: flex; align-items: center;
  font-family: var(--sans); font-size: clamp(12px, 1.05vw, 16px); font-weight: 700;
  line-height: 1.35; color: #f0b90b; text-transform: uppercase; letter-spacing: .5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}
/* Sin sitio a los lados (pantallas estrechas o móviles): se ocultan. */
@media (max-aspect-ratio: 5/4), (max-width: 1100px) {
  .ref-bloque, .ref-texto { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ref-boton { animation: none; } }

/* ---- Marca de arriba a la izquierda con el mismo oro que la de abajo ---- */
#topbar .brand > span {
  background: linear-gradient(180deg, #fff6c2 0%, #f9dc7a 28%, #e0ad4a 52%, #b27a2e 76%, #7e5019 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6));
}
[data-theme="light"] #topbar .brand > span { -webkit-text-fill-color: #b8860b; color: #b8860b; background: none; filter: none; }

/* ---- Lupa del buscador de pares: dibujada, más grande y sin el azul del emoji ---- */
.symbol-picker .symbol-picker-icon { opacity: 0.85; font-size: 0; line-height: 0; right: 7px; color: #d6dae0; }
.symbol-picker .symbol-picker-icon svg { width: 17px; height: 17px; display: block; }
.symbol-picker #symbolSearchInput { padding-right: 30px; }

/* ---- Barra de edición de dibujos (arriba del gráfico, como TradingView) ---- */
.barra-dibujo {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 2px;
  padding: 4px 6px; border-radius: 8px;
  background: rgba(58, 52, 58, 0.97); border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
  user-select: none;
}
.barra-dibujo.hidden { display: none; }
.barra-dibujo .bd-asa { width: 18px; height: 30px; display: flex; align-items: center; color: #8d8f97; cursor: grab; }
.barra-dibujo .bd-asa svg { width: 16px; height: 16px; }
.barra-dibujo .bd-btn {
  position: relative; height: 32px; min-width: 34px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; border: none; border-radius: 6px; color: #f2f2f2; cursor: pointer;
}
.barra-dibujo .bd-btn:hover { background: rgba(255, 255, 255, 0.1); }
.barra-dibujo .bd-btn.activo { color: #f0b90b; }
.barra-dibujo .bd-btn > svg { width: 21px; height: 21px; }
.barra-dibujo .bd-color {
  position: absolute; left: 7px; right: 7px; bottom: 3px; height: 4px; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.barra-dibujo .bd-btn:has(.bd-color) > svg { margin-bottom: 5px; }
.barra-dibujo .bd-ancho { gap: 7px; }
.bd-linea { display: inline-block; width: 22px; background: currentColor; border-radius: 2px; }
.barra-dibujo .bd-num { font-family: var(--sans); font-size: 13px; font-weight: 700; }

.barra-dibujo-menu {
  position: absolute; z-index: 61; min-width: 150px; max-width: 280px;
  padding: 8px; border-radius: 8px;
  background: #2a2e39; border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  color: #e8e8e8; font-family: var(--sans); font-size: 12.5px;
}
.barra-dibujo-menu.hidden { display: none; }
.barra-dibujo-menu .bd-titulo { font-weight: 700; margin-bottom: 8px; }
.barra-dibujo-menu .bd-subtitulo { margin: 10px 0 6px; color: #aab0bb; }
.barra-dibujo-menu .bd-input {
  width: 100%; box-sizing: border-box; padding: 7px 8px; border-radius: 5px;
  background: #1a1d24; border: 1px solid #3d4350; color: #fff; font-size: 13px;
}
.barra-dibujo-menu .bd-input:focus { outline: none; border-color: #f0b90b; }
.barra-dibujo-menu .bd-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; color: #c7ccd1; }
.barra-dibujo-menu .bd-fila input[type="number"] { width: 64px; padding: 4px 6px; border-radius: 4px; background: #1a1d24; border: 1px solid #3d4350; color: #fff; }
.barra-dibujo-menu .bd-fila input[type="color"] { width: 36px; height: 24px; padding: 0; border: none; background: none; cursor: pointer; }
.barra-dibujo-menu .bd-grupo { display: inline-flex; gap: 3px; }
.barra-dibujo-menu .bd-alin {
  width: 32px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  background: #1a1d24; border: 1px solid #3d4350; border-radius: 5px; color: #c7ccd1; cursor: pointer;
}
.barra-dibujo-menu .bd-alin.activo { border-color: #f0b90b; color: #f0b90b; }
.barra-dibujo-menu .bd-paleta { display: grid; grid-template-columns: repeat(6, 22px); gap: 6px; }
.barra-dibujo-menu .bd-muestra { width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.2); cursor: pointer; padding: 0; }
.barra-dibujo-menu .bd-muestra.activo { outline: 2px solid #f0b90b; outline-offset: 1px; }
.barra-dibujo-menu .bd-opcion {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px;
  background: transparent; border: none; border-radius: 5px; color: #e8e8e8; cursor: pointer; text-align: left; font-size: 12.5px;
}
.barra-dibujo-menu .bd-opcion:hover { background: rgba(255, 255, 255, 0.08); }
.barra-dibujo-menu .bd-opcion.activo { color: #f0b90b; }
.barra-dibujo-menu .bd-quitar {
  margin-top: 10px; width: 100%; padding: 6px; border-radius: 5px; cursor: pointer;
  background: transparent; border: 1px solid rgba(239, 83, 80, 0.5); color: #ef5350;
}

/* La marca de abajo lleva detrás el mismo tono de la franja de las horas: tapa
   las horas que quedan debajo sin que se vea un recuadro negro. */
#marcaOroFija { background: #000000; border-radius: 3px; }
[data-theme="light"] #marcaOroFija { background: transparent; }
[data-theme="light"] .draw-btn { color: #3a3f47; }
[data-theme="light"] .draw-btn:hover { color: #0b0e11; }
.barra-dibujo .bd-nombre { color: #d6dae0; font-family: var(--sans); font-size: 12.5px; font-weight: 600; padding: 0 8px 0 2px; white-space: nowrap; }
