/* ============ Cryptos Market Watch — tema oscuro ============ */
:root {
  --bg: #0e1117;
  --bg-soft: #161b26;
  --bg-card: #1a2130;
  --border: #2a3245;
  --text: #e6e9ef;
  --muted: #8b93a7;
  --up: #22c55e;
  --down: #ef4444;
  --accent: #f0b90b; /* guiño a Binance */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--down); min-height: 1.2em; }

/* ---------- Login ---------- */
.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-card input {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
}
.login-card button {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #111;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
}

/* ---------- Estructura ---------- */
.brand { color: var(--accent); font-weight: 700; white-space: nowrap; }
.brand.big { font-size: 28px; text-align: center; }

header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}

#ticker-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  flex: 1;
  font-variant-numeric: tabular-nums;
}
.ticker-item { cursor: pointer; white-space: nowrap; }
.ticker-item .sym { color: var(--muted); margin-right: 6px; }

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 53px);
}

aside {
  border-right: 1px solid var(--border);
  padding: 16px;
}
aside h2 { font-size: 13px; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }

#watchlist { list-style: none; margin: 0 0 12px; padding: 0; }
#watchlist li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
#watchlist li:hover { background: var(--bg-soft); }
#watchlist li.active { background: var(--bg-card); color: var(--accent); font-weight: 600; }
#watchlist .remove {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px;
  visibility: hidden;
}
#watchlist li:hover .remove { visibility: visible; }

#add-symbol-form { display: flex; gap: 6px; }
.autocomplete { position: relative; flex: 1; min-width: 0; }
#add-symbol-form input {
  width: 100%;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 8px 10px;
}
#add-symbol-form button {
  background: var(--accent); border: none; border-radius: 8px;
  width: 34px; font-size: 16px; font-weight: 700; cursor: pointer;
}

/* ---------- Autocompletado de símbolos ---------- */
#suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  list-style: none;
  margin: 0; padding: 4px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
#suggestions li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
#suggestions li:hover, #suggestions li.active { background: var(--bg-soft); }
#suggestions .base { font-weight: 650; }
#suggestions .name {
  color: var(--muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#suggestions .pair { font-size: 11px; }

main { padding: 16px 20px; min-width: 0; }

.symbol-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.symbol-bar h1 { margin: 0; font-size: 22px; }

.bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-ia {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #06b6d4;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-ia:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(139, 92, 246, 0.25));
  border-color: #06b6d4;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
  transform: translateY(-1px);
}

.btn-ia.active {
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
}

.btn-ia:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Botón 2: Briefing IA (Qwen 3.8 Flash) - Esmeralda / Cian */
.btn-brief {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.btn-brief:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.25));
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.btn-brief.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(6, 182, 212, 0.35));
  color: #a7f3d0;
  border-color: #10b981;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.btn-brief:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Botón 3: Autopsia Forense de Mercado - Púrpura / Magenta */
.btn-forensic {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.btn-forensic:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.25));
  border-color: #a855f7;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

.btn-forensic.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(236, 72, 153, 0.35));
  color: #f5d0fe;
  border-color: #a855f7;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.35);
}

.btn-forensic:disabled {
  opacity: 0.5;
  cursor: wait;
}

.ia-card {
  background: linear-gradient(180deg, rgba(14, 21, 35, 0.8), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 10px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ia-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ia-badge {
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.bullish {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.badge.bearish {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.badge.neutral {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.ia-summary {
  font-weight: 600;
  font-size: 13px;
  flex: 1;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
}
.close-btn:hover { color: #fff; background: var(--bg-soft); }

.ia-details {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  font-size: 12px;
  flex-wrap: wrap;
}

#timeframes button, .tabs button {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted);
  padding: 6px 12px; cursor: pointer;
}
#timeframes button:first-child { border-radius: 8px 0 0 8px; }
#timeframes button:last-child { border-radius: 0 8px 8px 0; }
#timeframes button.active, .tabs button.active { color: var(--accent); border-color: var(--accent); }
#timeframes button:disabled { opacity: .35; cursor: not-allowed; }

#data-notice { min-height: 1.2em; margin: 4px 0 0; }

/* ---------- Stats ---------- */
#stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.stat-card .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .value { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- Tabs y gráficos ---------- */
.tabs { margin-bottom: 12px; }
.tabs button:first-child { border-radius: 8px 0 0 8px; }
.tabs button:last-child { border-radius: 0 8px 8px 0; }

.chart { width: 100%; }
.chart.tall { height: 420px; }
.chart.small { height: 160px; }

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.card h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 12px;
}

#main-chart { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }

/* ---------- Auditoría IA y Tablas ---------- */
.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.table-card {
  margin-top: 10px;
}

.table-responsive {
  overflow-x: auto;
  max-height: 480px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(42, 50, 69, 0.4);
  white-space: nowrap;
}

.data-table tr:hover td {
  background: var(--bg-soft);
}

.badge.hit {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge.miss {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge.pending {
  background: rgba(240, 185, 11, 0.15);
  color: #f0b90b;
  border: 1px solid rgba(240, 185, 11, 0.3);
}

/* ---------- Estrategia y Filtros Cuantitativos ---------- */
.strategy-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.strategy-config-card, .strategy-sim-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.filter-controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .filter-controls-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.filter-item {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.switch-item {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.filter-badge-val {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.4);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
}

/* Custom Range Slider */
.slider-container input[type="range"] {
  width: 100%;
  accent-color: #00f0ff;
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #2a3245;
  transition: .3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: .3s;
  border-radius: 50%;
}

.switch input:checked + .switch-slider {
  background-color: #00f0ff;
}

.switch input:checked + .switch-slider:before {
  transform: translateX(20px);
  background-color: #0f172a;
}

/* Simulación parámetros */
.sim-params-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  background: var(--bg-soft);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sim-param-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-param-item label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-small {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.input-small:focus {
  border-color: #00f0ff;
}

.sim-date-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-btn-container {
  margin-left: auto;
}

.select-small {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.select-small:focus {
  border-color: #00f0ff;
}

.badge.strategy-valid {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge.strategy-filtered {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.success-text { color: #10b981; }
.warning-text { color: #f59e0b; }
.danger-text { color: #ef4444; }
.mt-1 { margin-top: 4px; }

.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  aside { border-right: none; border-bottom: 1px solid var(--border); }
  .chart-row { grid-template-columns: 1fr; }
  .chart.tall { height: 320px; }
  .sim-actions { flex-direction: column; align-items: stretch; }
}

/* ---------- Botón y Tarjeta Quant ML ---------- */
.btn-ml {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(249, 115, 22, 0.15));
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #eab308;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-ml:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(249, 115, 22, 0.25));
  border-color: #eab308;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.25);
  transform: translateY(-1px);
}

.btn-ml.active {
  background: linear-gradient(135deg, #eab308, #f97316);
  color: #0b0f19;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.4);
}

.btn-ml:disabled {
  opacity: 0.5;
  cursor: wait;
}

.ml-card {
  background: linear-gradient(180deg, rgba(20, 24, 38, 0.85), rgba(26, 32, 53, 0.95));
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 10px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.25s ease;
}

.ml-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ml-badge {
  background: linear-gradient(135deg, #eab308, #f97316);
  color: #0b0f19;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ml-summary {
  font-weight: 600;
  font-size: 13px;
  color: #f8fafc;
}

.ml-plan-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ml-plan-item {
  font-size: 12px;
}

.ml-factors-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.factors-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.factor-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: #cbd5e1;
}

.symbol-chip {
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  transition: all 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.symbol-chip:hover {
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}

.symbol-chip.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.ml-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

/* ---------- Notificaciones Toast (Reemplazo de alert nativo) ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 440px;
  width: calc(100% - 48px);
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #f8fafc;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast.hide {
  transform: translateY(8px) scale(0.94);
  opacity: 0;
}

.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-message {
  flex-grow: 1;
  word-break: break-word;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  opacity: 1;
  color: #fff;
}

.toast.toast-error {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, rgba(32, 16, 24, 0.97), rgba(20, 24, 38, 0.97));
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.25);
}
.toast.toast-error .toast-icon {
  color: #ef4444;
}

.toast.toast-success {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, rgba(14, 34, 23, 0.97), rgba(20, 24, 38, 0.97));
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.25);
}
.toast.toast-success .toast-icon {
  color: #22c55e;
}

.toast.toast-warning {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(34, 27, 14, 0.97), rgba(20, 24, 38, 0.97));
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.25);
}
.toast.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast.toast-info {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(14, 27, 42, 0.97), rgba(20, 24, 38, 0.97));
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.25);
}
.toast.toast-info .toast-icon {
  color: #38bdf8;
}

/* ---------- Cockpit Financiero y Widget de Cartera ---------- */
.header-portfolio-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 27, 38, 0.85);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.header-portfolio-chip:hover {
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.95);
}
.header-portfolio-chip strong {
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
}

.portfolio-hero-card {
  background: linear-gradient(180deg, rgba(20, 27, 45, 0.85), rgba(15, 20, 32, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.portfolio-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 14px;
}

.portfolio-status-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.portfolio-status-banner.bullish {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}
.portfolio-status-banner.bearish {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.portfolio-status-banner.neutral {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.stat-card.highlight {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(56, 189, 248, 0.25);
}
.stat-card .value.text-large {
  font-size: 22px;
  font-weight: 700;
}
.font-bold {
  font-weight: 700;
}

