.market-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.market-widget {
    min-width: 190px;
    max-width: 160px;
    flex: 1 1 23%;
    border-radius: 0.5rem;
    background-color: #1e1e1e;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    padding: 0 1rem;
}

.market-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.market-title-text {
    color: #4fc3f7;
}

.market-value {
    font-size: 1.2rem;
    font-weight: bold;
}

.market-change {
    font-size: 0.95rem;
}

.market-change .fa-caret-up,
.market-change .fa-caret-down {
    margin-right: 4px;
}

.market_cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget-success {
    color: var(--green);
}

.widget-danger {
    color: var(--red);
}

.analytics-logo {
    display: flex;
    align-items: center;
}

.analytics-logo img {
    height: 32px;
    margin-right: 12px;
}

.analytics-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.strategy-btn {
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, outline-color 0.2s ease;
}

.strategy-btn-primary {
    background-color: #1546c3;
}

.strategy-btn-secondary {
    background-color: #007e92;
}

.strategy-btn-tertiary {
    background-color: #0ca25c;
}

.strategy-btn.is-active {
    outline: 2px solid #facc15;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.7);
    transform: scale(1.05);
}

.date-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.analytics-heading-icon {
    margin-right: 5px;
}

#selectDate {
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #000;
    padding: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#stockTable thead {
    background-color: #1e1e1e;
    color: #ccc;
}

@media (prefers-color-scheme: dark) {
    #selectDate {
        border-color: #444;
        background-color: #1e1e1e;
        color: #f5f5f5;
    }

    #selectDate::-webkit-calendar-picker-indicator {
        filter: invert(1);
    }
}

@media (max-width: 768px) {
    .market-widget {
        padding: 0 0.5rem;
    }

    .market_cards {
        flex-direction: column;
        text-align: center;
    }
}
