/* ═══════════════════════════════════════════════════════════
   MEJORAS EXTRA - LIMPIO Y FUNCIONAL
   ═══════════════════════════════════════════════════════════ */

/* 1. Banner */
.tg-banner {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.15), rgba(0, 204, 255, 0.12)) !important;
    border-bottom: 1px solid rgba(0, 204, 255, 0.4) !important;
}
.tg-banner span { color: #7dd3fc !important; text-shadow: 0 0 10px rgba(0, 204, 255, 0.5) !important; }
.tg-banner a { color: #00ccff !important; text-shadow: 0 0 12px rgba(0, 204, 255, 0.6) !important; }
.tg-dot { background: #00ccff !important; box-shadow: 0 0 12px rgba(0, 204, 255, 0.8) !important; }

/* 2. Actividad en Vivo */
#activity-log-content { overflow-x: hidden !important; }
.activity-item { transition: all 0.3s ease !important; cursor: pointer !important; margin: 2px 0 !important; }
.activity-item:hover { transform: translateY(-3px) !important; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important; z-index: 10 !important; }
.activity-green:hover { background: rgba(0, 255, 136, 0.15) !important; box-shadow: 0 8px 20px rgba(0, 255, 136, 0.25) !important; }
.activity-red:hover { background: rgba(255, 51, 102, 0.15) !important; box-shadow: 0 8px 20px rgba(255, 51, 102, 0.25) !important; }
.activity-blue:hover { background: rgba(0, 170, 255, 0.15) !important; box-shadow: 0 8px 20px rgba(0, 170, 255, 0.25) !important; }
.activity-orange:hover { background: rgba(255, 165, 0, 0.15) !important; box-shadow: 0 8px 20px rgba(255, 165, 0, 0.25) !important; }

/* 3. Tabs */
.tabs button.tab:hover { transform: translateY(-3px) !important; box-shadow: 0 6px 16px rgba(0, 170, 255, 0.3) !important; }

/* 4. Estadísticas */
#stats-detail > div { transition: all 0.3s ease !important; cursor: pointer !important; }
#stats-detail > div:hover { background: rgba(0, 170, 255, 0.12) !important; transform: translateX(4px) !important; box-shadow: 0 2px 8px rgba(0, 170, 255, 0.25) !important; }

/* 5. Racha & Tiempo */
#streak-content > div > div:first-child,
#hold-content > div > div:first-child {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), text-shadow 0.4s ease !important;
    cursor: pointer !important;
}
#streak-content > div > div:first-child:hover { transform: scale(1.3) !important; text-shadow: 0 0 60px currentColor, 0 0 120px currentColor !important; }
#hold-content > div > div:first-child:hover { transform: scale(1.25) !important; text-shadow: 0 0 60px currentColor, 0 0 120px currentColor !important; }

/* 6. KPIs - Mantener colores originales */
.kpi-value:hover, .kpi:hover .kpi-value { color: inherit !important; text-shadow: none !important; }
.kpi-value[style*="var(--green)"]:hover, .kpi-value.cg:hover { color: #00ff88 !important; text-shadow: 0 0 15px rgba(0, 255, 136, 0.8) !important; }
.kpi-value[style*="var(--red)"]:hover, .kpi-value.cr:hover { color: #ff3366 !important; text-shadow: 0 0 15px rgba(255, 51, 102, 0.8) !important; }
.kpi-value[style*="#e2eaf4"]:hover, .kpi-value[style*="var(--text)"]:hover { color: #e2eaf4 !important; text-shadow: none !important; }

/* 7. Métricas Avanzadas - Solo elevación, mantiene color original */
.metric-big-val {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), text-shadow 0.4s ease !important;
    cursor: pointer !important;
    display: inline-block !important;
}
.metric-big-val:hover {
    transform: scale(1.25) !important;
    text-shadow: 0 0 60px currentColor, 0 0 120px currentColor !important;
}

/* ═══════════════════════════════════════════════════════════
   PESTAÑA GRÁFICAS - DINAMISMO PREMIUM
   ═══════════════════════════════════════════════════════════ */

/* Grid de KPIs superiores */
.graficas-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

/* Tarjetas KPI con elevación y brillo */
.graficas-kpi-card {
    background: linear-gradient(135deg, #111d2e 0%, #0d1520 100%);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid #1e2d42;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.graficas-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 170, 255, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.graficas-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 170, 255, 0.25);
    border-color: rgba(0, 170, 255, 0.4);
}

.graficas-kpi-card:hover::before {
    opacity: 1;
}

.graficas-kpi-positive {
    border-color: rgba(0, 255, 136, 0.3);
}

.graficas-kpi-positive:hover {
    box-shadow: 0 12px 32px rgba(0, 255, 136, 0.3);
    border-color: rgba(0, 255, 136, 0.5);
}

.graficas-kpi-negative {
    border-color: rgba(255, 77, 77, 0.3);
}

.graficas-kpi-negative:hover {
    box-shadow: 0 12px 32px rgba(255, 77, 77, 0.3);
    border-color: rgba(255, 77, 77, 0.5);
}

.graficas-kpi-label {
    font-size: 10px;
    color: #4a6080;
    font-family: var(--mono);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.graficas-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: #e2eaf4;
    font-family: var(--mono);
    transition: all 0.3s ease;
}

.graficas-kpi-positive .graficas-kpi-value {
    color: #00e5a0;
    text-shadow: 0 0 15px rgba(0, 229, 160, 0.5);
}

.graficas-kpi-negative .graficas-kpi-value {
    color: #ff4d4d;
    text-shadow: 0 0 15px rgba(255, 77, 77, 0.5);
}

.graficas-kpi-small {
    font-size: 16px;
}

/* Grid de posiciones */
.graficas-positions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media(max-width: 1200px) {
    .graficas-positions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 768px) {
    .graficas-positions-grid {
        grid-template-columns: 1fr;
    }
    .graficas-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tarjeta de posición con elevación premium */
.graficas-position-card {
    background: linear-gradient(135deg, #111d2e 0%, #0d1520 100%);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.graficas-position-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 170, 255, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.graficas-position-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 170, 255, 0.2);
}

.graficas-position-card:hover::after {
    opacity: 1;
}

/* Sección del gráfico */
.graficas-position-chart {
    position: relative;
    height: 100px;
    overflow: hidden;
}

.graficas-position-header {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 100px;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    overflow: hidden;
}

.graficas-ticker {
    font-size: 14px;
    font-weight: 700;
    color: #e2eaf4;
    white-space: nowrap;
}

.graficas-cap-type {
    font-size: 8px;
    font-family: var(--mono);
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

.graficas-cap-large {
    background: rgba(127, 119, 221, 0.2);
    color: #afa9ec;
}

.graficas-cap-small {
    background: rgba(0, 229, 160, 0.15);
    color: #00e5a0;
}

.graficas-bot {
    font-size: 8px;
    font-family: var(--mono);
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: #4a6080;
    white-space: nowrap;
}

.graficas-position-label {
    position: absolute;
    bottom: 8px;
    left: 10px;
    right: 90px;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    overflow: hidden;
}

.graficas-position-label span {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* Cuerpo de la tarjeta */
.graficas-position-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.graficas-position-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.graficas-price-info {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.graficas-price {
    font-size: 17px;
    font-weight: 700;
    color: #e2eaf4;
    font-family: var(--mono);
    transition: all 0.3s ease;
}

.graficas-position-card:hover .graficas-price {
    text-shadow: 0 0 12px rgba(226, 234, 244, 0.5);
}

.graficas-pnl-badge {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 5px;
    font-family: var(--mono);
    font-weight: 600;
}

.graficas-shares {
    font-size: 10px;
    color: #4a6080;
    font-family: var(--mono);
}

.graficas-pnl-eur {
    font-size: 10px;
    color: #4a6080;
    font-family: var(--mono);
}

/* Barra de progreso */
.graficas-progress-section {
    margin-top: 2px;
}

.graficas-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.graficas-sl {
    font-size: 9px;
    color: #ff4d4d;
    font-family: var(--mono);
}

.graficas-entry {
    font-size: 9px;
    color: #4a6080;
    font-family: var(--mono);
}

.graficas-tp {
    font-size: 9px;
    color: #00e5a0;
    font-family: var(--mono);
}

.graficas-progress-bar {
    position: relative;
    height: 8px;
    background: #0d1520;
    border-radius: 5px;
    overflow: visible;
}

.graficas-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 5px;
    opacity: 0.25;
    transition: opacity 0.3s ease;
}

.graficas-position-card:hover .graficas-progress-fill {
    opacity: 0.4;
}

.graficas-progress-entry {
    position: absolute;
    top: -4px;
    transform: translateX(-50%);
    width: 2px;
    height: 16px;
    background: #4a6080;
    border-radius: 1px;
}

.graficas-progress-current {
    position: absolute;
    top: -4px;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #111d2e;
    transition: all 0.3s ease;
}

.graficas-position-card:hover .graficas-progress-current {
    transform: translateX(-50%) scale(1.2);
}

/* Métricas inferiores */
.graficas-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.graficas-metric-card {
    background: #0d1520;
    border-radius: 9px;
    padding: 7px 9px;
    text-align: center;
    transition: all 0.3s ease;
}

.graficas-position-card:hover .graficas-metric-card {
    background: #111d2e;
}

.graficas-metric-label {
    font-size: 8px;
    color: #4a6080;
    font-family: var(--mono);
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.graficas-metric-value {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--mono);
    transition: all 0.3s ease;
}

.graficas-position-card:hover .graficas-metric-value {
    text-shadow: 0 0 10px currentColor;
}

.graficas-metric-score {
    color: #afa9ec;
}

.graficas-metric-max {
    font-size: 9px;
    color: #4a6080;
}

.graficas-metric-bar {
    height: 2px;
    background: #1e2d42;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.graficas-metric-bar > div {
    height: 100%;
    border-radius: 2px;
    transition: all 0.4s ease;
}

.graficas-position-card:hover .graficas-metric-bar > div {
    box-shadow: 0 0 8px currentColor;
}

/* ═══════════════════════════════════════════════════════════
   GRÁFICAS - MEJORAS ESENCIALES (SIN ROMPER NADA)
   ═══════════════════════════════════════════════════════════ */

/* KPIs de gráficas - Elevación suave */
.graficas-kpi-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    cursor: pointer !important;
}

.graficas-kpi-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 170, 255, 0.25) !important;
}

/* KPI positivo (verde) */
.graficas-kpi-positive {
    border: 1px solid rgba(0, 229, 160, 0.5) !important;
    box-shadow: 0 4px 12px rgba(0, 229, 160, 0.15) !important;
}

.graficas-kpi-positive:hover {
    border-color: rgba(0, 229, 160, 0.8) !important;
    box-shadow: 0 12px 32px rgba(0, 229, 160, 0.3) !important;
}

/* KPI negativo (rojo) */
.graficas-kpi-negative {
    border: 1px solid rgba(255, 77, 77, 0.5) !important;
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.15) !important;
}

.graficas-kpi-negative:hover {
    border-color: rgba(255, 77, 77, 0.8) !important;
    box-shadow: 0 12px 32px rgba(255, 77, 77, 0.3) !important;
}

/* Tarjetas de posiciones - Elevación */
.graficas-position-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.graficas-position-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
}

/* Tarjeta positiva */
.graficas-pos-positive {
    border: 1px solid rgba(0, 229, 160, 0.4) !important;
}

.graficas-pos-positive:hover {
    border-color: rgba(0, 229, 160, 0.8) !important;
    box-shadow: 0 16px 40px rgba(0, 229, 160, 0.3) !important;
}

/* Tarjeta negativa */
.graficas-pos-negative {
    border: 1px solid rgba(255, 77, 77, 0.4) !important;
}

.graficas-pos-negative:hover {
    border-color: rgba(255, 77, 77, 0.8) !important;
    box-shadow: 0 16px 40px rgba(255, 77, 77, 0.3) !important;
}

/* Métricas internas */
.graficas-metric-card {
    transition: all 0.3s ease !important;
}

.graficas-position-card:hover .graficas-metric-card {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* ═══════════════════════════════════════════════════════════
   GRÁFICAS - SOBRESCRIBIR ESTILOS INLINE
   ═══════════════════════════════════════════════════════════ */

/* KPIs - Sobrescribir background inline */
.graficas-kpi-card[style*="background:#111d2e"] {
    background: linear-gradient(135deg, #111d2e 0%, #0d1520 100%) !important;
    transition: all 0.3s ease !important;
}

.graficas-kpi-card[style*="background:#111d2e"]:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 170, 255, 0.3) !important;
}

/* Tarjetas de posiciones - Sobrescribir background inline */
.graficas-position-card[style*="background:#111d2e"] {
    background: linear-gradient(135deg, #111d2e 0%, #0d1520 100%) !important;
    transition: all 0.3s ease !important;
}

.graficas-position-card[style*="background:#111d2e"]:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
}

/* ═══════════════════════════════════════════════════════════
   GRÁFICAS - EFECTOS HOVER QUE FUNCIONAN
   ═══════════════════════════════════════════════════════════ */

/* KPIs - Hover con elevación */
.graficas-kpi-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.graficas-kpi-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 32px rgba(0, 170, 255, 0.3) !important;
}

/* KPI Positivo - Verde */
.graficas-kpi-positive {
    border: 1px solid rgba(0, 229, 160, 0.5) !important;
}

.graficas-kpi-positive:hover {
    border-color: rgba(0, 229, 160, 0.8) !important;
    box-shadow: 0 12px 32px rgba(0, 229, 160, 0.35) !important;
}

/* KPI Negativo - Rojo */
.graficas-kpi-negative {
    border: 1px solid rgba(255, 77, 77, 0.5) !important;
}

.graficas-kpi-negative:hover {
    border-color: rgba(255, 77, 77, 0.8) !important;
    box-shadow: 0 12px 32px rgba(255, 77, 77, 0.35) !important;
}

/* Tarjetas de posiciones - Hover */
.graficas-position-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.graficas-position-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
}

/* Tarjeta positiva (verde) */
.graficas-pos-positive:hover {
    box-shadow: 0 16px 40px rgba(0, 229, 160, 0.3) !important;
}

/* Tarjeta negativa (rojo) */
.graficas-pos-negative:hover {
    box-shadow: 0 16px 40px rgba(255, 77, 77, 0.3) !important;
}

/* Métricas internas - Hover */
.graficas-metric-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.graficas-position-card:hover .graficas-metric-card {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Canvas - Brillo en hover */
.graficas-position-card:hover canvas {
    filter: brightness(1.1) !important;
    transition: filter 0.3s ease !important;
}

/* ═══════════════════════════════════════════════════════════
   OPERACIONES - COLORES EN FILAS
   ═══════════════════════════════════════════════════════════ */

/* Hover en filas de operaciones */
.tbl tbody tr {
    transition: all 0.3s ease !important;
}

.tbl tbody tr:hover {
    background: rgba(0, 170, 255, 0.1) !important;
    transform: translateX(4px) !important;
    box-shadow: -4px 0 12px rgba(0, 170, 255, 0.2) !important;
}

/* Fila positiva - Verde */
.tbl tbody tr[style*="rgba(0,229,160,0.06)"] {
    border-left: 3px solid #00e5a0 !important;
}

.tbl tbody tr[style*="rgba(0,229,160,0.06)"]:hover {
    background: rgba(0, 229, 160, 0.12) !important;
    box-shadow: -4px 0 16px rgba(0, 229, 160, 0.3) !important;
}

/* Fila negativa - Rojo */
.tbl tbody tr[style*="rgba(255,77,77,0.06)"] {
    border-left: 3px solid #ff4d4d !important;
}

.tbl tbody tr[style*="rgba(255,77,77,0.06)"]:hover {
    background: rgba(255, 77, 77, 0.12) !important;
    box-shadow: -4px 0 16px rgba(255, 77, 77, 0.3) !important;
}

/* Beneficio en € - Más destacado */
.tbl tbody tr td[style*="font-weight:700"] {
    font-size: 14px !important;
}

/* Porcentaje - Más destacado */
.tbl tbody tr td.mono[style*="color"] {
    font-weight: 600 !important;
}

/* ═══════════════════════════════════════════════════════════
   OPERACIONES - BENEFICIO Y % CON COLORES BRILLANTES
   ═══════════════════════════════════════════════════════════ */

/* Beneficio en € - Verde brillante si positivo */
.tbl tbody tr td.mono.cg[style*="font-weight:700"],
.tbl tbody tr td[style*="font-weight:700"] .cg {
    color: #00ff88 !important;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6), 0 0 20px rgba(0, 255, 136, 0.3) !important;
    font-weight: 700 !important;
}

/* Beneficio en € - Rojo brillante si negativo */
.tbl tbody tr td.mono.cr[style*="font-weight:700"],
.tbl tbody tr td[style*="font-weight:700"] .cr {
    color: #ff4d4d !important;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.6), 0 0 20px rgba(255, 77, 77, 0.3) !important;
    font-weight: 700 !important;
}

/* Porcentaje % - Verde brillante si positivo */
.tbl tbody tr td.mono.cg:not([style*="font-weight:700"]) {
    color: #00ff88 !important;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5) !important;
    font-weight: 600 !important;
}

/* Porcentaje % - Rojo brillante si negativo */
.tbl tbody tr td.mono.cr:not([style*="font-weight:700"]) {
    color: #ff4d4d !important;
    text-shadow: 0 0 8px rgba(255, 77, 77, 0.5) !important;
    font-weight: 600 !important;
}

/* Sobrescribir estilos inline de color en celdas de beneficio */
.tbl tbody tr td[style*="font-weight:700"][style*="color"] {
    color: inherit !important;
}

/* Forzar color verde en celdas con clase cg */
.tbl tbody tr td.cg {
    color: #00ff88 !important;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6) !important;
}

/* Forzar color rojo en celdas con clase cr */
.tbl tbody tr td.cr {
    color: #ff4d4d !important;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.6) !important;
}

/* ═══════════════════════════════════════════════════════════
   OPERACIONES - FONDO DE FILA VISIBLE
   ═══════════════════════════════════════════════════════════ */

/* Quitar fondo a las celdas para que se vea el de la fila */
.tbl tbody tr td {
    background: transparent !important;
}

/* Hacer el fondo de la fila más visible */
.tbl tbody tr[style*="rgba(0,229,160,0.06)"] {
    background: rgba(0, 229, 160, 0.08) !important;
    border-left: 3px solid #00e5a0 !important;
}

.tbl tbody tr[style*="rgba(255,77,77,0.06)"] {
    background: rgba(255, 77, 77, 0.08) !important;
    border-left: 3px solid #ff4d4d !important;
}

/* Hover más visible */
.tbl tbody tr[style*="rgba(0,229,160,0.06)"]:hover {
    background: rgba(0, 229, 160, 0.15) !important;
}

.tbl tbody tr[style*="rgba(255,77,77,0.06)"]:hover {
    background: rgba(255, 77, 77, 0.15) !important;
}

/* ═══════════════════════════════════════════════════════════
   OPERACIONES - FORZAR FONDO EN TODA LA FILA
   ═══════════════════════════════════════════════════════════ */

/* Forzar fondo verde en TODAS las celdas de la fila */
.tbl tbody tr[style*="background:rgba(0,229,160,0.06)"] td {
    background: rgba(0, 229, 160, 0.08) !important;
}

.tbl tbody tr[style*="background:rgba(0,229,160,0.06)"]:hover td {
    background: rgba(0, 229, 160, 0.15) !important;
}

/* Forzar fondo rojo en TODAS las celdas de la fila */
.tbl tbody tr[style*="background:rgba(255,77,77,0.06)"] td {
    background: rgba(255, 77, 77, 0.08) !important;
}

.tbl tbody tr[style*="background:rgba(255,77,77,0.06)"]:hover td {
    background: rgba(255, 77, 77, 0.15) !important;
}

/* Mantener el borde izquierdo */
.tbl tbody tr[style*="border-left:3px solid #00e5a0"] {
    border-left: 3px solid #00e5a0 !important;
}

.tbl tbody tr[style*="border-left:3px solid #ff4d4d"] {
    border-left: 3px solid #ff4d4d !important;
}

/* ═══════════════════════════════════════════════════════════
   SEÑALES - BADGES PROFESIONALES (sin bordes feos)
   ═══════════════════════════════════════════════════════════ */

.badge {
    border: none !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.badge:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5) !important;
}

/* Colores por estado */
.badge.rechazada, .brechazada { 
    background: rgba(255, 77, 77, 0.15) !important; 
    color: #ff6b6b !important; 
}
.badge.pendiente, .bpendiente { 
    background: rgba(240, 192, 64, 0.15) !important; 
    color: #f0c040 !important; 
}
.badge.ejecutada, .bejecutada { 
    background: rgba(0, 229, 160, 0.15) !important; 
    color: #00e5a0 !important; 
}
.badge.expirada, .bexpirada { 
    background: rgba(100, 116, 139, 0.15) !important; 
    color: #94a3b8 !important; 
}

/* ═══════════════════════════════════════════════════════════
   SEÑALES - TASA DE RECHAZO: HOVER ELEVADO + BRILLO
   ═══════════════════════════════════════════════════════════ */

/* Targetear los números grandes de la sección derecha */
div[style*="font-size:32px"], 
div[style*="font-size:36px"],
.kpi-big-num {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    display: inline-block !important;
}

div[style*="font-size:32px"]:hover,
div[style*="font-size:36px"]:hover,
.kpi-big-num:hover {
    transform: translateY(-6px) scale(1.08) !important;
    text-shadow: 0 0 20px currentColor, 0 0 40px currentColor !important;
}

/* Etiquetas debajo de los números */
.stat-label {
    font-size: 11px !important;
    color: #5a6d8a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: color 0.3s ease !important;
}

div[style*="font-size:32px"]:hover + .stat-label,
div[style*="font-size:36px"]:hover + .stat-label {
    color: #94a3b8 !important;
}

/* ═══════════════════════════════════════════════════════════
   SEÑALES - ELIMINAR BARRA AZUL INFERIOR
   ═══════════════════════════════════════════════════════════ */

/* Quitar fondo/borde azul en la tabla de señales */
.tbl-wrap .tbl tbody tr:last-child {
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Eliminar cualquier línea azul inferior */
#signals-content .tbl::after,
#signals-content .tbl::before,
.tbl-wrap::after,
.tbl-wrap::before {
    display: none !important;
}

/* Quitar fondo azul en contenedor */
#signals-content {
    background: transparent !important;
}

/* ═══════════════════════════════════════════════════════════
   ANÁLISIS - ELIMINAR BARRA AZUL INFERIOR
   ═══════════════════════════════════════════════════════════ */

/* Quitar barra azul en tabla de rendimiento mensual */
#analysis-content .tbl::after,
#analysis-content .tbl::before,
#analysis-content .tbl-wrap::after,
#analysis-content .tbl-wrap::before {
    display: none !important;
}

/* Quitar fondo/borde en última fila */
#analysis-content .tbl tbody tr:last-child {
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Eliminar cualquier línea azul inferior genérica */
.tbl-wrap::after {
    display: none !important;
    content: none !important;
    background: none !important;
    height: 0 !important;
}

/* ═══════════════════════════════════════════════════════════
   ANÁLISIS - ELIMINAR BARRA INFERIOR DE TABLA MENSUAL
   ═══════════════════════════════════════════════════════════ */

/* Quitar border-bottom de la última fila */
#monthly-matrix-content table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Quitar border-bottom de todas las celdas del header */
#monthly-matrix-content table thead th {
    border-bottom: none !important;
}

/* Mantener solo bordes laterales sutiles */
#monthly-matrix-content table td,
#monthly-matrix-content table th {
    border-bottom: 1px solid rgba(74, 96, 128, 0.1) !important;
}

/* Última fila sin borde */
#monthly-matrix-content table tbody tr:last-child td {
    border-bottom: none !important;
}

/* ═══════════════════════════════════════════════════════════
   ELIMINAR BARRA AZUL HORIZONTAL - SEÑALES Y ANÁLISIS
   ═══════════════════════════════════════════════════════════ */

/* Ocultar cualquier barra azul inferior en tablas */
#signals-content .tbl-wrap::after,
#signals-content .tbl-wrap::before,
#analysis-content .tbl-wrap::after,
#analysis-content .tbl-wrap::before,
#signals-content .tbl::after,
#signals-content .tbl::before,
#analysis-content .tbl::after,
#analysis-content .tbl::before {
    display: none !important;
    content: none !important;
    background: none !important;
    border: none !important;
    height: 0 !important;
    width: 0 !important;
}

/* Eliminar border-bottom en última fila */
#signals-content .tbl tbody tr:last-child td,
#analysis-content .tbl tbody tr:last-child td,
#monthly-matrix-content table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Ocultar scrollbar horizontal si es azul */
#signals-content .tbl-wrap::-webkit-scrollbar,
#analysis-content .tbl-wrap::-webkit-scrollbar,
#monthly-matrix-content::-webkit-scrollbar {
    height: 0 !important;
    display: none !important;
}

/* Eliminar cualquier línea azul decorativa */
#signals-content::after,
#signals-content::before,
#analysis-content::after,
#analysis-content::before {
    display: none !important;
    content: none !important;
}

/* Forzar sin borde en contenedores */
.tbl-wrap {
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Última tabla sin borde inferior */
.tbl {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

/* ══════════════════════════════════════════════════════════
   POSICIONES - HOVER VERDE/ROJO SEGÚN PNL
   ══════════════════════════════════════════════════════════ */

/* Posición positiva - Hover verde */
.pos-card.pos-positive {
    border-color: rgba(0, 229, 160, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pos-card.pos-positive:hover {
    background: linear-gradient(145deg, rgba(0, 229, 160, 0.08), rgba(11, 15, 28, 0.98)) !important;
    border-color: rgba(0, 229, 160, 0.6) !important;
    box-shadow: 0 20px 60px rgba(0, 229, 160, 0.2), 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    transform: translateY(-6px) !important;
}

.pos-card.pos-positive:hover::before {
    background: linear-gradient(90deg, transparent, #00e5a0, transparent) !important;
    box-shadow: 0 0 20px #00e5a0 !important;
}

/* Posición negativa - Hover rojo */
.pos-card.pos-negative {
    border-color: rgba(255, 77, 77, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pos-card.pos-negative:hover {
    background: linear-gradient(145deg, rgba(255, 77, 77, 0.08), rgba(11, 15, 28, 0.98)) !important;
    border-color: rgba(255, 77, 77, 0.6) !important;
    box-shadow: 0 20px 60px rgba(255, 77, 77, 0.2), 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    transform: translateY(-6px) !important;
}

.pos-card.pos-negative:hover::before {
    background: linear-gradient(90deg, transparent, #ff4d4d, transparent) !important;
    box-shadow: 0 0 20px #ff4d4d !important;
}

/* ══════════════════════════════════════════════════════════
   HEADER SUPERIOR - ELEVACIÓN Y COLORES DINÁMICOS
   ══════════════════════════════════════════════════════════ */

/* Cada sección del header se eleva al hover */
.regime-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    position: relative !important;
}

.regime-item:hover {
    transform: translateY(-4px) !important;
    background: rgba(0, 170, 255, 0.05) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 170, 255, 0.15) !important;
}

/* Valores positivos - Verde brillante */
.regime-val.cg {
    color: #00ff88 !important;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5) !important;
    font-weight: 700 !important;
}

.regime-item:hover .regime-val.cg {
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.8), 0 0 30px rgba(0, 255, 136, 0.4) !important;
}

/* Valores negativos - Rojo brillante */
.regime-val.cr {
    color: #ff4d4d !important;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.5) !important;
    font-weight: 700 !important;
}

.regime-item:hover .regime-val.cr {
    text-shadow: 0 0 15px rgba(255, 77, 77, 0.8), 0 0 30px rgba(255, 77, 77, 0.4) !important;
}

/* Valores neutrales - Cyan */
.regime-val.ct {
    color: #00ccff !important;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5) !important;
    font-weight: 700 !important;
}

.regime-item:hover .regime-val.ct {
    text-shadow: 0 0 15px rgba(0, 204, 255, 0.8), 0 0 30px rgba(0, 204, 255, 0.4) !important;
}

/* ══════════════════════════════════════════════════════════
   BOTS LARGE/SMALL CAPS - MEJORA VISUAL
   ══════════════════════════════════════════════════════════ */

/* Contenedor de bots */
.tg-cap {
    display: flex !important;
    gap: 12px !important;
    padding: 0 12px !important;
    border-left: 1px solid rgba(74, 96, 128, 0.2) !important;
    margin-left: 8px !important;
}

/* Cada bot como tarjeta independiente */
.tg-cap .regime-item {
    background: linear-gradient(135deg, rgba(15, 21, 37, 0.6), rgba(11, 15, 28, 0.8)) !important;
    border: 1px solid rgba(0, 170, 255, 0.2) !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    min-width: 140px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tg-cap .regime-item:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(0, 170, 255, 0.5) !important;
    box-shadow: 0 12px 32px rgba(0, 170, 255, 0.25), 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.08), rgba(11, 15, 28, 0.9)) !important;
}

/* Etiqueta del bot */
.tg-cap .regime-label {
    font-size: 10px !important;
    color: #5a6d8a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 4px !important;
}

/* Valor del bot (€) */
.tg-cap .regime-val {
    font-size: 18px !important;
    font-weight: 800 !important;
    font-family: 'JetBrains Mono', monospace !important;
    display: block !important;
}

/* Bot Large Caps - Azul/Purple */
.tg-cap .regime-item:first-child {
    border-color: rgba(170, 85, 255, 0.3) !important;
}

.tg-cap .regime-item:first-child:hover {
    border-color: rgba(170, 85, 255, 0.6) !important;
    box-shadow: 0 12px 32px rgba(170, 85, 255, 0.25), 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.tg-cap .regime-item:first-child .regime-val {
    color: #cc88ff !important;
    text-shadow: 0 0 12px rgba(170, 85, 255, 0.6) !important;
}

/* Bot Small Caps - Cyan */
.tg-cap .regime-item:last-child {
    border-color: rgba(0, 200, 255, 0.3) !important;
}

.tg-cap .regime-item:last-child:hover {
    border-color: rgba(0, 200, 255, 0.6) !important;
    box-shadow: 0 12px 32px rgba(0, 200, 255, 0.25), 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.tg-cap .regime-item:last-child .regime-val {
    color: #00ccff !important;
    text-shadow: 0 0 12px rgba(0, 200, 255, 0.6) !important;
}

/* ══════════════════════════════════════════════════════════
   HEADER SUPERIOR - TODO CENTRADO
   ══════════════════════════════════════════════════════════ */

/* Barra de régimen centrada */
.regime-bar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    padding: 12px 20px !important;
}

/* Cada item centrado */
.regime-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-width: 100px !important;
}

/* Etiquetas centradas */
.regime-label {
    display: block !important;
    text-align: center !important;
    margin-bottom: 4px !important;
}

/* Valores centrados */
.regime-val {
    display: block !important;
    text-align: center !important;
}

/* Contenedor de bots centrado */
.tg-cap {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Responsive: en pantallas pequeñas ajustar */
@media (max-width: 1200px) {
    .regime-bar {
        gap: 12px !important;
        padding: 10px 16px !important;
    }
    
    .regime-item {
        min-width: 80px !important;
    }
}

/* ══════════════════════════════════════════════════════════
   MÓVIL - SEPARADOR ENTRE BOTS
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Quitar border-left del contenedor de bots */
    .tg-cap {
        border-left: none !important;
        margin-left: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }
    
    /* Línea separadora vertical entre los dos bots */
    .tg-cap .regime-item:first-child {
        border-right: 1px solid rgba(74, 96, 128, 0.3) !important;
        border-radius: 10px 0 0 10px !important;
    }
    
    .tg-cap .regime-item:last-child {
        border-radius: 0 10px 10px 0 !important;
    }
    
    /* Asegurar que los bots estén juntos */
    .tg-cap {
        gap: 0 !important;
    }
}

/* ══════════════════════════════════════════════════════════
   MÓVIL - ELIMINAR LÍNEA HORIZONTAL ENCIMA DE BOTS
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Eliminar línea horizontal encima de los bots */
    .tg-cap::before,
    .tg-cap::after {
        display: none !important;
        content: none !important;
        border: none !important;
        background: none !important;
        height: 0 !important;
    }
    
    /* Eliminar cualquier borde superior en los bots */
    .tg-cap .regime-item:first-child,
    .tg-cap .regime-item:last-child {
        border-top: none !important;
    }
    
    /* Eliminar líneas horizontales del contenedor padre */
    .regime-bar .tg-cap {
        border-top: none !important;
        box-shadow: none !important;
    }
    
    /* Bajar un poco los bots para separarlos de la línea de Mercado */
    .tg-cap {
        margin-top: 16px !important;
        padding-top: 16px !important;
    }
    
    /* Eliminar cualquier pseudo-elemento que genere línea */
    .regime-item::before,
    .regime-item::after {
        display: none !important;
        content: none !important;
    }
}

/* ═══ CLASES AÑADIDAS PARA COMPATIBILIDAD ═══ */

.graficas-kpi-card {
    background: #111d2e;
    border-radius: 10px;
    padding: 11px 13px;
    border: 1px solid #1e2d42;
    transition: all 0.3s ease;
}

.graficas-kpi-card:hover {
    border-color: #2a4a6b;
    transform: translateY(-2px);
}

.graficas-kpi-neutral {
    border-left: 3px solid #6c757d;
}

.graficas-kpi-positive {
    border-left: 3px solid #00e5a0;
    background: linear-gradient(135deg, #111d2e 0%, #0d2818 100%);
}

.graficas-kpi-negative {
    border-left: 3px solid #ff4757;
    background: linear-gradient(135deg, #111d2e 0%, #2d0d0d 100%);
}

.graficas-metric-card {
    background: #0d1520;
    border-radius: 8px;
    padding: 6px 8px;
    text-align: center;
    border: 1px solid #1e2d42;
}

.graficas-position-card {
    background: #111d2e;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #1e2d42;
    transition: all 0.3s ease;
}

.graficas-position-card:hover {
    border-color: #2a4a6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.graficas-pos-positive {
    border-left: 4px solid #00e5a0;
}

.graficas-pos-negative {
    border-left: 4px solid #ff4757;
}

.pos-positive {
    color: #00e5a0 !important;
}

.pos-negative {
    color: #ff4757 !important;
}

/* Mejoras adicionales para cards */
.pos-card {
    transition: all 0.3s ease;
}

.pos-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
