.table-responsive {
    max-height:300px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay-box {
    min-width: 180px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 14px 16px;
    color: #e2e8f0;
    text-align: center;
}

.loading-overlay-text {
    margin-top: 10px;
    font-size: 0.9rem;
}

.chart-shell {
    position: relative;
}

#chartbtc{
    height: 32rem;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #334155;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
    overflow: hidden;
}

.chart-legend {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 170px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #e2e8f0;
    font-size: 0.84rem;
    z-index: 5;
}

.chart-legend-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    line-height: 1.5;
}

.chart-legend-row span:first-child {
    color: #94a3b8;
}

.legend-signal {
    font-weight: 600;
    text-transform: uppercase;
}

.legend-signal--buy {
    color: #22c55e;
}

.legend-signal--sell {
    color: #ef4444;
}

.legend-signal--neutral {
    color: #fbbf24;
}

.trade-row-new-buy {
    animation: tradeRowFlashBuy 2s ease-out;
}

.trade-row-new-sell {
    animation: tradeRowFlashSell 2s ease-out;
}

@keyframes tradeRowFlashBuy {
    0% {
        background-color: rgba(34, 197, 94, 0.28);
    }
    100% {
        background-color: transparent;
    }
}

.panel-body.table-responsive table {
    min-width: 960px;
}

@media (max-width: 992px) {
    #chartbtc {
        height: 24rem;
    }

    .chart-legend {
        min-width: 140px;
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    #btc-target .col-sm {
        margin-bottom: 12px;
    }
}

@media (max-width: 768px) {
    #chartbtc {
        height: 20rem;
    }

    .chart-legend {
        position: static;
        display: inline-block;
        transform: none;
        margin-top: 8px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@keyframes tradeRowFlashSell {
    0% {
        background-color: rgba(239, 68, 68, 0.28);
    }
    100% {
        background-color: transparent;
    }
}


